Method and system for detecting abnormal feed dynamic
By constructing a dynamic graph network matrix and state transition model, the problems of anomaly detection accuracy and strategy adaptability in large-scale feed storage centers were solved, accurate prediction and dynamic intervention of feed anomalies were achieved, and the scientific nature and efficiency of storage management were improved.
Patent Information
- Application Number
- CN202511140732.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-15
- Publication Date
- 2025-10-14
- Estimated Expiration
- 2045-08-15
AI Technical Summary
Existing large-scale feed storage centers have problems with insufficient anomaly detection accuracy and lack of dynamic adaptability in terms of detection mechanism and strategy generation. They are unable to effectively capture the evolution trends of dynamic anomalies such as sudden changes in temperature and humidity, and biological deterioration, and the intervention strategies are not adaptable enough in multi-category mixed storage environments.
A dynamic graph network matrix is constructed, and abnormal propagation features are extracted through variational graph autoencoders. The node state evolution is predicted based on the state transition probability model, and a future time graph network is generated. Combined with the physical intervention strategy optimization target, a highly adaptable intervention strategy is generated.
It has achieved accurate modeling of the feed anomaly transmission link, improved the early prediction capability of anomaly detection and the dynamic adaptability of intervention strategies, and improved the detection accuracy and decision optimization adaptability in multi-category mixed storage environments.
Smart Images

