Pig slaughtering whole process management method and system based on segmentation model
By adopting a segmentation model-based pig slaughter management method, the body size and meat quality distribution of pigs are identified, and an optimized slaughter path is generated. Genetic algorithms and convolutional neural networks are used to adjust the cutting path, which solves the problems of resource waste and low efficiency caused by differences in body size during pig slaughtering. This achieves efficient and accurate meat grading and production process stability.
Patent Information
- Application Number
- CN202510953380.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-10
- Publication Date
- 2025-10-31
AI Technical Summary
Existing technologies lack dynamic sensing and processing mechanisms when dealing with pigs that have significant differences in body size or uneven muscle distribution. This leads to mismatches in meat grades, resource waste, and low operational efficiency. Furthermore, the lack of real-time load and equipment rhythm scheduling feedback on the production line affects product quality and the stability of the production process.
A segmentation-based management approach is adopted. By identifying the body size and meat quality distribution of pigs, an optimized slaughtering path is generated. Genetic algorithms and convolutional neural networks are used to adjust the cutting path. Combined with production line operation data, dynamic segmentation adjustments are made to achieve precise cutting and resource optimization.
It improves the accuracy of meat grading and the stability of the production process, reduces resource waste, enhances the efficiency of the slaughtering process and product quality, and ensures the continuity of the production line and the coordinated operation of equipment.
Smart Images

