Intelligent control method and system for rice stacking line

Through the object detection model and optimization algorithm, the rice packaging bag and pallet parameters are identified and adjusted, and the optimal palletization solution is generated, which solves the problems of low space utilization and insufficient stability in the existing technology, and achieves efficient and stable rice palletization.

CN120387770AActive Publication Date: 2025-07-29HEBEI LIANGNIU AGRI TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510468308.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-15
Publication Date
2025-07-29
Estimated Expiration
2045-04-15

AI Technical Summary

Technical Problem

The existing rice palletizing lines cannot dynamically adjust the stacking method according to the size of rice packaging bags and pallets of different specifications, resulting in low pallet space utilization, uneven stacking height, shift of center of gravity and local instability, which can easily cause tilt or collapse during transportation.

Method used

The pallet and rice packaging bag parameters are identified through the target detection model, the constraints of the optimization algorithm are set, the initial population encoding is randomly generated, and the individual encoding is updated through the optimization algorithm until the iteration termination conditions are met, and the optimal palletization scheme is generated to maximize space utilization, load utilization and structural stability and reduce center of gravity offset.

Benefits of technology

The stability of rice palletization is improved, and the palletization scheme generated by automatic identification and optimization algorithms can maximize space utilization, maximize load utilization, maximize structural stability and minimize center of gravity offset.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120387770A_ABST
    Figure CN120387770A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of intelligent optimization, and discloses a rice stacking line intelligent control method and system.The rice stacking line intelligent control method comprises the following steps that S101, tray parameters and rice packaging bag parameters of different specifications are recognized through a target detection model; s102, setting constraint conditions of an optimization algorithm according to the tray parameters and the parameters of the rice packaging bags of different specifications; s103, randomly generating codes of individuals of the initialized population meeting constraint conditions in the optimization algorithm; s104, the code of the individual with the maximum fitness value serves as a stacking scheme through an optimization algorithm; according to the method, rice packaging bag parameters and tray parameters of different specifications are automatically identified through the target detection model, and the space utilization rate, the load utilization rate, the structural stability and the gravity center offset of the whole rice stacking structure are maximized through an optimization algorithm, so that the stability of rice stacking is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of intelligent optimization, and more specifically, it relates to an intelligent control method and system for a rice palletizing line. Background Art

[0002] With the rapid development of the grain processing industry, after the processes of rice packaging, labeling, etc. are completed, it is also necessary to perform automatic stacking processing on the finished rice packaging bags to facilitate rice transportation and boxing operations. The so-called rice palletizing line refers to an automatic production line that neatly stacks the finished rice packaging bags on a pallet.

[0003] Existing rice palletizing lines usually use a machine vision system (such as YOLOv8, etc.) to identify the positions of the rice packaging bags, and place the rice packaging bags on the pallet one by one through a palletizing robot or a robotic arm according to a preset fixed stacking template (such as all rice packaging bags are vertically stacked along the same direction, etc.). However, the above solutions cannot dynamically adjust the stacking method according to different specifications of rice packaging bags and pallet sizes, resulting in problems such as low utilization rate of the pallet space and uneven stacking height, and the simple repetitive stacking method may have problems of center of gravity offset and local instability, especially prone to tilting, collapse of the stack, and even damage to the goods during transportation.

[0004] Therefore, there is an urgent need for an intelligent control method for a rice palletizing line to solve the above problems. Summary of the Invention

[0005] The present invention provides an intelligent control method and system for a rice palletizing line to solve the technical problems in the above background art.

[0006] The present invention provides an intelligent control method for a rice palletizing line, including the following steps:

[0007] Step S101, identifying the pallet parameters and parameters of different specifications of rice packaging bags in the image through a target detection model;

[0008] Step S102, setting the constraint conditions of the optimization algorithm according to the pallet parameters and parameters of different specifications of rice packaging bags;

[0009] Step S103, randomly generating the encoding of the individuals of the initial population that meet the constraint conditions in the optimization algorithm;

[0010] Wherein the total number of individuals of the initial population is a user-defined parameter;

[0011] The encoding of the individual is represented by the two-dimensional coordinates of the lower left corner of different specifications of rice packaging bags in the image and the stacking direction;

[0012] Step S104, update the encoding of the individuals in the initialized population through an optimization algorithm until the iterative termination condition is met, and use the encoding of the individual with the largest fitness value as the palletizing scheme;

