Livestock breeding feed production management system and method
Patent Information
- Application Number
- CN202611446710.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-17
- Publication Date
- 2026-10-27
AI Technical Summary
此时,继续按照原收割批次的入窖数量进行扣减,只能反映账面上的批次余量,不能据此确定取料设备本次实际切取部分所包含的各来源狼尾草数量,随着连续取料进行,记录中的批次剩余量及来源构成会逐渐与窖内实际料体不一致,进而使进入后续配料环节的狼尾草来源缺少准确对应依据;
1、 本方案通过卸料前后料面体素化并写入来源质量,使不同来源狼尾草形成空间质量记录,可相对减少批次边界消失后取料来源与实际物料不一致的问题;
Smart Images

Figure CN122988640A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of livestock feed production management technology, and more specifically, to a livestock feed production management system and method. Background Technology
[0002] In the current management of livestock feed production, Napier grass is generally registered in batches according to the source of the field, harvest time, transportation batch and storage record. The remaining quantity of each batch is determined by combining weighing data and inventory records, which serves as the basis for subsequent feed collection, mixing and feeding arrangements. In large-scale silage operations, the Napier grass grown in different fields and at different harvest times will be unloaded into the same silage pit one after another. After continuous spreading, leveling and compaction, it will form a whole material body. The original harvest batches will no longer maintain a clear physical boundary. After the silage is opened, the material extraction operation will cut along the current material surface layer by layer and section by section, so that one actual extraction involves multiple areas that have entered the pit one after another. At this point, continuing to deduct based on the original batch quantity entering the cellar can only reflect the batch balance on the books, and cannot determine the quantity of Napier grass from various sources included in the actual portion cut by the material extraction equipment. As extraction continues, the batch balance and source composition recorded will gradually become inconsistent with the actual material in the cellar, thus making the source of Napier grass entering the subsequent batching stage lack accurate corresponding basis. The technical problem this application aims to solve is: after the Napier grass from different sources is continuously put into the pit and then spread and compacted to form a material body with redistributed solid boundaries, how to accurately determine the source composition of each Napier grass taken out based on the actual pit-entry and material-taking process, and how to keep the production management records consistent with the actual materials. Summary of the Invention
[0003] To overcome the aforementioned deficiencies of the prior art, embodiments of the present invention provide a livestock feed production management system and method. The system converts the process of putting, compacting, and taking out Napier grass into voxel source quality changes through edge computing nodes, determines the compaction location using coherence point drift, and migrates the source quality through capacity scaling minimum cost flow. Then, based on the digital twin, the source composition and resource scheduling are updated according to the actual taking results, thereby solving the problems mentioned in the background art.
[0004] To achieve the above objectives, the present invention provides the following technical solution: a method for managing feed production in livestock farming, comprising: S1. Obtain the material surface data and the quality of the grass entering the pit before and after unloading. Unify the edge computing nodes to the pit coordinate system and voxelize them. Allocate the quality of the grass entering the pit according to the volume ratio of the newly added voxels to obtain the source quality. S2. For voxels before and after compaction, the center of the voxel before compaction is used as the Gaussian center of the coherence point drift algorithm and the center of the voxel after compaction is used as the observation point. The posterior probability and displacement coefficient are iteratively calculated until the first and second posterior relationships of the two adjacent rounds are consistent, and the compaction position is obtained. S3. Construct a capacity-scaling minimum cost flow network based on the compaction location. Use pre-compacted voxels as supply nodes and post-compacted voxels as receiving nodes. Build edges between corresponding voxels. Use the number of sequence reversals as the high-level cost and the spatial distance order as the low-level cost. Make a high-level cost greater than the sum of low-level costs. Transfer the source quality along the first path of the reduced cost ascending order according to the decreasing capacity scale until all flows out, and obtain the post-compacted source quality distribution. S4. Update the digital twin of Napier grass based on the source quality distribution after compaction. Allocate the source quality from the current feeding surface one voxel at a time according to the order of feed production tasks. Divide the voxels that have accumulated the task requirements into the remaining requirements to obtain the feeding area and source composition. S5. After material extraction, the edge computing node determines the reduction of voxels based on the material surface change, deducts the corresponding source mass from the Napier grass digital twin, uses the material surface after extraction as the starting point for the next task allocation, and re-executes S4, outputting the source record and resource scheduling results.
[0005] In a preferred embodiment, S1 includes: S11. Obtain the coordinates of the material surface points before and after unloading under the reference point of the pit body. The edge calculation nodes complete the translation and rotation transformation of the material surface according to the coordinate difference of the reference point, and write them into the pit body voxel grid with the same voxel side length to obtain the voxel set before unloading and the voxel set after unloading. Among them, the material surface point refers to the three-dimensional spatial sampling point that falls on the surface of the Napier grass in the silage pit after being collected by the material surface measuring equipment and calculated by coordinates. Each material surface point saves the corresponding three-dimensional coordinates. The reference point of the silage pit refers to the coordinate origin that is fixedly set in the silage pit and remains unchanged before and after unloading. The silage pit coordinate system is established with this point as the origin and according to the length, width and height of the pit body to unify the spatial position of the material surface points before and after unloading. A voxel is a cubic spatial unit formed by dividing the three-dimensional space covered by the cellar coordinate system according to a fixed side length. Each voxel is uniquely located by its three-dimensional index in the cellar coordinate system. S12. Compare the voxel set after unloading with the voxel set before unloading according to the voxel coordinates. Record the voxels that were not occupied before unloading but are occupied after unloading as new voxels. Calculate the overlap volume between the part below the material surface and the voxel grid in each new voxel to obtain the volume of the new voxel. S13. Multiply the ratio of the volume of each newly added voxel to the total volume of all newly added voxels by the mass of this cellar entry, write the calculated mass into the corresponding newly added voxel and bind it to the source of this wolf's tail grass, and obtain the source mass of each newly added voxel. The mass of the grass entering the pit refers to the actual mass of the grass unloaded, obtained by subtracting the mass of the transport vehicle carrying the grass from the mass of the same transport vehicle after the unloading is completed.
[0006] In a preferred embodiment, S2 includes: S21. Using the pre-compaction voxel center as the Gaussian center and the post-compaction voxel center as the observation point, execute the forward coherence point drift algorithm. Calculate the Gaussian response according to the negative exponent of the squared distance between centers and normalize it according to the observation point to obtain the posterior probability. Use the sum of the squared center distances weighted by the posterior probability and the Gaussian kernel displacement smoothing term as the cost to alternately update the displacement coefficient and Gaussian variance until the first voxel number of the posterior probability sorting corresponding to each pre-compaction voxel in two adjacent rounds is consistent, thus obtaining the forward correspondence sequence. The process of calculating the Gaussian response is as follows: calculate the square of the Euclidean distance between each compacted voxel center and each pre-compacted voxel center after transformation by the current displacement coefficient, divide the square of the Euclidean distance by twice the current Gaussian variance, take the negative value, and perform exponential operation. The resulting value is used as the Gaussian response of the corresponding voxel pair. The process of posterior probability weighting is as follows: For each compacted voxel, the Gaussian response corresponding to each pre-compacted voxel is normalized to the sum of all Gaussian responses corresponding to that compacted voxel to obtain the posterior probability. Then, the square of the center distance of each voxel pair is multiplied by the corresponding posterior probability and summed to obtain the posterior probability weighted center distance sum of squares. The Gaussian kernel displacement smoothing term refers to using the Gaussian kernel value between the centers of each compacted precursor to characterize the degree of spatial correlation. The displacement coefficient of each compacted precursor is propagated through the Gaussian kernel matrix to calculate the overall displacement change, which is used to limit the independent displacements that conflict between adjacent compacted precursors. The displacement coefficient refers to the non-rigid displacement parameter corresponding to each compaction precursor in the coherent point drift iteration. The displacement coefficient is weighted by the Gaussian kernel value between compaction precursors to form the displacement vector of the center of each compaction precursor, and the position of the center of the compaction precursor is updated accordingly. S22. Exchange the pre-compaction voxel centers and post-compaction voxel centers and execute the reverse coherence point drift algorithm. Use the Gaussian response, posterior probability and displacement update rules of S21 until the first voxel number of the posterior probability sorting corresponding to each post-compaction voxel in two adjacent rounds is consistent, and obtain the reverse corresponding sequence.
[0007] In a preferred embodiment, S2 further includes: S23. Based on the plane coordinates of the cellar bottom, write the pre-compacted voxels and post-compacted voxels into the corresponding spatial columns and sort them by height respectively. Use the sum of the sorting positions of the voxels that point to each other in the forward correspondence sequence and the reverse correspondence sequence as the local cost. Use dynamic time warping to calculate the sum of the local cost and the first value of the ascending order of the cumulative value of the predecessor cell by cell. Then, backtrack from the last cell along the selected predecessor to the first cell to obtain the voxel correspondence chain that maintains the height order. Mutually linked voxels refer to voxel pairs in the forward correspondence sequence where a pre-compacted voxel points to a post-compacted voxel, and in the reverse correspondence sequence, the post-compacted voxel points to the same pre-compacted voxel. The process of using dynamic time warping is as follows: establish a row sequence according to the height order of the voxels before compaction and establish a column sequence according to the height order of the voxels after compaction. The local cost of each row and column combination forms the cost. Starting from the first cell, make the cumulative value of the current cell equal to the sum of the current local cost and the first value of the cumulative values of the left cell, the top cell, and the top left cell. At the same time, record the corresponding predecessor cell. After calculating to the last cell, backtrack to the first cell in reverse order along the recorded predecessor cells to obtain the voxel corresponding chain. The cumulative value of the predecessor refers to the cumulative value of the left, top, and top-left cells that are adjacent to the current price and allow transfer to the current price when the dynamic time warping is used to calculate the current price. S24. For each pre-compacted voxel in the voxel corresponding chain, determine the first voxel in ascending order according to the sum of the forward posterior order and the reverse posterior order of the corresponding post-compacted voxel, write the center of the first voxel as the compaction position, and output the compaction position to the source quality transfer process of the Napier digital twin.
[0008] In a preferred embodiment, S3 includes: S31. The source mass of each pre-compaction voxel is integerized into the supply quantity according to the quality record accuracy. The post-compaction voxels falling into each compaction position are aggregated to form the corresponding supply quantity to form the receiving quantity. Each pre-compaction voxel is connected with the post-compaction voxel corresponding to the compaction position and the occupied voxel in the same spatial column located between the original height and the compaction height to obtain the supply node, receiving node and transport edge. The quality record precision refers to the fixed quality unit used when calculating and storing the source quality. The source quality is divided by this fixed quality unit and rounded to the nearest integer. The integer obtained is used as the supply in the capacity scaling minimum cost flow network. Source quality refers to the quality value written to the corresponding compacted precursor voxel and bound to the source of the grass after the mass in S1 is allocated into the cellar according to the proportion of the newly added voxel volume to the total newly occupied volume. S32. For each transport edge, based on the pre-compacted voxel height number and the receiving voxel height number, count the number of voxels in the forward corresponding sequence whose pre-compacted height number is less than the current pre-compacted voxel and whose corresponding compacted position height number is greater than the current receiving voxel, and whose pre-compacted height number is greater than the current pre-compacted voxel and whose corresponding compacted position height number is less than the current receiving voxel, to obtain the sequence reversal number; write the distance order in ascending order of the distance from the compacted position to the center of the receiving voxel, and use the product of the sum of all source mass integer supply quantities and the sum of all transport edge distance orders plus one as the high-order unit, multiply the sequence reversal number by the high-order unit and add the distance order to obtain the transport edge cost; The receiving voxel refers to the compacted occupied voxel that falls into the compaction position, and the compacted occupied voxel that establishes a transport edge with the corresponding pre-compacted voxel and is used to receive the source mass.
[0009] In a preferred embodiment, S3 further includes: S33. Construct a capacity-scaling minimum cost flow network based on supply, receiving, and transportation edge costs. Starting from a capacity scale that does not exceed the quadratic power of the total supply, only retain residual edges whose remaining capacity reaches the current capacity scale. Calculate the reduced cost by subtracting the endpoint potential from the sum of the transportation edge cost and the starting potential. Read the first source-sink path in ascending order of the cumulative reduced cost value and transmit the source quality in ascending order of the first value of the path's remaining capacity. When there is no source-sink path at the current capacity scale, halve the capacity scale until the capacity scale is one and all supply flows out, thus obtaining the source quality transportation result. The process of building a capacity-scaling minimum cost flow network is as follows: set up source nodes and sink nodes, connect the source nodes to each supply node and use the corresponding supply quantity as the edge capacity, connect each supply node to the receiving node through the transport edge formed by S31 and write the transport edge cost obtained by S32, then connect each receiving node to the sink node and use the corresponding receiving quantity as the edge capacity, and at the same time, establish a reverse edge for each forward edge with an initial capacity of zero and the cost taking the opposite number of the forward edge cost, thus forming a capacity-scaling minimum cost flow network. The quadratic capacity scale refers to taking the total supply as the upper bound, selecting the last value from powers of two that do not exceed the total supply and whose exponent is a non-negative integer as the first round capacity scale, and decreasing by half in subsequent rounds until one. Remaining capacity refers to the edge capacity of a forward edge minus the transmitted source mass, or the transmitted source mass that is currently allowed to be sent back for a reverse edge. A residual edge is a positive or negative edge with a non-zero remaining capacity. A positive residual edge is used to continue transmitting source mass, while a negative residual edge is used to withdraw the source mass that has already been transmitted by the corresponding positive edge. The starting potential and ending potential refer to the node potential values written to the starting node and ending node of a residual edge, respectively, which are used together with the residual edge cost to calculate the reduced cost of the residual edge. The source-sink path refers to the sequence of directed residual edges that start from the supply node that still has unoutflowed supply and reach the receiving node that still has unmet receiving capacity via the transport residual edge; S34. Reconstruct the residual network based on the source quality transportation results and recalculate the reduced cost. When there is a residual edge with negative reduced cost, read the first residual edge with negative reduced cost according to the voxel number and form a residual ring along the predecessor edge. Send back the source quality and update the node potential according to the first value of the remaining capacity of the residual ring in ascending order. Continue until the reduced cost of all residual edges is not negative. Then summarize the source quality according to each receiving node to obtain the compacted source quality distribution. The process of reconstructing the residual network is as follows: based on the source quality transportation results, read the transmitted source quality edge by edge, write the transmitted source quality into the forward residual capacity by subtracting the edge capacity from the transmitted source quality for each forward edge, and write the transmitted source quality into the corresponding reverse residual capacity, delete the edge with zero residual capacity, and retain the remaining forward and reverse edges to form the residual network. Node potential refers to the numerical label assigned to each node in a capacity-scaling minimum cost flow network. It is used to transform the original cost of residual edges into a reduced cost. After each adjustment, the search order of residual edges is changed by the node potential difference, while maintaining the path cost relationship corresponding to the sum of the costs of all edges on the same path.
[0010] In a preferred embodiment, S4 includes: S41. Read the source mass of each voxel after compaction in the digital twin of Napier grass, establish a voxel sampling layer along the normal of the current sampling surface, and arrange the voxels in each voxel sampling layer according to the direction of the sampling equipment to obtain the sampling voxel sequence. S42. Read the task requirements according to the order of feed production tasks, accumulate the source quality of each voxel starting from the first voxel in the feed collection sequence, and write the voxels whose cumulative quality does not exceed the task requirements into the current task in sequence to obtain the complete allocation of voxels for the current task.
[0011] In a preferred embodiment, S4 further includes: S43. In voxels whose cumulative quality exceeds the task requirement, the split quality is obtained by subtracting the total source quality of the fully allocated voxels from the task requirement. The split quality is then allocated according to the proportion of each source quality in the corresponding voxel to the total source quality of the corresponding voxel, thus obtaining the split source quality and the remaining source quality of the voxels for the current task. S44. Combine the complete allocation of voxels with the split source mass to form the feed area and source composition for the current task, and use the remaining source mass of voxels as the first allocation amount for the next feed production task. Repeat S42 to S43 in the order of tasks to obtain the allocation results of Napier grass resources for each feed production task.
[0012] In a preferred embodiment, S5 includes: S51. Obtain the feed surface data before and after the current feed production task, unify it from the edge computing node to the pit coordinate system, and compare it bit by bit according to the voxel position of the wolftail grass digital twin. Record the voxels that were occupied before the feeding and not occupied after the feeding as reduced voxels, and calculate the actual reduction ratio of the reduced voxels according to the overlapping volume of the feed surface and voxels after the feeding, so as to obtain the actual reduction amount of voxels. The material surface data refers to the data formed after spatial collection of the upper surface of the Napier grass in the silage pit. Each record contains the three-dimensional coordinates of the material surface sampling point in the pit coordinate system, which is used to determine the height occupied by Napier grass and the spatial shape of the material surface at the corresponding location. S52. Based on the actual reduction in voxel quantity, read the source mass of the corresponding voxel in the Napier digital twin, deduct the source mass according to the actual reduction ratio, and retain the source mass that has not been reduced in the planned feeding area in the original voxel, and include the source mass that has been reduced outside the planned feeding area in the current feed production task, so as to obtain the actual source record of the current task and the updated Napier digital twin. S53. Using the material surface after material extraction in the updated digital twin of Napier grass as the starting point for the allocation of the next feed production task, the demand of the next feed production task is re-executed by the voxel allocation and terminal voxel segmentation of S4, and the material extraction area and source composition of the subsequent feed production task are updated in sequence to obtain the feed resource scheduling result.
[0013] A livestock feed production management system, comprising a silo distribution module, a compaction and registration module, a quality transfer module, a task allocation module, and a feed retrieval and update module. The cellar allocation module is used to obtain the material surface data and cellar entry quality of the grass before and after unloading. It is unified from the edge computing nodes to the cellar coordinate system and voxelized. The cellar entry quality is allocated according to the volume ratio of the newly added voxels to obtain the source quality. The compaction registration module is used to iteratively calculate the posterior probability and displacement coefficient for voxels before and after compaction, with the center of the voxel before compaction as the coherence point drift algorithm Gaussian center and the center of the voxel after compaction as the observation point, until the first and second posterior relationships of the two adjacent rounds are consistent, thus obtaining the compaction position. The quality transfer module is used to construct a capacity-scaling minimum cost flow network based on the compaction location. It uses pre-compaction voxels as supply nodes and post-compaction voxels as receiving nodes, and builds edges between corresponding voxels. The high-order cost is determined by the number of sequence reversals and the low-order cost by the spatial distance order, so that the sum of the high-order costs is greater than the sum of the low-order costs. The source quality is transferred along the first path of the reduced cost ascending order according to the decreasing capacity scale until all the quality flows out, thus obtaining the post-compaction source quality distribution. The task allocation module updates the digital twin of Napier grass based on the source quality distribution after compaction. It allocates the source quality from the current feeding surface one voxel at a time according to the order of feed production tasks. Within the voxels that have accumulated the task requirements, it divides the remaining requirements to obtain the feeding area and source composition. The material picking and updating module is used to determine the reduction of voxels based on the material surface changes after material picking, deduct the corresponding source mass from the Napier grass digital twin, use the material surface after picking as the starting point for the next task allocation, and re-execute the task allocation module to output source records and resource scheduling results.
[0014] The technical effects and advantages of this invention are as follows: 1. This solution uses material surface volumetric mapping before and after unloading and writes the source quality to form a spatial quality record of Napier grass from different sources, which can relatively reduce the problem of inconsistency between the source of the material and the actual material after the batch boundary disappears. 2. Combining coherence point drift with forward and reverse correspondence and height order correction to determine the position of voxels after compaction can relatively improve the tracking accuracy after the source position changes due to compaction. 3. By using capacity scaling minimum cost flow migration for source quality before and after compaction, and simultaneously constraining sequence cost and spatial distance, the recording bias caused by source quality mismatch and sequence overlap can be relatively reduced. 4. By allocating task requirements to each voxel in the current feed intake surface within the digital twin of Napier grass, and by dividing the terminal voxels according to the source ratio, the correspondence between feed production tasks and the actual available Napier grass can be improved. 5. By determining the actual reduction in volumetric values based on changes in material levels before and after material extraction, and deducting the source quality and rearranging subsequent tasks accordingly, the problem of planned material extraction deviations being continuously transmitted to subsequent resource scheduling can be relatively alleviated. Attached Figure Description
[0015] Figure 1 This is a flowchart of the livestock feed production process of the present invention; Figure 2 This is a diagram of the Napier grass feed management system of the present invention. Detailed Implementation
[0016] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0017] Refer to the instruction manual appendix Figure 1-2 The livestock feed production management method of the present invention includes: S1. Obtain the material surface data and the quality of the grass entering the pit before and after unloading. Unify the edge computing nodes to the pit coordinate system and voxelize them. Allocate the quality of the grass entering the pit according to the volume ratio of the newly added voxels to obtain the source quality. After a batch of Napier grass is unloaded, the changes in the material surface before and after unloading need to be converted into voxel records with definite spatial location and source quality, so as to continue to track the spatial migration of Napier grass from various sources during the subsequent compaction process. Edge computing nodes use a unified clock to record the start and end times of unloading, and freeze the corresponding material surface data respectively. Compaction, material removal and other unloading operations are stopped between two material surface acquisitions. The current unloading material surface data, transport carrier weighing results, and Napier grass source number are written into the same unloading record, and then coordinate unification, new spatial identification, and cellar quality allocation are completed sequentially. This implementation process includes the following steps: The spatial position of the material surface before and after unloading is first unified to the fixed kiln coordinate system; the edge calculation node reads the three-dimensional coordinates of the two material surface points, takes the kiln reference point as the coordinate origin, and determines three coordinate axes in the length direction, width direction and height direction of the kiln. The translation and rotation matrix are calculated according to the origin offset and axial relationship between the coordinate system of the material surface measuring equipment and the coordinate system of the kiln. Then the same coordinate transformation is performed on the two material surface points. After completing the above transformation, proceed to S11. Fix the origin of the voxel grid with the pit body reference point. The voxel side length is determined at the beginning of the current silage cycle and remains unchanged. Each coordinate axis uses the left-closed and right-open interval to calculate the three-dimensional index. The end boundary of the pit body is assigned to the end voxel. Then, write the voxel occupancy status according to the material surface height to form the voxel set before unloading and the voxel set after unloading. Repeated material surface points with the same three-dimensional coordinates are retained as one record; if the material surface data of the pit body reference point, the three coordinate axes or any point in time is missing, the subsequent calculation of the current unloading record is paused and the missing data is collected. After the spatial reference is unified, the change in material surface is used to determine the actual newly added space occupied during this unloading; S12 compares the voxel set before unloading and the voxel set after unloading bit by bit according to the three-dimensional index, and writes the voxels that were not occupied before unloading but are occupied after unloading as the newly added voxels; When the material surface passes through the newly added voxel, the unloaded material surface point is projected onto the bottom plane of the pit and triangulation is performed to determine the local material surface by covering the triangular face of the current voxel's horizontal projection. Then, the space below the local material surface is cut off by using the six boundary faces of the voxel in sequence. The closed space obtained by cutting is decomposed into tetrahedrons and the volumes are accumulated. The resulting value is written as the volume of the newly added voxel. When the local material surface is above the upper boundary of the voxel, the volume of the newly added voxel is written as the volume of the complete voxel. If the current voxel horizontal projection range is not covered by the material surface triangle, the material surface point is re-collected at that location, and the total volume of the newly added voxel is calculated after the re-collection is completed. Once the newly added space is determined, the actual mass of the cellar is allocated according to the volume occupied by each newly added element. When entering S13, the mass of the cellar is obtained by subtracting the mass weighed after unloading from the mass weighed before unloading begins on the same transport carrier. The loading status of the transport carrier is kept consistent between the two weighings. The source number of Napier grass is generated by combining the field number and the harvest batch number. Each unloading record is bound to a source number. When the transport vehicle is loaded with two sources, they are weighed separately and unloading records are generated separately. Then, the sum of the volumes of all newly added voxels is calculated. The volume distribution ratio is obtained by dividing the volume of a single newly added voxel by the sum of these volumes, and then multiplied by the mass of this cellar entry to obtain the corresponding source mass. The source quality is quantified according to the fixed quality record precision. The quality remainder after quantification is sorted from largest to smallest according to the unquantified decimal part of each voxel, and then added to a quality record unit in turn until the sum of the source quality of all newly added voxels equals the quality of this batch entering the pit. Finally, the voxel index, source number and source quality are written into the voxel set after unloading for subsequent compaction location calculation and reading. Taking a truckload of Napier grass from the same field and the same harvest batch as an example, the material surface is frozen once and the transport carrier is weighed before unloading begins. After unloading, the material surface is weighed again and frozen a second time. After the material surface is transformed by the same coordinate and processed by the same voxel grid, the new space is determined by the change in voxel occupancy status, and then the quality allocation for entering the pit is completed according to the actual volume occupied by the new voxels. After processing, each newly added voxel corresponds to a defined 3D index, source number, and source quality, and the sum of the source qualities of each newly added voxel is consistent with the quality of this cellar entry, providing a data basis for maintaining the correspondence between the source qualities of Napier grass during subsequent compaction.
[0018] S2. For voxels before and after compaction, the center of the voxel before compaction is used as the Gaussian center of the coherence point drift algorithm and the center of the voxel after compaction is used as the observation point. The posterior probability and displacement coefficient are iteratively calculated until the first and second posterior relationships of the two adjacent rounds are consistent, and the compaction position is obtained. The compaction operation will change the voxel position of the Napier grass material, and it is necessary to maintain the coherent migration relationship of the same batch of material in space. Therefore, the voxel set before compaction is started is frozen before compaction begins, and the voxel set after compaction is frozen after compaction is completed and the compaction equipment leaves the work area. The two sets of voxels use the kiln coordinate system, voxel side length and voxel number determined by S1. Between the two freezes, unloading and unloading are stopped. The edge computing node writes the compaction operation number, the pre-compaction voxel set, and the post-compaction voxel set into the same data version. Then, through forward matching, reverse verification, stratification correction, and location determination, the compaction location is formed for subsequent source quality migration reading. The specific processing is as follows: The positive spatial relationship is first established from the pre-compacted voxels to the post-compacted voxels; after entering S21, the center of each pre-compacted voxel is recorded as the Gaussian center, and the center of each post-compacted voxel is recorded as the observation point. The initial values of the displacement coefficients are all set to zero, and the first round of Gaussian variance is obtained by dividing the sum of the square distances between all Gaussian centers and all observation points by the product of the number of the two types of voxels and the spatial dimension three. The Gaussian kernel width is taken as the current voxel side length, and the smoothing coefficient is read from the coherence point drift parameter table frozen at the beginning of the current silage cycle; In each round, the displacement vector of each Gaussian center is obtained by multiplying the Gaussian kernel matrix by the displacement coefficient. Then, the squared distance between the transformed Gaussian center and each observation point is calculated. The squared distance is divided by twice the Gaussian variance and the negative exponent is taken to obtain the Gaussian response. The negative exponent values corresponding to the same observation point are arranged in descending order. The first value is used as a common shift before the exponent operation is performed to prevent exponent underflow. Then, the posterior probability is obtained by dividing each Gaussian response by the sum of the Gaussian responses corresponding to that observation point. The current round cost is calculated by multiplying the posterior probability of all voxel pairs by the squared distance, summing the results, and then adding the smoothing amount formed by the displacement coefficient propagation of the Gaussian kernel matrix. The linear equation of the displacement coefficient is solved based on the current posterior probability, and the Gaussian variance is updated by dividing the weighted sum of the updated squared distances by three times the sum of the posterior probabilities. When a linear equation is rank deficient, the solution is recalculated by adding the value obtained by dividing the current Gaussian variance by the number of voxels to the diagonal of the coefficient matrix. In each round, the posterior probabilities of the same pre-compacted voxel are arranged in descending order. If the values are the same, they are sorted by the voxel number after compaction, and the first voxel number is recorded. When all the first voxel numbers in two adjacent rounds are the same, the forward calculation ends and a forward correspondence sequence is formed. When the same complete first-digit sequence reappears in non-adjacent rounds, the cost of each round between the two occurrences is read, and the first-digit round is determined by ascending order of cost value and round number. A positive corresponding sequence is then formed using the parameters of that round. The reverse calculation is used to verify whether the forward correspondence remains consistent after the observation direction is exchanged; S22 changes the voxel center after compaction to the Gaussian center and the voxel center before compaction to the observation point. The displacement coefficient, Gaussian variance, Gaussian response, posterior probability and cost are all re-initialized and iterated according to the same rule mentioned above, and the displacement parameters obtained by the forward calculation are not directly used; the Gaussian kernel width is still taken as the voxel side length, and the smoothing coefficient reads the same parameter version; In each round, the posterior probabilities of the pre-compacted voxels corresponding to each compacted voxel are arranged in descending order, and the values are processed by the pre-compacted voxel number until the first digit of all adjacent rounds is the same. When a non-adjacent repeating sequence appears, the output round is determined by the cost value and round number within the repeating interval, thus obtaining the reverse corresponding sequence. Both the forward and reverse correspondence sequences preserve the complete posterior order, enabling the same voxel pair to simultaneously obtain both the forward and reverse order for subsequent stratigraphic calculations. Material compression mainly occurs along the height direction, and the spatial correspondence obtained in both the forward and reverse directions needs to be corrected together with the upper and lower order within the same spatial column; When S23 is executed, the spatial columns are determined by the horizontal and vertical indices of the voxels, and the pre-compacted and post-compacted voxels in each spatial column are arranged from the bottom of the cellar upwards according to the height index. If there are no occupied voxels in the pre-compaction spatial column after compaction, read the first post-compaction voxel in the forward corresponding sequence of the pre-compaction voxel in that column, and transfer to the spatial column where the post-compaction voxel is located for sequence calculation. For any combination of pre-compacted voxels and post-compacted voxels, read the positive posterior order of the former pointing to the latter and the negative posterior order of the latter pointing to the former, respectively. Combinations belonging to mutually referential voxels are directly written into the local cost as the sum of the two order numbers. Other combinations are added to the sum of the number of voxels before and after compaction of the current space column, so that the entire cost has a definite value. Dynamic time warping starts from the first cell. The cumulative value of the first cell is taken as the local cost of the first cell. The first row only reads the cumulative value of the left cell, and the first column only reads the cumulative value of the top cell. For the remaining cells, the cumulative values of the left cell, top cell, and top-left cell are read and the first value is added to the current local cost in ascending order of cumulative values. When the cumulative values are the same, the predecessor is determined by the top-left cell, left cell, and top cell in sequence, and the position of the predecessor of each cell is recorded. After calculating to the last cell, backtracking from the preceding cell to the first cell one by one to form a voxel correspondence chain that maintains a high degree of advancement order; if any spatial column lacks a pre-compacted voxel or still lacks a post-compacted voxel after positive correspondence, the sequence calculation of that spatial column is paused and the current compaction data version is reread to verify the voxel occupancy status. The compaction position is written after the bidirectional posterior relationship and height order are determined simultaneously; S24 reads the pre-compacted voxels in the corresponding chain of voxels one by one, and collects all the post-compacted voxels connected to the pre-compacted voxel in the corresponding chain. For each candidate post-compacted voxel, the sum of the forward posterior order and the reverse posterior order is calculated, and they are arranged in ascending order of the order sum. If the order sums are the same, they are arranged according to the post-compacted voxel number. The center of the first post-compacted voxel is written as the compaction position of the pre-compacted voxel. Since the dynamic time warping path advances from the first row to the last row, each compaction precursor voxel corresponds to at least one candidate voxel within the chain, thus compaction positions can be formed item by item. The final record simultaneously saves the pre-compaction voxel number, compaction location, forward posterior sequence and reverse posterior sequence, and writes the current compaction operation version for S3 to directly read when establishing source quality transportation relationships; For example, if three pre-compacted voxels in the same spatial column are numbered 1, 2, and 3 according to their height, and three occupied voxels are still formed after compaction, the forward calculation first gives the posterior order corresponding to each pre-compacted voxel, and the reverse calculation returns from the compacted voxels to the pre-compacted voxels to form a second order. Dynamic time warping uses two sets of orders to calculate the local cost for all nine combinatorial cells and restricts the path to advance according to the height sequence. Then, the first voxel is determined from the candidate voxels in the path by forward and reverse order of each compacted pre-voxel. The compaction locations obtained in this way, after undergoing non-rigid spatial matching, reverse verification, and height order correction, can be directly used as the spatial basis for the next step of source quality migration.
[0019] S3. Construct a capacity-scaling minimum cost flow network based on the compaction location. Use pre-compacted voxels as supply nodes and post-compacted voxels as receiving nodes. Build edges between corresponding voxels. Use the number of sequence reversals as the high-level cost and the spatial distance order as the low-level cost. Make a high-level cost greater than the sum of low-level costs. Transfer the source quality along the first path of the reduced cost ascending order according to the decreasing capacity scale until all flows out, and obtain the post-compacted source quality distribution. Once the compaction location is determined, it is necessary to transfer the mass of Napier grass source carried by each compaction precursor to the space occupied after compaction, and maintain the conservation of each source mass before and after the transfer. Considering that the same voxel can retain multiple sources after multiple unloading and compaction, subsequent calculations use voxel number and source number to distinguish the supply item, then use the compaction location to limit the receiving voxel that the quality can reach, constrain the order of Napier grass in the compaction process through stratification cost, and finally form the source quality distribution after compaction by capacity scaling transmission and residual correction. During the calculation, the quality record accuracy determined in S1 and the compaction element version frozen in S2 are used to avoid cross-involvement of data from different compaction operations in the calculation; the specific processing is as follows: Before the source quality is included in the transportation calculation, it is first converted into a supply item with a fixed integer capacity. For each compaction precursor voxel, the voxel number, source number and source quality are read item by item. When a compaction precursor voxel has two sources, supply items are established according to the two sources respectively, so that the source number is always retained in subsequent transportation. The current silage cycle uses the mass corresponding to one display division of the weighing equipment as the mass recording accuracy. The source mass written by S1 has been quantified according to this accuracy. Therefore, the source mass divided by the mass recording accuracy directly yields the integer supply amount. When there are non-integer records of historical import mass, the supply amount is first written according to the integer part of each record. Then, the mass recording units are added in order of remainder from largest to smallest and voxel number, so that the total supply amount from the same source is consistent with the integer total amount corresponding to the import mass. When executing S31, a supply node is established for each supply item. The compaction position obtained in S2 is projected onto the voxel grid. The compacted voxel at the compaction position forms a direct receiving node. The spatial column is determined by the horizontal and vertical indices of the compaction position. The compacted voxels in this spatial column whose height is between the center height of the voxel before compaction and the height of the compaction position are also used as candidate receiving nodes. The transport edge from each supply node to the direct receiving node is always retained, and the remaining transport edges are connected to the corresponding candidate receiving nodes. Then, the total supply of all compacted locations falling into the same receiving voxel is added together to form the receiving quantity, so that the sum of all receiving quantities equals the sum of all supply quantities; the edge capacity from the source node to the supply node is written as the supply quantity, the transport edge capacity from the supply node to the receiving node is also written as the supply quantity, and the edge capacity from the receiving node to the sink node is written as the receiving quantity, thus obtaining the supply node, the receiving node, and the transport edge. The hierarchical relationship is used to distinguish transportation schemes that are geometrically close but will cause the sources of Napier grass to intersect vertically; each spatial column writes the height number of the compacted precursor voxel and the receiving voxel in the direction from the bottom of the cellar upwards; After entering S32, for each transport edge connected to the current supply node, traverse the remaining compacted precursor voxels in the forward corresponding sequence and count two types of order changes: one is that the height position number before compaction is less than the current compacted precursor voxel, while the height position number of the corresponding compaction position is greater than the current receiving voxel; the other is that the height position number before compaction is greater than the current compacted precursor voxel, while the height position number of the corresponding compaction position is less than the current receiving voxel. The two types of counts are added together to obtain the number of order reversals of the current transport edge. Then, the distance order is calculated only among all transport edges of the same supply node. First, the Euclidean distance from the compaction position to the center of each receiving voxel is calculated, and then the voxels are arranged in ascending order of distance. When the distances are the same, they are arranged according to the receiving voxel number and written into the distance order in sequence. The total supply is obtained by adding all the supply quantities together, and the total order quantity is obtained by adding all the transport edge distance order quantities together. The product of the two plus one is used as the higher unit. The transport edge cost is obtained by multiplying the number of order reversals by the higher unit and then adding the distance order quantity. Therefore, the cost generated by adding one unit to any order reversal exceeds the distance order cost that can be accumulated for a complete transport result. Transportation costs are stored as integers. Before the calculation, the required number of integer bits is calculated based on the total supply, the number of transportation edges, the number of hierarchical reversals, and the distance order. If the fixed word length cannot fully accommodate the costs, multi-precision integers are used instead, and truncation is not performed. After the transportation cost is written into the network, the source quality is transmitted in rounds according to the capacity scale; S33 sets up source nodes and sink nodes. The source node is connected to each supply node through the supply edge, the supply node is connected to the receiving node through the transport edge, and the receiving node is connected to the sink node through the receiving edge. A reverse edge is established for each forward edge. The initial capacity of the reverse edge is written to zero, and the cost is written to the opposite of the cost of the forward edge; the initial value of the node potential is all written to zero. The capacity scale is multiplied by two each time from the beginning. When the value obtained by multiplying by two in the next round exceeds the total integer supply, the current value is used. In each subsequent round, the capacity scale is divided by two until it becomes one. At the current capacity scale, only residual edges with remaining capacity not lower than that scale are read. For each residual edge, the reduced cost is calculated by adding the edge cost to the starting potential and then subtracting the ending potential. Starting from the supply node with no outflow supply, the cumulative reduced cost is recorded. Available residual edges are scanned in the order of node number. When the new cumulative value is less than the original recorded value, the cumulative value and the predecessor edge are replaced. When the values are the same, the record is determined by the predecessor node number until the cumulative value no longer changes in this round of scanning. Upon reaching a receiving node with unmet reception capacity, the first path is read in order of cumulative reduced cost and receiving node number. The source node supply edge and the receiving node sink edge are connected at both ends of the path to form a complete augmenting path. All remaining capacity is read along the path, and the first value is taken as the transmission amount in ascending order. Simultaneously, subject to the current supply node's no outflow supply and the current receiving node's unmet reception capacity, the forward flow is increased synchronously after transmission, and the corresponding reverse remaining capacity is also increased. After completing one transmission, the cumulative reduced cost of each node that has been reached in this round is added to the corresponding node potential, and then the search is restarted; when the current capacity scale cannot form a path, the capacity scale is divided by two, and the source quality transportation result is formed after the capacity scale is one and the integer supply total flows out. Since each supply node retains a direct transport edge to the receiving node where its compaction location is located, and the receiving volume is obtained by aggregating these directly mapped supply volumes, there is always a set of transport relationships that satisfy all supply and receiving volumes in the normal data version; when there are still un-outflowed supply volumes after the capacity scale is one, the current network is marked as data abnormal and returned to S31 to verify the supply volume, receiving volume and direct transport edge. After all the supply has been transferred, the residual network is still needed to eliminate the cyclical adjustments that can further reduce transportation costs. When performing S34, the forward residual capacity is obtained by subtracting the transferred source quality from the capacity of each forward edge, and the transferred source quality is used as the corresponding reverse residual capacity. Edges with non-zero residual capacity are retained to form a residual network, and the reduced cost is calculated according to the current node potential. When a residual edge with negative reduction cost appears, the residual edge relaxation is first performed in a fixed order of node number and edge number: the initial cumulative value of all nodes is set to zero. For each edge scanned, if the cumulative value of the starting point plus the edge reduction cost is less than the cumulative value of the ending point, the cumulative value of the ending point is updated and the edge is recorded as the predecessor edge. Let the number of nodes in the residual network be N. If N rounds of scanning are performed continuously, and there are still nodes being updated in the Nth round, backtrack N times along the predecessor edge from the updated node in the number sequence to enter the residual loop, and then continue backtracking along the predecessor edge until returning to the same node, thus obtaining the residual loop. Read the remaining capacity of all edges in the residual ring and take the first value in ascending order as the adjustment amount in the ring. When a positive residual edge is encountered along the ring direction, increase the corresponding transportation amount; when a negative residual edge is encountered, decrease the corresponding positive transportation amount. Rebuild the residual network and repeat the above calculation. When there is no node update in the Nth round, update the node potential with the cumulative value of each node in this round, so that the reduced cost after recalculation of all residual edges is not negative, and end the adjustment. Finally, all transport edge flows entering the receiving node are summarized according to the receiving voxel number and the source number, and then multiplied by the quality record accuracy to restore the source quality, thus obtaining the source quality distribution after compaction. The total source quality of the same source in all receiving voxels is checked item by item against the total source quality before compaction. If they match, they are written into the data version of the current compaction operation and are available for updating and reading by the Napier digital twin. Taking the simultaneous existence of two sources of Napier grass in the same compaction area as an example, when a pre-compaction voxel stores two sources, it will form two supply items with different source numbers. Both use the same compaction location but store the transport flow separately. The candidate receiving voxel is limited by the compaction location and the same spatial column. The transport cost first constrains the height order and then distinguishes the spatial distance. After the capacity scaling process completes the transfer of all integer mass, the transport relationship is adjusted through the residual loop. Ultimately, each compacted voxel can obtain source quality separated by source number, and the total amount before and after compaction of each source remains consistent. At the same time, the total amount of voxels received after compaction is consistent with the amount received by the network, providing a definite quality record for the allocation of material resources in the subsequent Napier grass digital twin.
[0020] S4. Update the digital twin of Napier grass based on the source quality distribution after compaction. Allocate the source quality from the current feeding surface one voxel at a time according to the order of feed production tasks. Divide the voxels that have accumulated the task requirements into the remaining requirements to obtain the feeding area and source composition. After the compacted source quality distribution is written into the Napier grass digital twin, the current inventory version will have three types of related information: voxel location, source number and source quality. Feed production tasks will allocate the actual available Napier grass accordingly. At the start of a resource allocation, the current inventory version and the order of feed production tasks already in production are frozen. During the allocation process, only task allocation tags are written, and the actual source quality in the digital twin is not deducted. The actual source quality is only updated after the subsequent material retrieval results are confirmed. Currently, the material handling equipment faces the exposed working surface of the material body, with the normal direction pointing from the material body to the material handling equipment. The material elements are layered along the normal direction and then sorted according to the equipment's travel direction to ensure that the task allocation order is consistent with the material handling order. The specific processing is as follows: The material handling sequence is first determined by the current material space status; read the voxels in the current inventory version whose total source mass is not zero, and obtain the operating position and direction of travel of the material handling equipment; In the S41 process, the normal is determined by the planar position of the current material picking surface, the center of each voxel is projected along the normal, and the layer thickness is taken as the side length of one voxel. The voxel picking layers are divided sequentially from the current material picking surface into the material body. Voxels in the same projection interval are assigned to the same voxel picking layer. Within each layer, the voxel center is projected onto the direction of travel of the material handling equipment and arranged in ascending order of projection coordinates; when the projection coordinates are the same, they are arranged according to the horizontal coordinates perpendicular to the direction of travel; when the horizontal coordinates are still the same, they are arranged according to the voxel number, thus forming a unique material handling voxel sequence. Voxels with a total source mass of zero are not written into the sequence; if the current picking surface or picking equipment direction is missing, the current inventory version remains unchanged, and the picking voxel sequence is regenerated after the corresponding operation parameters are supplemented. Once the task requirements enter the allocation phase, resource usage proceeds sequentially according to the frozen task order; each feed production task reads the confirmed demand for Napier grass and accumulates the total source quality within the voxel starting from the first position of the currently available feed voxel sequence. When executing S42, if the cumulative mass of a certain voxel after its addition is less than the task requirement, the voxel is completely written into the current task's planned material collection record and the next voxel is read. When the cumulative mass equals the task requirement, the current voxel is written as the fully allocated voxel and the current task allocation ends. If the total quality of all remaining voxels is still less than the current task requirement, then all remaining voxels will be written into the current task. At the same time, the unmet quality will be recorded by subtracting the total quality of remaining sources from the task requirement. Subsequent tasks will be suspended and will wait for new wolftail grass inventory to enter the digital twin before continuing execution from this task. When adding a voxel would cause the cumulative mass to exceed the current task requirement, only the mass required for the current task is separated from that voxel; after entering S43, the split mass is obtained by subtracting the total mass of the previously fully allocated voxel sources from the task requirement, and then the mass of each source in the current voxel is read. The source proportion is obtained by dividing the mass of each source by the total mass of the current voxel sources. The source proportion is then multiplied by the segmentation mass to form the theoretical segmentation mass of each source. The theoretical segmentation quality is quantized according to the quality recording precision adopted by S1. First, the integer quality units of each source are written in. Then, the quantization remainder is added to a quality recording unit one by one in the order of the unquantized decimal part from large to small and the source number from small to large, until the sum of the segmentation quality of each source equals the segmentation quality. The remaining source quality of the voxel is obtained by subtracting the corresponding segmentation quality from the original quality of each source of the current voxel. Thus, the segmented voxels simultaneously preserve the current task allocation portion and the subsequent task retention portion at the planning level, while the actual source quality in the digital twin remains unchanged. The resource allocation results are carried over between tasks in the same material retrieval order; when S44 is completed, all complete allocation voxels and the source quality of the segmented voxels in the current task are written together into the current task. The location range of the complete allocation voxels plus the allocation quality range of the segmented voxels form the material retrieval area. The source quality allocated to the current task in each complete allocation voxel and segmented voxel is summarized by source number to form the source composition. If the current task ends at a segmented voxel, the remaining source mass of that voxel is used as the first allocation amount for the next feed production task. The next task continues to accumulate from the remaining part of the same voxel. If the current task ends at a whole voxel, the next task starts from the next voxel in the feed extraction sequence. For each completed task, only the planned allocation mark is added and the sum of the allocated quality and the unallocated quality is checked to be equal to the source quality in the current inventory version. S42 to S43 are executed according to the task order until all tasks are allocated or unmet quality is found, and the wolftail grass resource allocation results for each feed production task are obtained. Taking three sequentially executed feed production tasks as an example, the first task obtains a certain number of complete carcasses along the current feeding surface and reaches the required amount in the next carcass. Then, the carcass is divided according to the source ratio, and the divided part is assigned to the first task. The remaining source quality directly becomes the first allocation amount of the second task. The second task continues to advance along the original feeding carcass sequence, and the third task takes over the remaining inventory in turn. Throughout the allocation process, the digital twin only stores the planned material retrieval markers and the original source quality. After the actual material retrieval is completed, subsequent steps deduct inventory based on the actual reduction of voxels. Therefore, the planned allocation results can maintain a consistent correspondence between task requirements, spatial material retrieval sequence, and the composition of the source of Napier grass.
[0021] S5. After material collection, the edge computing node determines the reduction of voxels based on the material surface change, deducts the corresponding source mass from the Napier digital twin, uses the material surface after material collection as the starting point for the next task allocation, and re-executes S4, outputting the source record and resource scheduling results. After the current feed production task completes the material retrieval action, the planned material retrieval area in the digital twin needs to be corrected according to the actual material level changes, and subsequent tasks will then be redistributed based on the corrected inventory. The edge computing nodes use the same cellar coordinate system, voxel grid and unified clock as the unloading and compaction stages. The material surface data is frozen once before the current task starts material picking, and the material surface data is frozen a second time after the material picking equipment finishes the current operation. Unloading and compaction operations are stopped between the two freezes. The current implementation method involves taking material layer by layer from the top surface of the wolftail grass feed, ensuring that the surface data before and after taking material corresponds to the same upper surface space. Then, the actual reduction in voxels is determined, the actual source mass is deducted, and unexecuted tasks are rearranged. The specific processing is as follows: The actual material retrieval space is determined by the difference in material surface before and after the same task; the edge computing node first unifies the two material surfaces to the kiln coordinate system according to the coordinate transformation parameters adopted by S11, and then uses the voxel origin and voxel side length of the current digital twin to generate the occupied state before material retrieval and the occupied state after material retrieval. When executing S51, the voxels that were occupied before material removal and were not occupied after material removal are written as completely reduced voxels, and their actual reduction ratio is recorded as one. For voxels that are passed through by the material surface both before and after material removal, the volume occupied before material removal and the volume occupied after material removal are calculated respectively. The difference between the two is divided by the volume occupied before material removal to obtain the actual reduction ratio. The voxel number and the actual reduction ratio are written together into the actual reduced voxel amount. If material surface data that can cover the voxel horizontal projection is missing at any position before or after material collection, the current task inventory update is paused and the corresponding position is collected; if unloading or compaction records occur between two collections, the current material surface data before and after the collection is invalidated and collected again. The actual inventory is reduced item by item based on the reduction of voxels, and the difference between the planned material collection area and the actual material collection area is corrected. After entering S52, the mass of each source in the digital twin is read one by one according to the actual reduction of voxels, and the corresponding source deduction mass is obtained by multiplying the mass of each source by the actual reduction ratio. The deducted mass is quantified according to the established mass record precision, and the resulting remainder follows the remainder allocation rule of S1, so that the sum of the deducted mass from each source of the same voxel is equal to the actual mass reduction of that voxel. Source quality that has not decreased within the planned material retrieval area remains in the original element; source quality that has decreased outside the planned material retrieval area is all recorded in the current task's actual source record; after the deduction is completed, the original planned material retrieval mark for the current task and the planned allocation mark formed based on the old material retrieval surface for tasks that have not yet been executed are deleted, and the current digital twin inventory version is reconstructed with the remaining source quality. When the actual material quality of the current task is less than the task requirement, the difference between the two is used to form the remaining requirement of the current task; when the actual material quality exceeds the task requirement, the excess is still retained in the actual source record of the current task and has been deducted from the actual inventory of the digital twin. After the inventory version is updated, subsequent tasks will re-obtain the allocation starting point from the new entity boundary; S53 reads the material surface after material picking and the updated digital twin, re-executes S41 to establish the material picking voxel sequence, and then completes the voxel accumulation, end voxel segmentation and source composition summary according to S42 to S44. If there is a remaining demand for the current task, it is first redistributed using that remaining demand. Once the current task is satisfied, the next task can begin. If there is no remaining demand, the process starts directly from the next task. Subsequent tasks are assigned using the end position of the previous task. When the remaining inventory cannot meet the current task's requirements, all existing source quality is written into the current task and the unmet quality is recorded. Subsequent tasks stop being assigned and will continue execution only after new wolftail grass inventory is written into the digital twin. Taking an operation where the planned material picking area and the actual material picking area are offset as an example, the voxels that are not picked by the equipment within the planned area retain their original source quality. The voxels that are actually picked by the equipment beyond the planned boundary are counted in the current task according to the material reduction ratio. After the actual deduction is completed, all old plan markers are released, the new material picking area regenerates the material picking voxel sequence, and the unexecuted tasks are redistributed according to the updated inventory order. Therefore, the remaining inventory in the digital twin is always equal to the inventory before material retrieval minus the actual material retrieval quality. The actual source record of the current task corresponds to the real reduction in space, and subsequent resource scheduling continues to be based on the updated physical inventory.
[0022] exist Figure 1 It should be noted that: the diagram represents the overall process of the method. After the grass is put into the pit, the source quality is generated, the compaction position is calculated, the source quality is migrated, the digital twin is updated and the task is assigned in sequence. After the material is taken out, the source quality is corrected according to the actual material surface changes. The solid line represents the main process, and the dashed line that returns from S5 to S4 represents the actual material taking results used to rearrange subsequent tasks. exist Figure 2It should be noted that: This diagram represents the data relationships between various parts of the system. After being processed by the edge computing nodes, the field data sequentially enters the stages of cellar allocation, compaction registration, quality migration, digital twin, and task allocation, and finally outputs the source record and resource scheduling results; solid lines represent normal data transmission, and dashed lines represent the update relationship between material retrieval data and digital twin and subsequent tasks.
[0023] Furthermore, the present invention also includes a livestock feed production management system, the system comprising a silo distribution module, a compaction and registration module, a quality transfer module, a task allocation module, and a feed retrieval and update module: The cellar allocation module is used to obtain the material surface data and cellar entry quality of the grass before and after unloading. It is unified from the edge computing nodes to the cellar coordinate system and voxelized. The cellar entry quality is allocated according to the volume ratio of the newly added voxels to obtain the source quality. The compaction registration module is used to iteratively calculate the posterior probability and displacement coefficient for voxels before and after compaction, with the center of the voxel before compaction as the coherence point drift algorithm Gaussian center and the center of the voxel after compaction as the observation point, until the first and second posterior relationships of the two adjacent rounds are consistent, thus obtaining the compaction position. The quality transfer module is used to construct a capacity-scaling minimum cost flow network based on the compaction location. It uses pre-compaction voxels as supply nodes and post-compaction voxels as receiving nodes, and builds edges between corresponding voxels. The high-order cost is determined by the number of sequence reversals and the low-order cost by the spatial distance order, so that the sum of the high-order costs is greater than the sum of the low-order costs. The source quality is transferred along the first path of the reduced cost ascending order according to the decreasing capacity scale until all the quality flows out, thus obtaining the post-compaction source quality distribution. The task allocation module updates the digital twin of Napier grass based on the source quality distribution after compaction. It allocates the source quality from the current feeding surface one voxel at a time according to the order of feed production tasks. Within the voxels that have accumulated the task requirements, it divides the remaining requirements to obtain the feeding area and source composition. The material picking and updating module is used to determine the reduction of voxels based on the material surface changes after material picking, deduct the corresponding source mass from the Napier grass digital twin, use the material surface after picking as the starting point for the next task allocation, and re-execute the task allocation module to output source records and resource scheduling results.
[0024] Overall execution and implementation description: This scheme first obtains the material surface data and the mass of the grass entering the pit before and after unloading by the edge computing node. It then divides the voxels in a unified pit coordinate system and determines the newly occupied space. The mass of the grass entering the pit is allocated to the source mass of each newly added voxel. After compaction, the spatial correspondence of the voxels before and after compaction is calculated by the coherent point drift algorithm. Then, the compaction position of each voxel is determined by combining the forward and reverse correspondence and the height order. Subsequently, a capacity scaling minimum cost flow network is established based on the compaction location. Under the condition of maintaining the conservation of source quality and hierarchical relationship, the source quality before compaction is transferred to the voxel after compaction, forming the source quality distribution after compaction and updating the Napier grass digital twin. During feed production, the source quality is allocated voxel by voxel from the current feeding surface according to the task order. After the actual feeding is completed, the actual reduced source quality is deducted according to the changes in the feeding surface before and after, and the subsequent tasks are rearranged with the updated feeding surface, so that the source record, inventory status and resource scheduling always correspond to the actual Napier grass in the pit. For example, if two fields of Napier grass are loaded into the same silage pit one after another, the system first records the source mass of each source based on the newly added voxels formed each time the material is unloaded. After the compaction equipment is operated, the original vertical position changes. The coherence point drift algorithm first determines where each voxel has migrated to, and then calculates which compacted voxels each source mass should fall into using the minimum cost flow, so that the two sources can still be distinguished after compaction. Afterwards, the farm issues a batch of feed production tasks. The system allocates voxels sequentially along the actual feeding direction. When only a portion of a voxel needs to be taken, it is divided according to the internal source ratio. After the equipment completes the feeding, the digital twin and task source records are corrected based on the actual reduction in the feed surface. Then, the next batch of tasks is arranged from the new feeding surface. In this way, after the Napier grass has been unloaded, compacted, and fed multiple times, it is possible to continuously determine which sources were actually used in each feed production and the amount of each source.
[0025] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for managing feed production in livestock farming, characterized in that, include: S1. Obtain the material surface data and the quality of the grass entering the pit before and after unloading. Unify the edge computing nodes to the pit coordinate system and voxelize them. Allocate the quality of the grass entering the pit according to the volume ratio of the newly added voxels to obtain the source quality. S2. For voxels before and after compaction, the center of the voxel before compaction is used as the Gaussian center of the coherence point drift algorithm and the center of the voxel after compaction is used as the observation point. The posterior probability and displacement coefficient are iteratively calculated until the first and second posterior relationships of the two adjacent rounds are consistent, and the compaction position is obtained. S3. Construct a capacity-scaling minimum cost flow network based on the compaction location. Use pre-compacted voxels as supply nodes and post-compacted voxels as receiving nodes. Build edges between corresponding voxels. Use the number of sequence reversals as the high-level cost and the spatial distance order as the low-level cost. Make a high-level cost greater than the sum of low-level costs. Transfer the source quality along the first path of the reduced cost ascending order according to the decreasing capacity scale until all flows out, and obtain the post-compacted source quality distribution. S4. Update the digital twin of Napier grass based on the source quality distribution after compaction. Allocate the source quality from the current feeding surface one voxel at a time according to the order of feed production tasks. Divide the voxels that have accumulated the task requirements into the remaining requirements to obtain the feeding area and source composition. S5. After material extraction, the edge computing node determines the reduction of voxels based on the material surface change, deducts the corresponding source mass from the Napier grass digital twin, uses the material surface after extraction as the starting point for the next task allocation, and re-executes S4, outputting the source record and resource scheduling results.
2. The livestock feed production management method according to claim 1, characterized in that: S1 includes: S11. Obtain the coordinates of the material surface points before and after unloading under the reference point of the pit body. The edge calculation nodes complete the translation and rotation transformation of the material surface according to the coordinate difference of the reference point, and write them into the pit body voxel grid with the same voxel side length to obtain the voxel set before unloading and the voxel set after unloading. S12. Compare the voxel set after unloading with the voxel set before unloading according to the voxel coordinates. Record the voxels that were not occupied before unloading but are occupied after unloading as new voxels. Calculate the overlap volume between the part below the material surface and the voxel grid in each new voxel to obtain the volume of the new voxel. S13. Multiply the ratio of the volume of each newly added voxel to the total volume of all newly added voxels by the mass of this cellar entry, write the calculated mass into the corresponding newly added voxel and bind it to the source of this wolf's tail grass, and obtain the source mass of each newly added voxel.
3. The livestock feed production management method according to claim 2, characterized in that: S2 includes: S21. Using the pre-compaction voxel center as the Gaussian center and the post-compaction voxel center as the observation point, execute the forward coherence point drift algorithm. Calculate the Gaussian response according to the negative exponent of the squared distance between centers and normalize it according to the observation point to obtain the posterior probability. Use the sum of the squared center distances weighted by the posterior probability and the Gaussian kernel displacement smoothing term as the cost to alternately update the displacement coefficient and Gaussian variance until the first voxel number of the posterior probability sorting corresponding to each pre-compaction voxel in two adjacent rounds is consistent, thus obtaining the forward correspondence sequence. S22. Exchange the pre-compaction voxel centers and post-compaction voxel centers and execute the reverse coherence point drift algorithm. Use the Gaussian response, posterior probability and displacement update rules of S21 until the first voxel number of the posterior probability sorting corresponding to each post-compaction voxel in two adjacent rounds is consistent, and obtain the reverse corresponding sequence.
4. The livestock feed production management method according to claim 3, characterized in that: S2 also includes: S23. Based on the plane coordinates of the cellar bottom, write the pre-compacted voxels and post-compacted voxels into the corresponding spatial columns and sort them by height respectively. Use the sum of the sorting positions of the voxels that refer to each other in the forward correspondence sequence and the reverse correspondence sequence as the local cost. Use dynamic time warping to calculate the sum of the local cost and the first value of the ascending order of the cumulative value of the predecessor cell by cell. Then, trace back from the last cell along the selected predecessor to the first cell to obtain the voxel correspondence chain. S24. For each pre-compacted voxel in the corresponding chain of voxels, determine the first voxel in ascending order of the sum of the forward posterior order and the reverse posterior order of the corresponding post-compacted voxel, and write the center of the first voxel as the compaction position.
5. The livestock feed production management method according to claim 4, characterized in that: S3 includes: S31. The source mass of each pre-compaction voxel is integerized into the supply quantity according to the quality record accuracy. The post-compaction voxels falling into each compaction position are aggregated to form the corresponding supply quantity to form the receiving quantity. Each pre-compaction voxel is connected with the post-compaction voxel corresponding to the compaction position and the occupied voxel in the same spatial column located between the original height and the compaction height to obtain the supply node, receiving node and transport edge. S32. For each transport edge, based on the pre-compacted voxel height number and the receiving voxel height number, count the number of voxels in the forward corresponding sequence whose pre-compacted height number is less than the current pre-compacted voxel and whose corresponding compacted position height number is greater than the current receiving voxel, and whose pre-compacted height number is greater than the current pre-compacted voxel and whose corresponding compacted position height number is less than the current receiving voxel, to obtain the sequence reversal number; write the distance order in ascending order of the distance from the compacted position to the center of the receiving voxel, and use the product of the sum of all source mass integer supply quantities and the sum of all transport edge distance orders plus one as the high-order unit, multiply the sequence reversal number by the high-order unit and add the distance order to obtain the transport edge cost.
6. The livestock feed production management method according to claim 5, characterized in that: S3 also includes: S33. Construct a capacity-scaling minimum cost flow network based on supply, receiving, and transportation edge costs. Starting from a capacity scale that does not exceed the quadratic power of the total supply, only retain residual edges whose remaining capacity reaches the current capacity scale. Calculate the reduced cost by subtracting the endpoint potential from the sum of the transportation edge cost and the starting potential. Read the first source-sink path in ascending order of the cumulative reduced cost value and transmit the source quality in ascending order of the first value of the path's remaining capacity. When there is no source-sink path at the current capacity scale, halve the capacity scale until the capacity scale is one and all supply flows out, thus obtaining the source quality transportation result. S34. Reconstruct the residual network based on the source quality transportation results and recalculate the reduced cost. When there is a residual edge with negative reduced cost, read the first residual edge with negative reduced cost according to the voxel number and form a residual ring along the predecessor edge. Send back the source quality and update the node potential according to the first value of the remaining capacity of the residual ring in ascending order. Continue until the reduced cost of all residual edges is not negative. Then summarize the source quality according to each receiving node to obtain the compacted source quality distribution.
7. The livestock feed production management method according to claim 6, characterized in that: S4 includes: S41. Read the source mass of each voxel after compaction in the digital twin of Napier grass, establish a voxel sampling layer along the normal of the current sampling surface, and arrange the voxels in each voxel sampling layer according to the direction of the sampling equipment to obtain the sampling voxel sequence. S42. Read the task requirements according to the order of feed production tasks, accumulate the source quality of each voxel starting from the first voxel in the feed collection sequence, and write the voxels whose cumulative quality does not exceed the task requirements into the current task in sequence to obtain the complete allocation of voxels for the current task.
8. The livestock feed production management method according to claim 7, characterized in that: S4 also includes: S43. In voxels whose cumulative quality exceeds the task requirement, the split quality is obtained by subtracting the total source quality of the fully allocated voxels from the task requirement. The split quality is then allocated according to the proportion of each source quality in the corresponding voxel to the total source quality of the corresponding voxel, thus obtaining the split source quality and the remaining source quality of the voxels for the current task. S44. Combine the complete allocation of voxels with the split source mass to form the feed area and source composition for the current task, and use the remaining source mass of voxels as the first allocation amount for the next feed production task. Repeat S42 to S43 in the order of tasks to obtain the allocation results of Napier grass resources for each feed production task.
9. The livestock feed production management method according to claim 8, characterized in that: S5 includes: S51. Obtain the feed surface data before and after the current feed production task, unify it from the edge computing node to the pit coordinate system, and compare it bit by bit according to the voxel position of the wolftail grass digital twin. Record the voxels that were occupied before the feeding and not occupied after the feeding as reduced voxels, and calculate the actual reduction ratio of the reduced voxels according to the overlapping volume of the feed surface and voxels after the feeding, so as to obtain the actual reduction amount of voxels. S52. Based on the actual reduction in voxel quantity, read the source mass of the corresponding voxel in the Napier digital twin, deduct the source mass according to the actual reduction ratio, and retain the source mass that has not been reduced in the planned feeding area in the original voxel, and include the source mass that has been reduced outside the planned feeding area in the current feed production task, so as to obtain the actual source record of the current task and the updated Napier digital twin. S53. Using the material surface after material extraction in the updated digital twin of Napier grass as the starting point for the allocation of the next feed production task, the demand of the next feed production task is re-executed by the voxel allocation and terminal voxel segmentation of S4, and the material extraction area and source composition of the subsequent feed production task are updated in sequence to obtain the feed resource scheduling result.
10. A livestock feed production management system, used to implement the livestock feed production management method according to any one of claims 1-9, the system comprising a silo distribution module, a compaction and registration module, a quality transfer module, a task allocation module, and a feed retrieval and update module, characterized in that: The cellar allocation module is used to obtain the material surface data and cellar entry quality of the grass before and after unloading. It is unified from the edge computing nodes to the cellar coordinate system and voxelized. The cellar entry quality is allocated according to the volume ratio of the newly added voxels to obtain the source quality. The compaction registration module is used to iteratively calculate the posterior probability and displacement coefficient for voxels before and after compaction, with the center of the voxel before compaction as the coherence point drift algorithm Gaussian center and the center of the voxel after compaction as the observation point, until the first and second posterior relationships of the two adjacent rounds are consistent, thus obtaining the compaction position. The quality transfer module is used to construct a capacity-scaling minimum cost flow network based on the compaction location. It uses pre-compaction voxels as supply nodes and post-compaction voxels as receiving nodes, and builds edges between corresponding voxels. The high-order cost is determined by the number of sequence reversals and the low-order cost by the spatial distance order, so that the sum of the high-order costs is greater than the sum of the low-order costs. The source quality is transferred along the first path of the reduced cost ascending order according to the decreasing capacity scale until all the quality flows out, thus obtaining the post-compaction source quality distribution. The task allocation module updates the digital twin of Napier grass based on the source quality distribution after compaction. It allocates the source quality from the current feeding surface one voxel at a time according to the order of feed production tasks. Within the voxels that have accumulated the task requirements, it divides the remaining requirements to obtain the feeding area and source composition. The material picking and updating module is used to determine the reduction of voxels based on the material surface changes after material picking, deduct the corresponding source mass from the Napier grass digital twin, use the material surface after picking as the starting point for the next task allocation, and re-execute the task allocation module to output source records and resource scheduling results.