A behavior monitoring system for silkworm spinning state
By using a behavior monitoring system with spatiotemporal coherence length verification and dynamic feedforward gain adjustment, the problem of image feature annihilation caused by high-density fiber occlusion and environmental noise interference during silkworm spinning was solved, and accurate monitoring of silkworm behavior and automatic adjustment of environmental parameters were achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHANDONG INST OF SERICULTURE
- Filing Date
- 2026-06-26
- Publication Date
- 2026-07-31
AI Technical Summary
Under closed parallel tracking conditions, the image features are obscured due to high-density fiber occlusion and environmental noise interference during the silkworm spinning process. Existing technologies cannot effectively separate the background tensor and extract weak behavioral features.
The system employs a frame data acquisition module, a grid spatiotemporal analysis module, a feedforward weight calibration module, a feature map assembly module, and a probabilistic state arbitration module. By verifying the spatiotemporal coherence length and adjusting the dynamic feedforward gain, it separates weak behavioral features under high scattering occlusion and generates a global nonlinear behavioral feature map.
It effectively eliminates environmental noise interference, extracts and presents subtle biological movement characteristics, enables accurate monitoring of silkworm spinning and determination of critical evolution of cocooning state, and supports automated adjustment of environmental parameters.
Smart Images

Figure CN122493530A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of behavior monitoring technology, and in particular to a behavior monitoring system for silkworms spinning silk. Background Technology
[0002] Currently, in automated production in facility agriculture, image sensors are used to acquire continuous video sequences and identify specific movements, forming a conventional method for determining the physiological characteristics and growth status of organisms. Two-dimensional pixel matrices are used to extract the edge contours, geometric features, and spatiotemporal motion features of target objects. Feature mapping relationships are established by combining pixel changes between consecutive frames, providing a basis for action state decisions for subsequent control loops. However, in closed parallel tracking conditions, the fine fiber materials discharged by the work object during its movement evolution form a high-density network occlusion medium in the closed-loop space. As the process progresses, the densely interwoven fibers obstruct light transmission and cause a large-scale attenuation of field contrast, resulting in a severe and unpredictable self-occlusion phenomenon of the target object's true contour. At the same time, the weak resonance of the cabin caused by external airflow, along with the spatial in-phase flicker generated by the lighting system under a specific power grid frequency, superimposes a large number of spatiotemporally coherent low-frequency artifacts in the video stream, causing the weak swaying trajectory of the core target to be completely buried in the dynamic background noise.
[0003] The existing hardware environment and acquisition methods have physical limitations, and the related information processing software control methods also have shortcomings. For example, Chinese invention patent application CN115439789A discloses an intelligent identification method and system for the life status of silkworms. In practical applications, it implicitly relies on the objective premise of clear silkworm image features and stable identification of key points of various parts of the individual. Under the condition of group-reared silkworms spinning silk and forming cocoons in parallel, the high-dissipation dense silk netting and large-scale contrast attenuation can easily lead to long-term and large-area feature annihilation of discrete key points such as the geometric edges and back markings of silkworms, causing the solution to lose the matching image calculation. The loss of features leads to a logical break in the state determination, causing disordered jumps in the probability matrix time axis. To overcome the logical break caused by feature loss, the common improvement approach of increasing the global grayscale threshold or cascading multi-order linear filters will amplify the spatial noise generated by the high scattering network by the same factor in practical applications, which will instead exacerbate the pixel semantic confusion at the image level. While simply increasing the order of the temporal smoothing filter can suppress some flicker artifacts, it inevitably introduces a large signal calculation delay and is more likely to erase transient change operators in weak signals, resulting in disordered jumps and logical breaks in the probability matrix output by the decision bus in the time axis direction.
[0004] Therefore, how to separate the high-dissipation background tensor from the transient motion spectrum, and how to remove environmental in-phase flicker noise through spatiotemporal coherence length verification to extract weak behavioral features under high scattering occlusion, has become the technical problem to be solved by this invention. Summary of the Invention
[0005] To address the problems in the background art, the present invention provides the following technical solution: a behavior monitoring system for silkworm spinning, comprising: The frame data acquisition module is used to acquire the original video frame sequence inside the silkworm rearing chamber; The grid spatiotemporal analysis module has its input end connected to the output end of the frame data acquisition module. It is used to divide the original video frame sequence into logical grid units, obtain the direction distribution variation index by calculating the spatial principal direction derivative of the pixels in each logical grid unit, and compare the residuals of adjacent timestamps on the time axis to generate a spatiotemporal coherence length index. The feedforward weight calibration module, whose input is connected to the output signal of the grid spatiotemporal analysis module, is used to adjust the dynamic feedforward gain factor step by step to the upper limit of the saturation constant, which is used as the system calibration constant, when the gray-scale contrast of the logic grid unit is continuously attenuated due to the scattering of the wire mesh. It also uses the dynamic feedforward gain factor to perform in-situ nonlinear symbol amplification of the differential motion vector in the logic grid unit. The feature map assembly module, whose input end is connected to the output end of the feedforward weight calibration module, is used to perform matrix splicing of the amplified differential motion vectors of each logic grid unit according to the original spatial topology to generate a global nonlinear behavior feature map. The probabilistic state arbitration module, whose input is connected to the output signal of the feature map assembly module, is used to determine and output the critical evolution state arbitration data of the silkworm's transition from the silk-spinning state to the cocooning state to the external control gateway based on the global nonlinear behavior feature map.
[0006] Preferably, the system further includes a window control module; the input of the window control module is connected to the output of the frame data acquisition module, and the output of the window control module is connected to the input of the probabilistic state arbitration module; when the frame data acquisition module acquires the original video frame sequence, the window control module is used to calculate the sum of the absolute differences of the background reference tensors at adjacent time points to determine the global ambient light variation rate; when the global ambient light variation rate reaches the preset ambient light variation threshold constant, the window control module performs step-by-step truncation and shortening of the historical frame temporal sliding window to eliminate global in-phase creep noise and light source flicker interference, and inputs the shortened historical frame temporal sliding window into the probabilistic state arbitration module as the basis for calculating the critical evolution state arbitration data.
[0007] Preferably, the grid spatiotemporal analysis module includes a gradient extraction unit and a frequency statistics unit. When the grid spatiotemporal analysis module divides the original video frame sequence into logical grid units, the gradient extraction unit is used to extract pixel grayscale gradient vectors along the horizontal and vertical directions of the logical grid units, and determine the spatial principal direction derivative based on the tangent value of the pixel grayscale gradient vector. The frequency statistics unit is connected to the gradient extraction unit and is used to count the cumulative frequency of the spatial principal direction derivative deviating from the preset historical benchmark mean within a fixed time sliding window, and output the cumulative frequency as a direction distribution variation index.
[0008] Preferably, the grid spatiotemporal analysis module includes a timestamp residual calculation unit and a coherent event accumulation unit. The timestamp residual calculation unit is used to calculate the absolute grayscale residual between corresponding logical grid units between adjacent timestamps. When the absolute grayscale residual is lower than the preset grayscale residual threshold, the coherent event accumulation unit is connected to the timestamp residual calculation unit to record local spatiotemporal coherent events and to count the maximum temporal continuous span of consecutively occurring local spatiotemporal coherent events so as to output the maximum temporal continuous span as a spatiotemporal coherence length index.
[0009] Preferably, the feedforward weight calibration module includes a gain factor adjustment unit and a nonlinear amplification unit. The gain factor adjustment unit receives the spatiotemporal coherence length index and, when the grayscale contrast of the logic grid unit continuously decays to a preset contrast threshold, adjusts the dynamic feedforward gain factor according to a preset step size until the upper limit of the saturation constant. The nonlinear amplification unit is signal-connected to the gain factor adjustment unit and is used to extract the differential motion vector of each pixel in the logic grid unit. The amplitude of the differential motion vector is multiplied by the dynamic feedforward gain factor to complete the in-situ nonlinear sign amplification of the differential motion vector while keeping the original algebraic sign of the differential motion vector unchanged.
[0010] Preferably, the feature map assembly module includes a topology mapping unit and a map stretching unit. The topology mapping unit is used to spatially align the differential motion vectors of each logic grid unit after in-situ nonlinear symbol amplification according to the two-dimensional topological coordinates in the original video frame sequence. The map stretching unit is signal-connected to the topology mapping unit and is used to stitch the aligned differential motion vectors into a behavior matrix of the complete field of view image dimension to increase the behavior amplitude and generate a global nonlinear behavior feature map.
[0011] Preferably, the system further includes a cocooning critical change rate analysis module; the input of the cocooning critical change rate analysis module is connected to the output of the probabilistic state arbitration module; after the probabilistic state arbitration module outputs critical evolution state arbitration data, the cocooning critical change rate analysis module is used to record critical evolution state arbitration data at different timestamps to construct a state change time sequence queue, and obtain the cocooning state transition rate index by calculating the first-order difference of the state change time sequence queue; when the cocooning state transition rate index continuously exceeds the preset rate transition constant threshold, the cocooning critical change rate analysis module is used to output the cocooning state transition critical evolution node signal.
[0012] Preferably, the system also includes an external control interface; the external control interface is connected to the cocooning critical change rate analysis module to convert the cocooning state transition critical evolution node signal into industrial control bus data, and transmit the industrial control bus data to the environmental regulation automation control system outside the silkworm rearing chamber through the data link network to regulate the ambient temperature, ambient humidity and light intensity inside the silkworm rearing chamber.
[0013] Preferably, the image resolution of the original video frame sequence acquired by the frame data acquisition module is 1920×1080, the sampling frequency is 30Hz, the grid size of each logical grid unit is 16px×16px, and the initial comparison interval length of adjacent timestamps on the time axis is 5 timestamp units.
[0014] The beneficial effects of this invention are:
[0015] 1. In the behavior monitoring of silkworms spinning silk, the video frame serial input and transfer unit divides the original image into orthogonal distributed local logic grid units, cutting off the system's direct dependence on the overall geometric contour of the object. In the dual-track processing architecture, the overall background adaptive smoothing and suppression subsystem separates the real-time background reference tensor from the continuous gray-level distortion through long time window smoothing. At the same time, the high-frequency surface trajectory feature space decoupling subsystem extracts the dynamic differential trajectory map containing the target head swaying features through short time window difference operation algorithm, completely decoupling the local high-frequency pixel changes from the low-frequency spatial background. Finally, the discrete behavior semantic state probability arbitration unit completes the adaptive masking region pixel compensation based on the background reference tensor.
[0016] 2. The spatiotemporal coherence length matrix calculation unit dynamically monitors the grayscale changes of each logical grid unit within a short time window, extracts the spatial principal direction derivative of each pixel, and calculates the direction distribution change index reflecting the dynamic fluctuation law of local field of view pixels. The absolute residual of adjacent timestamps is calculated by the time axis sliding comparator to determine local spatiotemporal coherent events and accumulates to generate a spatiotemporal coherence length index. Combined with the two-level truncation and enhancement rules solidified by the feedforward weight calibration module, the low-frequency global in-phase creep noise and surface periodic oscillation features are asymmetrically stripped at the feature generation front end based on the discrete differences of coherence characteristics, eliminating the impact of environmental mechanical resonance and light source flicker on the state decision unit.
[0017] 3. The feedforward weight calibration module receives the spatiotemporal coherence length index and calls the discrete gradient mapping rule. When the absolute grayscale contrast in a specific grid area is continuously attenuated due to scattering and occlusion by the mesh object, the system steps up the dynamic feedforward gain factor to the upper limit of the constant value, and performs in-situ nonlinear symbol amplification on the differential motion vector in the grid. The assembly unit then completes the splicing of each calibrated local discrete coherent behavior feature matrix according to the original spatial topology, thereby generating a global nonlinear derived behavior feature map, so that the weak biological motion features originally hidden in the high spatial scattering noise present a step-like amplitude transition stretch in the global feature map. Attached Figure Description
[0018] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort, wherein: Figure 1 This is a schematic diagram of the composition structure of a behavior monitoring system for silkworm spinning state according to the present invention; Figure 2 This is a state transition diagram for a behavior monitoring system of silkworms during silk spinning, according to the present invention. Detailed Implementation
[0019] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the protection scope of the present invention.
[0020] A behavior monitoring system for silkworms during silk spinning includes: The frame data acquisition module is used to acquire the original video frame sequence inside the silkworm rearing chamber; The grid spatiotemporal analysis module has its input end connected to the output end of the frame data acquisition module. It is used to divide the original video frame sequence into logical grid units, obtain the direction distribution variation index by calculating the spatial principal direction derivative of the pixels in each logical grid unit, and compare the residuals of adjacent timestamps on the time axis to generate a spatiotemporal coherence length index. The feedforward weight calibration module, whose input is connected to the output signal of the grid spatiotemporal analysis module, is used to adjust the dynamic feedforward gain factor step by step to the upper limit of the saturation constant, which is used as the system calibration constant, when the gray-scale contrast of the logic grid unit is continuously attenuated due to the scattering of the wire mesh. It also uses the dynamic feedforward gain factor to perform in-situ nonlinear symbol amplification of the differential motion vector in the logic grid unit. The feature map assembly module, whose input end is connected to the output end of the feedforward weight calibration module, is used to perform matrix splicing of the amplified differential motion vectors of each logic grid unit according to the original spatial topology to generate a global nonlinear behavior feature map. The probabilistic state arbitration module, whose input is connected to the output signal of the feature map assembly module, is used to determine and output the critical evolution state arbitration data of the silkworm's transition from the silk-spinning state to the cocooning state to the external control gateway based on the global nonlinear behavior feature map.
[0021] Preferably, the system further includes a window control module; the input of the window control module is connected to the output of the frame data acquisition module, and the output of the window control module is connected to the input of the probabilistic state arbitration module; when the frame data acquisition module acquires the original video frame sequence, the window control module is used to calculate the sum of the absolute differences of the background reference tensors at adjacent time points to determine the global ambient light variation rate; when the global ambient light variation rate reaches the preset ambient light variation threshold constant, the window control module performs step-by-step truncation and shortening of the historical frame temporal sliding window to eliminate global in-phase creep noise and light source flicker interference, and inputs the shortened historical frame temporal sliding window into the probabilistic state arbitration module as the basis for calculating the critical evolution state arbitration data.
[0022] Preferably, the grid spatiotemporal analysis module includes a gradient extraction unit and a frequency statistics unit. When the grid spatiotemporal analysis module divides the original video frame sequence into logical grid units, the gradient extraction unit is used to extract pixel grayscale gradient vectors along the horizontal and vertical directions of the logical grid units, and determine the spatial principal direction derivative based on the tangent value of the pixel grayscale gradient vector. The frequency statistics unit is connected to the gradient extraction unit and is used to count the cumulative frequency of the spatial principal direction derivative deviating from the preset historical benchmark mean within a fixed time sliding window, and output the cumulative frequency as a direction distribution variation index.
[0023] Preferably, the grid spatiotemporal analysis module includes a timestamp residual calculation unit and a coherent event accumulation unit. The timestamp residual calculation unit is used to calculate the absolute grayscale residual between corresponding logical grid units between adjacent timestamps. When the absolute grayscale residual is lower than the preset grayscale residual threshold, the coherent event accumulation unit is connected to the timestamp residual calculation unit to record local spatiotemporal coherent events and to count the maximum temporal continuous span of consecutively occurring local spatiotemporal coherent events so as to output the maximum temporal continuous span as a spatiotemporal coherence length index.
[0024] Preferably, the feedforward weight calibration module includes a gain factor adjustment unit and a nonlinear amplification unit. The gain factor adjustment unit receives the spatiotemporal coherence length index and, when the grayscale contrast of the logic grid unit continuously decays to a preset contrast threshold, adjusts the dynamic feedforward gain factor according to a preset step size until the upper limit of the saturation constant. The nonlinear amplification unit is signal-connected to the gain factor adjustment unit and is used to extract the differential motion vector of each pixel in the logic grid unit. The amplitude of the differential motion vector is multiplied by the dynamic feedforward gain factor to complete the in-situ nonlinear sign amplification of the differential motion vector while keeping the original algebraic sign of the differential motion vector unchanged.
[0025] Preferably, the feature map assembly module includes a topology mapping unit and a map stretching unit. The topology mapping unit is used to spatially align the differential motion vectors of each logic grid unit after in-situ nonlinear symbol amplification according to the two-dimensional topological coordinates in the original video frame sequence. The map stretching unit is signal-connected to the topology mapping unit and is used to stitch the aligned differential motion vectors into a behavior matrix of the complete field of view image dimension to increase the behavior amplitude and generate a global nonlinear behavior feature map.
[0026] Preferably, the system further includes a cocooning critical change rate analysis module; the input of the cocooning critical change rate analysis module is connected to the output of the probabilistic state arbitration module; after the probabilistic state arbitration module outputs critical evolution state arbitration data, the cocooning critical change rate analysis module is used to record critical evolution state arbitration data at different timestamps to construct a state change time sequence queue, and obtain the cocooning state transition rate index by calculating the first-order difference of the state change time sequence queue; when the cocooning state transition rate index continuously exceeds the preset rate transition constant threshold, the cocooning critical change rate analysis module is used to output the cocooning state transition critical evolution node signal.
[0027] Preferably, the system also includes an external control interface; the external control interface is connected to the cocooning critical change rate analysis module to convert the cocooning state transition critical evolution node signal into industrial control bus data, and transmit the industrial control bus data to the environmental regulation automation control system outside the silkworm rearing chamber through the data link network to regulate the ambient temperature, ambient humidity and light intensity inside the silkworm rearing chamber.
[0028] Preferably, the image resolution of the original video frame sequence acquired by the frame data acquisition module is 1920×1080, the sampling frequency is 30Hz, the grid size of each logical grid unit is 16px×16px, and the initial comparison interval length of adjacent timestamps on the time axis is 5 timestamp units.
[0029] Example 1: In the behavior monitoring of a closed industrial silkworm rearing chamber, when the system faces the dense silk web and high scattering obstruction caused by the high-density parallel spinning of silkworms, the spatial semantic confusion and visual continuity break caused by the anisotropic scattering of the silk web lead to the area annihilation of the target's edge contour features. At the same time, the mechanical resonance of the chamber caused by the environmental ventilation equipment, accompanied by the spatial flicker noise of the lighting source at the power supply frequency, introduces a large number of high-frequency artifacts that coincide with the frequency of the silkworm's head swing in the continuous image sequence. This causes the traditional behavior monitoring scheme that relies on two-dimensional pixel motion intensity calibration or edge contour tracking to slip into an uncontrollable and scattered state, unable to capture the critical node of the transition from silk spinning to cocooning. The behavior monitoring system for the silkworm spinning state uses a frame data acquisition module to collect the original video frame sequence with a resolution of 1920×1080 and a sampling frequency of 30Hz. The original video frame sequence is retrieved by the grid spatiotemporal analysis module. It is dynamically divided into distributed logical grid units with consistent spatial area. Each logic grid unit Internally, it corresponds to a 16px×16px floating-point local pixel grayscale value matrix feature vector, which is used to replace the dependence on the external geometric contour of the target and transform the overall monitoring field of view into a distributed spatiotemporal local tensor.
[0030] Based on the distributed spatiotemporal local tensor, the gradient extraction unit inside the grid spatiotemporal analysis module extracts gradients along each logical grid unit. Extract the pixel grayscale gradient vectors horizontally and vertically respectively, and calculate the spatial principal direction derivative of each pixel. and The frequency statistics unit counts the cumulative frequency of deviations of the spatial principal direction derivative from the preset historical baseline mean within a fixed-time sliding window and outputs the direction distribution variation index. Directional distribution variation index The calculation formula is: ,in, A dimensionless index representing the directional distribution variation of pixel dynamic fluctuations in the local field of view. This represents the spatial principal direction derivative of the pixel grayscale gradient vector extracted laterally. The spatial principal direction derivative of the pixel grayscale gradient vector extracted along the vertical direction is given by 1, which is a scalar placeholder to prevent the denominator from being zero.
[0031] The timestamp residual calculation unit inside the grid spatiotemporal analysis module calculates the directional distribution variation index of the corresponding logical grid cells between adjacent timestamps. and The absolute residual is used to obtain the absolute grayscale residual. The absolute grayscale residual is then calculated when it falls below a preset grayscale residual threshold. At any given time, the coherent event accumulation unit records one local spatiotemporal coherent event, and uses the time axis sliding comparator to calculate the upper limit of the continuous span of consecutive local spatiotemporal coherent events occurring within a short time window. The upper limit of the continuous span is output as a spatiotemporal coherence length index. The gain factor adjustment unit inside the feedforward weight calibration module receives the spatiotemporal coherence length index. Furthermore, when the absolute grayscale contrast of the logic grid unit continuously decays to the preset contrast threshold due to high scattering from the wire mesh, the gain factor adjustment unit activates a level 2 cutoff and enhancement rule, based on the spatiotemporal coherence length index. When the grayscale change within the grid unit exceeds the preset upper limit safety boundary of more than 4 timestamp units, it is determined that the grayscale change is caused by ultra-low frequency global in-phase creep noise due to the gravitational deformation of the wire mesh or mechanical vibration of the cabin. The feedforward weight calibration module triggers the first-level truncation procedure and adjusts the corresponding dynamic feedforward gain factor. The value is set to 0 to remove spurious noise signals in situ at the front end of data processing, thus blocking the impact of non-biological behavior data entry on the status arbitration bus.
[0032] In terms of spatiotemporal coherence length When the pixel transition features fall within a discrete interval of 2 to 3 timestamp units, it is determined that the pixel transition features within the grid area match the periodic, localized figure-eight head swaying behavior unique to the silk-spinning individual being monitored. The numerical boundaries of the aforementioned timestamp units are determined based on the statistical mapping of characteristic behavioral physiological parameters during silkworm spinning and the frequency of external mechanical noise. At a sampling frequency of 30 Hz, one timestamp unit corresponds to approximately 33.3 milliseconds. When a group-reared silkworm individual in the silk-spinning stage performs a localized figure-eight head sway, the period of a single round-trip movement is typically between 60 and 100 milliseconds, which is reflected in continuous images. Within the short time window, the maximum continuous span of spatiotemporal coherent events occurring continuously in local pixels is stably converged within 2 to 3 timestamp units. However, due to mechanical resonance of the cabin caused by environmental ventilation equipment and flicker noise from the light source, it manifests as large-area in-phase creep globally. The residual coherence time caused in the pixel grayscale domain has extremely strong temporal continuity, and its upper limit of continuous span is significantly greater than 133 milliseconds, which is greater than 4 timestamp units. Through this discrete interval division of the time span, the system can accurately perform asymmetric separation of rapid biological behavior disturbances and long-period environmental pseudo-noise at the front end of the input stream.
[0033] When atmospheric or screen scattering self-occlusion causes a continuous decrease in absolute pixel contrast in a region, the gain factor adjustment unit inside the feedforward weight calibration module adjusts the dynamic feedforward gain factor according to a preset step size. The step size is increased to the upper limit of the saturation constant of 2.5, which serves as the system calibration constant. The differential motion vector of each pixel within the logic grid unit is extracted by the nonlinear amplification unit. The amplitude of the differential motion vector is then compared with the dynamic feedforward gain factor. Multiplication is performed to achieve in-situ nonlinear symbol amplification while keeping the original algebraic sign of the differential motion vector unchanged. This process generates a purified discrete coherent behavioral feature matrix. The in-situ nonlinear symbol amplification addresses the grayscale fluctuations caused by the periodic movement of silkworms in the time domain. Although the high scattering medium significantly reduces the static absolute contrast of the image, the local pixel dynamic fluctuations caused by the swaying of the silkworm's head do not completely disappear. This invention performs in-situ nonlinear symbol amplification on the differential motion vectors within the grid unit, using spatiotemporal coherence to numerically transform the periodic temporal disturbances into spatial displacement feature amplitudes. Based on the coherent energy of the temporal oscillation, the behavioral state of the biological individual is identified to avoid the annihilation of static features. The topological mapping unit inside the feature map assembly module collects the differential motion vectors of each logical grid unit after in-situ nonlinear symbol amplification and aligns them spatially according to the two-dimensional topological coordinates in the original video frame sequence.
[0034] The map stretching unit concatenates the aligned differential motion vectors into a behavior matrix of full field-of-view image dimensions to increase the behavior amplitude, and then fuses them to generate a global nonlinear behavior feature map. By splicing together the behavior amplitude and forming a behavior energy cascade on the overall geometric grid through spatial topological alignment, under the high scattering conditions of dense wire mesh, the weak oscillation features of a single individual are easily judged as random spatial noise in isolated grids. However, when the map stretching unit splices all the local discrete behavior feature matrices amplified by in-situ nonlinear symbols into a behavior matrix of the complete field of view image dimension according to the original spatial topological connection relationship, the in-phase oscillation vectors between adjacent grids form a continuous spatial topological connected domain in the global behavior matrix. This geometric recombination in the spatial dimension enhances the energy density and feature saliency of the feature matrix in the overall spatial structure, thereby realizing the nonlinear step-like amplitude stretching of the feature signal in the global spatial connection relationship, generated from local surface trajectory features. A global behavioral map, which renders low-amplitude transient action features as exhibiting nonlinear amplitude stretching in spatial connectivity, is used in a silkworm spinning behavior monitoring system. The window control module calculates the sum of the absolute differences between the background reference tensors at adjacent time points in real time to determine the global ambient light variation rate. When the global ambient light variation rate reaches a preset ambient light variation threshold constant, the window control module progressively truncates and shortens the historical frame temporal sliding window, reducing the initial 300-frame sliding window to 30 frames to eliminate global in-phase creep noise caused by sudden global light field drift. The shortened temporal sliding window data stream is then input to the probabilistic state arbitration module as the causal benchmark for calculating the critical state of behavioral semantics. The probabilistic state arbitration module then uses the global nonlinear behavioral feature map... The input is fed into the classification matrix of the single-layer behavioral semantic state machine to calculate the discrete probability vectors belonging to the continuous spinning state, the cocooning preparation state, and the resting dormant state at the current moment. Specifically, the classification matrix of the single-layer behavioral semantic state machine adopts a static linear weight matrix obtained in advance through standard behavioral samples. The dimension of the classification matrix is completely matched with the feature dimension of the input behavioral matrix. It contains multiple sets of orthogonal behavioral space feature weight vectors, corresponding to the continuous spinning state, the cocooning preparation state, and the resting dormant state, respectively. At the input end, the global nonlinear behavioral feature map is input in the format of a one-dimensional expanded floating-point vector and is multiplied with the classification matrix to calculate the three original state scores corresponding to the current frame image. Then, the three original state scores are normalized by the logistic regression function so that their numerical range converges between 0 and 1 and the sum of the three is equal to 1. Finally, the discrete probability vector composed of three probability scalars is output, which clearly represents the probability of belonging to each behavioral state at the current moment. The behavior probability transition calibration module with spatial topological association integrated inside calls the first-order Markov transition probability matrix of the state machine.
[0035] The discrete probability values output by the probabilistic state arbitration module are continuously weighted along the time axis. When the behavior state output at the previous time stamp is the continuous silk-spinning state, the calibration module, based on the Markov transition probability matrix, applies a reverse penalty weight to the current resting / dormant state in the arbitration operation at the current moment. This changes the boundary judgment logic of the current step in situ and suppresses high-frequency jumps in the state transition chain caused by brief motion collisions between individuals. When the discrete probability value of the cocooning preparation state crosses the preset safety judgment threshold, the probabilistic state arbitration module outputs critical evolution state arbitration data to the external control gateway to characterize the population growth nodes. After the system outputs the critical evolution state arbitration data, the connected cocooning critical change rate analysis module... Arbitration data of critical evolution states at different timestamps are recorded to construct a state change time sequence queue. The cocooning state transition rate index is obtained by calculating the first-order difference of the state change time sequence queue. When the cocooning state transition rate index continuously exceeds the preset rate transition constant threshold, the cocooning critical change rate analysis module outputs the cocooning state transition critical evolution node signal. The cocooning state transition critical evolution node signal is converted into industrial control bus data and transmitted to the environmental regulation automation control system outside the silkworm rearing chamber through the external control interface. This regulates the ambient temperature, humidity and light intensity inside the silkworm rearing chamber. In actual conversion and regulation operations, the external control interface uses the standard industrial control bus protocol for data format encapsulation.
[0036] Upon receiving the critical evolution node signal for the cocooning state transition, the system converts the node signal into a corresponding control command data packet based on a preset environmental parameter association mapping table. Upon receiving the data packet, the environmental regulation automation control system initiates closed-loop control to perform the following regulatory actions: controlling the actuator valve of the temperature control equipment to gradually increase the ambient temperature inside the silkworm rearing chamber to a constant cocooning temperature of 25.5 degrees Celsius in increments of 0.5 degrees Celsius per hour; simultaneously starting the exhaust fans and adjusting the damper opening to gradually reduce the relative humidity inside the chamber and stabilize it within the standard relative humidity range of 65% over 120 minutes; and simultaneously adjusting the power supply duty cycle of the lighting system to reduce the humidity inside the silkworm rearing chamber... The light intensity is smoothly reduced to a low-light state below 15 lux, realizing an automated closed-loop flow from behavioral state perception to precise environmental control. When the environmental regulation and automation control system adjusts the ambient temperature, ambient humidity and light intensity inside the silkworm rearing chamber according to the received industrial control bus data, the behavior monitoring loop composed of the frame data acquisition module, grid spatiotemporal analysis module, feedforward weight calibration module, feature map assembly module and probability state arbitration module continuously outputs critical evolution state arbitration data. The environmental regulation and automation control system corrects the ventilation volume and heat load parameters in the silkworm rearing chamber according to the industrial control bus data, so that the environmental state parameters in the silkworm rearing chamber are maintained within the set growth index range.
[0037] Example 2: In a closed industrial silkworm rearing chamber behavior monitoring and verification environment, before sampling began, an image sensor matrix mounted on a fixed test bench continuously imaged multiple areas within the chamber. The transient sampling rate of the image sensors was stabilized at 30Hz, and the pixel resolution of a single image reached 1920×1080. During the test, a group of silkworms in the silk-spinning stage with a density of 450 silkworms per square meter were arranged in the silkworm rearing chamber. A low-frequency mechanical harmonic resonance of 12.5Hz was applied to the image sensors through a vibration generator, and the original video frame sequence was simultaneously captured. A Gaussian distribution of grayscale fluctuations with a signal-to-noise ratio of 15.6 dB is superimposed to simulate the strong scattering attenuation caused by dense cocoon-like webs and the flicker interference from power grid fluctuations, generating a sequence of original video frames containing weakened target outlines and random pixel noise. ,in The data consists of discrete timestamp video image matrix data containing superimposed noise interference. On the same processing core and dynamic random access memory hardware, a system equipped with a complete control loop is used as the sample group of this invention. At the same time, a system with the feedforward weight calibration module locked and removed and without in-situ nonlinear enhancement is used as a partially missing control group. This is used to conduct a full-link differential comparison and verification of the local feature evolution and final decision accuracy under multiple groups of different control logics.
[0038] When the original video frame sequence The input grid spatiotemporal analysis module dynamically divides the data into multiple 16px×16px logical grid units. The decision-making process regarding the length of the time-domain sliding window is as follows: The extraction unit identifies the logic grid unit. The variation components of the local pixel grayscale value matrix feature vector contained within the controller, when the movement and swaying of a group of silkworms causes a local grayscale polarity shift, if the temporal sliding window span is longer than 300 frames, sudden global ambient light fluctuations will cause integral accumulation within the window, thus converting into creep artifacts. If the temporal sliding window span is shorter than 30 frames, it cannot cover the temporal feature interval required for a single target to complete a single swaying trajectory. Therefore, the setting of the temporal sliding window span balances the integrity of local spatiotemporal feature connectivity with the timeliness of suppressing global light field drift noise. By establishing an inverse proportional change correlation rule between the window span and the sum of the absolute values of the difference between the background reference tensor within the controller, when the global ambient light variation rate is detected to reach the set upper limit of change, the control loop actively steps to forcibly shorten the sliding window, initially set at 300 frames, to 30 frames to cut off the cumulative effect. The system is a local two-dimensional image grid spatial logic grid unit, thereby establishing a causal operation benchmark with anti-interference performance at the front end of the input stream.
[0039] Based on the distributed spatiotemporal local tensor, the gradient extraction unit and frequency statistics unit inside the grid spatiotemporal analysis module extract the pixel gray-level gradient vector along the image axis and calculate the spatial principal direction derivative. and The computational unit calculates the dimensionless directional distribution variation index, which characterizes the dynamic fluctuation polarity of local pixels. Directional distribution variation index The calculation formula is: ,in, This represents the index of directional distribution change within the logical grid at the current timestamp. The spatial principal direction derivative extracted along the horizontal direction of the image. The spatial principal direction derivative is extracted along the vertical axis of the image, with constant 1 as the denominator zero-prevention adjustment scalar; the timestamp residual calculation unit performs a difference operation on the directional distribution variation index of adjacent timestamps, and the calculation is performed when the absolute grayscale residual is lower than the preset grayscale residual threshold. Local spatiotemporal coherent events are recorded by the coherent event accumulation unit, where The preset discrete grayscale discrimination threshold constant; the upper limit of the continuous span of continuously occurring local spatiotemporal coherent events within a short time window is statistically determined by the time axis sliding comparator, and the spatiotemporal coherence length index measured by the sample group of this invention is obtained. The head-swinging trajectory of the silkworm individual stably converges within a range of 2 to 3 timestamp units, while the spatiotemporal coherence length index of the in-phase creep noise caused by external mechanical resonance is measured at the corresponding logic grid. It then monotonically increases and spans 4 timestamp units, of which This is a coherence length index used to characterize the spatiotemporal connectivity span of features; in contrast, the partially missing control group lacks a spatiotemporal coherence length index. The multi-level discrimination enhancement cannot achieve in-situ zeroing of the dynamic feedforward gain factor within the noise region, allowing external noise vibration signals to be transmitted to the subsequent assembly bus. This experiment introduces an out-of-range control group to determine the dynamic feedforward gain factor. The upper bound boundary value, where This is the dynamic feedforward gain factor acting on the pixel differential motion vector; when the dynamic feedforward gain factor is... When the upper limit of the gain factor is adjusted downwards to 1.2, the feature amplitude after multiplication by the nonlinear amplification unit is too low to cross the input start-up voltage threshold of the single-layer behavioral semantic state machine classification matrix inside the subsequent probability state arbitration module. This causes the system to miss area detections of weak biological actions under high-scattering mesh occlusion. When the upper limit is adjusted upwards to 4.5, due to the overload of nonlinear noise introduced by the high gain, the global nonlinear behavior feature map generated by the feature map assembly unit is affected. Local saturation occurs, leading to frequent disordered oscillations at the state decision boundary. The nonlinear characteristic matrix is plotted after global spatial topology alignment. The performance response curves obtained from the tests show that, with changes in the feedforward gain, the accuracy of system state arbitration exhibits a nonlinear inflection point characteristic of low accuracy at both ends and high accuracy in the middle. This is further demonstrated by the dynamic feedforward gain factor. When the constant upper limit of 2.5 is reached, the system maintains a stable feature purification ratio, thereby providing data support for the parameter range that needs to be protected. The setting of these core quantization control constants has undergone limit calculations of engineering boundaries and system stability calibration. The upper limit of the saturation constant is set to 2.5 because when the gain factor is lower than 1.2, the feature amplitude of nonlinear amplification is too low to cross the start-up judgment threshold of the subsequent classification matrix, resulting in missed detection of weak behavior under scattering occlusion.
[0040] When the gain factor is higher than 4.5, excessive gain will introduce high-frequency noise overload, causing local saturation of the global behavioral feature map and triggering frequent oscillations of the decision boundary. In addition, the fixed damping coefficient used in state calibration is set to 0.45 to balance the transient response speed of state transition and the ability to suppress collision jumps. If the damping coefficient is lower than 0.15, the constraint of the reverse penalty weight is insufficient and cannot effectively avoid the logic discontinuity caused by short-term motion collisions. If the damping coefficient is higher than 0.80, it will cause the state machine to generate system control delay, which will reduce the capture accuracy of critical evolution nodes. By configuring the two constants to 2.5 and 0.45 respectively, the entire monitoring loop can obtain the optimal feature purification ratio and decision convergence speed under strong interference conditions. When the silkworm rearing cabin is unloaded, the ventilation equipment is turned on and the lighting system is maintained. The frame data acquisition module collects 60 frames of images at a sampling frequency of 30Hz. The grid spatiotemporal analysis module monitors the spatiotemporal coherence length index in different spatial grids. When the cabin When the in-phase creep caused by mechanical resonance results in the spatiotemporal coherence length index exceeding 4 timestamp units consecutively, the control loop clears the dynamic feedforward gain factor to zero to block pseudo-noise. A rotating oscillator with a set frequency of 10Hz is placed in the field of view to simulate the head-shaking action of a silkworm. The value of the dynamic feedforward gain factor is gradually increased from 1.0, and the global nonlinear behavioral feature spectrum response characteristics are recorded. When the value reaches 2.5, the signal-to-noise ratio improvement curve of the behavioral feature signal shows an inflection point, and the pixel grayscale value in the spatial grid does not reach the overflow saturation state of 255. 2.5 is fixed as the upper limit of the saturation constant. An interference video stream containing double silkworm collision contact is introduced. The fixed damping coefficient is gradually increased from 0.10 in steps of 0.05. The state switching control word output by the probability state arbitration module is monitored. When the fixed damping coefficient reaches 0.45, the jump rate of the state transition chain in the time axis direction remains below 0.05%, and the transition recognition delay from the continuous spinning state to the cocooning preparation state is less than 3 timestamp units. 0.45 is fixed as the damping constant.
[0041] By adjusting the cumulative silk-spinning time within the silkworm rearing chamber, three different severity levels of silk mesh scattering interference gradient environments were constructed. Under the low-severity scattering condition caused by the dense silk mesh, the local average gray-scale attenuation rate was 15.4%. The consistency probability between the critical evolution state arbitration data output by the sample group of this invention and the actual silk-spinning node was 98.2%. When the local average gray-scale attenuation rate monotonically increased to 42.1% under the moderate scattering condition, the behavior probability transfer calibration module of the internal spatial topology association called the first-order Markov transition probability matrix to apply a reverse penalty weight to the states that are prone to jumps in the time axis direction. The decision accuracy rate was 96.5%. However, when faced with extreme scattering conditions such as overlapping wire meshes and a local average grayscale attenuation rate of 78.6%, the recognition accuracy of the existing technology control group, which relies on external geometric contour tracking, dropped to 41.2%, leading to process timing mismatch. In contrast, the sample group of this invention, due to the dynamic step-like amplitude stretching of the differential motion vector of the occluded area by the feedforward weight calibration module, still achieved a stable classification accuracy of 92.4% for the final critical evolution state arbitration data. This demonstrates the parameter response stability of the system architecture through the predictable correlation trend of the data under the interference gradient.
[0042] After the probabilistic state arbitration module outputs the critical evolution state arbitration data, the connected cocooning critical change rate analysis module calculates its first-order difference in real time to obtain the cocooning state transition rate index. When the transition rate index continuously exceeds the set transition constant threshold, the module outputs the cocooning state transition critical evolution node signal through the external control interface. The node signal is transmitted to the environmental regulation automation control system outside the silkworm rearing chamber in the form of standard industrial control bus data. This system is used to drive the adjustment of the ventilation valve opening and the electric heating load parameters inside the silkworm rearing chamber. The measured adjustment response delay data shows that the behavior monitoring system for silkworm spinning state completes the extraction of the cocooning critical node without the addition of external non-standard auxiliary sensors through the coordination of spatial local tensor partitioning and front-end coherence length verification. This achieves closed-loop regulation from feature analysis to the downstream regulation automation control system.
[0043] Example 3: This example combines Figures 1 to 2 This paper describes a behavior monitoring system for silkworms during their silk-spinning process, such as... Figure 1As shown, the system includes a frame data acquisition module, a grid spatiotemporal analysis module, a feedforward weight calibration module, a feature map assembly module, a probabilistic state arbitration module, and a window control module. The frame data acquisition module is signal-connected to the grid spatiotemporal analysis module and the window control module. The frame data acquisition module acquires the original video frame sequence and outputs it to both the grid spatiotemporal analysis module and the window control module. The grid spatiotemporal analysis module divides the system into logical grid units and outputs a spatiotemporal coherence length index to the feedforward weight calibration module. The feedforward weight calibration module amplifies the differential motion vector and outputs it to the feature map assembly module. The feature map assembly module generates a behavioral feature map and outputs it to the probabilistic state arbitration module. The window control module truncates the historical frame sliding window and inputs the output historical frame sliding window to the probabilistic state arbitration module. The probabilistic state arbitration module performs calculations based on the received behavioral feature map and the historical frame sliding window to output state arbitration data. This state arbitration data is ultimately output to an external control gateway, which receives the state arbitration data.
[0044] like Figure 2 As shown, the global nonlinear behavior feature map is input into the continuous spinning state to perform the operation of mapping and calculating discrete probability vectors in the continuous spinning state. In the correction path of the decision mechanism, the path of calling the first-order Markov transition probability matrix based on the reverse penalty weight is from the continuous spinning state to the resting and dormant state to perform the operation of limiting the state transition boundary in the resting and dormant state. At the same time, the path of the state transition chain caused by the brief motion collision between individuals in the resting and dormant state returns to the continuous spinning state. When the discrete probability value crosses the preset safety judgment threshold, the state evolves into the cocooning transition preparation state. When the cocooning transition preparation state meets the condition of crossing the preset safety judgment threshold and the cocooning state transition rate index continuously exceeds the preset rate transition constant threshold, the system determines and outputs the critical evolution node of the cocooning state transition. After the critical evolution node of the cocooning state transition is executed to perform the operation of adjusting the ambient temperature, ambient humidity and light intensity of the industrial control bus data, the data is finally transmitted to the environmental regulation automation control system.
[0045] Example 4: When a closed industrial silkworm rearing chamber faces overlapping and mechanical collisions caused by the high-density parallel spinning of silkworms in a group, frequent individual contact and short-term obstruction of the local field of view in the original video frame sequence The introduction of transient nonstationary grayscale polarity tearing leads to a local spatiotemporal coherence length index. Non-monotonic jumps occur, leading to dangling classification criteria and high-frequency jumps in the state transition chain. To eliminate the interference of high-frequency jumps on decision continuity, the system's static random access memory allocates a ring-shaped feature buffer with a storage depth of 10 timestamp units to receive and align the global nonlinear behavioral feature map output by the feature map assembly module. The behavior probability transition calibration module retrieves the discrete probability vector output by the current timestamp of the probability state arbitration module via the data bus and writes it into the state probability register. The probability state arbitration module retrieves the pre-stored first-order Markov transition probability matrix. The conditional transition probability at the current moment is calculated. Given that the judgment result at the previous timestamp was a continuous spinning state, the behavior probability transition calibration module calculates the probability variance of the continuous spinning state within the preceding 5 timestamps. The reciprocal of this probability variance is multiplied by a fixed damping coefficient of 0.45 to calculate the dimensionless reverse penalty weight. The results are accumulated and added to the feature terms belonging to the resting and dormant state in the discrete probability vector to limit the state transition boundary. The behavior probability transition calibration module inputs the discrete probability vector after gain calibration to the state comparator. The behavior probability transition calibration module calls the first-order Markov transition probability matrix to calculate the conditional transition probability at the current time. When the previous time stamp judgment result is the continuous spinning state and the dimensionless reverse penalty weight generated by multiplying the inverse of the probability variance of the continuous spinning state by the fixed damping coefficient 0.45 is calculated, the reverse penalty weight is subtracted from the score terms belonging to the resting and dormant state in the discrete probability vector as a deduction variable to reduce the current time stamp transition probability. When the contact or cross-over of individual silkworms in the group introduces transient non-stationary grayscale polarity tearing in the original video frame sequence, the discrete probability vector after subtracting the reverse penalty weight is input to the state comparator to increase the feature barrier to the resting and dormant state transition to constrain the high-frequency jump of the state transition boundary, so that the jump rate of the state switching control word output is kept below 0.05%, and the critical evolution state arbitration data output by the probability state arbitration module is maintained in the time axis direction.
[0046] When the absolute value of the probability belonging to the cocooning preparation state in the discrete probability vector is greater than or equal to the preset safety judgment threshold, the state comparator latches and outputs a high-level state switching control word. The high-level state switching control word is converted into industrial control bus data format through the external control interface and transmitted to the environmental regulation and automation control system outside the silkworm rearing chamber. This drives the environmental regulation and automation control system to adjust the ventilation volume and heat load parameters in the silkworm rearing chamber, suppressing the state jump rate caused by noise to below 0.05%, and maintaining the environmental state parameters within the preset growth index range.
[0047] Example 5: When the system is deployed in a new cabin or faces changes in focal length and altitude due to lens replacement, the change in geometric topology causes a shift in the projection of the physical size of the pixels, resulting in changes in the logic grid unit. The pixel array within the grid cannot be aligned with the initial spatial geometric step size, and the spatiotemporal analysis module is prone to overflowing the preset grayscale residual threshold value due to spatial scale mismatch. During the calibration phase before monitoring begins, the frame data acquisition module collects static images containing standard squares with known side lengths of 50mm. The grid spatiotemporal analysis module extracts the pixel width values of the standard square edges to output the reference pixel span. The controller uses the ratio of the reference pixel span to the factory span constant to calculate the spatial scale scaling factor used for in-situ correction of geometric dimensions. .
[0048] Spatial scale scaling factor The calibration formula is ,in, is a dimensionless spatial scale scaling factor. The measured standard square pixel width value, For the pre-stored standard pixel width value, the grid spatiotemporal analysis module will use a spatial scale scaling factor. Multiply by the direction distribution change index The denominator uses in-situ reconstruction criteria. Since changes in focal length and height alter the actual physical size of a single pixel, the original pixel grayscale gradient vector exhibits scale mismatch when representing the rate of change in physical space. To correct the denominator without compromising the dimensionless property of the directional distribution variation index, this invention uses a spatial scale scaling factor as a multiplication coefficient, directly multiplying it by the overall result of the denominator, which is the sum of the differences between the derivatives of the horizontal and vertical spatial principal directions, and a scalar constant of 1. Since the spatial scale scaling factor represents the ratio of the actual measured width to the standard width, multiplying it into the denominator effectively calibrates the geometric step size of the pixel-level differential operator in the image space. This ensures that the corrected directional distribution variation index accurately maps the true gradient ratio at the physical space level, achieving dimensional and control logic equivalence between the overall geometric scale and the surface pixel gradient. Furthermore, 60 blank images are continuously acquired in the cabin under initial unloaded conditions. The timestamp residual calculation unit calculates the mean of the global pixel grayscale variance envelope and writes 1.5 times the mean into memory to update and overwrite the preset grayscale residual threshold. This enables the monitoring loop to filter out noise based on the reconstructed sensing baseline, and the update of the calibration benchmark ensures the accuracy of the probabilistic state arbitration module in capturing the arbitration data of the critical evolution state.
[0049] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the protection scope of the present invention.
Claims
1. A behavior monitoring system for silkworms during silk spinning, characterized in that, include: The frame data acquisition module is used to acquire the original video frame sequence inside the silkworm rearing chamber; The grid spatiotemporal analysis module has its input end connected to the output end of the frame data acquisition module. It is used to divide the original video frame sequence into logical grid units, obtain the direction distribution variation index by calculating the spatial principal direction derivative of the pixels in each logical grid unit, and compare the residuals of adjacent timestamps on the time axis to generate a spatiotemporal coherence length index. The feedforward weight calibration module, whose input is connected to the output signal of the grid spatiotemporal analysis module, is used to adjust the dynamic feedforward gain factor step by step to the upper limit of the saturation constant, which is used as the system calibration constant, when the gray-scale contrast of the logic grid unit is continuously attenuated due to the scattering of the wire mesh. It also uses the dynamic feedforward gain factor to perform in-situ nonlinear symbol amplification of the differential motion vector in the logic grid unit. The feature map assembly module, whose input end is connected to the output end of the feedforward weight calibration module, is used to perform matrix splicing of the amplified differential motion vectors of each logic grid unit according to the original spatial topology to generate a global nonlinear behavior feature map. The probabilistic state arbitration module, whose input is connected to the output signal of the feature map assembly module, is used to determine and output the critical evolution state arbitration data of the silkworm's transition from the silk-spinning state to the cocooning state to the external control gateway based on the global nonlinear behavior feature map.
2. The behavior monitoring system for silkworm spinning state according to claim 1, characterized in that, The system also includes a window control module; the input of the window control module is connected to the output of the frame data acquisition module, and the output of the window control module is connected to the input of the probabilistic state arbitration module; when the frame data acquisition module acquires the original video frame sequence, the window control module is used to calculate the sum of the absolute differences of the background reference tensors at adjacent time points to determine the global ambient light variation rate; when the global ambient light variation rate reaches the preset ambient light variation threshold constant, the window control module performs step-by-step truncation and shortening of the historical frame temporal sliding window to eliminate global in-phase creep noise and light source flicker interference, and inputs the shortened historical frame temporal sliding window into the probabilistic state arbitration module as the basis for calculating the critical evolution state arbitration data.
3. The behavior monitoring system for silkworm spinning state according to claim 1, characterized in that, The grid spatiotemporal analysis module includes a gradient extraction unit and a frequency statistics unit. When the grid spatiotemporal analysis module divides the original video frame sequence into logical grid units, the gradient extraction unit is used to extract pixel grayscale gradient vectors along the horizontal and vertical directions of the logical grid units, and determines the spatial principal direction derivative based on the tangent value of the pixel grayscale gradient vector. The frequency statistics unit is connected to the gradient extraction unit and is used to count the cumulative frequency of the spatial principal direction derivative deviating from the preset historical benchmark mean within a fixed time sliding window, and outputs the cumulative frequency as the direction distribution variation index.
4. The behavior monitoring system for silkworm spinning state according to claim 1, characterized in that, The grid spatiotemporal analysis module includes a timestamp residual calculation unit and a coherent event accumulation unit; The timestamp residual calculation unit is used to calculate the absolute grayscale residual between the corresponding logic grid units between adjacent timestamps. When the absolute grayscale residual is lower than the preset grayscale residual threshold, the coherent event accumulation unit is connected to the timestamp residual calculation unit to record local spatiotemporal coherent events and to count the maximum temporal continuous span of consecutively occurring local spatiotemporal coherent events so as to output the maximum temporal continuous span as a spatiotemporal coherence length index.
5. A behavior monitoring system for silkworm spinning state according to claim 1, characterized in that, The feedforward weight calibration module is equipped with a gain factor adjustment unit and a nonlinear amplification unit. The gain factor adjustment unit is used to receive the spatiotemporal coherence length index and, when the grayscale contrast of the logic grid unit continuously decays to the preset contrast threshold, adjusts the dynamic feedforward gain factor according to the preset step size until the upper limit of the saturation constant. The nonlinear amplification unit is signal-connected to the gain factor adjustment unit. It is used to extract the differential motion vector of each pixel in the logic grid unit and multiply the amplitude of the differential motion vector by the dynamic feedforward gain factor to complete the in-situ nonlinear sign amplification of the differential motion vector while keeping the original algebraic sign of the differential motion vector unchanged.
6. A behavior monitoring system for silkworm spinning state according to claim 1, characterized in that, The feature map assembly module includes a topology mapping unit and a map stretching unit. The topology mapping unit is used to spatially align the differential motion vectors of each logic grid unit after in-situ nonlinear symbol amplification according to the two-dimensional topological coordinates in the original video frame sequence. The map stretching unit is signal-connected to the topology mapping unit and is used to stitch the aligned differential motion vectors into a behavior matrix of the complete field of view image dimension to increase the behavior amplitude and generate a global nonlinear behavior feature map.
7. A behavior monitoring system for silkworm spinning state according to claim 1, characterized in that, The system also includes a cocooning critical change rate analysis module; the input of the cocooning critical change rate analysis module is connected to the output of the probabilistic state arbitration module; after the probabilistic state arbitration module outputs critical evolution state arbitration data, the cocooning critical change rate analysis module records critical evolution state arbitration data at different timestamps to construct a state change time series queue, and obtains the cocooning state transition rate index by calculating the first-order difference of the state change time series queue; when the cocooning state transition rate index continuously exceeds the preset rate transition constant threshold, the cocooning critical change rate analysis module outputs the cocooning state transition critical evolution node signal.
8. A behavior monitoring system for silkworm spinning state according to claim 7, characterized in that, The system also includes an external control interface; the external control interface is connected to the cocooning critical change rate analysis module to convert the cocooning state transition critical evolution node signal into industrial control bus data, and transmit the industrial control bus data to the environmental regulation automation control system outside the silkworm rearing chamber through the data link network to regulate the ambient temperature, ambient humidity and light intensity inside the silkworm rearing chamber.
9. A behavior monitoring system for silkworm spinning state according to claim 1, characterized in that, The original video frame sequence acquired by the frame data acquisition module has an image resolution of 1920×1080, a sampling frequency of 30Hz, a grid size of 16px×16px for each logical grid unit, and an initial comparison interval length of 5 timestamp units for adjacent timestamps on the time axis.