[0013] The fitness value is obtained by calculating through a custom objective function. The larger the fitness value, the better the palletizing scheme.

[0014] Furthermore, the object detection model is YOLOv8, and the sample labels of the training samples used to train the object detection model are obtained by manually annotating with annotation tools.

[0015] Furthermore, taking the lower left corner of the pallet as the origin, the length of the pallet as the horizontal axis, and the width of the pallet as the vertical axis to construct a two-dimensional coordinate system, the stacking direction is represented by dividing the range from 0° to 180° into 10 discrete angles at intervals of 20°.

[0016] Furthermore, the constraint conditions include:

[0017] Boundary constraint: For the 4 vertex coordinates of any rice packaging bag, the following inequalities must be satisfied:

[0018] where 1 ≤ i ≤ K, K represents the total number of different specifications of rice packaging bags, randx i and randy i respectively represent the horizontal axis coordinate value and the vertical axis coordinate value of any vertex coordinate of the i-th rice packaging bag, L and W respectively represent the length and width of the pallet, ∈ L and ∈ W respectively represent the tolerance length and tolerance width of the pallet, and both are custom parameters; among them, the calculation formulas for the lower right corner coordinate P1, the upper right corner coordinate P2, and the upper left corner coordinate P3 are as follows:

[0019] P1 = (x i + width i × cosθ i , y i - width i × sinθ i );

[0020] P2 = (x i + width i × cosθ i + length i × sinθ i , y i - width i × sinθ i + length i × cosθ i );

[0021] P3 = (x i + length i × sinθ i , y i + length i × cosθ i );

[0022] Where θ i represents the stacking direction of the i-th rice packaging bag, x i and y i respectively represent the horizontal axis coordinate value and the vertical axis coordinate value of the two-dimensional coordinate at the lower left corner of the i-th rice packaging bag in the image, length i and width i respectively represent the length and width of the i-th rice packaging bag;

[0023] Maximum load height constraint:

[0024] Where height i represents the height of the i-th rice packaging bag, median(tier) represents the median number of single-layer rice packaging bags loaded on the pallet, Height max represents the maximum load height of the pallet;

[0025] Maximum load weight constraint:

[0026] Where weight i represents the weight of the i-th rice packaging bag, Weight max represents the maximum load weight of the pallet;

[0027] Overlap area constraint: (x i + length i ≤ x j ) ∨ (x j + length j ≤ x i ) ∨ (y i + width i ≤ y j ) ∨ (y j ]>+ width j ≤ y i );

[0028] Where i ≠ j, 1 ≤ j ≤ K, x j and y j respectively represent the horizontal axis coordinate value and the vertical axis coordinate value of the two-dimensional coordinate at the lower left corner of the j-th rice packaging bag in the image, length j and width jrepresent the length and width of the j-th rice packaging bag respectively, and ∨ represents logical OR;

[0029] Support area constraint: The overlap coefficient overlap between the rice packaging bags on the second layer and above and the corresponding lower-layer rice packaging bags must be greater than or equal to the preset overlap coefficient threshold;

[0030] The calculation formula for the overlap coefficient is as follows:

[0031] where the preset overlap coefficient threshold is a custom parameter, Area represents the area of the rice packaging bags on the second layer and above, and Area overlap represents the overlapping area between the rice packaging bags on the second layer and above and the corresponding lower-layer rice packaging bags;

[0032] Center of gravity balance constraint: The horizontal axis coordinate value and the vertical axis coordinate value of the center of gravity of the entire palletizing structure cannot exceed the preset center threshold of the pallet center, where the preset center threshold is a custom parameter;

[0033] The horizontal axis coordinate value x of the center of gravity of the palletizing structure cg and the vertical axis coordinate value y cg The calculation formulas are as follows:

[0034]

[0035] where x ci and y ci represent the horizontal axis coordinate value and the vertical axis coordinate value of the center of gravity of the i-th rice packaging bag respectively, and θ i represents the stacking direction of the i-th rice packaging bag;

[0036] Stacking method constraint: Stacking of the next layer can only start after the stacking of each layer of rice packaging bags is completed.

[0037] Furthermore, the encoding of the individuals in the initial population is updated through an optimization algorithm, including the following steps:

[0038] Step S201, calculate the fitness values of all individuals in the initial population through the objective function;

[0039] Step S202, generate the iteration factor iter corresponding to the current iteration number t , and determine whether the iteration factor is greater than or equal to the first preset threshold. If so, execute step S203; otherwise, execute step S204;