Figure CN120632381B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of intelligent feed storage and quality monitoring, and in particular to a method and system for dynamic detection of feed abnormalities. Background Art
[0002] In the field of intelligent feed storage management, as the livestock industry accelerates towards scale and intensification, large-scale feed storage centers must cope with the dynamic storage needs of multiple feed categories. Current monitoring systems rely on a three-dimensional monitoring network composed of multimodal sensing devices such as temperature and humidity sensor arrays, near-infrared spectroscopy detection modules, and visual monitoring systems within the storage environment, generating high-dimensional, spatiotemporal, and heterogeneous data in real time. This places stringent demands on feed anomaly detection technology for real-time analysis capabilities, multi-source data fusion accuracy, and dynamic decision-making adaptability.
[0003] At present, the anomaly detection in existing large-scale feed storage centers faces dual architectural bottlenecks. At the detection mechanism level, traditional methods based on historical statistical models or single-point threshold alarms lack the dynamic modeling of the spatiotemporal coupling characteristics of the temperature and humidity fields in the storage environment, as well as the ability to analyze the chain reactions between the characteristics of feed ingredients. As a result, the anomaly prediction dimension is unable to capture the evolution trend of dynamic anomalies such as sudden changes in temperature and humidity, and biological deterioration. At the strategy generation level, the intervention model driven by the static rule base cannot adapt to the differences in the deterioration dynamics of different feeds and the changes in the cargo location topology structure because the dynamic mapping relationship between the characteristic parameters of the feed category and the storage layout has not been established. As a result, the dynamic adaptability of the intervention strategy in a multi-category mixed storage environment is significantly insufficient. Summary of the Invention
[0004] In order to achieve dynamic anomaly detection of multiple categories of feed in large-scale feed storage centers and improve anomaly detection capabilities and decision optimization adaptability, the present invention provides a method and system for dynamic detection of feed anomalies. The technical solutions adopted are as follows:
[0005] The technical solution of the first aspect of the present invention provides a method for detecting abnormal dynamics of feed, the method comprising:
[0006] Obtaining sensor data, feed batch attribute data, and storage location data from a feed storage center, constructing a dynamic graph network matrix, and performing feature compression and sparsification processing on the dynamic graph network matrix;
[0007] Divide the subgraph network based on feed type and extract key abnormal feature vectors;
[0008] Quantitatively evaluate the matching degree between various feed subgraph networks and the current warehouse actual status, select the current graph network based on the matching results, and extract the spatiotemporal evolution characteristics of the warehouse environment;
[0009] Based on the selected current graph network, the state transition probability model is used to predict the evolution of node state, and the future time graph network is generated;
[0010] According to the future time graph network, the abnormal influence on the feed batch set is located, and the state transition probability improvement amount and the strategy energy consumption are taken as the optimization objectives, and the physical intervention strategy is generated based on the preset constraint condition.
[0011] Further, the sensor data, feed batch attribute data and storage location data of the feed storage center are acquired, and a dynamic graph network matrix is constructed, including:
[0012] Define the node matrix, including the sensor node position and type, the feed batch node water content and protein content, the storage location node area number and ventilation condition;
[0013] Construct the edge connection relationship, filter the connection based on data correlation, type similarity and location proximity;
[0014] Construct the edge feature matrix, including the temperature and humidity conduction coefficient, the distance attenuation factor and the feed type matching degree;
[0015] Construct the accessibility matrix, mark the effectiveness of the abnormal propagation logic path.
[0016] Further, the dynamic graph network matrix is compressed and sparsified, including:
[0017] The variational graph autoencoder is used to extract the abnormal propagation features of the feed storage graph network, including:
[0018] The two-layer graph convolution network is used to fuse the temperature and humidity, spectrum and location data of the sensor node and the feed batch node, and the node latent representation is generated to quantify the abnormal propagation risk intensity;
[0019] The inner product operation is used to reconstruct the adjacency matrix, and the topological structure representing the mold-harm chain propagation path is recovered;
[0020] The edge sampling algorithm is used to filter the edge connection relationship related to the feed deterioration, and the associated edges are reserved according to the temperature and humidity conduction coefficient and the preset ranking threshold.
[0021] Further, the sub-graph network is divided based on the feed type, and the key abnormal feature vector is extracted, including:
[0022] Based on the temperature and humidity sensor time series data, the humidity deviation and temperature fluctuation amplitude are calculated;
[0023] Based on the near-infrared spectrum data, the difference between the current batch spectrum and the standard spectrum is calculated as the spectrum component abnormal value;
[0024] Based on the image analysis model, the probability value of the pest sign is output.
[0025] Further, the matching degree of each type of feed subgraph network with the current warehouse actual state is quantitatively evaluated, and the current time graph network is selected based on the matching result, and the spatio-temporal evolution characteristics of the warehouse environment are extracted, including:
[0026] The feed type matching degree score, the environmental parameter matching degree score and the abnormal feature matching degree score are calculated;
[0027] The three scores are weighted and summed to obtain a comprehensive matching degree;
[0028] The subgraph with the highest comprehensive matching degree is selected as the current time graph network.
[0029] Further, based on the selected current graph network, a state transition probability model is used to predict the evolution of node state and generate a future time graph network, including:
[0030] A state transition probability model is constructed based on a long short-term memory network, environmental parameter change rate and abnormal feature value are input, and state transition probability is output;
[0031] The feed state evolution path is predicted according to the state transition probability;
[0032] The simplified future time graph network is generated in combination with physical constraint rules.
[0033] Further, the state transition probability model can be represented as:
[0034]
[0035] In the formula, The state transition probability matrix is represented as; The safe state is represented as; The alert state is represented as; The abnormal state is represented as; The recovery state is represented as; The probability that the feed remains normal in the future under the current safe state is represented as; The probability that the feed recovers to a safe state due to environmental improvement after an abnormality is represented as; The probability that the feed changes from a safe state to an alert state due to environmental temperature and humidity fluctuations is represented as; The probability that the feed does not further deteriorate or recover in the alert state is represented as; The probability that the feed deteriorates from alert to abnormal due to continuous environmental deterioration is represented as; The probability that the feed continuously deteriorates in the abnormal state without effective intervention is represented as; The probability that the feed temporarily recovers after intervention but becomes abnormal again is represented as; The probability that the feed changes from an abnormal state to a recovery state after taking intervention measures is represented as; represents the probability that the feed remains in a stable recovery state after the intervention; represents the probability that the abnormal state is recovered to the alert state through the intervention.
[0036] Further, according to the future time graph network, the abnormal influence on the feed batch set is positioned, the state transition probability improvement amount and the strategy energy consumption are taken as optimization objectives, a physical intervention strategy is generated based on a preset constraint condition, and the physical intervention strategy comprises the following steps:
[0037] A benefit function is constructed, and the state transition probability improvement amount is positively weighted, and the strategy energy consumption is negatively weighted;
[0038] A critical time constraint condition is set;
[0039] The maximum value of the benefit function under the time constraint is solved, and an optimal physical intervention strategy is generated.
[0040] Further, the expression of the benefit function is as follows:
[0041]
[0042] In the formula, represents the comprehensive benefit value of the strategy ; represents a state transition probability weight coefficient; represents the improvement amount of the transition probability of the abnormal state to the recovery state after the strategy is executed; represents an energy consumption weight coefficient; represents the energy consumption value of the strategy .
[0043] The technical scheme of the second aspect of the present application provides a feed abnormality dynamic detection system, which adopts the feed abnormality dynamic detection method of the technical scheme of the first aspect of the present application, and the system comprises:
[0044] A data acquisition module is configured to acquire sensor data, feed batch attribute data and storage location data of a feed storage center, construct a dynamic graph network matrix, and perform feature compression and sparsification processing on the dynamic graph network matrix;
[0045] A graph network construction module is configured to divide a subgraph network based on a feed type and extract a key abnormal feature vector;
[0046] A feature extraction module is configured to quantitatively evaluate the matching degree of each type of feed subgraph network and the current actual state of the storage, select a current time graph network based on the matching result, and extract a storage environment space-time evolution feature;
[0047] A prediction module is configured to predict the node state evolution based on the selected current graph network using a state transition probability model and generate a future time graph network;
[0048] The decision optimization module is configured to locate the set of feed batches affected by abnormalities in the future time graph network, take the improvement of state transition probability and strategy energy consumption as optimization targets, and generate physical intervention strategies based on preset constraints.
[0049] The present invention has the following beneficial effects:
[0050] The dynamic detection method for feed anomalies provided by the present invention realizes the accurate modeling of feed anomaly transmission links by constructing a dynamic graph network matrix that integrates multi-source data; based on the subgraph matching mechanism, it dynamically captures the spatiotemporal characteristics of the storage environment, which can improve the early prediction ability of dynamic anomaly evolution trends such as sudden changes in temperature and humidity, and pest breeding; finally, it combines the state transition model with energy consumption constraint optimization to generate an adaptive intervention strategy adapted to the differences in feed characteristics and the storage environment, solving the problems of insufficient prediction accuracy and lack of decision-making dynamics in traditional methods, and improving the dynamic adaptability of the intervention strategy in a multi-category mixed storage environment. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] In order to more clearly illustrate the technical solutions and advantages of the embodiments of the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art descriptions. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0052] Figure 1 A flow chart of a method for detecting abnormal dynamic feed in accordance with an embodiment of the present invention;
[0053] Figure 2 This is a structural diagram of a feed abnormal dynamic detection system provided by one embodiment of the present invention. DETAILED DESCRIPTION
[0054] To further illustrate the technical means and effectiveness of the present invention in achieving its intended objectives, the following, in conjunction with the accompanying drawings and preferred embodiments, describes in detail a method and system for detecting abnormal feed dynamics according to the present invention, including its specific implementation, structure, features, and effectiveness. In the following description, references to "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, specific features, structures, or characteristics of one or more embodiments may be combined in any suitable manner.
[0055] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
[0056] The application provides a feed abnormality dynamic detection method and system.
[0057] The application takes a large feed storage center as an example, the feed storage center is provided with a plurality of feed storage bins for storing different types of feed; the application realizes dynamic abnormality detection of the large feed storage center with multiple types of feed, and improves the abnormality detection capability and decision optimization adaptability.
[0058] Please refer to Figure 1 , which shows a method flowchart of the feed abnormality dynamic detection method provided by an embodiment of the application, and the method comprises the following steps:
[0059] Step S100: acquiring sensor data, feed batch attribute data and storage bin position data of a feed storage center, constructing a dynamic graph network matrix, and performing feature compression and sparsification processing on the dynamic graph network matrix;
[0060] Step S100 specifically comprises the following steps:
[0061] Step S110: defining a node matrix, including sensor node position and type, feed batch node water content and protein content, storage position node area number and ventilation condition; specifically, based on a storage bin set, the storage bin set can be represented as , wherein n is the total number of storage bins, temperature and humidity, weight and gas sensors are distributed in each storage bin, and the sensor nodes in each storage bin can be represented as , wherein is the type of the sensor, including the physical position coordinates of the sensor and the type of the sensor; the feed batch node can be represented as , wherein is the index of the feed batch, represents the water content; represents the protein content; represents the storage period; represents the type of feed; the storage position node can be represented as , including the storage bin number , the area number , and the ventilation condition coefficient , which is between 0 and 1, and the higher the value, the better the ventilation effect; the above three types of nodes are vertically spliced in the form of a block matrix to form a complete node matrix
[0062] Step S111: constructing an edge connection relationship, and screening the connection based on data correlation, type similarity and position proximity; wherein the data correlation edge set can be represented as:
[0063]
[0064] wherein, denotes the Pearson correlation coefficient, used to measure the correlation of time series data of sensors and in the same warehouse; and are the historical monitoring data sequences of sensors and respectively; when the correlation coefficient is greater than 0.7, it is determined that the data of the two sensors are strongly correlated, and a connection edge is established;
[0065] Type similarity may be represented as:
[0066]
[0067] wherein, only when the two batches of feed are of the same type and the absolute value of the difference in moisture content is less than , a connection edge is established to represent the correlation of feed batches of the same type and similar moisture content in terms of deterioration risk;
[0068] Position proximity may be represented as:
[0069]
[0070] wherein, the Euclidean distance is used to measure the spatial distance between the warehouse location nodes and ; when the distance is less than a preset distance threshold , it is considered that the positions are adjacent, a connection edge is established, and it is reflected that the environmental influence between areas with close physical positions is more significant;
[0071] Step S112: constructing an edge feature matrix including a temperature and humidity conduction coefficient, a distance attenuation factor, and a feed type matching degree; wherein the temperature and humidity conduction coefficient may be represented as:
[0072]
[0073] wherein, denotes the shared ventilation area of node and node ; denotes the ventilation condition coefficient of node ; denotes the ventilation condition coefficient of node Ventilation condition coefficient; the coefficient represents the conduction ability of temperature and humidity between nodes, the larger the ventilation area, the closer the distance, the better the ventilation condition, and the higher the conduction coefficient;
[0074] Feed type matching degree Can be expressed as:
[0075]
[0076] In the formula, Indicates the absolute difference of water content between two batches of feed; Indicates the water content difference threshold for controlling the exponential decay rate; based on the water content difference between two batches of feed, the matching degree is calculated, and when the water content difference is smaller, Closer to 1, indicating that the type matching degree is higher, and the risk of deterioration is more relevant; Indicates the water content of the target feed batch ;
[0077] Distance decay factor Can be expressed as:
[0078]
[0079] In the formula, Indicates the distance decay coefficient; Indicates the node type of the storage location, used to distinguish sensor nodes, feed batch nodes and other types of nodes; And Respectively represent the area number of the storage location node, wherein Represents the source area, Represents the target area; Indicates the distance decay factor from area To area ; Indicates the physical position coordinate vector of the storage location node ; Indicates the physical position coordinate vector of the storage location node ; Indicates the natural exponential function, which maps the distance related term to the decay factor;
[0080] Step S113: construct the accessibility matrix and mark the abnormal propagation logic path validity; wherein, the channel matrix construction and abnormal propagation rules include: rule 1: humidity to mold rule, which can be expressed as:
[0081]
[0082] In the formula, Indicates the accessibility matrix element, and the subscript indicates from the storage location node To the feed batch node The validity of the propagation path, 1 means valid, 0 means invalid; Represents the set of storage relationship edges, i.e., the edges connecting feed batches and their regions; Indicates storage warehouse The average humidity is obtained by weighted average of all temperature and humidity sensor data in the storage bin; when the feed batch node Storage location node There is a storage relationship edge, that is, the feed is stored in this area, and the storage warehouse When the average humidity exceeds 14%, the path is considered valid, indicating that high humidity environment may cause feed mold;
[0083] Rule 2: Mildew to insect pests:
[0084]
[0085] Where, Indicates that the node is from the storage location To the feed batch node The validity of the abnormal propagation path, 1 is valid and 0 is invalid; Represents the storage location node, including the storage warehouse number, area number and ventilation condition coefficient; represents the target feed batch node, Index for feed batches; Indicates source feed batch The physical location coordinates of Indicates target feed batch The physical location coordinates of Indicates the threshold of moldy characteristics; the spatial distance between two feed batches is less than the threshold , the same category, and the moldy characteristic value of the source batch Exceeding the threshold When the mold is detected, it is determined that the mold can spread to the adjacent feed of the same type and the path is valid; Indicates target feed batch The thermal conductivity of
[0086] Based on the above rules, the abnormal propagation paths between different storage areas can also be quantified through regional location proximity and ventilation conduction coefficient. For example, the effectiveness of the temperature and humidity conduction path between areas connected by the ventilation system can be expressed as:
[0087]
[0088] Where, Indicates that the node is from the storage location To storage location node The effectiveness of abnormal propagation paths; Indicates area The physical location coordinates of Indicates area The physical location coordinates of Indicates the ventilation association distance threshold, which can be set based on the coverage of the ventilation system; Indicates area and The temperature and humidity conductivity between Indicates area Ventilation condition coefficient;
[0089] This embodiment integrates multidimensional data on physical equipment, material attributes, and spatial layout in the storage environment through a block matrix containing sensor nodes, feed batch nodes, and storage location nodes. The location and type information of the sensor nodes provides a spatial positioning basis for environmental monitoring data. The moisture content and protein content attributes of the feed batch nodes characterize the inherent sensitivity of the material to deterioration. The area number and ventilation conditions of the storage location nodes reflect the factors affecting the spatial environment on the feed. Step S110 merges the three types of nodes in the form of a block matrix. The resulting complete node matrix provides a structured data foundation for the subsequent construction of a dynamic graph network. This graph model can simultaneously express the association between sensor data and feed status, the type similarity between feed batches, and the spatial constraint relationship between storage locations.
[0090] Step S120: Using a variational graph autoencoder to extract abnormal propagation features from the feed storage graph network. The purpose is to extract the potential features of abnormal propagation in the feed storage graph network through a graph convolutional network (GCN), compress high-dimensional node features, and screen key propagation paths. Specifically, the following steps are included:
[0091] Step S121: The temperature, humidity, spectrum, and location data of the sensor nodes and the feed batch nodes are fused through a two-layer graph convolutional network to generate a node potential representation for quantifying the intensity of abnormal transmission risk, where:
[0092] The first layer of convolution operation can be expressed as:
[0093]
[0094] Where, is the node feature matrix, with dimension ,in is the total number of nodes, including sensor nodes, feed batch nodes, and storage location nodes, The original feature dimension, such as temperature and humidity data from sensors, moisture content and protein content of feed batches, and ventilation conditions of storage locations; represents the weighted adjacency matrix of the self-loop edge, , represents the adjacency matrix The edge connection relationship constructed from step S111 、 、 , add the identity matrix Forming self-loops enables nodes to integrate their own characteristics; represents the degree matrix, and the diagonal elements are used to normalize the adjacency matrix; represents the activation function;
[0095] The second layer convolution operation can be expressed as:
[0096]
[0097] Where, Represents the hidden feature matrix of the first layer output; Represents the second layer weight matrix; through the same normalized adjacency matrix operation as the first layer, Mapping to low-dimensional latent space , where the potential vector of each node is Contains unusual transmission risk characteristics; e.g. , represents the mold risk intensity subvector, and Positive correlation, higher values indicate a higher probability of mold; , represents the pest spread probability subvector, and Positive correlation reflects the risk of high-protein feed attracting pests; through the two-layer GCN, the temperature and humidity data of the sensor node and the data of the feed batch are weighted and fused. For example, the high humidity environment of the storage location forms an association mapping with the mold risk of the high-water content feed batch; this implementation is based on the node matrix and edge connection relationships, integrating warehouse physical layout, feed attributes, and environmental monitoring into graph convolution operations. This approach incorporates both spatial topology and material attribute features. By constraining the reconstruction error of a variational graph autoencoder, it automatically filters edges strongly correlated with anomaly propagation, achieving graph network sparsification and reducing computational complexity. This implementation not only improves the model's processing efficiency for large-scale warehouse graph data through adjacency matrix normalization and feature compression, but also captures anomaly propagation patterns such as spatiotemporal coupling of temperature and humidity fields and chain reactions of feed ingredients through self-loop mechanisms and nonlinear activation functions. This effectively addresses the issues of insufficient precision in multi-source heterogeneous data fusion and ambiguous modeling of anomaly propagation links in traditional methods.
[0098] Step S130: screening the edge connection relationship strongly related to the feed deterioration by using the edge sampling algorithm, and retaining the associated edge according to the temperature and humidity conduction coefficient and the preset ranking threshold; specifically, the calculated temperature and humidity conduction coefficient matrix is obtained from step S112, which records the temperature and humidity conduction capacity between any two nodes in the feed storage graph network, and the higher the conduction coefficient, the easier the heat and humidity propagate between nodes; all nodes are divided into two categories: feed batch nodes and storage location nodes, which correspond to the actual feed pile and physical storage area respectively; then the conduction coefficients between all nodes are arranged in descending order; the top 20% of edges with the highest conduction coefficients are retained, and the remaining 80% of weakly related edges are removed. The differentiated screening strategy is as follows:
[0099] Feed batch nodes: the edges directly connected to high humidity storage locations are mainly retained to reflect the path of feed exposed to a high-risk environment; storage location nodes: strong conduction edges connected through ventilation systems are preferentially retained, such as air duct connections between adjacent storage locations; finally, the graph network is sparsified and dynamically updated, the adjacency matrix of the graph network is updated according to the screening results, only the edges meeting the threshold requirements are retained, and the sparsified graph structure is formed; the sparsified graph reduces the computational load, but retains the most important abnormal propagation path; at the same time, the conduction coefficient is recalculated regularly and the screening is performed, which adapts to the dynamic changes of the storage environment, and when an anomaly is detected, the screening threshold can be temporarily increased to strengthen the monitoring of the abnormal propagation path;
[0100] As a preferred embodiment, the sparsified graph structure can be input into the variational graph autoencoder of step S120 to enable the model to focus on learning the abnormal propagation pattern of the strongly related edge. Finally, the model can more accurately capture the key abnormal propagation path, reduce the interference of noise edges, and improve the precision of abnormal risk quantification.
[0101] Step S200: dividing the sub-graph network based on the feed type and extracting the key abnormal feature vector; specifically, the global storage graph network is divided into multiple sub-graphs according to the feed type, and each sub-graph corresponds to the storage environment, sensors and adjacent area of a type of feed;
[0102] Step S200 specifically includes:
[0103] Step S210: calculating the humidity deviation and temperature fluctuation amplitude based on the time series data of the temperature and humidity sensor; specifically, the real-time data of the temperature and humidity sensor of the feed storage location is compared with the average humidity of the historical storage environment of the feed batch to calculate the deviation degree of the current humidity from the historical average; considering the sensitivity difference of different feed types to humidity, the evaluation standard of the deviation degree is adjusted adaptively through a dynamic threshold; the temperature fluctuation amplitude can be calculated by calculating the difference between the maximum temperature and the minimum temperature in a preset time period;
[0104] Step S220: Calculate the difference between the current batch spectrum and the standard spectrum based on the near-infrared spectrum data as the spectrum component abnormal value; use the near-infrared spectrometer to scan the feed batch, obtain its reflection or absorption spectrum data at different wavelengths to reflect the chemical component content of the feed; compare the measured spectrum with the standard spectrum of this type of feed, and calculate the difference between the two; for example, if the measured spectrum of a batch of soybean meal feed is significantly lower than the standard spectrum in the protein characteristic wavelength, it indicates that the protein is degraded or mixed with foreign matter, and the spectrum component abnormal value is generated;
[0105] Step S230: Output the probability value of insect damage signs based on the image analysis model; specifically, obtain the feed surface image through the camera installed in the warehouse, and perform preprocessing such as denoising and contrast enhancement on the image to highlight possible insect damage features; use the pre-trained YOLOv5 target detection model to analyze the image, identify and locate insect damage related targets, and output the probability value of detecting insect damage.
[0106] Step S300: Quantitatively evaluate the matching degree of each type of feed subgraph network with the actual state of the current warehouse, select the current time graph network based on the matching result, and extract the spatiotemporal evolution features of the warehouse environment;
[0107] Step S300 specifically includes:
[0108] Step S310: Calculate the feed type matching degree score, the environment parameter matching degree score, and the abnormal feature matching degree score; first, compare the batch quantity and proportion of each type of feed in the current warehouse with the pre-set feed types of each subgraph network, calculate the conformity degree of the actual feed composition and the pre-set type of the subgraph, then compare the pre-set environment parameter range of each subgraph network with the real-time environment data measured by the sensors in the warehouse, evaluate the fitness degree of the current environment and the pre-set condition of the subgraph, and finally based on the humidity deviation, spectrum difference value, and insect damage probability abnormal features extracted in step S200, analyze the similarity of the abnormal patterns recorded in the history of each subgraph network, and determine which historical abnormal patterns of the subgraph the current abnormal features are closer to;
[0109] Step S320: Weighted sum of the three scores to obtain the comprehensive matching degree; weight and sum the three types of matching degree scores according to the pre-set weight to obtain the comprehensive matching degree of each subgraph; wherein the weight can be dynamically adjusted according to the warehouse operation scene, such as focusing on type matching degree during feed storage stage, focusing on environment parameter matching degree during summer high temperature period, and focusing on abnormal feature matching degree during insect damage high incidence period;
[0110] Step S330: select the subgraph with the highest comprehensive matching degree as the current time graph network; select the subgraph with the highest comprehensive matching degree as the current time graph network, and analyze the space-time evolution characteristics of the warehouse environment based on this: in space, pay attention to the distribution and propagation path of abnormal features in different warehouse areas; in time, track the change trend of parameters such as temperature and humidity, abnormal features, etc.; this embodiment dynamically selects the optimal subgraph network through multi-dimensional matching degree evaluation, realizes the adaptation of the detection model to the actual state of the warehouse, and further ensures that the system can dynamically adjust the detection focus according to the current feed composition, environmental conditions and abnormal patterns in the warehouse; on the other hand, after selecting the subgraph, the space-time evolution characteristics extracted can capture the propagation path of the abnormality in the warehouse space and the development trend in time, providing a dynamic basis for subsequent abnormality prediction and intervention strategy generation. The problem of insufficient adaptability of the detection model in a multi-category feed mixed storage environment is solved, the accuracy of abnormality detection is improved, and the response ability to dynamic changes in the warehouse environment is improved, so that the system can more timely and accurately discover potential abnormalities and predict their development trend.
[0111] Step S400: based on the selected current graph network, predict the node state evolution using a state transition probability model, and generate a future time graph network;
[0112] Step S400 specifically includes:
[0113] Step S410: build a state transition probability model based on a long short-term memory network, input the change rate of environmental parameters and abnormal feature values, and output state transition probability; specifically, the state definition includes: , which represents a safe state, humidity and no mold characteristics, , which represents an alert state, and slight caking, , which represents an abnormal state, and obvious mold or insect damage, , which represents a recovery state, humidity decreases and mold characteristics disappear after intervention; the state transition probability model can be represented as:
[0114]
[0115] In the formula, represents the state transition probability matrix; represents a safe state; represents an alert state; represents an abnormal state; represents a recovery state; represents the probability that the feed remains abnormal-free in the future under the current safe state; represents the probability that the feed returns to a safe state after improving the environment after being abnormal; Probability of feed changing from safe to alert due to environmental humidity and temperature fluctuation; Probability of feed staying in alert state without further deterioration or recovery; Probability of feed changing from alert to abnormal due to continuous environmental deterioration; Probability of feed continuously deteriorating in abnormal state without effective intervention; Probability of feed temporarily recovering after intervention but becoming abnormal again; Probability of feed changing from abnormal state to recovery state after intervention; Probability of feed continuously staying in stable recovery state after intervention; Probability of abnormal state recovering to alert state through mild intervention such as temporary ventilation, which needs to be determined based on historical data training; Through the design of this matrix, the state transition probability model can quantitatively depict the dynamic process of feed deterioration and the influence of intervention measures, and provide a logically rigorous probability basis for subsequent state evolution prediction;
[0116] The model training process includes: based on the historical sensor data of step S100 and the abnormal features of step S200, labeling the feed state at each time point and the subsequent transition results; input the feature sequence of the continuous time window into LSTM to capture the time dependence of state transition; cross-entropy loss can be used, and the optimization goal is to minimize the deviation between the predicted transition probability and the actual transition frequency; the input features include: humidity change rate, temperature change rate and mold feature value; the output feature is a 4x4 probability matrix , which is mapped to a 4x4 probability matrix through the full connection layer of the LSTM network;
[0117] Step S420: predicting the evolution path of the feed state according to the state transition probability; based on the transition probability matrix , state evolution sampling is performed for each batch of feed: starting from the current state, the next state is randomly selected according to the probability distribution of , , ; repeat the process to the preset prediction length to generate multiple possible state evolution paths; finally, the evolution path with a probability exceeding the threshold is extracted and screened as the key path;
[0118] Step S430: generate a simplified future time graph network combined with physical constraint rules;
[0119] Among them, the physical constraint rule space constraint includes:
[0120] The first constraint condition is configured to limit the abnormal propagation distance to be within the coverage of the ventilation system;
[0121] The second constraint condition is configured to satisfy the physical deterioration dynamics for state transition;
[0122] The third constraint is configured to retain only the transfer edges with LSTM prediction probabilities greater than 20%, and eliminate low-probability propagation paths;
[0123] According to the prediction result of step S420, the state of the node at the future time is updated; at the same time, only the edges that meet the physical constraints and have a high predicted propagation probability are retained; finally, the radius is generated with the current abnormal node as the center. local future graph; this embodiment combines the LSTM state transition model with physical constraints to map the current storage state constructed in steps S100-S300 to future time and space, and uses LSTM to capture the long-term dependencies of time series such as the temperature and humidity change rate and mold characteristics, thereby realizing time series modeling of feed state evolution; through the logical design of the state transition matrix, it ensures that the prediction results are consistent with the actual dynamic process of feed deterioration, avoiding unreasonable predictions of pure data-driven models; the final generated future time graph network can intuitively display the spatial path and time risk points of abnormal propagation.
[0124] Step S500: Based on the future time graph network positioning abnormality affecting the feed batch set, the state transition probability improvement and strategy energy consumption are optimized, and a physical intervention strategy is generated based on preset constraints;
[0125] Step S500 specifically includes:
[0126] Step S510: Construct a benefit function, positively weight the state transition probability improvement and negatively weight the strategy energy consumption; the expression of the benefit function is:
[0127]
[0128] Where, Representation Strategy The comprehensive income value; Represents the state transition probability weight coefficient; Indicates execution strategy After, abnormal state To recovery state The improvement of the transition probability; represents the energy consumption weight coefficient; Indicates execution strategy Energy consumption values can be preset according to the strategy type; , is the difference in the probability of transition from the abnormal state to the recovery state before and after the intervention;
[0129] Solving the constrained optimization problem can be expressed as:
[0130]
[0131] Where, denotes a strategy denotes an execution time denotes a critical time threshold determined by feed spoilage kinetics, such as the remaining time of 8 hours for a certain type of feed to go from an abnormal state to irreversible spoilage denotes maximization denotes a strategy denotes a comprehensive benefit value denotes being limited to
[0132] Step S520: setting a critical time constraint; specifically, calculating the remaining time from the current state to irreversible spoilage through the state evolution path predicted by step S420; for example, a batch in an abnormal state predicts that it will be completely moldy after 8 hours; it should be noted that the threshold value can be adjusted according to the type of feed and the storage period, such as a longer critical time for fresh feed and a stricter threshold for feed close to the expiration date
[0133] Step S530: solving the maximum value of the benefit function under the time constraint to generate an optimal physical intervention strategy
[0134] The embodiment predefines a strategy library, including:
[0135] Ventilation strategy: different wind speeds, ventilation durations
[0136] Pesticide strategy: type, dosage, and action time of fumigant
[0137] Shifting strategy: transferring the feed batch to a low-risk area
[0138] For each strategy , the state transition probability after intervention is predicted through the future time diagram network of step S400; the energy consumption is calculated and substituted into the benefit function for calculation. The optimization algorithm can use heuristic algorithms such as genetic algorithm and particle swarm optimization; the embodiment solves the optimal physical intervention strategy under the preset critical time constraint by constructing a benefit function with the state transition probability improvement amount and the strategy energy consumption as the optimization objectives, realizing a closed loop from abnormal prediction to intelligent decision-making; the feed abnormality dynamic detection method provided by the application can not only accurately locate the abnormal influence batch based on the future time diagram network, but also balance the state improvement effect and energy cost by quantifying the benefit, ensuring that the intervention measures are executed before the feed spoilage becomes irreversible, avoiding the subjectivity of traditional experience-based decision-making; at the same time, this mechanism supports multi-strategy collaborative optimization and dynamic adjustment, and can generate an intervention scheme that takes into account efficiency and cost in real time according to the feed state and environmental changes, significantly improving the scientificity, timeliness, and resource allocation efficiency of large-scale feed storage center management, and providing a solution for abnormality response in a multi-category feed mixing and storage environment.
[0139] A specific embodiment of the feed abnormality dynamic detection method is provided as follows:
[0140] In this example, a large feed storage center stores 500 batches of pig feed and poultry feed. Area C is the pig feed storage area. The humidity sensor measured a value of 14.8% and the temperature was 28°C. Near-infrared spectroscopy analysis showed that the protein absorption peak of batch number P20250601 was abnormal, with a spectral difference of 0.65. Image monitoring captured white mold on the feed surface, and the pest identification model output a probability of 75%. The status was determined to be Area D is the poultry feed storage area: humidity is 13.2%, temperature is 25°C; spectral analysis shows no significant abnormalities, but the storage period of this batch has exceeded the recommended storage period, and the moisture content has increased by 2% compared to the storage time; image analysis shows no insect pests, but slight caking is present; the status is determined to be ;
[0141] Step S1: Based on step S110, the sensor nodes, feed batch nodes, and storage location nodes in regions C and D are merged according to a block matrix; the edge connection relationship is filtered through data correlation, type similarity, and location proximity to form a structured edge set; the node matrix includes: temperature and humidity sensor nodes, pig feed batch nodes, poultry feed batch nodes, and storage location nodes deployed in regions C / D; edge connection: a ventilation duct connection edge is established from region C to D, sharing a ventilation area A = 15 m2; feed batches of the same type are matched; the accessibility matrix includes: Rule 1 trigger: Humidity in region C > 14% → pig feed moldy path is valid; Rule 3 trigger: Ventilation connection in region C → D → abnormal transmission path is valid;
[0142] Step S2: Abnormal feature vector selection: Region C: humidity deviation 1.2, temperature fluctuation 8°C / 12h, spectral difference 0.65, insect infestation probability 75%; Region D: humidity deviation 0.8, temperature fluctuation 3°C / 12h, spectral difference 0.2, insect infestation probability 20%;
[0143] Step S3: Subgraph network matching: Calculate the comprehensive matching degree through step S300 and select the “high-humidity pig feed subgraph” as the graph network at the current moment;
[0144] Step S4: Future state prediction: Step S400 predicts through LSTM model: Region C: If no intervention is made, the next 24 hours will be The state deteriorates to irreversible deterioration with a probability of 90%, and may spread to area D through the ventilation duct; Area D: Maintain The probability of the status is 60%, deteriorating to The probability of status is 30%;
[0145] Step S5: Based on the constructed strategy library: Strategy 1: Ventilate the entire warehouse in area C for 4 hours, consume 40 kWh of electricity, and predict Strategy 2: Directional ventilation in area C combined with antifungal spraying for 2 hours, consuming 25 kWh of electricity, predicts that P(I→R) will increase to 88%. Calculation of the profit function shows that Strategy 2 has a 37% higher profit than Strategy 1.
[0146] Step S6: Strategy execution and results:
[0147] After execution in area C: humidity dropped to 12.5%, temperature 24°C; spectral difference value dropped to 0.21, mildew characteristics disappeared; pest probability <5%, status updated to R;
[0148] Due to the blocking of abnormal transmission, the humidity in area D remained at 13.2% and did not deteriorate to state I.
[0149] In the end, 150 batches of pig feed were effectively avoided from being scrapped and 300 batches of poultry feed were blocked from deteriorating, and the total cost was significantly reduced compared with the non-intervention plan; this feed anomaly dynamic detection method constructs a dynamic graph network that integrates sensor nodes, feed attribute nodes, and storage area nodes, and combines variational graph autoencoder feature extraction and anomaly propagation path quantification model. This feed anomaly dynamic detection method constructs a dynamic graph network that integrates sensor nodes, feed attribute nodes, and storage area nodes, and combines variational graph autoencoder feature extraction and anomaly propagation path quantification model. It can accurately locate the impact range of anomalies and predict state evolution trends. It generates an adaptive intervention strategy based on the profit function optimization of state migration probability and energy consumption, realizes dynamic anomaly detection in multi-category feed storage environments, effectively improves the early prediction ability of anomalies and the adaptability of decision optimization, blocks the propagation of anomalies and reduces processing costs.
[0150] See also Figure 2 , which shows a schematic structural diagram of a feed abnormal dynamic detection system provided by an embodiment of the present invention, the system includes:
[0151] a data acquisition module configured to acquire sensor data, feed batch attribute data, and storage location data of a feed storage center, construct a dynamic graph network matrix, and perform feature compression and sparsification processing on the dynamic graph network matrix;
[0152] a graph network building module configured to partition the subgraph network based on feed type and extract key anomaly feature vectors;
[0153] The feature extraction module is configured to quantitatively evaluate the matching degree between various feed sub-graph networks and the current warehouse actual status, select the current graph network based on the matching results, and extract the spatiotemporal evolution characteristics of the warehouse environment;
[0154] A prediction module is configured to predict the node state evolution based on the selected current graph network using a state transition probability model and generate a future time graph network;
[0155] The decision optimization module is configured to position the abnormal influence on the feed batch set according to a future time graph network, to generate a physical intervention strategy based on a preset constraint condition, with a state transition probability improvement amount and a strategy energy consumption as optimization targets.
[0156] It should be noted that the above-mentioned embodiment sequence of the application is only for description, and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multi-task processing and parallel processing are also possible or can be advantageous.
[0157] Each of the embodiments in the specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other. Each embodiment focuses on the difference from other embodiments.
Claims
1. A method for dynamic detection of feed abnormality, characterized in that: The method comprises: Obtaining sensor data, feed batch attribute data, and storage location data from a feed storage center, constructing a dynamic graph network matrix, and performing feature compression and sparsification processing on the dynamic graph network matrix; Divide the subgraph network based on feed type and extract key abnormal feature vectors; Quantitatively evaluate the matching degree between various feed subgraph networks and the current warehouse actual status, select the current graph network based on the matching results, and extract the spatiotemporal evolution characteristics of the warehouse environment; Based on the selected current graph network, the state transition probability model is used to predict the node state evolution and generate the future time graph network; According to the future time graph network positioning anomalies affecting the feed batch set, the state transition probability improvement and strategy energy consumption are taken as optimization goals, and the physical intervention strategy is generated based on the preset constraints.
2. The method for detecting abnormal dynamics of feed according to claim 1, wherein: Obtain sensor data, feed batch attribute data, and storage location data from the feed storage center to construct a dynamic graph network matrix, including: Define the node matrix, including the sensor node location and type, feed batch node moisture content and protein content, storage location node area number and ventilation conditions; Build edge connection relationships and filter connections based on data relevance, type similarity, and location proximity; Construct an edge feature matrix, including the temperature and humidity conductivity coefficient, distance attenuation factor, and feed type matching degree; Construct a reach matrix to mark the validity of the abnormal propagation logic path.
3. The method for detecting abnormal dynamics of feed according to claim 2, wherein: Performing feature compression and sparsification processing on the dynamic graph network matrix includes: A variational graph autoencoder is used to extract abnormal propagation features from the feed storage graph network, including: The temperature, humidity, spectrum, and location data of sensor nodes and feed batch nodes are fused through a two-layer graph convolutional network to generate node potential representations for quantifying the intensity of abnormal transmission risk. The adjacency matrix is reconstructed through inner product operations to restore the topological structure representing the chain transmission path of mildew and insect pests; The edge sampling algorithm is used to screen the edge connections that are strongly correlated with feed deterioration, and the associated edges are retained based on the temperature and humidity conductivity coefficient and the preset ranking threshold.
4. The method for detecting abnormal dynamics of feed according to claim 1, wherein: Divide the subgraph network based on feed type and extract key abnormal feature vectors, including: Calculate humidity deviation and temperature fluctuation amplitude based on time series data of temperature and humidity sensors; Based on the near-infrared spectral data, the difference between the current batch spectrum and the standard spectrum is calculated as the spectral component abnormal value; Output the probability value of pest signs based on the image analysis model.
5. The method for detecting abnormal dynamics of feed according to claim 1, wherein: Quantitatively evaluate the degree of match between various feed subgraph networks and the current warehouse status, select the current graph network based on the matching results, and extract the spatiotemporal evolution characteristics of the warehouse environment, including: Calculate the feed type matching score, environmental parameter matching score and abnormal feature matching score; The weighted sum of the three scores is used to obtain the comprehensive matching degree; The subgraph with the highest comprehensive matching degree is selected as the graph network at the current moment.
6. The method for detecting abnormal dynamics of feed according to claim 1, wherein: Based on the selected current graph network, the state transition probability model is used to predict the node state evolution and generate the future time graph network, including: A state transition probability model is constructed based on the long short-term memory network, which inputs the rate of change of environmental parameters and abnormal characteristic values and outputs the state transition probability; Predict the feed state evolution path based on state migration probability; Combine physical constraints to generate a simplified future time graph network.
7. The method for detecting abnormal dynamics of feed according to claim 6, wherein: The state transition probability model can be expressed as: Where, represents the state transition probability matrix; Indicates a safe state; Indicates alert status; Indicates an abnormal state; Indicates recovery status; Indicates the probability that the feed will remain safe in the future under the current safety condition; It indicates the probability that the feed will return to a safe state due to environmental improvement after an abnormality; Indicates the probability that the feed changes from a safe state to a warning state due to fluctuations in ambient temperature and humidity; It indicates the probability that the feed does not deteriorate further or recover in the alert state; Indicates the probability of feed deteriorating from warning to abnormal due to continued environmental deterioration; It indicates the probability that the feed will continue to deteriorate if no effective intervention is taken when it is in an abnormal state; It indicates the probability that the feed will be abnormal again after temporary recovery after intervention; It represents the probability that the feed will change from abnormal state to recovery state after intervention measures are taken; represents the probability that the feed will continue to maintain a stable recovery state after the intervention; Indicates the probability that the abnormal state can be restored to the alert state through intervention.
8. The method for detecting abnormal dynamics of feed according to any one of claims 1 to 7, characterized in that: Based on the future time graph network positioning abnormalities affecting the feed batch set, the state transition probability improvement and strategy energy consumption are optimized, and a physical intervention strategy is generated based on preset constraints, including: Construct a profit function, positively weighting the improvement in state transition probability and negatively weighting the strategy energy consumption; Set critical time constraints; Solve the maximum value of the profit function under time constraints and generate the optimal physical intervention strategy.
9. The method for detecting abnormal dynamics of feed according to claim 8, wherein: The expression of the profit function is: Where, Representation Strategy The comprehensive income value; Represents the state transition probability weight coefficient; Indicates execution strategy After, abnormal state To recovery state The improvement of the transition probability; represents the energy consumption weight coefficient; Indicates execution strategy energy consumption value.
10. Feed abnormal dynamic detection system, characterized by: The method for detecting abnormal dynamic feed behavior according to any one of claims 1 to 9 is adopted, wherein the system comprises: a data acquisition module configured to acquire sensor data, feed batch attribute data, and storage location data of a feed storage center, construct a dynamic graph network matrix, and perform feature compression and sparsification processing on the dynamic graph network matrix; a graph network building module configured to partition the subgraph network based on feed type and extract key anomaly feature vectors; The feature extraction module is configured to quantitatively evaluate the matching degree between various feed sub-graph networks and the current warehouse actual status, select the current graph network based on the matching results, and extract the spatiotemporal evolution characteristics of the warehouse environment; A prediction module is configured to predict the node state evolution based on the selected current graph network using a state transition probability model and generate a future time graph network; The decision optimization module is configured to locate the set of feed batches affected by abnormalities in the future time graph network, take the improvement of state transition probability and strategy energy consumption as optimization targets, and generate physical intervention strategies based on preset constraints.
Citation Information
Patent Citations
Grain storage management system based on Internet of Things technology
CN119941132A
Dynamic cooperative control method and system for digital twin-driven warehousing equipment
CN120181362A