Ecological chicken feeding amount control method based on machine learning
By constructing an undirected graph data structure and a graph neural network, the amount of feed is dynamically adjusted to adapt to the spatial distribution of the chicken flock, which solves the problem of mismatch of feeding resources in the free-range environment of ecological chickens and achieves precise matching of feed delivery and spatial feeding needs.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHONGQING ANIMAL HUSBANDRY TECH EXTENSION STATION
- Filing Date
- 2026-04-27
- Publication Date
- 2026-07-21
Smart Images

Figure CN122432384A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of agricultural intelligent control technology, which is an intersection of machine learning and graph data retrieval, and discloses a method for controlling the feeding amount of ecological chickens based on machine learning. Background Technology
[0002] In the field of feeding control for free-range chickens, existing conventional technical solutions typically employ a strategy of global visual monitoring combined with homogeneous distribution. Specifically, overhead cameras are installed above the breeding area, and image recognition algorithms are used to count the total number of chickens within the current field of view or calculate the global average density. After obtaining the overall flock size data, the system directly distributes the calculated total feed amount proportionally according to the number of feeding nodes, based on a preset mathematical formula for the standard feed intake per chicken. Upon receiving the equally distributed feeding control command, each distributed feeding node synchronously activates its feeding mechanism to deliver feed to the corresponding feed trough.
[0003] The aforementioned conventional technical solutions treat free-range chickens as a uniformly distributed, homogeneous whole for calculating and allocating feed, without considering the strong huddling and clustering habits of chickens in their natural growth environment. Because the spatial distribution of chickens within the rearing area is highly uneven, homogenized allocation instructions can lead to feed troughs in densely populated areas experiencing competition for feed exceeding their physical capacity in a short period, resulting in feed spillage, waste, and stress on the chickens. Meanwhile, feed troughs in less densely populated peripheral areas remain idle, causing a mismatch between feeding resources and physical feed trough space. Summary of the Invention
[0004] The purpose of this invention is to provide a machine learning-based method for controlling the feeding amount of free-range chickens, which can effectively solve the problems mentioned in the background art.
[0005] To achieve the above objectives, the technical solution adopted by the present invention is as follows:
[0006] A machine learning-based method for controlling the feeding amount of free-range chickens includes:
[0007] Location-aware nodes and distributed feeding nodes are deployed in the ecological chicken farming area. The location coordinates of individual chickens are used as nodes of an undirected graph, the relationship of individual spacing below a preset distance threshold is used as edges of the undirected graph, and the location of the feed trough is used as node attribute labels. A dynamically updated undirected graph data structure is constructed and stored in a graph database.
[0008] The subgraph matching interface of the graph database is used to retrieve locally connected subgraphs centered on each of the distributed feeding nodes and located within a preset physical radius.
[0009] The node degree, edge weight, and node attribute label of the locally connected subgraph are input into a graph neural network to extract a local competition feature vector that represents the intensity of local foraging competition.
[0010] The feeding ratio coefficient of each of the distributed feeding nodes is calculated based on the local competition feature vector, and the feeding ratio coefficient is decomposed into independent feeding amount control instructions for each of the distributed feeding nodes in combination with the total feeding demand.
[0011] Preferably, the machine learning-based method for controlling the feeding amount of free-range chickens is characterized in that relationships where the distance between individuals is less than a preset distance threshold are used as edges in an undirected graph, including:
[0012] The location sensing node transmits radio frequency signals and receives return signals, and a signal attenuation distance calculation model is constructed based on the flight time of the radio frequency signals and the received signal strength indication value.
[0013] The individual distance between any two undirected graph nodes is calculated using the signal attenuation distance calculation model. When the individual distance is less than the preset distance threshold, an undirected graph edge connecting the two undirected graph nodes is established in the undirected graph data structure. When the individual distance is greater than or equal to the preset distance threshold, the corresponding undirected graph edge in the undirected graph data structure is deleted, so as to dynamically maintain the topological connection state of the undirected graph data structure based on the real-time individual distance.
[0014] Preferably, the machine learning-based method for controlling the feeding amount of free-range chickens is characterized by retrieving a locally connected subgraph centered on each of the distributed feeding nodes and located within a preset physical radius, including:
[0015] Determine the central node corresponding to each of the distributed feeding nodes in the undirected graph data structure;
[0016] Starting from the central node, perform a breadth-first traversal operation. In each hop of the breadth-first traversal operation, calculate the cumulative path distance between the currently traversed undirected graph node and the central node.
[0017] When the cumulative path distance exceeds the preset physical radius, the current traversal branch is truncated, and all undirected graph nodes and undirected graph edges that have been traversed before the truncation are aggregated into the local connected subgraph.
[0018] Preferably, the machine learning-based method for controlling the feeding amount of free-range chickens is characterized by inputting the node degree, edge weight, and node attribute labels of the locally connected subgraph into a graph neural network to extract a local competition feature vector representing the intensity of local feeding competition, including:
[0019] In the message passing phase of the graph neural network, for each undirected graph node in the locally connected subgraph, the feature information passed by the adjacent undirected graph nodes is obtained, and attention coefficients are assigned to the feature information passed by the adjacent undirected graph nodes according to the edge weights, wherein the edge weights and the attention coefficients are negatively correlated.
[0020] The feature information after the attention coefficient is assigned is concatenated and fused with the node degree of the current undirected graph node and the node attribute label. After multi-layer graph convolution operation, the local competitive feature vector is output.
[0021] Preferably, the machine learning-based method for controlling the feeding amount of free-range chickens is characterized in that calculating the feeding ratio coefficient of each of the distributed feeding nodes based on the local competition feature vector includes:
[0022] Extract the competition intensity value from the local competition feature vector, and input the competition intensity value corresponding to all the distributed feeding nodes into the softmax normalization function to obtain the initial allocation ratio of each of the distributed feeding nodes.
[0023] The remaining capacity feature of the corresponding feed trough position contained in the node attribute label is read, and the initial allocation ratio is linearly mapped and corrected using the remaining capacity feature. The corrected initial allocation ratio is then confirmed as the feeding ratio coefficient.
[0024] Preferably, the machine learning-based method for controlling the feeding amount of free-range chickens is characterized in that, before decomposing the feeding ratio coefficient into independent feeding amount control instructions for each of the distributed feeding nodes based on the total feeding demand, it further includes:
[0025] Extract the sequence of total degree of all nodes in the undirected graph data structure at multiple consecutive historical timestamps from the graph database;
[0026] The sequence of total degree of all nodes in the graph is input into a long short-term memory network to predict the total degree of all nodes in the graph for the next feeding cycle.
[0027] Query the pre-stored chicken flock individual feed intake mapping table, multiply the predicted total degree of all nodes in the whole graph with the chicken flock individual feed intake mapping table, and generate the total feeding requirement.
[0028] Preferably, the machine learning-based method for controlling the feeding amount of free-range chickens is characterized in that the individual distance between any two nodes in the undirected graph is calculated using the signal attenuation distance measurement model, including:
[0029] Extract the multipath interference component from the received signal strength indication value and construct the Kalman filter state equation containing position coordinates and velocity vector;
[0030] The initial distance value output by the signal attenuation distance measurement model is used as the observation input of the Kalman filter state equation. The initial distance value is smoothed by the Kalman filter state equation to filter out the multipath interference component and output the individual spacing after interference is removed.
[0031] Preferably, the machine learning-based method for controlling the feeding amount of ecological chickens is characterized in that, in each hop of the breadth-first traversal operation, the cumulative path distance between the currently traversed undirected graph node and the center node is calculated, including:
[0032] Get the cumulative distance of the undirected graph node reached in the current traversal to the previous hop in the previous hop traversal, and extract the current edge weight corresponding to the current undirected graph edge between the currently reached undirected graph node and the previous hop undirected graph node;
[0033] The cumulative distance of the previous hop is added to the current edge weight to obtain the cumulative path distance. When the cumulative path distance exceeds the preset physical radius for the first time, the undirected graph node reached by the current traversal is marked as a boundary isolation node, blocking the subsequent traversal path starting from the boundary isolation node.
[0034] Preferably, the machine learning-based method for controlling the feeding amount of ecological chickens is characterized in that attention coefficients are assigned to the feature information transmitted between adjacent undirected graph nodes according to the edge weights, including:
[0035] A multi-head graph attention mechanism is introduced to map the edge weights to initial attention scores corresponding to multiple attention heads;
[0036] The material trough position contained in the node attribute label is processed by vector embedding to obtain the material trough position bias vector, and the material trough position bias vector is superimposed on the initial attention score to obtain the superimposed attention score.
[0037] The superimposed attention score is processed by a preset activation function, and the processed output value is confirmed as the attention coefficient.
[0038] Preferably, the machine learning-based method for controlling the feeding amount of free-range chickens is characterized by using the remaining capacity feature to perform a linear mapping correction on the initial allocation ratio, including:
[0039] Obtain the historical discharge rate and current discharge amount of the distributed feeding node, and calculate the real-time remaining amount of the hopper based on the historical discharge rate and current discharge amount;
[0040] Determine whether the real-time balance of the feed trough is lower than a preset balance threshold. When the real-time balance of the feed trough is lower than the preset balance threshold, generate a capacity penalty factor, use the capacity penalty factor to narrow the numerical range of the initial allocation ratio, and output the feeding ratio coefficient after being reduced by the capacity penalty factor.
[0041] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0042] 1. This invention constructs an undirected graph data structure using individual chicken coordinates as nodes, individual spacing relationships as edges, and feed trough locations as attribute labels, and stores this data in a graph database. It utilizes a subgraph matching interface to retrieve locally connected subgraphs within the physical radius of feeding nodes, and combines this with a graph neural network to extract local competition feature vectors and calculate feeding ratio coefficients, thus decomposing the total feeding demand into independent feeding control commands. This technique transforms the spatial distribution of the chicken flock into a graph topology structure for local quantification and analysis. It changes the logic of allocating feeding based on a globally homogeneous perspective, allocating feeding based on the differences in local feeding competition intensity around each feeding node. This resolves the resource mismatch problem caused by the coexistence of local feed trough overload and edge feed trough vacancy due to the flock's aggregation habits, ensuring that feed delivery corresponds to spatial feeding needs.
[0043] 2. When constructing the edge relationships of an undirected graph, this invention utilizes the time-of-flight of radio frequency signals and the received signal strength indication value to build a distance measurement model, dynamically maintaining the graph topology connection state and ensuring the real-time calculation of node spacing. When searching for locally connected subgraphs, it performs breadth-first traversal and truncates out-of-bounds branches based on the cumulative path distance, limiting the resolution range and reducing computational overhead. When calculating the feeding ratio coefficient, it introduces the remaining capacity feature of the feed trough location to perform linear mapping correction on the initial allocation ratio, avoiding the continued overfeeding of feed to feed troughs that are already close to full. When generating the total feeding demand, it extracts the total degree sequence of all nodes in the graph and inputs it into a long short-term memory network for trend prediction, combining it with the individual feed intake mapping table to obtain the total demand, enabling the determination of the basic feeding amount to have the ability to adaptively adjust to changes in the scale of flock activity. Attached Figure Description
[0044] Figure 1 This is the overall flowchart of the machine learning-based feeding control method for ecological chickens according to the present invention;
[0045] Figure 2 This is a flowchart illustrating the dynamic construction and maintenance process of undirected graph edges in this invention.
[0046] Figure 3 This is a flowchart of the local connected subgraph retrieval process of the present invention;
[0047] Figure 4 This is a flowchart of the local competitive feature vector extraction process of the present invention;
[0048] Figure 5 This is a flowchart of the feeding ratio coefficient calculation and correction process for the present invention;
[0049] Figure 6 This is a flowchart illustrating the process of generating the total feeding requirement for this invention. Detailed Implementation
[0050] The technical solutions of the embodiments of the present invention will now be explained in conjunction with the accompanying drawings.
[0051] The description is complete; obviously, the described embodiments are only a part of the embodiments of the present invention, not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.
[0052] Please refer to Figure 1 This embodiment provides a machine learning-based method for controlling the feeding amount of free-range chickens, deploying location-aware nodes and distributed feeding nodes within the free-range chicken farming area. Location-aware nodes are deployed at preset spatial intervals along the boundaries and within the farming area. Each node has radio frequency signal transmission and reception capabilities, covering the entire spatial range of the farming area, enabling real-time acquisition of the location coordinates of each individual free-range chicken within the farming area. Distributed feeding nodes are deployed at preset feeding points within the farming area. Each distributed feeding node corresponds to an independent feed trough and has a controllable feeding mechanism, capable of receiving control commands and dispensing the corresponding weight of feed. A two-dimensional Cartesian coordinate system is established with the southwest corner of the farming area as the origin, the east direction as the positive X-axis, and the north direction as the positive Y-axis. The definition of all location coordinates within the farming area is based on this two-dimensional Cartesian coordinate system, ensuring a unified baseline for all spatial location data.
[0053] refer to Figure 2Specifically, the real-time individual location coordinates of each free-range chicken are used as independent nodes in an undirected graph. Each undirected graph node corresponds to a unique free-range chicken, and the basic attributes of the node include the real-time two-dimensional planar location coordinates of the corresponding free-range chicken. For any two undirected graph nodes, the straight-line distance between the free-range chickens corresponding to the two nodes is calculated, and this straight-line distance is used as the individual spacing. The preset distance threshold is a fixed value that corresponds to the maximum spatial distance at which free-range chickens can engage in direct competition during feeding. When the individual spacing between two undirected graph nodes is lower than the preset distance threshold, an undirected graph edge is established between the two nodes, and the edge weight is positively correlated with the individual spacing between the two nodes. When the individual spacing between two undirected graph nodes is greater than or equal to the preset distance threshold, the undirected graph edge connection between the two nodes is removed. The location of the feed trough corresponding to each distributed feeding node is used as the node attribute label of the corresponding undirected graph node. The node attribute label includes the two-dimensional planar location coordinates of the feed trough and the physical capacity parameter of the feed trough. Based on the aforementioned nodes, edges, and node attribute labels, a dynamically updated undirected graph data structure is constructed. The topology of the undirected graph data structure is updated in real time according to the location changes of individual chickens, with the update frequency consistent with the location acquisition frequency of the location-aware nodes. The updated undirected graph data structure is stored in a graph database. The graph database adopts a native graph storage architecture that supports attribute graph models, provides standardized subgraph matching call interfaces, and supports high-concurrency real-time writing, updating, and retrieval operations of the graph structure.
[0054] After constructing the dynamically updated undirected graph data structure, the core fields of the undirected graph data structure are defined in a standardized manner, as shown in the table below:
[0055] Table 1. Definition of Core Fields for Undirected Graph Data Structure
[0056] Node basic properties Node unique identifier String type Each node corresponds to a unique identification code for an individual free-range chicken, with each node having a unique identifier value. Nodes are fixed at creation time and are not updated. Node basic properties Node position coordinates Two-dimensional floating-point array The corresponding real-time X-axis and Y-axis coordinates of individual free-range chickens in the plane coordinate system of the breeding area. Consistent with the sampling frequency of location-aware nodes Node basic properties Node degree Plastic Surgery The total number of undirected graph edges connected to the corresponding node The topology of the undirected graph is updated synchronously with each update. Node attribute tags Material trough position coordinates Two-dimensional floating-point array The X and Y coordinates of the feed troughs corresponding to the distributed feeding nodes in the plane coordinate system of the breeding area. Update when the location of the distributed feeding node is adjusted Node attribute tags Physical capacity of the trough floating point The maximum weight of feed that the corresponding feed trough can hold. Update when replacing hopper hardware edge attributes unique identifier of the edge String type Each edge in an undirected graph has a unique identifier code, with each edge corresponding to a unique identifier value. The edge is fixed at creation time and is not updated. edge attributes Related node identifier String array The unique identifier value of the two nodes connected by the edge in the undirected graph The edge is fixed at creation time and is not updated. edge attributes edge weight floating point The numerical value of the individual spacing between two nodes connected by the edge in an undirected graph. The topology of the undirected graph is updated synchronously with each update. edge attributes Edge connection state Boolean type This flag indicates whether the edges of the corresponding undirected graph are in a valid connected state; true indicates valid, false indicates invalid. The topology of the undirected graph is updated synchronously with each update.
[0057] The table above standardizes all core fields of the undirected graph data structure, ensuring consistency in field definitions and compatibility in data transmission throughout the entire process of writing the undirected graph data structure to the graph database, performing subgraph retrieval, and feature extraction. Among these, node location coordinates, node degree, edge weight, and edge connection status are dynamically updated fields, while the remaining fields are statically fixed fields. Static fixed fields are updated only when the corresponding hardware device or identifier changes, while dynamically updated fields are updated synchronously with the collection cycle of location-aware nodes, ensuring that the undirected graph data structure can reflect the spatial distribution of ecological chicken flocks within the breeding area in real time. After each update operation of the undirected graph data structure, a corresponding version identifier is generated. The version identifier corresponds one-to-one with the timestamp of the update operation, and the graph database uses the version identifier to archive, store, and retrieve historical undirected graph data structures.
[0058] In this embodiment, a local subgraph retrieval operation centered on each distributed feeding node is performed through the subgraph matching interface of the graph database. Specifically, each distributed feeding node corresponds to a central node in an undirected graph data structure, and the position coordinates of the central node are completely consistent with the position coordinates of the feed trough of the corresponding distributed feeding node. The preset physical radius is a pre-defined spatial range parameter, which corresponds to the effective feeding range that the distributed feeding node can cover. Starting from the central node, a traversal operation is performed. During the traversal, only undirected graph nodes whose straight-line distance from the central node is within the preset physical radius, as well as the undirected graph edges connecting the above nodes, are retained. The undirected graph nodes and undirected graph edges that meet the above range requirements are aggregated to form a locally connected subgraph centered on the corresponding distributed feeding node. Each distributed feeding node corresponds to a unique locally connected subgraph, and there may be overlap of nodes and edges between different locally connected subgraphs. The retrieval operation of the subgraph matching interface is executed synchronously with the update operation of the undirected graph data structure. After each topology update of the undirected graph data structure, the full retrieval operation of the subgraph matching interface is automatically triggered to ensure that the local connected subgraph corresponding to each distributed feeding node can reflect the distribution status of the chickens in the corresponding local area in real time.
[0059] Furthermore, the node degree, edge weights, and node attribute labels corresponding to each locally connected subgraph are input into the pre-trained graph neural network. The node degree is the total number of undirected graph edges connected to each undirected graph node in the locally connected subgraph; the edge weight is the weight value corresponding to each undirected graph edge in the locally connected subgraph; and the node attribute label is the feed trough location-related attribute information corresponding to each undirected graph node in the locally connected subgraph. The graph neural network contains multiple graph convolutional layers, each of which can perform feature extraction and aggregation operations on the input graph structure data. The training process of the graph neural network is completed using supervised learning. The training dataset uses chicken flock location data, local feeding competition event annotation data, and corresponding feeding amount allocation data collected during historical breeding processes. The loss function is the mean squared error loss function, and the network parameters are iteratively optimized through the backpropagation algorithm. After training, the graph neural network can stably output feature vectors that meet expectations. During the forward propagation process of the graph neural network, the input node degree, edge weights, and node attribute labels are first processed by vector embedding, transforming discrete numerical and attribute information into fixed-dimensional feature vectors. After feature aggregation and nonlinear transformation through multiple graph convolutional layers, the graph neural network outputs a fixed-dimensional feature vector. This feature vector represents the local competition intensity around the corresponding distributed feeding node. The dimension of the local competition feature vector is consistent with the dimension of the graph neural network output layer, and each dimension value in the feature vector corresponds to different dimensions of feeding competition-related feature information within the local region.
[0060] In this embodiment, the feeding ratio coefficient for each distributed feeding node is calculated based on the local competition feature vector corresponding to that node. Specifically, the local competition feature vector contains a quantified value of the feeding competition intensity within the corresponding local area. This quantified value is positively correlated with the aggregation density of free-range chickens and the probability of inter-individual competitive behavior within the local area. The quantified values corresponding to all distributed feeding nodes are normalized to obtain the feeding ratio coefficient for each node, and the sum of the feeding ratio coefficients for all distributed feeding nodes is 1. The total feeding demand for the current feeding cycle is obtained, which is the total weight of feed to be fed to all free-range chickens in the breeding area during the current feeding cycle. The total feeding demand is multiplied by the feeding ratio coefficient for each distributed feeding node to obtain the target feeding weight for each distributed feeding node. Based on the target feeding weight for each distributed feeding node, an independent feeding control command is generated for that node. This command includes the target feeding weight, feeding rate, and feeding time window parameters. It can be directly sent to the feeding actuator of the corresponding distributed feeding node to drive the actuator to complete the feed dispensing operation. The feeding rate is a pre-set fixed value, and the feeding time window is a preset time interval for the current feeding cycle. All distributed feeding nodes maintain the same feeding time window to ensure all feeding operations are completed within the same time interval, preventing feed allocation mismatches caused by large-scale migration of the flock during feeding.
[0061] In this embodiment, by transforming the individual location coordinates of the ecological chicken flock into nodes of an undirected graph data structure, the spatial distance relationships between individuals into edges of the undirected graph, and the feed trough location information into node attribute labels, a graph-structured representation of the spatial distribution of the chicken flock is achieved. The retrieval of locally connected subgraphs is completed through the subgraph matching interface of the graph database, decomposing the global chicken flock distribution analysis into local region analysis centered on each distributed feeding node, thus reducing the computational scope of a single feature extraction. Local competition features are extracted through a graph neural network, transforming the graph topology data into a quantifiable representation of feeding competition intensity. Finally, based on the local competition intensity, differentiated allocation of feed amount is achieved, ensuring that the feed amount at each distributed feeding node matches the feeding demand of the corresponding local area.
[0062] In another embodiment, a location-aware node transmits radio frequency (RF) signals and receives reflected signals from RFID tags worn by individual free-range chickens. A signal attenuation distance calculation model is constructed based on the time-of-flight of the RF signals and the received signal strength indication. Specifically, the location-aware node broadcasts RF signals to the breeding area at a fixed transmission power. Upon receiving the RF signals, the passive RFID tags worn by the free-range chickens return reflected signals containing the unique identifier of each individual. The location-aware node records the transmission timestamp of the RF signals and the reception timestamp of the reflected signals, calculating the difference between the two timestamps to obtain the time-of-flight of the RF signals. Simultaneously, the location-aware node performs signal strength detection on the received reflected signals to obtain the received signal strength indication value for the corresponding reflected signals. Each location-aware node can simultaneously receive reflected signals from multiple RFID tags and distinguish the corresponding free-range chickens based on the unique identifiers in the reflected signals, achieving simultaneous location acquisition and distance calculation for multiple targets.
[0063] The core calculation logic of the signal attenuation distance measurement model is quantitatively described by the following formula:
[0064]
[0065] in, Let be the initial distance between the individual chickens corresponding to the two nodes in the undirected graph. The speed at which radio frequency signals propagate in the air. For the flight time of the radio frequency signal, The preset environmental attenuation coefficient, This refers to the nominal transmit power of the radio frequency signal. This is the received signal strength indication value. The environmental attenuation coefficient is preset based on actual environmental testing in the aquaculture area and can reflect the attenuation effect of environmental factors such as obstacles and vegetation on the radio frequency signal.
[0066] Using the aforementioned signal attenuation distance calculation model, the initial distance between any two undirected graph nodes corresponding to individual chickens is calculated, and this initial distance is taken as the individual spacing between the two nodes. When the calculated individual spacing is less than a preset distance threshold, an undirected graph edge connecting the two corresponding undirected graph nodes is established in the undirected graph data structure, and the calculated individual spacing is assigned as the edge weight of this undirected graph edge. When the calculated individual spacing is greater than or equal to the preset distance threshold, the undirected graph edge between the two corresponding undirected graph nodes is retrieved from the undirected graph data structure. If a corresponding valid undirected graph edge exists, its connection state is updated to invalid, and its topological connection relationship is deleted from the undirected graph data structure. Through the above operations, the topological connection state of the undirected graph data structure is dynamically maintained based on the real-time position changes of the individual chickens, ensuring that the undirected graph topology is completely synchronized with the actual spatial distribution of the chicken flock within the breeding area. The maintenance of the undirected graph topology is accomplished by combining full traversal and incremental updates. For node pairs whose position coordinates have not changed, the edge connection state and edge weight values of the previous cycle are directly used. Only for node pairs whose position coordinates have changed, the individual spacing is recalculated and the edge information is updated, thereby reducing the computational overhead of topology maintenance.
[0067] Furthermore, multipath interference components are extracted from the received signal strength indication value, and a Kalman filter state equation incorporating position coordinates and velocity vectors is constructed to smooth the initial distance value output by the signal attenuation distance measurement model. Obstacles such as walls, fences, and vegetation within the aquaculture area cause radio frequency signals to reflect and refract, resulting in multipath propagation. The interference components introduced by multipath propagation cause fluctuations in the received signal strength indication value, thus affecting the accuracy of distance measurement. The Kalman filter state equation and observation equation are quantitatively described by the following formula:
[0068]
[0069]
[0070] in, for The system state vector at time t contains the two-dimensional position coordinates and two-dimensional velocity vector of the corresponding individual chicken. Here is the state transition matrix. This is the process noise vector. for The observation vector at time t corresponds to the initial distance value output by the signal attenuation distance measurement model. For the observation matrix, The observation noise vector includes interference components caused by multipath effects. The state transition matrix is determined based on the sampling period of the position-aware nodes and can describe the state transition relationship of an individual chicken during uniform motion within the sampling period.
[0071] The initial distance value output by the signal attenuation distance measurement model is used as the observation input to the Kalman filter state equation, and the Kalman filter prediction and update operations are performed. In the prediction phase, based on the system state vector of the previous time step, the prior state estimate and prior covariance matrix are calculated using the state transition matrix. In the update phase, based on the observation input of the current time step, the Kalman gain is calculated, and the prior state estimate is corrected using the Kalman gain to obtain the posterior state estimate of the current time step, while simultaneously updating the covariance matrix. Through the above filtering process, multipath interference components in the observation input are filtered out, and the individual spacing after filtering out interference is output. This individual spacing is used as the basis for assigning edge weights to the undirected graph and for determining the topological connectivity state. The Kalman filtering process is executed synchronously with the sampling period of the position-aware node, completing one prediction and update operation within each sampling period, and outputting the smoothed position coordinates and individual spacing values for the corresponding ecological chicken individual.
[0072] The core parameters in the Kalman filtering process are defined and configured in a standardized manner, as shown in the table below:
[0073] Table 2. Definition and Configuration of Core Parameters for Kalman Filtering
[0074] State vector 4×1 Real-time system status, including the X-axis coordinate, Y-axis coordinate, X-axis velocity, and Y-axis velocity of individual free-range chickens. No fixed value Synchronous update after each filter cycle completes the update operation. State transition matrix 4×4 Describing system state from Time's up Transitional relationships of time A fixed matrix determined by the sampling period Update when sampling period is adjusted Observation matrix 1×4 Describes the mapping relationship between the system state vector and the observation vector. Fixed identity mapping matrix No updates Process noise covariance matrix 4×4 Statistical characteristics describing system process noise A fixed matrix pre-set based on the dynamic characteristics of the aquaculture environment. Update when environmental parameters are adjusted Observation noise covariance matrix 1×1 Describes the statistical characteristics of observation noise, including multipath interference components. Determined based on environmental test values of radio frequency signals Each sampling period is dynamically updated based on signal quality. Kalman gain 4×1 Describes the correction weights of the observed values to the prior state estimates. No fixed value Synchronous update after each filter cycle completes the update operation. Posterior covariance matrix 4×4 Describe the covariance of the estimation error of the posterior state estimate. No fixed value Synchronous update after each filter cycle completes the update operation.
[0075] The table above standardizes all core parameters in the Kalman filtering process, clarifying the dimensions, physical meaning, configuration rules, and update logic of each parameter to ensure the reproducibility and stability of the filtering process. Among these, the observation noise covariance matrix... To dynamically update parameters, adaptive adjustments can be made based on the RF signal quality within the current sampling period. When multipath interference is strong, the value of the observation noise covariance matrix is increased, the correction weight of the observation value on the state estimate is reduced, and the smoothness of the filtered output is improved. (Process noise covariance matrix) Based on the preset normal activity range of an individual free-range chicken, the random fluctuation characteristics of the chicken's movement state can be reflected.
[0076] refer to Figure 3In this embodiment, a central node is determined for each distributed feeding node in the undirected graph data structure. The coordinates of the central node completely coincide with the coordinates of the feed trough of the corresponding distributed feeding node. A breadth-first traversal operation is performed starting from the central node. During the traversal, adjacent undirected graph nodes connected to the currently traversed node by valid undirected graph edges are visited sequentially in ascending order of hop count. In each hop of the breadth-first traversal operation, the cumulative path distance between the currently traversed undirected graph node and the central node is calculated. During the traversal operation initialization phase, a set of visited nodes, a queue of nodes to be visited, and a set of boundary isolated nodes are established. The set of visited nodes stores nodes that have been traversed, the queue of nodes to be visited stores nodes to be traversed, and the set of boundary isolated nodes stores nodes whose cumulative path distance exceeds a preset physical radius. After the initialization operation is completed, the central node is added to the queue of nodes to be visited, marked as visited, and the cumulative path distance corresponding to the central node is assigned a value of 0.
[0077] The calculation logic for cumulative path distance is quantified using the following formula:
[0078]
[0079] in, The number of traversals reached in the current iteration The cumulative path distance corresponding to jumping nodes in an undirected graph The 1st jump of the previous traversal The cumulative path distance corresponding to jumping nodes in an undirected graph To connect the first Jump undirected graph node and the first The edge weights corresponding to the edges of the undirected graph nodes.
[0080] Specifically, the process involves obtaining the cumulative distance of the currently traversed undirected graph node from the previous hop, extracting the current edge weight of the edge between the currently traversed undirected graph node and the previous hop undirected graph node, and summing the previous hop cumulative distance and the current edge weight to obtain the cumulative path distance for the currently traversed node. When the calculated cumulative path distance exceeds a preset physical radius, the current traversal branch is truncated, the currently traversed undirected graph node is marked as a boundary isolation node, added to the boundary isolation node set, and subsequent traversal paths starting from the boundary isolation node are blocked. Adjacent undirected graph nodes with valid connections to the boundary isolation node are no longer visited. When the calculated cumulative path distance is less than or equal to the preset physical radius, if the currently traversed node is not marked as visited, it is added to the queue of nodes to be visited and marked as visited. This traversal operation is repeated until the queue of nodes to be visited is empty and all traversal branches have completed either the visit or truncation operation. After the traversal operation is completed, all undirected graph nodes in the visited node set and the valid undirected graph edges connecting the above nodes are aggregated to form a locally connected subgraph centered on the corresponding distributed feeding node.
[0081] Furthermore, the total degree sequence of all nodes in the undirected graph data structure at multiple consecutive historical time stamps is extracted from the graph database. The total degree of all nodes is the sum of the degrees of all valid undirected graph nodes in the undirected graph data structure at the corresponding time stamp. The number of historical time stamps is preset based on the input sequence length of the Long Short-Term Memory (LSTM) network, covering multiple consecutive historical feeding cycles. The consecutive total degree sequence of all nodes is input into a pre-trained LSM network, which includes an input layer, multiple LSM unit layers, and a fully connected output layer, enabling it to fit and predict the changing trends of time series sequences. The training process of the LSM network is completed using supervised learning. The training dataset uses the total degree sequence of all nodes in the undirected graph at consecutive historical time stamps. The input is the total degree sequence of multiple consecutive historical time stamps, and the label is the actual total degree of the next time stamp. The loss function is the mean absolute error loss function, and the network parameters are iteratively optimized through backpropagation. Based on the input historical total degree sequence of all nodes, the LSM network outputs the predicted total degree of all nodes in the undirected graph for the next feeding cycle. Query the pre-stored chicken flock individual feed intake mapping table. The chicken flock individual feed intake mapping table stores the standard feed intake value of ecological chickens for the corresponding growth cycle. Multiply the predicted total degree of all nodes in the whole graph with the standard feed intake value of each individual in the chicken flock individual feed intake mapping table to generate the total feeding requirement for the next feeding cycle.
[0082] The calculation logic for the total feeding requirement is quantitatively described by the following formula:
[0083]
[0084] in, This represents the total feeding requirement for the next feeding cycle. This is the predicted total degree of all nodes in the graph for the next feeding cycle output by the Long Short-Term Memory network. This represents the standard feed intake value per individual chicken in the flock feed intake mapping table. The flock feed intake mapping table is pre-set based on the breed, age, and growth stage of free-range chickens and can be updated and adjusted according to the growth cycle of free-range chickens.
[0085] refer to Figure 6 In this embodiment, a signal attenuation distance calculation model is constructed using the time-of-flight of the radio frequency signal and the received signal strength indication value. Combined with Kalman filtering to remove multipath interference, the accuracy of individual spacing calculation is improved, providing reliable data support for the dynamic maintenance of the undirected graph topology. Breadth-first traversal is used to retrieve locally connected subgraphs. Based on cumulative path distance, out-of-bounds traversal branches are truncated, precisely limiting the retrieval range of the subgraph, reducing the computational overhead of invalid nodes and edges, and improving the efficiency of subgraph retrieval. A long short-term memory network is used to perform trend fitting and prediction of the total degree sequence of nodes in the historical full graph. Combined with the standard feed intake of individual birds, the total feeding requirement is generated, allowing the total feeding amount to be adaptively adjusted according to changes in the flock's activity scale, ensuring the rationality of the basic feeding amount.
[0086] In another embodiment, the node degree, edge weights, and node attribute labels of the locally connected subgraph are input into a graph neural network to extract a local competition feature vector representing the intensity of local feeding competition. The graph neural network employs a graph attention network architecture, comprising an input embedding layer, multiple graph attention convolutional layers, and an output layer. The input embedding layer transforms the input node degree, edge weights, and node attribute labels into an initial node feature vector of fixed dimensions. The input embedding layer contains multiple independent embedding branches, corresponding to the embedding processing of node degree, edge weights, and node attribute labels, respectively. The embedding output dimensions of different branches remain consistent to ensure compatibility with subsequent feature fusion. During the message passing phase of the graph neural network, for each undirected graph node in the locally connected subgraph, the feature information passed by all its neighboring undirected graph nodes is obtained. Neighboring undirected graph nodes are other undirected graph nodes that have valid undirected graph edge connections with the current undirected graph node. The message passing process is executed along a bidirectional path along the undirected graph edges. Each node simultaneously transmits its own feature information to neighboring nodes and receives feature information transmitted by neighboring nodes, completing the aggregation of neighborhood features.
[0087] refer to Figure 4Based on the edge weights corresponding to the edges of the undirected graph, attention coefficients are assigned to the feature information transmitted between adjacent undirected graph nodes, where edge weights and attention coefficients are negatively correlated. Specifically, a multi-head graph attention mechanism is introduced, mapping edge weights to initial attention scores corresponding to multiple attention heads. Each attention head corresponds to independent mapping parameters and feature spaces, and the feature spaces of different attention heads are independent of each other, enabling feature extraction and aggregation from different dimensions. The slot position contained in the node attribute label is processed by vector embedding to obtain a fixed-dimensional slot position bias vector. The dimension of the slot position bias vector is consistent with the dimension of the initial attention score. The slot position bias vector is superimposed on the initial attention score corresponding to each attention head to obtain the superimposed attention score. A preset activation function is applied to the superimposed attention score, and the processed output value is confirmed as the attention coefficient of the feature information of the corresponding adjacent nodes.
[0088] The calculation logic of the attention coefficient is quantitatively described by the following formula:
[0089]
[0090] in, For the first In each attention head, the node To the node Attention coefficients that transmit feature information The preset activation function, For the first The attention weight vector of each attention head. For the first Feature transformation matrix of each attention head For nodes The initial node feature vector, For nodes The initial node feature vector, This is a vector concatenation operation. For the first The edge weight mapping coefficients of each attention head. For connecting nodes With nodes The edge weights corresponding to the edges of an undirected graph, and the edge weight mapping coefficients. The value is negative to ensure a negative correlation between the edge weights and the attention coefficient. The activation function uses... Activation functions can avoid the vanishing gradient problem and improve the stability of network training.
[0091] The core parameters of the multi-head graph attention mechanism are defined and configured in a standardized manner, as shown in the table below:
[0092] Table 3. Configuration of Core Parameters for Multi-Head Image Attention Mechanism
[0093] Attention to the number of heads Integer scalar The total number of independent attention heads in a multi-head attention mechanism Preset fixed values, ranging from 4 to 16. Once training is complete, the settings are fixed and there are no updates. Characteristic transformation matrix No. The input feature transformation matrix of each attention head. For the input feature dimension, Output feature dimension Initial value adopted Uniform distribution initialization Iterative updates are performed during training using the backpropagation algorithm. Attention weight vector No. The attention score of each attention head is used to calculate the weight vector. Initial value adopted Uniform distribution initialization Iterative updates are performed during training using the backpropagation algorithm. Edge weight mapping coefficient floating-point scalar No. The mapping coefficients of the side weights to the attention scores in each attention head. The initial value is a preset negative value, ranging from -1.0 to -0.1. During training, the algorithm is used for iterative updates, maintaining the negative value constraint. Activation function Function Operators Activation function that performs a nonlinear transformation on the attention scores after stacking. Preset Activation function Once training is complete, the settings are fixed and there are no updates. Material slot position embedding dimension Integer scalar Feature dimensions after embedding the material tank position coordinate vector Preset fixed values to maintain consistency with the input feature dimensions. Once training is complete, the settings are fixed and there are no updates.
[0094] The table above standardizes all core parameters of the multi-head graph attention mechanism, clarifying the dimensions, physical meanings, configuration rules, and training update logic of each parameter, ensuring that the feature extraction process of the graph neural network is reproducible and interpretable. Among these, the edge weight mapping coefficients... During training, a negative value constraint is maintained to ensure that the negative correlation between edge weights and attention coefficients remains stable. This ensures that neighboring nodes with smaller inter-node distances receive higher attention weights for the feature information they transmit, thus more accurately reflecting the feeding competition relationship within the local region. The output features of multiple attention heads are concatenated or averaged before being input into the next graph attention convolutional layer to complete the iterative extraction and aggregation of multi-layer features.
[0095] The neighboring node features, after being assigned attention coefficients, are weighted and summed to obtain the aggregated neighborhood features of the current node. These aggregated neighborhood features are then concatenated and fused with the feature vectors corresponding to the node degree and node attribute labels of the current undirected graph node to obtain the updated feature vector of the current node. The updated feature vectors of all nodes are then input into the next graph attention convolutional layer. After multiple layers of graph convolution operations, global average pooling is performed on the feature vectors of all nodes in the locally connected subgraph, outputting a fixed-dimensional local competition feature vector. This local competition feature vector fully characterizes the local feeding competition intensity around the corresponding distributed feeding node. Global average pooling aggregates the features of all nodes in the locally connected subgraph into a feature vector of uniform dimension, eliminating the dimensionality inconsistency caused by differences in the number of nodes in the subgraph and ensuring compatibility in subsequent feeding ratio calculations.
[0096] refer to Figure 5 In this embodiment, the competition intensity value is extracted from the local competition feature vector. The competition intensity value is a one-dimensional scalar value output after the local competition feature vector is mapped through a fully connected layer. This scalar value is positively correlated with the feeding competition intensity within the corresponding local region. The fully connected layer contains two linear transformation layers and a non-linear activation layer, which can map the high-dimensional local competition feature vector into a one-dimensional competition intensity value, retaining the core information related to feeding competition intensity in the feature vector during the mapping process. The competition intensity values corresponding to all distributed feeding nodes are input... The softmax normalization function is used to obtain the initial allocation ratio of each distributed feeding node.
[0097] The calculation logic of the softmax normalization function is quantitatively described by the following formula:
[0098]
[0099] in, For the first The initial allocation ratio corresponding to each distributed feeding node. For the first The contention intensity value corresponding to each distributed feeding node. The total number of distributed feeding nodes in the breeding area is 1, and the sum of the initial allocation ratios of all distributed feeding nodes is 1. Softmax normalization can map competition intensity values of different magnitudes to allocation ratios within the range of 0 to 1, thereby achieving unified quantification of allocation weights among different distributed feeding nodes.
[0100] The remaining capacity features of the corresponding feed trough location are read from the node attribute tags. These features include the real-time remaining capacity of the feed trough for the corresponding distributed feeding node, the historical discharge rate, and the current amount of feed discharged. The historical discharge rate and current amount of feed discharged for the distributed feeding node are obtained. The historical discharge rate is the average discharge rate of the corresponding distributed feeding node over multiple historical feeding cycles, and the current amount of feed discharged is the total weight of feed discharged by the corresponding distributed feeding node in the current feeding cycle. The real-time remaining capacity of the feed trough is calculated based on the historical discharge rate and the current amount of feed discharged, which is the difference between the physical capacity of the feed trough and the current amount of feed discharged. The initial allocation ratio is linearly mapped and corrected using the remaining capacity features, and the corrected initial allocation ratio is confirmed as the feeding ratio coefficient for the corresponding distributed feeding node.
[0101] Specifically, it determines whether the real-time remaining amount in the feed trough is lower than a preset remaining amount threshold. The preset remaining amount threshold is a preset proportion of the physical capacity of the feed trough. When the real-time remaining amount in the feed trough is lower than the preset remaining amount threshold, a capacity penalty factor is generated. The value of the capacity penalty factor ranges from 0 to 1 and is positively correlated with the real-time remaining amount in the feed trough. The capacity penalty factor is used to narrow the numerical range of the initial allocation ratio, and the feeding ratio coefficient after the reduction by the capacity penalty factor is output.
[0102] The calculation logic of the capacity penalty factor and the feeding ratio coefficient is quantitatively described by the following formula:
[0103]
[0104]
[0105] in, For the first The capacity penalty factor corresponding to each distributed feeding node For the first Real-time remaining amount of feed in the trough corresponding to each distributed feeding node. For the first The physical capacity of the feed trough corresponding to each distributed feeding node. For the first The feeding ratio coefficient corresponding to each distributed feeding node. For the first The initial allocation ratio corresponds to each distributed feeding node. When the real-time balance of the feed trough is greater than or equal to the preset balance threshold, the capacity penalty factor is set to 1, the initial allocation ratio is not reduced, and the initial allocation ratio is directly confirmed as the feeding ratio coefficient.
[0106] After calculating the feeding ratio coefficients for all distributed feeding nodes, a second normalization process is performed on all feeding ratio coefficients to ensure that the sum of the feeding ratio coefficients for all distributed feeding nodes is 1. This avoids deviations in the total feeding amount allocation caused by the reduction operation of the capacity penalty factor. Combining the total feeding demand for the current feeding cycle, the total feeding demand is multiplied by the feeding ratio coefficient corresponding to each distributed feeding node, decomposing it into target feeding weights for each distributed feeding node. Based on the target feeding weights, independent feeding amount control commands are generated for the corresponding distributed feeding nodes. These independent feeding amount control commands can be directly sent to the feeding actuators of the corresponding distributed feeding nodes, driving the actuators to complete the feeding operation of the corresponding weight of feed. After the independent feeding amount control commands are issued, the actual feeding weight of the corresponding distributed feeding node is collected in real time. When the actual feeding weight reaches the target feeding weight, the feeding operation is immediately stopped to ensure precise control of the feeding amount.
[0107] In this embodiment, a graph neural network is constructed by introducing a multi-head graph attention mechanism. Attention coefficients are assigned to the feature information of adjacent nodes based on edge weights, enabling the feature extraction process to accurately focus on the competitive relationships within local regions, thus improving the representational ability of local competitive feature vectors. The softmax normalization function maps the competition intensity value to the initial allocation ratio. Combined with the remaining capacity characteristics of the feed trough, a capacity penalty factor is generated to correct the initial allocation ratio, avoiding the continued overfeeding of feed to feed troughs that are already close to full capacity. This further improves the rationality of feed allocation and the utilization rate of feed resources.
Claims
1. A method for controlling the feeding amount of free-range chickens based on machine learning, characterized in that, include: Location-aware nodes and distributed feeding nodes are deployed in the ecological chicken farming area. The location coordinates of individual chickens are used as nodes of an undirected graph, the relationship of individual spacing below a preset distance threshold is used as edges of the undirected graph, and the location of the feed trough is used as node attribute labels. A dynamically updated undirected graph data structure is constructed and stored in a graph database. The subgraph matching interface of the graph database is used to retrieve locally connected subgraphs centered on each of the distributed feeding nodes and located within a preset physical radius. The node degree, edge weight, and node attribute label of the locally connected subgraph are input into a graph neural network to extract a local competition feature vector that represents the intensity of local foraging competition. The feeding ratio coefficient of each of the distributed feeding nodes is calculated based on the local competition feature vector, and the feeding ratio coefficient is decomposed into independent feeding amount control instructions for each of the distributed feeding nodes in combination with the total feeding demand.
2. The method for controlling the feeding amount of ecological chickens based on machine learning according to claim 1, characterized in that, Relationships where the distance between individuals is less than a preset distance threshold are treated as edges in an undirected graph, including: The location sensing node transmits radio frequency signals and receives return signals, and a signal attenuation distance calculation model is constructed based on the flight time of the radio frequency signals and the received signal strength indication value. The individual distance between any two undirected graph nodes is calculated using the signal attenuation distance calculation model. When the individual distance is less than the preset distance threshold, an undirected graph edge connecting the two undirected graph nodes is established in the undirected graph data structure. When the individual distance is greater than or equal to the preset distance threshold, the corresponding undirected graph edge in the undirected graph data structure is deleted, so as to dynamically maintain the topological connection state of the undirected graph data structure based on the real-time individual distance.
3. The method for controlling the feeding amount of ecological chickens based on machine learning according to claim 1, characterized in that, Retrieving a locally connected subgraph centered on each of the distributed feeding nodes and located within a preset physical radius includes: Determine the central node corresponding to each of the distributed feeding nodes in the undirected graph data structure; Starting from the central node, perform a breadth-first traversal operation. In each hop of the breadth-first traversal operation, calculate the cumulative path distance between the currently traversed undirected graph node and the central node. When the cumulative path distance exceeds the preset physical radius, the current traversal branch is truncated, and all undirected graph nodes and undirected graph edges that have been traversed before the truncation are aggregated into the local connected subgraph.
4. The method for controlling the feeding amount of free-range chickens based on machine learning according to claim 1, characterized in that, The node degree, edge weight, and node attribute labels of the locally connected subgraph are input into a graph neural network to extract a local competition feature vector representing the intensity of local foraging competition, including: In the message passing phase of the graph neural network, for each undirected graph node in the locally connected subgraph, the feature information passed by the adjacent undirected graph nodes is obtained, and attention coefficients are assigned to the feature information passed by the adjacent undirected graph nodes according to the edge weights, wherein the edge weights and the attention coefficients are negatively correlated. The feature information after the attention coefficient is assigned is concatenated and fused with the node degree of the current undirected graph node and the node attribute label. After multi-layer graph convolution operation, the local competitive feature vector is output.
5. The method for controlling the feeding amount of ecological chickens based on machine learning according to claim 1, characterized in that, Calculating the feeding ratio coefficient for each of the distributed feeding nodes based on the local competition feature vector includes: Extract the competition intensity values from the local competition feature vectors, and input the competition intensity values corresponding to all the distributed feeding nodes. A normalization function is used to obtain the initial allocation ratio of each of the distributed feeding nodes; The remaining capacity feature of the corresponding feed trough position contained in the node attribute label is read, and the initial allocation ratio is linearly mapped and corrected using the remaining capacity feature. The corrected initial allocation ratio is then confirmed as the feeding ratio coefficient.
6. The method for controlling the feeding amount of ecological chickens based on machine learning according to claim 1, characterized in that, Before decomposing the feeding ratio coefficient into independent feeding amount control instructions for each of the distributed feeding nodes based on the total feeding demand, the method further includes: Extract the sequence of total degree of all nodes in the undirected graph data structure at multiple consecutive historical timestamps from the graph database; The sequence of total degree of all nodes in the graph is input into a long short-term memory network to predict the total degree of all nodes in the graph for the next feeding cycle. Query the pre-stored chicken flock individual feed intake mapping table, multiply the predicted total degree of all nodes in the whole graph with the chicken flock individual feed intake mapping table, and generate the total feeding requirement.
7. The method for controlling the feeding amount of ecological chickens based on machine learning according to claim 2, characterized in that, The signal attenuation distance calculation model is used to calculate the individual distance between any two nodes in the undirected graph, including: Extract the multipath interference component from the received signal strength indication value and construct the Kalman filter state equation containing position coordinates and velocity vector; The initial distance value output by the signal attenuation distance measurement model is used as the observation input of the Kalman filter state equation. The initial distance value is smoothed by the Kalman filter state equation to filter out the multipath interference component and output the individual spacing after interference is removed.
8. The method for controlling the feeding amount of ecological chickens based on machine learning according to claim 3, characterized in that, In each hop of the breadth-first traversal operation, the cumulative path distance between the currently traversed undirected graph node and the center node is calculated, including: Get the cumulative distance of the undirected graph node reached in the current traversal to the previous hop in the previous hop traversal, and extract the current edge weight corresponding to the current undirected graph edge between the currently reached undirected graph node and the previous hop undirected graph node; The cumulative distance of the previous hop is added to the current edge weight to obtain the cumulative path distance. When the cumulative path distance exceeds the preset physical radius for the first time, the undirected graph node reached by the current traversal is marked as a boundary isolation node, blocking the subsequent traversal path starting from the boundary isolation node.
9. The method for controlling the feeding amount of free-range chickens based on machine learning according to claim 4, characterized in that, Attention coefficients are assigned to the feature information transmitted between adjacent undirected graph nodes based on the edge weights, including: A multi-head graph attention mechanism is introduced to map the edge weights to initial attention scores corresponding to multiple attention heads; The material trough position contained in the node attribute label is processed by vector embedding to obtain the material trough position bias vector, and the material trough position bias vector is superimposed on the initial attention score to obtain the superimposed attention score. The superimposed attention score is processed by a preset activation function, and the processed output value is confirmed as the attention coefficient.
10. The method for controlling the feeding amount of ecological chickens based on machine learning according to claim 5, characterized in that, Using the remaining capacity feature to perform a linear mapping correction on the initial allocation ratio includes: Obtain the historical discharge rate and current discharge amount of the distributed feeding node, and calculate the real-time remaining amount of the hopper based on the historical discharge rate and current discharge amount; Determine whether the real-time balance of the feed trough is lower than a preset balance threshold. When the real-time balance of the feed trough is lower than the preset balance threshold, generate a capacity penalty factor, use the capacity penalty factor to narrow the numerical range of the initial allocation ratio, and output the feeding ratio coefficient after being reduced by the capacity penalty factor.