[0040]

[0041] Where t represents the current iteration number t, and the starting value of the current iteration number is 1, T represents the maximum iteration number, and T is a user-defined parameter, α represents a control factor, assigned a constant value of 3, e represents the natural constant; where the first preset threshold is a user-defined parameter;

[0042] Step S203: Generate a random number with a value range between 0 and 1, and determine whether the random number is greater than or equal to the second preset threshold. If so, update the encoding of the individuals in the initial population through the first update strategy; otherwise, update the encoding of the individuals in the initial population through the second update strategy; where the second preset threshold is a user-defined parameter;

[0043] Step S204: Update the encoding of the individuals in the initial population through the third update strategy;

[0044] Step S205: Determine whether the iteration termination condition is met. If so, use the encoding of the individual with the maximum fitness value as the palletizing scheme; otherwise, return to step S201 and continue to execute;

[0045] The iteration termination condition is that the current iteration number is greater than or equal to the maximum iteration number.

[0046] Furthermore, the calculation formula of the objective function includes:

[0047] Fitness = w1×space + w2×use + w3×stability - w4×skewness;

[0048]

[0049] Where space represents the space utilization rate, use represents the load utilization rate, stability represents the structural stability, skewness represents the center of gravity offset, overlap i represents the overlap coefficient between the rice packaging bags on the second layer and above and the corresponding lower-layer rice packaging bags, x mid and y mid respectively represent the horizontal axis coordinate value and the vertical axis coordinate value of the tray center, w1, w2, w3, and w4 respectively represent the user-defined first, second, third, and fourth weight coefficients, and the sum value is 1.

[0050] Furthermore, the first update strategy means generating a random number with a value range between 0 and 1, and determining whether the random number is greater than or equal to the third preset threshold. If so, randomly select 2 individuals from the initial population, and arbitrarily swap 2 element values selected from the encodings of the 2 individuals; otherwise, randomly select 1 individual from the initial population, and regenerate any one element value of the encoding of this individual that meets the constraint conditions, where the third preset threshold is a user-defined parameter.

[0051] Further, the calculation formula of the second update strategy is as follows:

[0052]

[0053] where 1 ≤ n ≤ N, and N represents the total number of individuals in the initialized population. and respectively represent the encodings of the nth individual at the current iteration times t + 1 and t. represents the encoding of the individual with the maximum fitness value at the current iteration time t.

[0054] Further, the calculation formula of the third update strategy is as follows:

[0055]

[0056] where 1 ≤ n ≤ N, and N represents the total number of individuals in the initialized population. and respectively represent the encodings of the nth individual at the current iteration times t + 1 and t. represents the encoding of the individual with the maximum fitness value at the current iteration time t.

[0057] The present invention provides an intelligent control system for a rice palletizing line, including:

[0058] A first module, which is used to identify the pallet parameters and the parameters of rice packaging bags of different specifications in the image through a target detection model;

[0059] A second module, which is used to set the constraint conditions of the optimization algorithm according to the pallet parameters and the parameters of rice packaging bags of different specifications;

[0060] A third module, which is used to randomly generate the encodings of individuals in the initialized population that meet the constraint conditions in the optimization algorithm;

[0061] A fourth module, which is used to update the encodings of individuals in the initialized population through the optimization algorithm until the iteration termination condition is met, and use the encoding of the individual with the maximum fitness value as the palletizing scheme.

[0062] The beneficial effects of the present invention are as follows: The present invention automatically identifies the parameters of rice packaging bags of different specifications and pallet parameters through a target detection model, and through the optimization algorithm, maximizes the space utilization rate, load utilization rate, structural stability, and minimizes the center of gravity offset of the entire rice palletizing structure, thereby improving the stability of rice palletizing. BRIEF DESCRIPTION OF THE DRAWINGS

[0063] Figure 1 is a flowchart of an intelligent control method for a rice palletizing line of the present invention;

[0064] Figure 2 is the flowchart of updating the encoding of individuals in the initialized population by the optimization algorithm of the present invention;

[0065] Figure 3 is the schematic diagram of an intelligent control system for a rice stacking line of the present invention;

[0066] Figure 4 is the schematic diagram of the two-dimensional coordinate system of the rice stacking of the present invention.

[0067] In the figure: the first module 301, the second module 302, the third module 303, the fourth module 304. Detailed implementation manners