Figure CN120875349A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of pig slaughter management technology, and in particular to a method and system for managing the entire pig slaughter process based on a segmentation model. Background Technology
[0002] Pig slaughter management technology mainly involves the management of pigs from pre-slaughter inspection, transportation, slaughtering process monitoring, cutting, processing, and product quality control and traceability systems. It aims to improve the safety, efficiency and product quality of the slaughtering process, ensure compliance with food safety standards, reduce waste, optimize production costs, and provide real-time monitoring and data support for the entire pig slaughtering process, thereby promoting the standardization, automation and traceability of the pig slaughtering process.
[0003] The purpose of the segmentation model-based whole-process management method for pig slaughter is to achieve efficient management of the pig slaughter process through data monitoring and precise control at each stage of the slaughtering process. The segmentation model is used to refine and optimize the operation process of each link in the slaughtering process, so that each operation meets the predetermined quality and efficiency standards, thereby improving the overall efficiency of the production line, reducing operational errors, reducing waste, improving product quality and traceability, effectively improving resource utilization and product safety in the pig slaughtering process, and ensuring that the products meet food safety and quality standards.
[0004] Existing technologies mostly employ static templates and fixed processes for pig segmentation and slaughter control. While monitoring and traceability can be achieved at the process level, they lack dynamic perception and processing mechanisms for individual differences. When dealing with pigs with significant differences in body size or uneven muscle distribution, the uniform standard processing method is prone to regional division deviations and inaccurate cutting, resulting in mismatched meat grades or resource waste. Furthermore, due to the lack of real-time load and equipment rhythm scheduling feedback on the production line, operational congestion or cutter malfunctions are likely to occur during peak load periods. Moreover, image recognition mostly focuses on surface detection rather than structural depth modeling, which cannot effectively guide the adjustment of cutting angles and paths, resulting in uneven cut surfaces, inconsistent depths, and efficiency fluctuations. In addition, the lack of a synchronous adjustment mechanism for matching the cutting point rhythm across the entire production line affects the stability of product quality and the continuity of production line rhythm. Summary of the Invention
[0005] The purpose of this invention is to overcome the shortcomings of existing technologies and propose a management method and system for the entire process of pig slaughtering based on a segmentation model.
[0006] To achieve the above objectives, the present invention adopts the following technical solution: a method for managing the entire process of pig slaughtering based on a segmentation model, comprising the following steps:
[0007] Step 1: Based on the data of pig body size, weight, muscle distribution and health status, divide the pigs into zones, identify the body size of each pig and match it with preset standards, select suitable zones, divide the pig areas according to body shape characteristics, and generate body size zoning results.
[0008] Step 2: Based on the body size zoning results, measure the fat content and skeletal structure of pigs in each zoning, combine real-time data to estimate the meat quality distribution, and match it with meat quality standards to generate meat quality distribution prediction results;
[0009] Step 3: Based on the meat quality distribution prediction results, obtain the slaughter time, production line capacity and equipment load of pigs in each zone and conduct a comprehensive evaluation. Use a genetic algorithm to sort and iterate the numbers that meet the conditions and arrange the slaughter path of each pig according to the priority order to generate a slaughter path optimization scheme.
[0010] Step 4: Based on the slaughter path optimization scheme, calculate the cutting points in each slaughter path, use a convolutional neural network to identify changes in muscle boundaries and assist in determining the cutting area, obtain the appropriate position and cutting angle of each cutting point, and adjust the path in combination with production line operation data to generate a cutting path optimization scheme;
[0011] Step 5: Based on the cutting path optimization scheme, combined with the equipment operating status and production line speed during the slaughtering process, adjust the cutting points of each path, select a suitable segmentation sequence, and generate dynamic segmentation adjustment results.
[0012] As a further aspect of the present invention, the specific steps for generating the body shape partitioning results are as follows:
[0013] Based on data on pig body shape, weight, muscle distribution, and health status, the body shape of pigs is measured, and the dimensions of the back, abdomen, and limbs are recorded. Preliminary body shape information is obtained through meat volume. The skeletal structure and fat distribution of pigs are calculated in combination with the body shape data. Suitable body shape standards are selected, and pigs are divided into regions according to the standards to generate body shape zoning results.
[0014] Based on the body size zoning results, the skeletal structure, fat ratio, muscle thickness and other characteristic data of pigs in each zoning are analyzed. The zoning standards are adjusted in combination with dynamic parameters to ensure that the zoning matches the actual body size and health status. The standard range of each region is refined to avoid zoning errors caused by environmental and data deviations, and optimized body size zoning results are generated.
[0015] As a further aspect of the present invention, the specific steps for generating the meat quality distribution prediction result are as follows:
[0016] Based on the body type zoning results, the subcutaneous thickness of the fat-covered area was measured. The depth of the fat layer on the back, abdomen, and shoulders was recorded using a vertical measurement method. The fat coverage rate was calculated by the difference between the thickness value and the length of the corresponding muscle contour line. The main axis length of the skeleton, joint width, and back curvature were measured. The temperature and humidity data during the detection period were combined to correct the error and generate a dataset of fat and skeleton parameters.
[0017] Based on the aforementioned fat and skeleton parameter dataset, the intervals of fat coverage, skeleton main axis length, muscle density value and meat grading standards are matched. The interval intersection method is used to determine the matching segment, and the fat and muscle combination parameters that meet the grade requirements are selected. They are sorted and marked as distribution nodes according to their location numbers. A continuous distribution trend line is formed by calculating the node frequency, and the meat quality distribution prediction result is generated.
[0018] As a further aspect of the present invention, the specific steps for generating the slaughter path optimization scheme are as follows:
[0019] Based on the meat quality distribution prediction results, the pig numbers are extracted, the slaughter time corresponding to the number is indexed, the start and end values of the corresponding production line time period are collected, the slaughter time span is calculated, the operating status of the production line is obtained, the unit time load value of the equipment is extracted, the total load under each pig number is accumulated, and the peak load position is recorded to generate a slaughter scheduling reference parameter set.
[0020] Based on the slaughter scheduling reference parameter set, the slaughter time and production line time period are matched, the corresponding numbers of conflict segments are marked, the unassignable numbers are removed, the equipment load values corresponding to the remaining numbers are extracted, the genetic algorithm is used to converge and iterate the arrangement combination of numbers that meet the conditions, the pig numbers are arranged in ascending order of load value, and the scheduling priority index list is formed by combining the number order to generate the slaughter number priority sequence.
[0021] Based on the slaughter number priority sequence, the slaughter time corresponding to each number and the remaining capacity of the production line are obtained in sequence. The difference between the remaining capacity and the slaughter time is compared and the available time period is obtained. After inserting the number, the path order is fixed, and a complete path structure is formed according to the number to establish a slaughter path optimization scheme.
[0022] As a further aspect of the present invention, the genetic algorithm is performed according to the formula:
[0023]
[0024] Where: f″(x) represents the scheduling fitness value of combination number x, x represents a chromosome individual in the genetic algorithm, w1 represents the weight coefficient of the load efficiency parameter, w2 represents the weight coefficient of the capacity stability term, w3 represents the peak avoidance scheduling priority weight, w4 represents the weight coefficient of the conflict penalty term, h iLet represent the unit time load value of the i-th number in the time period, and n represent the total number of numbers included in combination x. This represents the total load cost for all numbers in the current combination. φ(x) represents the variance of the difference between the number of slaughtering times and the capacity of the assigned production line, φ(x) represents the ratio of the number of numbers in combination x that fall into the low-load section to n, reflecting the peak avoidance capability, and δ(x) represents the conflict function value formed by the numbers in combination x that have production line conflicts.
[0025] As a further aspect of the present invention, the specific steps for generating the cutting path optimization scheme are as follows:
[0026] Based on the aforementioned slaughter path optimization scheme, the main axis of the skeleton is extracted, and the coordinates of the shoulder and pelvis are located using the pig body shape data under each path. The region is divided by the distribution of perpendicular lines between two points, and the number of segments is determined according to the rate of change of muscle distribution. A convolutional neural network is used to identify the boundary of muscle region change and assist in numbering and labeling. The starting and ending coordinates of each segment are labeled according to the number, and a set of coordinates of path segmentation points is generated.
[0027] Based on the coordinate set of the path segmentation points, the muscle thickness, bone length and fat surface contour line corresponding to each coordinate point are extracted, and the three-way included angle is constructed to locate the tangent vector. Combining the difference in muscle layer thickness and the distance between bone turning points, the cutting inclination and directional offset are determined to generate the cutting point angle positioning set.
[0028] Based on the cutting point angle positioning set, the production line tool operation cycle, pig movement speed and positioning sensor response time are obtained. The start time of each cutting point is adjusted according to the operation rhythm. The time mapping relationship is established by using the angle offset value and the rhythm sequence. Synchronous coordinates and segment combination are established to generate a cutting path optimization scheme.
[0029] As a further aspect of the present invention, the convolutional neural network is configured according to the formula:
[0030]
[0031] Where: M(u) represents the boundary response map set corresponding to the muscle image region with sequence index u, u represents the sequence number of the muscle image region, and ρ(·) represents the Sigmoid normalization function. This represents the summation operation over all convolutional channel indices r from 1 to R, where R represents the total number of output channels in the convolutional neural network, and λ... r Represents the channel weighting factor of the r-th convolutional channel, ReLU(·) represents the modified linear unit activation function, and Q... r This represents the input tensor of the r-th image region, * represents the two-dimensional convolution operation symbol, F r Let β represent the r-th convolutional kernel. rη represents the bias term of the r-th channel. r This represents the muscle density factor corresponding to the r-th image region. This represents the gradient intensity of the muscle contour direction in the r-th image region.
[0032] As a further aspect of the present invention, the process of constructing the three-way included angle is specifically as follows: extracting the skeletal principal axis direction vector corresponding to each segmentation point in the cutting path, the vector reflects the longitudinal trend of the overall skeletal arrangement of the pig; extracting the thickness normal direction of the corresponding muscle region at the same position; calculating the direction of the muscle cross-section shape; generating the tangent direction vector representing the curvature direction of the fat layer surface based on the trend of the fat surface contour; and constructing the three-way included angle of each segmentation point using the skeletal principal axis direction, the muscle normal direction, and the fat contour tangent direction as three references.
[0033] As a further aspect of the present invention, the specific steps for generating the dynamic segmentation adjustment result are as follows:
[0034] Based on the cutting path optimization scheme, the position coordinates and angle values of the cutting points in each path are extracted, the operating cycle of the equipment is collected and the start-stop interval of the cutter head is recorded, a time axis is established according to the operation sequence, the abnormal peak section is calibrated by referring to the tool load curve, the time window of the relevant cutting points is offset and adjusted, and the cutting point status adjustment sequence is generated.
[0035] Based on the cutting point status adjustment sequence, the pig position index corresponding to each cutting point number and the current position offset of the conveyor line are extracted. The unit time movement distance under the corresponding cycle is measured, and relative alignment is performed according to the time difference between the cutting point and the working end of the cutter. The order is rearranged according to the synchronous comparison results to establish dynamic segmentation adjustment results.
[0036] A segmentation-based pig slaughtering process management system, wherein the segmentation-based pig slaughtering process management system is used to execute the above-mentioned segmentation-based pig slaughtering process management method, the system comprising:
[0037] Body shape assessment module: Based on data on pig body shape, weight, muscle distribution and health status, it extracts feature points from multiple parts, maps structural points and compares them with body shape templates. Combined with posture contour fitting method, it delineates typical areas of the forequarters, back, abdomen and limbs. It determines the partition structure through regional feature similarity matching and generates body shape partition results.
[0038] Meat quality modeling module: Based on the body shape zoning results, it estimates fat thickness sampling, skeletal structure dimension measurement and muscle density, combines real-time temperature and humidity data to correct structural measurement deviations, and constructs fat and skeletal parameter groups by associating regional features through location numbers to generate meat quality distribution prediction results;
[0039] Numbering and sorting module: Based on the meat quality distribution prediction results, it reads the slaughter time, retrieves the production line capacity and analyzes the equipment load, constructs a capacity conflict judgment matrix and task arrangement map, and uses a genetic algorithm to aggregate and iterate the compliant number combinations to generate a slaughter path optimization scheme;
[0040] Boundary analysis module: Based on the slaughter path optimization scheme, it analyzes the positioning of the skeleton main axis, the segmentation and change rate of the muscle region image, uses a convolutional neural network to identify the boundary response segment and perform structural numbering and labeling, and extracts contour information and directional relationships by combining the cross section data to generate a cutting path optimization scheme;
[0041] The beat control module: Based on the cutting path optimization scheme, it collects the cutting point angle, reads the equipment beat parameters and analyzes the movement response, combines the angle offset and beat rhythm to generate a work synchronization table, establishes a path execution sequence and time mapping chain, and generates dynamic segmentation adjustment results.
[0042] The beneficial effects of this invention include:
[0043] By measuring fat content and skeletal parameters in different zones and combining them with real-time environmental data, a predictive result for meat quality distribution is constructed, enabling meat grading to transition from experience-based judgment to multi-parameter decision-making, improving identification accuracy and data stability. Combined with production line capacity and equipment load information, structural precision ensures cutting accuracy.
[0044] By using a genetic algorithm to iteratively sort and optimize the numbering, a calculable and quantifiable slaughtering sequence is constructed, forming a scheduling path that is coordinated and matched with the equipment operating status, reducing production line conflicts and resource waste, and enhancing the adaptability and dynamic coordination capability of the overall processing system.
[0045] By improving cycle time matching efficiency through path continuity, cutting deviation and error propagation are reduced. The segmentation sequence is adjusted in conjunction with changes in equipment load and conveying rhythm, achieving data-driven closed-loop control at each stage from body shape recognition to cutting execution. This effectively improves the precision management, cutting consistency and production process robustness in the slaughtering process. Attached Figure Description
[0046] The invention will now be further described with reference to the accompanying drawings.
[0047] Figure 1 This is a schematic diagram of the workflow of the present invention;
[0048] Figure 2 This is a system flowchart of the present invention. Detailed Implementation
[0049] 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.
[0050] This invention provides a method for managing the entire pig slaughtering process based on a segmentation model. See also... Figure 1 , Figure 1 This is a flowchart illustrating a method for managing the entire pig slaughtering process based on a segmentation model, provided in an embodiment of the present invention. The method includes the following steps:
[0051] Step 1: Based on the data of pig body size, weight, muscle distribution and health status, divide the pigs into zones, identify the body size of each pig and match it with preset standards, select suitable zones, divide the pig areas according to body shape characteristics, and generate body size zoning results.
[0052] Step 2: Based on the body size zoning results, measure the fat content and skeletal structure of pigs in each zoning, combine real-time data to estimate the distribution of meat quality, and match it with meat quality standards to generate meat quality distribution prediction results;
[0053] Step 3: Based on the meat quality distribution prediction results, obtain the slaughter time, production line capacity and equipment load of pigs in each region and conduct a comprehensive evaluation. Use a genetic algorithm to sort and iterate the numbers that meet the conditions and arrange the slaughter path of each pig according to the priority order to generate a slaughter path optimization scheme.
[0054] Step 4: Based on the slaughter path optimization scheme, calculate the cutting points in each slaughter path, use a convolutional neural network to identify changes in muscle boundaries and assist in determining the cutting area, obtain the appropriate position and cutting angle of each cutting point, and adjust the path in combination with production line operation data to generate a cutting path optimization scheme;
[0055] Step 5: Based on the cutting path optimization scheme, combined with the equipment operating status and production line speed during the slaughtering process, adjust the cutting points of each path, select a suitable segmentation sequence, and generate dynamic segmentation adjustment results.
[0056] The specific steps for generating body shape partitioning results are as follows:
[0057] Based on data on pig body shape, weight, muscle distribution, and health status, the body shape of pigs is measured, and the dimensions of the back, abdomen, and limbs are recorded. Preliminary body shape information is obtained through meat volume. The skeletal structure and fat distribution of pigs are calculated in combination with the body shape data. Suitable body shape standards are selected, and pigs are divided into regions according to the standards to generate body shape zoning results.
[0058] Based on the body size zoning results, we analyze the skeletal structure, fat ratio, muscle thickness and other characteristic data of pigs in each zoning, and adjust the zoning standards in combination with dynamic parameters to ensure that the zoning matches the actual body size and health status. We refine the standard range of each area to avoid zoning errors caused by environmental and data deviations, and generate optimized body size zoning results.
[0059] Based on data on pig body shape, weight, muscle distribution, and health status, the system extracts front and side view images of pigs to define boundary lines, delineates the outer contour areas of the back, abdomen, and limbs, and measures the distance between corresponding coordinate points. The vertical distance from the back line to the abdomen line is used as the pig thickness parameter, and the horizontal distance between the front and rear skeletal points is used as the body length index. The height difference between the start and end points of the limbs is used to define the limb length range. Combined with weight data, the system estimates the overall meat yield by converting block volume. Referring to a pre-defined skeleton proportion template file, which contains the length, thickness, and muscle density ranges corresponding to different standard body shapes, the system matches the existing pig data with the template indicators, filters and classifies the data, maps coordinate blocks, and then segments the data to generate body shape partitioning results.
[0060] Based on the body shape partitioning results, the skeletal density, fat thickness, and muscle structure change values are read for the divided regions. The fat ratio parameter is calculated based on the average image intensity of each region. The muscle thickness index is constructed by the ratio of the partitioned muscle thickness data to the length data. The distance between the center points of the skeletal line segments is selected as the bone length. The influence of data from the environmental temperature, humidity, and the individual pig health index grading table is combined. The muscle strength error range is adjusted according to the health score. In regions where the deviation between the partitioned coordinate data and the actual feature value exceeds the correction threshold of 3%, the boundary correction function is triggered to update the partition boundary index. The corresponding partition number, boundary coordinates, and correction direction are recorded to generate the optimized body shape partitioning results.
[0061] The specific steps for generating meat quality distribution prediction results are as follows:
[0062] Based on the body type zoning results, the subcutaneous thickness of the fat-covered area was measured. The depth of the fat layer on the back, abdomen, and shoulders was recorded using a vertical measurement method. The fat coverage rate was calculated by the difference between the thickness value and the length of the corresponding muscle contour line. The main axis length of the skeleton, joint width, and back curvature were also measured. The temperature and humidity data during the detection period were combined to correct the error and generate a dataset of fat and skeleton parameters.
[0063] Based on the fat and skeleton parameter dataset, the intervals of fat coverage, skeleton main axis length, muscle density value and meat grading standards are matched. The interval intersection method is used to determine the matching segment, and the fat and muscle combination parameters that meet the grade requirements are selected. They are sorted and marked as distribution nodes according to the location number. A continuous distribution trend line is formed by calculating the node frequency to generate meat quality distribution prediction results.
[0064] Based on the body shape partitioning results, binary boundaries are generated by converting images to grayscale and setting thresholds. Vertical coordinate differences are calculated for the back, abdomen, and shoulders at a preset pixel density conversion ratio of 0.26 mm pixels, and the region numbers are recorded. Combined with the pixel length difference of muscle contour lines in the image, the difference sequence between fat thickness and contour length is calculated by the position between coordinate points and stored with number index. Spatial alignment is performed using the three-dimensional coordinates of the skeleton point set at a set iteration number of 200 times and an error tolerance threshold of 0.001. The horizontal width of the connected pixel region at the joint endpoints is measured. The mean curvature of the spine point sequence is obtained by coordinate fitting method. Time series correction is performed by combining temperature and humidity sensor data sampled once per minute to generate a dataset of fat and skeleton parameters.
[0065] Based on a dataset of fat and skeleton parameters, the pre-defined meat grading standard intervals are arranged in ascending order and index boundaries are defined. The fat coverage segment, skeleton main axis length segment, and muscle density value segment are searched by number index. The segment numbers of the three are compared sequentially and the set intersection is performed. The combined index is recorded by matching number and the occurrence frequency of node number is counted. An order mapping is established by node number and occurrence frequency. The number positions are connected by number sequence interpolation to form a continuous trend line, generating meat quality distribution prediction results.
[0066] The specific steps for generating an optimized slaughter route are as follows:
[0067] Based on the meat quality distribution prediction results, the pig numbers are extracted, the slaughter time corresponding to the number is indexed, the start and end values of the corresponding production line time period are collected, the slaughter time span is calculated, the operating status of the production line is obtained, the unit time load value of the equipment is extracted, the total load under each pig number is accumulated, and the peak load position is recorded to generate a slaughter scheduling reference parameter set.
[0068] Based on the slaughter scheduling reference parameter set, the slaughter time and production line time period are matched, the corresponding numbers of conflicting segments are marked, and the load values of the equipment corresponding to the remaining numbers are extracted after removing the unassignable numbers. The genetic algorithm is used to converge and iterate the arrangement combination of numbers that meet the conditions. The pig numbers are arranged in ascending order of load value. The scheduling priority index list is formed by combining the number order and the slaughter number priority sequence is generated.
[0069] Based on the priority sequence of slaughter numbers, the slaughter time corresponding to each number and the remaining capacity of the production line are obtained in sequence. The difference between the remaining capacity and the slaughter time is compared and the available time period is obtained. After inserting the number, the path order is fixed, and a complete path structure is formed according to the number to establish a slaughter path optimization scheme.
[0070] Based on the meat quality distribution prediction results, the database query command `select` is used to match the corresponding slaughter time through the pig number field. The data is stored in a time series format. The start and end time values are extracted using the string separator "-", converted into timestamps, and then subtracted to calculate the slaughter time span. Using a pre-stored set of operating statuses corresponding to production line numbers, the database left join operation is used to connect to the operating status table, recording the production line number status code as 1 or 0. The production line status flags are used to match the pig numbers in parallel to extract the unit time load value of the equipment within the corresponding number time period. The load value of a single slaughter operation is read in minutes, and the load values under the same number are accumulated to form the total load. The load sequence is recorded by number index and a list traversal method is applied to identify the peak position. The number of the peak and the corresponding time index are marked to generate a set of slaughter scheduling reference parameters.
[0071] Based on the slaughter scheduling reference parameter set, the slaughter time field in the number index is matched with the start and end values of the production line time period. A bidirectional scanning method is used to compare whether the start and end times intersect and mark the conflict numbers. For the conflict numbers, a list removal operation is used to remove the numbers to be processed later. The equipment load value corresponding to the remaining numbers is extracted. The preset iteration number is 300, the population size is set to 50, the crossover probability is 0.8, and the mutation probability is 0.05. The remaining numbers are used to form a gene locus vector and initialized according to the binary format of the genetic code. A roulette wheel selection operation is performed to select the fitness and pass the priority number. After the iteration is completed, the pig numbers are sorted in ascending order of load value and stored as an integer list in combination with the record order to form a continuous number index sequence and generate a slaughter number priority sequence.
[0072] Based on the priority sequence of slaughter numbers, the slaughter time and remaining production capacity of the production line are obtained by traversing the numbers sequentially. The difference between the two is compared and the time intervals with a value greater than zero are recorded. The available time is inserted into the corresponding number index using a time interval array. The path arrangement order is fixed by sequential writing and a linked list structure is formed. All numbers are traversed and the available time intervals under adjacent numbers are merged. The number order and insertion position index are recorded to form a path structure. The path is written into a mapping table according to the number combination method to form a number order list, thus generating a slaughter path optimization scheme.
[0073] Genetic algorithms are based on the following formula:
[0074]
[0075] Where: f″(x) represents the scheduling fitness value of combination number x, x represents a chromosome individual in the genetic algorithm, w1 represents the weight coefficient of the load efficiency parameter, w2 represents the weight coefficient of the capacity stability term, w3 represents the peak avoidance scheduling priority weight, w4 represents the weight coefficient of the conflict penalty term, h iLet represent the unit time load value of the i-th number in the time period, and n represent the total number of numbers included in combination x. This represents the total load cost for all numbers in the current combination. φ(x) represents the variance of the difference between the number of slaughtering time and the capacity of the allocated production line, φ(x) represents the ratio of the number of numbers in combination x that fall into the low load section to n, reflecting the peak avoidance capability, and δ(x) represents the conflict function value formed by the numbers in combination x that have production line conflicts.
[0076] Execution process: First, the numbers of the pigs to be slaughtered, determined based on the meat quality distribution prediction results, are used as the initial coded population. Multiple number arrangement sequences are constructed, each representing a set of slaughtering sequence arrangements. The number combinations x are extracted sequentially, and the slaughtering time t corresponding to each number i in the combination is obtained. i Equipment load value per unit time h i Calculate production line capacity margin and fluctuation parameters. The total load under the current combination is obtained to measure execution efficiency. The variance of all numbers in terms of the difference between slaughter time and production line capacity is calculated to assess the stability of the arrangement in the combination. φ(x) is used to obtain the proportion of pig numbers in the low load period to measure the level of peak avoidance scheduling. δ(x) is used to calculate the penalty function value of the numbers with resource conflicts to reflect the intensity of the conflict. The values are multiplied by the weight coefficients w1, w2, w3, and w4 respectively to obtain the overall fitness value f″(x). The combinations are then iteratively sorted according to the fitness value.
[0077] The specific steps for generating the cutting path optimization scheme are as follows:
[0078] Based on the slaughter path optimization scheme, the main axis of the skeleton is extracted, the coordinates of the shoulder and pelvis are located using the body shape data of pigs under each path, the region is divided by the distribution of perpendicular lines between two points, and the number of segments is determined according to the rate of change of muscle distribution. A convolutional neural network is used to identify the boundary of muscle region change and assist in numbering and labeling. The starting and ending coordinates of each segment are labeled according to the number, and a set of coordinates of path segmentation points is generated.
[0079] Based on the coordinate set of path segmentation points, the muscle thickness, bone length and fat surface contour line corresponding to each coordinate point are extracted, and the three-way included angle is constructed to locate the tangent vector. Combining the difference in muscle layer thickness and the distance between bone turning points, the cutting inclination and direction offset are determined to generate the cutting point angle positioning set.
[0080] Based on the cutting point angle positioning set, the production line tool operation cycle, pig movement speed and positioning sensor response time are obtained. The start time of each cutting point is adjusted according to the operation rhythm. The time mapping relationship is established by using the angle offset value and the rhythm sequence. Synchronous coordinates and segment combination are established to generate a cutting path optimization scheme.
[0081] Based on the slaughter path optimization scheme, the two-dimensional coordinates of the pig body size point set corresponding to the slaughter path number are recorded in pixel coordinate order, and the x-axis and y-axis indices of the shoulder and pelvis are recorded. The Euclidean distance between the two points is calculated using a distance threshold of 15 pixels and the vertical projection range is marked. The segmentation area is defined with a fixed pixel step size of 5 pixels. The number of segmentation segments is defined based on the pixel difference change threshold of 20 in the meat layer area. A convolutional neural network model is loaded using the PyTorch framework. The input tensor size is defined as 128 x 128 pixels, the number of channels is 3, the convolution kernel size is 3 x 3, the activation function is ReLU, the batch normalization layer is used in parallel with the dropout layer ratio of 0.3, and the last layer outputs the classification probability. The classification index output by the network is used to label the number. The starting coordinates and ending coordinates of each segment number are labeled in sequence to generate the path segmentation point coordinate set.
[0082] Based on the path segmentation point coordinate set, the image blocks where each coordinate point is located are read sequentially. The local pixel grayscale difference threshold of 10 is used as the muscle thickness reference value. The straight line direction vector is calculated based on the pixel coordinate difference of the skeleton principal axis length and stored in a three-dimensional array structure. The approximate slope of the edge pixel curvature of the fat region is read. The boundary point coordinates are supplemented according to the control point interpolation method. The distance between adjacent skeleton points is greater than 8 pixels as the criterion for the bone turning point. The angle of the turning segment is calculated and vector dot product and cross product are performed with the fat direction vector to obtain the three-way included angle. The angle information is converted using radians and the angle offset index is marked. The information is written into the numbered structure list and the cutting point angle positioning set is generated.
[0083] Based on the cutting point angle positioning set, the operation time records of slaughter line knives are extracted and the operation cycle is loaded in seconds. The average pig movement speed measured by the production line sensors is stored at 50 cm per minute. The response time of reading the positioning sensor records is set to 200 milliseconds. The cutting point angle index is matched with the number list. The cycle time table is formed by the number order. The time axis mapping structure is established according to the product relationship between the angle offset and the cycle sequence. The start time is assigned and the number subscript is recorded with an integer array. The time index and coordinate number are summarized to form a mapping chain and generate a cutting path optimization scheme.
[0084] Convolutional neural networks are based on the formula:
[0085]
[0086] Where: M(u) represents the boundary response map set corresponding to the muscle image region with sequence index u, u represents the sequence number of the muscle image region, and ρ(·) represents the Sigmoid normalization function. This represents the summation operation over all convolutional channel indices r from 1 to R, where R represents the total number of output channels in the convolutional neural network, and λ... rRepresents the channel weighting factor of the r-th convolutional channel, ReLU(·) represents the modified linear unit activation function, and Q... r This represents the input tensor of the r-th image region, * represents the two-dimensional convolution operation symbol, F r Let β represent the r-th convolutional kernel. r η represents the bias term of the r-th channel. r This represents the muscle density factor corresponding to the r-th image region. This represents the gradient intensity of the muscle contour direction in the r-th image region;
[0087] Execution process: First, the pig body image region is divided into several small regions u, each corresponding to a different muscle distribution segment of the pig. The segmented image blocks are then input into a convolutional neural network model, and convolution operations Q are performed. r *F r Feature maps of each region u are extracted, and the convolutional results are then non-linearly mapped using the ReLU activation function. The model will adjust the mapping based on the channel weighting factor λ. r To adjust the weights of the convolution channels, the density factor η of the muscle region is then calculated. r and contour gradient Two parameters are used to measure the muscle distribution and degree of change in each region. After the features are weighted, they are input into the Sigmoid function ρ(·) for normalization to generate the final boundary response map M(u).
[0088] The process of constructing the three-way included angle is as follows: extract the direction vector of the main axis of the skeleton corresponding to each segmentation point in the cutting path. The vector reflects the longitudinal trend of the overall skeleton arrangement of the pig. Extract the thickness normal direction of the corresponding muscle region at the same position. Calculate the direction of the muscle cross-section shape. Based on the trend of the fat surface contour, generate the tangent direction vector representing the curvature direction of the fat layer surface. Then, using the main axis of the skeleton, the normal direction of the muscle, and the tangent direction of the fat contour as the three references, construct the three-way included angle of each segmentation point.
[0089] The specific steps for generating dynamic segmentation and adjustment results are as follows:
[0090] Based on the cutting path optimization scheme, the position coordinates and angle values of the cutting points in each path are extracted, the operating cycle of the equipment is collected and the start-stop interval of the cutter head is recorded, a time axis is established according to the operation sequence, the abnormal peak section is calibrated by referring to the tool load curve, the time window of the relevant cutting points is offset and adjusted, and the cutting point status adjustment sequence is generated.
[0091] Based on the cutting point status adjustment sequence, the pig position index and the current position offset of the conveyor line corresponding to each cutting point number are extracted. The unit time movement distance under the corresponding cycle is measured. The relative alignment is performed according to the time difference between the cutting point and the working end of the cutter. The order is rearranged according to the synchronous comparison results to establish dynamic segmentation adjustment results.
[0092] Based on the cutting path optimization scheme, the coordinates and angle values of the cutting points of each path in the cutting path number sequence are extracted. The database query command select is used to load the equipment operation cycle and record the start and stop times of the tool head. The operation interval is recorded in milliseconds. The difference between two start and stop times is calculated by converting the timestamp to an integer. The cutting point sequence is merged into a time sequence according to the number order. An array index is established and sorted based on the timestamp. The maximum value sliding window width is used to compare 5 cutting points and extract the tool load value segment that is continuously greater than twice the average value. The start and end index positions of the segment are marked as abnormal segments. Window time compensation is performed by offsetting 200 milliseconds to the left and right of the center position of the abnormal segment. The offset time is written into the number index table to form a time mapping table. The start time of the cutting point is updated sequentially according to the number order to generate the cutting point status adjustment sequence.
[0093] Based on the cutting point state adjustment sequence, the position index of the cutting number is extracted and the position offset of the conveyor line is read. The moving distance of the conveyor line is recorded in numerical order and the moving speed per unit time is set to 30 cm per second. The index number alignment offset is calculated by dividing the difference by the fixed interval of 200 milliseconds. The offset is written into the number mapping list. The order of each number is rearranged in ascending order and the beat array is synchronized. The beat identifier and the number subscript are recorded to form a combined index table. The number order and synchronization time are summarized to generate the dynamic segmentation adjustment result.
[0094] Please see Figure 2 A pig slaughtering whole-process management system based on a segmentation model, the system includes:
[0095] Body shape assessment module: Based on data on pig body shape, weight, muscle distribution and health status, it extracts feature points from multiple parts, maps structural points and compares them with body shape templates. Combined with posture contour fitting method, it delineates typical areas of the forequarters, back, abdomen and limbs. It determines the partition structure through regional feature similarity matching and generates body shape partition results.
[0096] Meat quality modeling module: Based on body shape zoning results, it estimates fat thickness sampling, skeletal structure dimension measurement and muscle density, combines real-time temperature and humidity data to correct structural measurement deviations, and constructs fat and skeletal parameter sets by associating regional features through location numbers to generate meat quality distribution prediction results;
[0097] Numbering and sorting module: Based on the meat quality distribution prediction results, it reads the slaughter time, retrieves the production line capacity and analyzes the equipment load, constructs a capacity conflict judgment matrix and task arrangement map, and uses a genetic algorithm to aggregate and iterate the compliant number combinations to generate a slaughter path optimization scheme;
[0098] Boundary analysis module: Based on the slaughter path optimization scheme, it analyzes the positioning of the skeleton main axis, the segmentation and change rate of the muscle region image, uses a convolutional neural network to identify the boundary response segment and perform structural numbering and labeling, and extracts contour information and directional relationships by combining the cross section data to generate a cutting path optimization scheme;
[0099] The cycle control module, based on the cutting path optimization scheme, collects the cutting point angle, reads the equipment cycle parameters and analyzes the movement response, combines the angle offset and cycle rhythm to generate a job synchronization table, establishes a path execution sequence and time mapping chain, and generates dynamic segmentation adjustment results.
Claims
1. A method for managing the entire pig slaughtering process based on a segmentation model, characterized in that, Includes the following steps: Step 1: Based on the data of pig body size, weight, muscle distribution and health status, divide the pigs into zones, identify the body size of each pig and match it with preset standards, select suitable zones, divide the pig areas according to body shape characteristics, and generate body size zoning results. Step 2: Based on the body size zoning results, measure the fat content and skeletal structure of pigs in each zoning, combine real-time data to estimate the meat quality distribution, and match it with meat quality standards to generate meat quality distribution prediction results; Step 3: Based on the meat quality distribution prediction results, obtain the slaughter time, production line capacity and equipment load of pigs in each zone and conduct a comprehensive evaluation. Use a genetic algorithm to sort and iterate the numbers that meet the conditions and arrange the slaughter path of each pig according to the priority order to generate a slaughter path optimization scheme. Step 4: Based on the slaughter path optimization scheme, calculate the cutting points in each slaughter path, use a convolutional neural network to identify changes in muscle boundaries and assist in determining the cutting area, obtain the appropriate position and cutting angle of each cutting point, and adjust the path in combination with production line operation data to generate a cutting path optimization scheme; Step 5: Based on the cutting path optimization scheme, combined with the equipment operating status and production line speed during the slaughtering process, adjust the cutting points of each path, select a suitable segmentation sequence, and generate dynamic segmentation adjustment results.
2. The method for managing the entire process of pig slaughtering based on a segmentation model according to claim 1, characterized in that, The specific steps for generating the body shape partitioning results are as follows: Based on data on pig body shape, weight, muscle distribution, and health status, the body shape of pigs is measured, and the dimensions of the back, abdomen, and limbs are recorded. Preliminary body shape information is obtained through meat volume. The skeletal structure and fat distribution of pigs are calculated in combination with the body shape data. Suitable body shape standards are selected, and pigs are divided into regions according to the standards to generate body shape zoning results. Based on the body size zoning results, the skeletal structure, fat ratio, muscle thickness and other characteristic data of pigs in each zoning are analyzed. The zoning standards are adjusted in combination with dynamic parameters to ensure that the zoning matches the actual body size and health status. The standard range of each region is refined to avoid zoning errors caused by environmental and data deviations, and optimized body size zoning results are generated.
3. The method for managing the entire process of pig slaughtering based on a segmentation model according to claim 1, characterized in that, The specific steps for generating the meat quality distribution prediction results are as follows: Based on the body type zoning results, the subcutaneous thickness of the fat-covered area was measured. The depth of the fat layer on the back, abdomen, and shoulders was recorded using a vertical measurement method. The fat coverage rate was calculated by the difference between the thickness value and the length of the corresponding muscle contour line. The main axis length of the skeleton, joint width, and back curvature were measured. The temperature and humidity data during the detection period were combined to correct the error and generate a dataset of fat and skeleton parameters. Based on the aforementioned fat and skeleton parameter dataset, the intervals of fat coverage, skeleton main axis length, muscle density value and meat grading standards are matched. The interval intersection method is used to determine the matching segment, and the fat and muscle combination parameters that meet the grade requirements are selected. They are sorted and marked as distribution nodes according to their location numbers. A continuous distribution trend line is formed by calculating the node frequency, and the meat quality distribution prediction result is generated.
4. The method for managing the entire process of pig slaughtering based on a segmentation model according to claim 1, characterized in that, The specific steps for generating the slaughter route optimization scheme are as follows: Based on the meat quality distribution prediction results, the pig numbers are extracted, the slaughter time corresponding to the number is indexed, the start and end values of the corresponding production line time period are collected, the slaughter time span is calculated, the operating status of the production line is obtained, the unit time load value of the equipment is extracted, the total load under each pig number is accumulated, and the peak load position is recorded to generate a slaughter scheduling reference parameter set. Based on the slaughter scheduling reference parameter set, the slaughter time and production line time period are matched, the corresponding numbers of conflict segments are marked, the unassignable numbers are removed, the equipment load values corresponding to the remaining numbers are extracted, the genetic algorithm is used to converge and iterate the arrangement combination of numbers that meet the conditions, the pig numbers are arranged in ascending order of load value, and the scheduling priority index list is formed by combining the number order to generate the slaughter number priority sequence. Based on the slaughter number priority sequence, the slaughter time corresponding to each number and the remaining capacity of the production line are obtained in sequence. The difference between the remaining capacity and the slaughter time is compared and the available time period is obtained. After inserting the number, the path order is fixed, and a complete path structure is formed according to the number to establish a slaughter path optimization scheme.
5. The method for managing the entire process of pig slaughtering based on a segmentation model according to claim 4, characterized in that, The genetic algorithm follows the formula: Where: f″(x) represents the scheduling fitness value of combination number x, x represents a chromosome individual in the genetic algorithm, w1 represents the weight coefficient of the load efficiency parameter, w2 represents the weight coefficient of the capacity stability term, w3 represents the peak avoidance scheduling priority weight, w4 represents the weight coefficient of the conflict penalty term, h i Let represent the unit time load value of the i-th number in the time period, and n represent the total number of numbers included in combination x. This represents the total load cost for all numbers in the current combination. φ(x) represents the variance of the difference between the number of slaughtering times and the capacity of the assigned production line, φ(x) represents the ratio of the number of numbers in combination x that fall into the low-load section to n, reflecting the peak avoidance capability, and δ(x) represents the conflict function value formed by the numbers in combination x that have production line conflicts.
6. The method for managing the entire process of pig slaughtering based on a segmentation model according to claim 1, characterized in that, The specific steps for generating the optimized cutting path scheme are as follows: Based on the aforementioned slaughter path optimization scheme, the main axis of the skeleton is extracted, and the coordinates of the shoulder and pelvis are located using the pig body shape data under each path. The region is divided by the distribution of perpendicular lines between two points, and the number of segments is determined according to the rate of change of muscle distribution. A convolutional neural network is used to identify the boundary of muscle region change and assist in numbering and labeling. The starting and ending coordinates of each segment are labeled according to the number, and a set of coordinates of path segmentation points is generated. Based on the coordinate set of the path segmentation points, the muscle thickness, bone length and fat surface contour line corresponding to each coordinate point are extracted, and the three-way included angle is constructed to locate the tangent vector. Combining the difference in muscle layer thickness and the distance between bone turning points, the cutting inclination and directional offset are determined to generate the cutting point angle positioning set. Based on the cutting point angle positioning set, the production line tool operation cycle, pig movement speed and positioning sensor response time are obtained. The start time of each cutting point is adjusted according to the operation rhythm. The time mapping relationship is established by using the angle offset value and the rhythm sequence. Synchronous coordinates and segment combination are established to generate a cutting path optimization scheme.
7. The method for managing the entire process of pig slaughtering based on a segmentation model according to claim 6, characterized in that, The convolutional neural network follows the formula: Where: M(u) represents the boundary response map set corresponding to the muscle image region with sequence index u, u represents the sequence number of the muscle image region, and ρ(·) represents the Sigmoid normalization function. This represents the summation operation over all convolutional channel indices r from 1 to R, where R represents the total number of output channels in the convolutional neural network, and λ... r Represents the channel weighting factor of the r-th convolutional channel, ReLU(·) represents the modified linear unit activation function, and Q... r This represents the input tensor of the r-th image region, * represents the two-dimensional convolution operation symbol, F r Let β represent the r-th convolutional kernel. r η represents the bias term of the r-th channel. r This represents the muscle density factor corresponding to the r-th image region. This represents the gradient intensity of the muscle contour direction in the r-th image region.
8. The method for managing the entire process of pig slaughtering based on a segmentation model according to claim 6, characterized in that, The process of constructing the three-way included angle is as follows: extract the direction vector of the main axis of the skeleton corresponding to each segmentation point in the cutting path. The vector reflects the longitudinal trend of the overall skeleton arrangement of the pig. Extract the thickness normal direction of the corresponding muscle region at the same position. Calculate the direction of the muscle cross-section shape. Based on the trend of the fat surface contour, generate the tangent direction vector representing the curvature direction of the fat layer surface. Then, using the main axis of the skeleton, the normal direction of the muscle, and the tangent direction of the fat contour as three references, construct the three-way included angle of each segmentation point.
9. The method for managing the entire process of pig slaughtering based on a segmentation model according to claim 1, characterized in that, The specific steps for generating the dynamic segmentation adjustment result are as follows: Based on the cutting path optimization scheme, the position coordinates and angle values of the cutting points in each path are extracted, the operating cycle of the equipment is collected and the start-stop interval of the cutter head is recorded, a time axis is established according to the operation sequence, the abnormal peak section is calibrated by referring to the tool load curve, the time window of the relevant cutting points is offset and adjusted, and the cutting point status adjustment sequence is generated. Based on the cutting point status adjustment sequence, the pig position index corresponding to each cutting point number and the current position offset of the conveyor line are extracted. The unit time movement distance under the corresponding cycle is measured, and relative alignment is performed according to the time difference between the cutting point and the working end of the cutter. The order is rearranged according to the synchronous comparison results to establish dynamic segmentation adjustment results.
10. A pig slaughtering whole-process management system based on a segmentation model, characterized in that, The method for managing the entire process of pig slaughtering based on a segmentation model according to any one of claims 1-9, the system comprising: Body shape assessment module: Based on data on pig body shape, weight, muscle distribution and health status, it extracts feature points from multiple parts, maps structural points and compares them with body shape templates. Combined with posture contour fitting method, it delineates typical areas of the forequarters, back, abdomen and limbs. It determines the partition structure through regional feature similarity matching and generates body shape partition results. Meat quality modeling module: Based on the body shape zoning results, it estimates fat thickness sampling, skeletal structure dimension measurement and muscle density, combines real-time temperature and humidity data to correct structural measurement deviations, and constructs fat and skeletal parameter groups by associating regional features through location numbers to generate meat quality distribution prediction results; Numbering and sorting module: Based on the meat quality distribution prediction results, it reads the slaughter time, retrieves the production line capacity and analyzes the equipment load, constructs a capacity conflict judgment matrix and task arrangement map, and uses a genetic algorithm to aggregate and iterate the compliant number combinations to generate a slaughter path optimization scheme; Boundary analysis module: Based on the slaughter path optimization scheme, it analyzes the positioning of the skeleton main axis, the segmentation and change rate of the muscle region image, uses a convolutional neural network to identify the boundary response segment and perform structural numbering and labeling, and extracts contour information and directional relationships by combining the cross section data to generate a cutting path optimization scheme; The beat control module: Based on the cutting path optimization scheme, it collects the cutting point angle, reads the equipment beat parameters and analyzes the movement response, combines the angle offset and beat rhythm to generate a work synchronization table, establishes a path execution sequence and time mapping chain, and generates dynamic segmentation adjustment results.
Citation Information
Cited By
Concrete pipeline wire winding quality real-time monitoring method and system based on machine vision
CN121685398A
A machine vision-based real-time monitoring method and system for wire winding quality of a concrete pipe
CN121685398B
Meat intelligent cutting system cooperative control method and device based on edge calculation
CN121870780A