[0068] Now, the subject matter described herein will be discussed with reference to example embodiments. It should be understood that discussing these embodiments is only to enable those skilled in the art to better understand and thus implement the subject matter described herein. Without departing from the scope of protection of the content of this specification, changes can be made to the functions and arrangements of the elements discussed. Each example can omit, substitute, or add various processes or components as needed. Additionally, the features described in relation to some examples can also be combined in other examples.

[0069] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in one or more embodiments of the present invention should have the ordinary meanings understood by those of ordinary skill in the art to which the present invention pertains. The "first", "second", and similar terms used in one or more embodiments of the present invention do not denote any order, quantity, or importance, but are only used to distinguish different components. The terms such as "including" or "comprising" mean that the elements or objects appearing before this word cover the elements or objects listed after this word and their equivalents, without excluding other elements or objects. The terms such as "connected" or "coupled" are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The terms such as "upper", "lower", "left", "right", etc. are only used to represent relative positional relationships, and when the absolute position of the object being described changes, the relative positional relationship may also change accordingly.

[0070] As Figures 1 to 4 shown, an intelligent control method for a rice stacking line includes the following steps:

[0071] Step S101, identifying the pallet parameters and the rice packaging bag parameters of different specifications in the image through a target detection model;

[0072] The pallet parameters include: length, width, maximum load-bearing weight, and maximum load-bearing height;

[0073] The parameters of the rice packaging bag include: length, width, height, and weight;

[0074] Step S102: Set the constraint conditions of the optimization algorithm according to the pallet parameters and the parameters of rice packaging bags of different specifications;

[0075] Step S103: Randomly generate the encoding of the individuals in the initial population that meets the constraint conditions in the optimization algorithm;

[0076] Where the total number of individuals in the initial population is a custom parameter. Preferably, the total number of individuals in the initial population is set to 20;

[0077] The encoding of an individual is represented by the two-dimensional coordinates at the lower left corner of the rice packaging bag of different specifications in the image and the stacking direction;

[0078] Step S104: Update the encoding of the individuals in the initial population through the optimization algorithm until the iteration termination condition is met, and use the encoding of the individual with the largest fitness value as the palletizing scheme;

[0079] Where the fitness value is obtained by calculating through a custom objective function. The larger the fitness value, the better the palletizing scheme.

[0080] In an embodiment of the present invention, the object detection model is YOLOv8, and the sample labels of the training samples used to train the object detection model are obtained by manually annotating with existing annotation tools.

[0081] It should be noted that the object detection model can also be Faster R-CNN, Mask R-CNN, etc., and the sample data (pallet images and rice packaging bag images) of the training samples can be preprocessed. For example, randomly cropping, adding Gaussian noise or salt-and-pepper noise to simulate the situation where the image is occluded, randomly adjusting the brightness or contrast of the image to simulate different lighting conditions, and the image can also be appropriately rotated to improve the robustness of the object detection model; in addition, the existing annotation tools can be LabelImg, RectLabel, etc. The training of the object detection model belongs to conventional technical means and will not be elaborated here.

[0082] In an embodiment of the present invention, as Figure 4 shown, taking the lower left corner of the pallet as the origin, the length of the pallet as the horizontal axis, and the width of the pallet as the vertical axis to construct a two-dimensional coordinate system. The stacking direction is represented by dividing the range from 0° to 180° into 10 discrete angles at intervals of 20°. That is, the stacking direction of 0° means that the rice packaging bag is in the same direction as the vertical axis, the stacking direction of 90° means that the rice packaging bag is in the same direction as the horizontal axis, and the stacking direction of 180° means that the rice packaging bag is in the opposite direction to the vertical axis.

[0083] In an embodiment of the present invention, the constraint conditions include:

[0084] 1. Boundary constraint: For the four vertex coordinates of any rice packaging bag, the following inequalities must be satisfied:

[0085] where 1 ≤ i ≤ K, K represents the total number of rice packaging bags of different specifications, randx i and randy i respectively represent the abscissa value and ordinate value of any vertex coordinate of the i-th rice packaging bag, L and W respectively represent the tray length and width, ∈ L and ∈ W respectively represent the tolerance length and tolerance width of the tray, and are both user-defined parameters. For example, ∈ L is set to 5% of the tray length, and ∈ W is set to 2% of the tray width;

[0086] where the calculation formulas for the lower right corner coordinate P1, upper right corner coordinate P2, and upper left corner coordinate P3 are as follows:

[0087] P1 = (x i + width i × cosθ i , y i - width i × sinθ i );

[0088] P2 = (x i + width i × cosθ i + length i × sinθ i , y i - width i × sinθ i + length i × cosθ i );

[0089] P3 = (x i + length i × sinθ i , y i + length i × cosθ i );

[0090] where θ i represents the stacking direction of the i-th rice packaging bag, x i and y irespectively represent the horizontal and vertical coordinate values of the lower left - hand two - dimensional coordinate of the \(i\) - th rice packaging bag in the image, length i and width i respectively represent the length and width of the \(i\) - th rice packaging bag;

[0091] 2. Maximum load - bearing height constraint:

[0092] where height i represents the height of the \(i\) - th rice packaging bag, median(tier) represents the median number of single - layer rice packaging bags loaded on the pallet, Height max represents the maximum load - bearing height of the pallet;

[0093] 3. Maximum load - bearing weight constraint:

[0094] where weight i represents the weight of the \(i\) - th rice packaging bag, Weight max represents the maximum load - bearing weight of the pallet;

[0095] 4. Overlap area constraint: \((x i +length i ≤x j )∨(x j +length j ≤x i )∨(y i +width i ≤y j )∨(y j +width j ≤y i );

[0096] where \(i≠j\), \(1≤j≤K\), \(x j and \(y j respectively represent the horizontal and vertical coordinate values of the lower left - hand two - dimensional coordinate of the \(j\) - th rice packaging bag in the image, length j and width j respectively represent the length and width of the \(j\) - th rice packaging bag, ∨ represents logical OR;

[0097] 5. Support area constraint: For rice packaging bags on the second layer and above, the overlap coefficient overlap with the corresponding lower - layer rice packaging bags must be greater than or equal to the preset overlap - coefficient threshold;

[0098] The calculation formula for the overlap coefficient is as follows:

[0099] Among them, the preset overlap coefficient threshold is a custom parameter. Preferably, the preset overlap coefficient threshold is set to 0.5. Area represents the area of the rice packaging bags on the second layer and above. Area overlap represents the overlapping area between the rice packaging bags on the second layer and above and the corresponding lower-layer rice packaging bags. The overlapping area is obtained by calculating through an existing geometric calculation library, such as Shapely, etc., or by calculating according to the 4 vertex coordinates of the rice packaging bags through a polygon clipping algorithm, such as the Sutherland-Hodgman algorithm, the Weiler-Atherton algorithm, etc.;

[0100] 6. Center of gravity balance constraint: The horizontal axis coordinate value and the vertical axis coordinate value of the center of gravity of the entire palletizing structure cannot exceed the preset center threshold of the pallet center;

[0101] Among them, the preset center threshold is a custom parameter. Preferably, the preset center threshold is set to 15% of the pallet center;

[0102] The horizontal axis coordinate value x of the center of gravity of the palletizing structure cg and the vertical axis coordinate value y cg The calculation formulas are as follows:

[0103]

[0104]

[0105] Among them, x ci and y ci respectively represent the horizontal axis coordinate value and the vertical axis coordinate value of the center of gravity of the i-th rice packaging bag, and θ i represents the stacking direction of the i-th rice packaging bag;

[0106] 7. Stacking method constraint: Stacking of the next layer can only start after the stacking of each layer of rice packaging bags is completed.

[0107] In an embodiment of the present invention, as Figure 2 shown, the encoding of the individuals in the initial population is updated through an optimization algorithm, including the following steps:

[0108] Step S201, calculate the fitness values of all individuals in the initial population through the objective function;

[0109] Step S202, generate an iteration factor iter corresponding to the current iteration number t , and determine whether the iteration factor is greater than or equal to the first preset threshold. If so, execute step S203; otherwise, execute step S204;

[0110]

[0111] Where t represents the current iteration number t, and the starting value of the current iteration number is 1, T represents the maximum iteration number, and T is a user-defined parameter. Preferably, T is set to 50, α represents a control factor, assigned a constant value of 3, and e represents the natural constant;

[0112] Where the first preset threshold is a user-defined parameter. Preferably, the first preset threshold is set to 2;

[0113] Step S203: Generate a random number with a value range between 0 and 1, and determine whether the random number is greater than or equal to the second preset threshold. If so, update the encoding of the individuals in the initial population through the first update strategy; otherwise, update the encoding of the individuals in the initial population through the second update strategy;

[0114] Where the second preset threshold is a user-defined parameter. Preferably, the second preset threshold is set to 0.5;

[0115] Step S204: Update the encoding of the individuals in the initial population through the third update strategy;

[0116] Step S205: Determine whether the iteration termination condition is satisfied. If so, use the encoding of the individual with the maximum fitness value as the palletizing scheme; otherwise, return to step S201 and continue to execute;

[0117] The iteration termination condition is that the current iteration number is greater than or equal to the maximum iteration number.

[0118] In an embodiment of the present invention, the calculation formula of the objective function includes:

[0119] Fitness = w1 × space + w2 × use + w3 × stability - w4 × skewness;

[0120]

[0121] Where space represents the space utilization rate, use represents the load utilization rate, stability represents the structural stability, skewness represents the center of gravity offset, and overlap i represents the overlap coefficient between the rice packaging bags on the second layer and above and the corresponding lower-layer rice packaging bags, and x mid and y mid respectively represent the horizontal axis coordinate value and the vertical axis coordinate value of the tray center. w1, w2, w3, and w4 respectively represent the user-defined first, second, third, and fourth weight coefficients, and the sum value is 1. Preferably, w1, w2, w3, and w4 are respectively set to 0.2, 0.3, 0.3, and 0.2.

[0122] It should be noted that the overlapping coefficient of the first layer of rice packaging bags is uniformly assigned a value of 1. The design of the objective function is to ensure that the encoding of individuals is updated in the direction of maximizing space utilization rate, load utilization rate, structural stability, and minimizing the center of gravity offset, so as to optimize the final generated stacking scheme.

[0123] In an embodiment of the present invention, the first update strategy means generating a random number with a value range between 0 and 1, and determining that if the random number is greater than or equal to the third preset threshold, randomly select 2 individuals from the initial population, and arbitrarily select 2 element values (the two-dimensional coordinates of the lower left corner of the rice packaging bag in the image and the stacking direction) from the encodings of the 2 individuals for swapping. Otherwise, randomly select 1 individual from the initial population and regenerate any element value of the encoding of this individual that meets the constraint conditions, where the third preset threshold is a custom parameter. Preferably, the third preset threshold is set to 0.8.

[0124] In an embodiment of the present invention, the calculation formula of the second update strategy is as follows:

[0125]

[0126] where 1 ≤ n ≤ N, and N represents the total number of individuals in the initial population, and respectively represent the encodings of the nth individual at the current iteration times t + 1 and t, represents the encoding of the individual with the maximum fitness value at the current iteration time t.

[0127] In an embodiment of the present invention, the calculation formula of the third update strategy is as follows:

[0128]

[0129] where 1 ≤ n ≤ N, and N represents the total number of individuals in the initial population, and respectively represent the encodings of the nth individual at the current iteration times t + 1 and t, represents the encoding of the individual with the maximum fitness value at the current iteration time t.

[0130] In an embodiment of the present invention, as Figure 3 shown, an intelligent control system for a rice stacking line includes:

[0131] The first module 301, which is used to identify the pallet parameters and the parameters of rice packaging bags of different specifications in the image through the object detection model;

[0132] The second module 302, which is used to set the constraint conditions of the optimization algorithm according to the pallet parameters and the parameters of rice packaging bags of different specifications;

[0133] The third module 303 is used to randomly generate the encoding of individuals in the initialization population that meet the constraint conditions in the optimization algorithm;

[0134] The fourth module 304 is used to update the encoding of individuals in the initialization population through the optimization algorithm until the iteration termination condition is met, and the encoding of the individual with the maximum fitness value is used as the palletizing scheme.

[0135] It should be noted that the setting of the interval and threshold size is for the convenience of comparison. Among them, the size of the threshold depends on the amount of sample data and the base quantity set by those skilled in the art for each group of sample data, as long as it does not affect the proportional relationship between the parameters and the quantified values. And the above formulas are all calculations of taking the numerical values after dimensionless, and the formulas are all formulas obtained by collecting a large amount of data for software simulation to approximate the real situation. The preset parameters in the formulas are set by those skilled in the art according to the actual situation.

[0136] The above has described the embodiments of this embodiment, but this embodiment is not limited to the above specific implementation manners. The above specific implementation manners are merely illustrative rather than restrictive. Under the inspiration of this embodiment, those of ordinary skill in the art can also make many forms, all of which fall within the protection scope of this embodiment.

Claims

1. An intelligent control method for a rice stacking line, characterized in that, It includes the following steps: Step S101, identifying the pallet parameters and the parameters of rice packaging bags of different specifications in the image through a target detection model; Step S102, setting the constraint conditions of the optimization algorithm according to the pallet parameters and the parameters of rice packaging bags of different specifications; Step S103, randomly generating the encoding of the individuals in the initial population that meets the constraint conditions in the optimization algorithm; where the total number of individuals in the initial population is a custom parameter; The encoding of an individual is represented by the two-dimensional coordinates of the lower left corner of the rice packaging bag of different specifications in the image and the stacking direction; Step S104, updating the encoding of the individuals in the initial population through the optimization algorithm until the iteration termination condition is met, and taking the encoding of the individual with the largest fitness value as the stacking plan; where the fitness value is obtained by calculating through a custom objective function, and the larger the fitness value, the better the stacking plan.

2. The intelligent control method for a rice stacking line according to claim 1, wherein, The target detection model is YOLOv8, and the sample labels of the training samples used to train the target detection model are obtained by manually annotating with annotation tools.

3. The intelligent control method for a rice stacking line according to claim 1, wherein Taking the lower left corner of the pallet as the origin, the length of the pallet as the horizontal axis, and the width of the pallet as the vertical axis to construct a two-dimensional coordinate system, and the stacking direction is represented by dividing the range from 0° to 180° into 10 discrete angles at intervals of 20°.

4. The intelligent control method for a rice stacking line according to claim 3, characterized in that The constraint conditions include: Boundary constraints: The four vertex coordinates of any rice packaging bag must satisfy the following inequalities: where 1 ≤ i ≤ K, K represents the total number of rice packaging bags of different specifications, randx i and randy i represent the abscissa value and ordinate value of any vertex coordinate of the i-th rice packaging bag respectively, L and W represent the length and width of the tray, ∈ L and ∈ W represent the tolerance length and tolerance width of the tray respectively, and both are user-defined parameters; the calculation formulas for the lower right corner coordinate P1, upper right corner coordinate P2, and upper left corner coordinate P3 are as follows: P1 = (x i + width i × cosθ i , y i - width i × sinθ i ); P2 = (x i + width i × cosθ i + length i × sinθ i , y i - width i × sinθ i + length i × cosθ i ); P3 = (x i + length i × sinθ i , y i + length i × cosθ i ); where θ i represents the stacking direction of the i-th rice packaging bag, x i and y i respectively represent the abscissa value and ordinate value of the two-dimensional coordinates of the lower left corner of the i-th rice packaging bag in the image, length i and width respectively represent the length and width of the i-th rice packaging bag; Maximum load-bearing height constraint: where height i represents the height of the i-th rice packaging bag, and median(tier) represents the median number of single-layer rice packaging bags loaded onto the pallet, and Height max represents the maximum load-bearing height of the pallet; Maximum load-bearing weight constraint: where weight i represents the weight of the i-th rice packaging bag, and Weight max represents the maximum load-bearing weight of the pallet; Overlap area constraint: (x i + length i ≤ x j ) ∨ (x j + length j ≤ x i ) ∨ (y i + width i ≤ y j ) ∨ (y j + width j ≤ y i ); where \(i\neq j\), \(1\leq j\leq K\), \(x\) j and \(y\) j represent the abscissa value and ordinate value of the lower - left two - dimensional coordinate of the \(j\) - th rice packaging bag in the image respectively, \(length\) j and \(width\) j represent the length and width of the \(j\) - th rice packaging bag respectively, and \(\vee\) represents logical OR; Support area constraint: The overlap coefficient overlap between the rice packaging bags on the second layer and above and the corresponding lower-layer rice packaging bags must be greater than or equal to the preset overlap coefficient threshold; The calculation formula for the overlap coefficient is as follows: Among them, the preset overlap coefficient threshold is a custom parameter, Area represents the area of the rice packaging bags on the second layer and above, Area overlap represents the overlapping area between the rice packaging bags on the second layer and above and the corresponding lower-layer rice packaging bags; Center of gravity balance constraint: The horizontal axis coordinate value and the vertical axis coordinate value of the center of gravity of the entire stacking structure cannot exceed the preset center threshold of the pallet center, where the preset center threshold is a custom parameter; The horizontal axis coordinate value x of the center of gravity of the palletizing structure cg and the vertical axis coordinate value y cg The calculation formula thereof includes: where x ci and y ci represent the abscissa value and ordinate value of the center of gravity of the i-th rice packaging bag respectively, and θ i represents the stacking direction of the i-th rice packaging bag; Stacking method constraint: Each layer of rice packaging bags must be stacked before starting to stack the next layer.

5. The intelligent control method for a rice stacking line according to claim 4, wherein Updating the encoding of the individuals in the initial population through the optimization algorithm includes the following steps: Step S201, calculating the fitness values of all individuals in the initial population through the objective function; Step S202, generate an iteration factor iter corresponding to the current iteration number t , and determine whether the iteration factor is greater than or equal to the first preset threshold. If so, execute Step S203; otherwise, execute Step S204; where t represents the current iteration number is t, and the starting value of the current iteration number is 1, T represents the maximum iteration number, and T is a custom parameter, α represents a control factor, assigned a constant value of 3, e represents the natural constant; where the first preset threshold is a custom parameter; Step S203, generating a random number with a value range between 0 and 1, and determining that if the random number is greater than or equal to the second preset threshold, then updating the encoding of the individuals in the initial population through the first update strategy, otherwise updating the encoding of the individuals in the initial population through the second update strategy; where the second preset threshold is a custom parameter; Step S204, updating the encoding of the individuals in the initial population through the third update strategy; Step S205, determining that if the iteration termination condition is met, then taking the encoding of the individual with the largest fitness value as the stacking plan, otherwise returning to Step S201 to continue execution; The iteration termination condition is that the current iteration number is greater than or equal to the maximum iteration number.

6. The intelligent control method for a rice stacking line according to claim 5, characterized in that, The calculation formula of the objective function includes: Fitness = w1×space + w2×use + w3×stability - w4×skewness; where space represents space utilization rate, use represents load utilization rate, stability represents structural stability, skewness represents the center of gravity offset, and overlap i represents the overlapping coefficient of the rice packaging bags on the second layer and above with the corresponding lower-layer rice packaging bags, x mid and y mid respectively represent the abscissa coordinate value and the ordinate coordinate value of the center of the tray, and w1, w2, w3, and w4 respectively represent the custom first, second, third, and fourth weight coefficients, and the sum value is 1.

7. A method for intelligent control of a rice stacking line according to claim 5, characterized in that The first update strategy means generating a random number with a value range between 0 and 1, and judging that if the random number is greater than or equal to the third preset threshold, randomly select 2 individuals from the initial population, and arbitrarily swap 2 element values selected from the encodings of the 2 individuals; otherwise, randomly select 1 individual from the initial population, and regenerate any element value of the encoding of this individual that meets the constraint conditions, where the third preset threshold is a custom parameter.

8. The intelligent control method for a rice stacking line according to claim 5, wherein, The calculation formula of the second update strategy is as follows: where 1 ≤ n ≤ N, and N represents the total number of individuals in the initialized population, and respectively represent the encodings of the n-th individual at the current iteration times t + 1 and t, represents the encoding of the individual with the maximum fitness value at the current iteration time t.

9. The intelligent control method of a rice palletizing line according to claim 5, characterized in that, The calculation formula of the third update strategy is as follows: where 1 ≤ n ≤ N, and N represents the total number of individuals in the initialized population, and respectively represent the encodings of the nth individual at the current iteration times of t + 1 and t, represents the encoding of the individual with the largest fitness value at the current iteration time of t.

10. An intelligent control system for a rice stacking line, characterized in that, Implement an intelligent control method for a rice stacking line as described in any one of claims 1 to 9, including: The first module is used to identify the pallet parameters and the rice packaging bag parameters of different specifications in the image through the target detection model; The second module is used to set the constraint conditions of the optimization algorithm according to the pallet parameters and the rice packaging bag parameters of different specifications; The third module is used to randomly generate the encodings of the individuals in the initial population that meet the constraint conditions in the optimization algorithm; The fourth module is used to update the encodings of the individuals in the initial population through the optimization algorithm until the iteration termination condition is met, and use the encoding of the individual with the largest fitness value as the stacking plan.

Citation Information

Patent Citations

  • An algorithm for intelligently generating a case loading scheme based on multiple constraint conditions

    CN107622321A

  • Half-offline mixed stacking method and system as well as robot

    CN108861619A

  • Stacking method and stacking device

    CN114580206A

  • Online mixed stacking method, device and equipment

    CN119706148A