Intelligent control method and system for rice stacking line

By using target detection and optimization algorithms to identify the parameters of pallets and rice packaging bags, the optimal stacking solution is generated, which solves the problems of low space utilization and center of gravity offset in the rice stacking line and achieves a stable stacking structure.

CN120387770BActive Publication Date: 2025-10-21HEBEI LIANGNIU AGRI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The existing rice palletizing line is unable to dynamically adjust the stacking method according to the different specifications of rice packaging bags and pallet sizes, resulting in low pallet space utilization, uneven stacking height, center of gravity offset, and tilting and collapsing of the pallet during transportation.

Method used

The parameters of pallets and rice packaging bags are identified through the target detection model, the optimization algorithm constraints are set, and the optimization algorithm is used to generate the code of the initialized population. The code is updated until the iteration termination conditions are met to generate the optimal stacking solution. The optimization algorithm includes constraints such as boundaries, maximum load, overlap, and center of gravity balance.

Benefits of technology

The space utilization, load utilization, structural stability and center of gravity offset of rice palletizing are improved, ultimately generating a stable palletizing solution.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120387770B_ABST
    Figure CN120387770B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of intelligent optimization, and discloses a rice stacking line intelligent control method and system, a rice stacking line intelligent control method, which comprises the following steps: step S101, identifying tray parameters and different specifications of rice packaging bag parameters through a target detection model; step S102, setting constraint conditions of an optimization algorithm according to the tray parameters and the different specifications of the rice packaging bag parameters; step S103, randomly generating the coding of individuals of an initialization population in the optimization algorithm that meets the constraint conditions; and step S104, taking the coding of an individual with the maximum fitness value as a stacking scheme through the optimization algorithm. The application automatically identifies the different specifications of the rice packaging bag parameters and the tray parameters through the target detection model, and maximizes the space utilization rate, the load utilization rate, the structural stability and the minimum center of gravity offset of the whole rice stacking structure through the optimization algorithm, so that the stability of the 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 field of intelligent optimization technology, and more particularly, 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 completing rice packaging and labeling processes, the finished rice bags need to be automatically stacked to facilitate rice transportation and boxing. The so-called rice palletizing line refers to an automated production line that neatly stacks finished rice bags on pallets.

[0003] Existing rice palletizing lines typically use machine vision systems (such as YOLOv8) to identify the position of rice bags. Palletizing robots or robotic arms then place the rice bags one by one on pallets according to a preset fixed stacking template (for example, all rice bags are stacked vertically in the same direction). However, these solutions cannot dynamically adjust the stacking method based on the size of the rice bags and pallets, resulting in low pallet space utilization and uneven stacking heights. Furthermore, simple, repetitive stacking methods can lead to center of gravity shifts and localized instability, which can easily cause tilting, stack collapse, and even cargo damage 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, which solve the technical problems in the above-mentioned background technology.

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

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

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

[0009] Step S103, randomly generating codes of individuals in the initialization population that meet the constraints in the optimization algorithm;

[0010] The total number of individuals in the initialized population is a custom parameter;

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

[0012] Step S104, updating the codes of the individuals in the initialized population by using an optimization algorithm until the iteration termination condition is met, and taking the code of the individual with the largest fitness value as the stacking solution;

[0013] The fitness value is obtained through the calculation of a custom objective function. The larger the fitness value, the better the palletizing solution.

[0014] Furthermore, 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 labeling using a labeling tool.

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

[0016] Furthermore, the constraints include:

[0017] Boundary constraints: The coordinates of the four vertices of any rice bag must satisfy the following inequalities:

[0018] Where 1≤i≤K, K represents the total number of rice packaging bags of different specifications, randx i and Randy i Represents the horizontal and vertical coordinate values ​​of any vertex coordinate of the i-th rice bag, L and W represent the length and width of the tray, respectively. L and ∈ W They represent the tolerance length and width of the pallet, and are custom parameters. 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 Indicates the stacking direction of the i-th rice bag, x i and y i Respectively represent the horizontal and vertical coordinate values ​​of the two-dimensional coordinates of the lower left corner of the i-th rice bag in the image, length i and width i Represent the length and width of the i-th rice bag respectively;

[0023] Maximum load height constraint:

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

[0025] Maximum load weight limit:

[0026] where weight i Indicates the weight of the i-th rice bag, Weight max Indicates 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 They represent the horizontal and vertical coordinate values ​​of the two-dimensional coordinates of the lower left corner of the j-th rice bag in the image, respectively. j and width jThey represent the length and width of the j-th rice bag respectively, and ∨ represents the logical OR;

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

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

[0031] The preset overlap coefficient threshold is a custom parameter, and Area represents the area of ​​the second layer and above of rice packaging bags. overlap Indicates the overlapping area of ​​the second and above rice packaging bags and the corresponding lower rice packaging bags;

[0032] Center of gravity balance constraint: The horizontal and vertical coordinate values ​​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 formula includes:

[0034]

[0035] where x ci and y ci They represent the horizontal and vertical coordinate values ​​of the center of gravity of the i-th rice bag, θ i Indicates the stacking direction of the i-th rice bag;

[0036] Stacking method constraints: After each layer of rice packaging bags is stacked, the next layer can be stacked.

[0037] Furthermore, the codes of the individuals in the initialized population are updated by an optimization algorithm, including the following steps:

[0038] Step S201, calculating the fitness values ​​of all individuals in the initialized population through the objective function;

[0039] Step S202: Generate the iteration factor iter corresponding to the current number of iterations t , and if it is determined that the iteration factor is greater than or equal to the first preset threshold, then step S203 is executed, otherwise step S204 is executed;

[0040]

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

[0042] Step S203: Generate a random number between 0 and 1, and if the random number is greater than or equal to a second preset threshold, update the codes of the individuals in the initialized population using the first update strategy; otherwise, update the codes of the individuals in the initialized population using the second update strategy; wherein the second preset threshold is a custom parameter;

[0043] Step S204, updating the codes of individuals in the initialized population using a third updating strategy;

[0044] Step S205: If it is determined that the iteration termination condition is met, the code of the individual with the largest fitness value is used as the palletizing solution, otherwise the process returns to step S201 to continue execution;

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

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

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

[0048]

[0049] Among them, space represents space utilization, use represents load utilization, stability represents structural stability, skewness represents center of gravity offset, overlap represents i represents the overlap coefficient between the second and above rice packaging bags and the corresponding lower rice packaging bags, x mid and y mid They represent the horizontal and vertical coordinate values ​​of the center of the pallet respectively, w1, w2, w3 and w4 represent the first, second, third and fourth customized weight coefficients respectively, and the total value is 1.

[0050] Furthermore, the first update strategy represents generating a random number in the value range between 0 and 1, and judging that the random number is greater than or equal to a third preset threshold, then randomly selecting 2 individuals from the initialization population, and arbitrarily selecting 2 element values ​​from the codes of the 2 individuals to exchange, otherwise randomly selecting 1 individual from the initialization population, and regenerating any element value of the code of the individual that meets the constraint conditions, where the third preset threshold is a custom parameter.

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

[0052]

[0053] Where 1≤n≤N, N represents the total number of individuals in the initialized population, and Represent the codes of the nth individual whose current iterations are t+1 and t, respectively. Indicates the code of the individual with the largest fitness value at the current iteration number t.

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

[0055]

[0056] Where 1≤n≤N, N represents the total number of individuals in the initialized population, and Represent the codes of the nth individual whose current iterations are t+1 and t, respectively. Indicates the code of the individual with the largest fitness value at the current iteration number t.

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

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

[0059] The second module is used to set the constraints of the optimization algorithm according to the parameters of the pallet and the parameters of the rice packaging bags of different specifications;

[0060] The third module is used to randomly generate the encoding of individuals in the initialization population that meet the constraints in the optimization algorithm;

[0061] The fourth module is used to update the codes of the individuals in the initialized population through an optimization algorithm until the iteration termination condition is met, and the code of the individual with the largest fitness value is used as the stacking solution.

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

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

[0064] Figure 2 It is a flow chart of updating the encoding of individuals of the initialized population through the optimization algorithm of the present invention;

[0065] Figure 3 Schematic diagram of an intelligent control system for a rice palletizing line according to the present invention;

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

[0067] In the figure: first module 301, second module 302, third module 303, fourth module 304. DETAILED DESCRIPTION

[0068] The subject matter described herein will now be discussed with reference to exemplary embodiments. It should be understood that these embodiments are discussed solely to enable those skilled in the art to better understand and implement the subject matter described herein, and that the functions and arrangements of the elements discussed may be varied without departing from the scope of this specification. Various examples may omit, substitute, or add various processes or components as needed. In addition, features described with respect to some examples may 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 usual meanings understood by people with ordinary skills in the field to which the present invention belongs. The "first", "second" and similar words used in one or more embodiments of the present invention do not indicate any order, quantity or importance, but are only used to distinguish different components. "Include" or "comprising" and similar words mean that the elements or objects appearing before the word include the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the object being described changes, the relative positional relationship may also change accordingly.

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

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

[0072] Pallet parameters include: length, width, maximum load weight and maximum load height;

[0073] Rice packaging bag parameters include: length, width, height and weight;

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

[0075] Step S103, randomly generating codes of individuals in the initialization population that meet the constraints in the optimization algorithm;

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

[0077] The individual codes are represented by the two-dimensional coordinates of the lower left corner and the stacking direction of rice bags of different specifications in the image;

[0078] Step S104, updating the codes of the individuals in the initialized population by using an optimization algorithm until the iteration termination condition is met, and taking the code of the individual with the largest fitness value as the stacking solution;

[0079] The fitness value is obtained through the calculation of a custom objective function. The larger the fitness value, the better the palletizing solution.

[0080] In one embodiment of the present invention, 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 labeling using existing labeling tools.

[0081] It should be noted that the target detection model can also be Faster R-CNN, Mask R-CNN, etc., and the sample data of the training samples (pallet images and rice packaging bag images) can be preprocessed, for example, by randomly cropping, adding Gaussian noise or salt and pepper noise to simulate the situation where the image is occluded, by 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 target detection model; in addition, the existing labeling tools can be LabelImg, RectLabel, etc. The training of the target detection model is a conventional technical means and will not be elaborated here.

[0082] In one embodiment of the present invention, Figure 4 As shown in the figure, a two-dimensional coordinate system is constructed with 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. The stacking direction is represented by dividing the range from 0° to 180° into 10 discrete angles at intervals of 20°, that is, a stacking direction of 0° indicates that the rice packaging bags are in the same direction as the vertical axis, a stacking direction of 90° indicates that the rice packaging bags are in the same direction as the horizontal axis, and a stacking direction of 180° indicates that the rice packaging bags are in the opposite direction to the vertical axis.

[0083] In one embodiment of the present invention, the constraints include:

[0084] 1. Boundary constraints: The coordinates of the four vertices of any rice bag must satisfy the following inequality:

[0085] Where 1≤i≤K, K represents the total number of rice packaging bags of different specifications, randx i and Randy i Represents the horizontal and vertical coordinate values ​​of any vertex coordinate of the i-th rice bag, L and W represent the length and width of the tray, respectively. L and ∈ W They represent the tolerance length and tolerance width of the pallet, and are both custom parameters, for example, ∈ L Set to 5% of the tray length, ∈ W Set to 2% of the pallet width;

[0086] 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:

[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 Indicates the stacking direction of the i-th rice bag, x i and y iRespectively represent the horizontal and vertical coordinate values ​​of the two-dimensional coordinates of the lower left corner of the i-th rice bag in the image, length i and width i Represent the length and width of the i-th rice bag respectively;

[0091] 2. Maximum load height constraint:

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

[0093] 3. Maximum load weight restriction:

[0094] where weight i Indicates the weight of the i-th rice bag, Weight max Indicates the maximum load 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 They represent the horizontal and vertical coordinate values ​​of the two-dimensional coordinates of the lower left corner of the j-th rice bag in the image, respectively. j and width j They represent the length and width of the j-th rice bag respectively, and ∨ represents the logical OR;

[0097] 5. Support area constraint: The overlap coefficient between the second and subsequent rice bags and the corresponding rice bags in the lower layer must be greater than or equal to the preset overlap coefficient threshold;

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

[0099] 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 second layer and above of the rice packaging bag. Area overlap Indicates the overlapping area between the second and subsequent rice bags and the corresponding rice bags in the lower layer. The overlapping area is calculated using an existing geometry calculation library, such as Shapely, or using a polygon clipping algorithm based on the coordinates of the four vertices of the rice bag, such as the Sutherland-Hodgman algorithm or the Weiler-Atherton algorithm.

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

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

[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 formula includes:

[0103]

[0104]

[0105] where x ci and y ci They represent the horizontal and vertical coordinate values ​​of the center of gravity of the i-th rice bag, θ i Indicates the stacking direction of the i-th rice bag;

[0106] 7. Stacking method constraints: The next layer of rice packaging bags can only be stacked after each layer is completed.

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

[0108] Step S201, calculating the fitness values ​​of all individuals in the initialized population through the objective function;

[0109] Step S202: Generate the iteration factor iter corresponding to the current number of iterations t , and if it is determined that the iteration factor is greater than or equal to the first preset threshold, then step S203 is executed, otherwise step S204 is executed;

[0110]

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

[0112] The first preset threshold is a custom parameter. Preferably, the first preset threshold is set to 2;

[0113] Step S203: Generate a random number between 0 and 1, and if the random number is greater than or equal to a second preset threshold, update the codes of the individuals in the initialized population using the first update strategy; otherwise, update the codes of the individuals in the initialized population using the second update strategy.

[0114] The second preset threshold is a custom parameter. Preferably, the second preset threshold is set to 0.5;

[0115] Step S204, updating the codes of individuals in the initialized population using a third updating strategy;

[0116] Step S205: If it is determined that the iteration termination condition is met, the code of the individual with the largest fitness value is used as the palletizing solution, otherwise the process returns to step S201 to continue execution;

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

[0118] In one 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] Among them, space represents space utilization, use represents load utilization, stability represents structural stability, skewness represents center of gravity offset, overlap represents i represents the overlap coefficient between the second and above rice packaging bags and the corresponding lower rice packaging bags, x mid and y mid They represent the horizontal and vertical coordinate values ​​of the center of the pallet respectively, w1, w2, w3 and w4 represent the customized first, second, third and fourth weight coefficients respectively, and the total value is 1. Preferably, w1, w2, w3 and w4 are set to 0.2, 0.3, 0.3 and 0.2 respectively.

[0122] It should be noted that the overlapping coefficient of the first layer of rice packaging bags is assigned a value of 1. The objective function is designed to ensure that the individual codes are updated in the direction of maximizing space utilization, maximizing load utilization, maximizing structural stability, and minimizing center of gravity offset, so that the final generated palletizing solution is optimal.

[0123] In one embodiment of the present invention, the first update strategy represents generating a random number in the value range between 0 and 1, and judging that the random number is greater than or equal to a third preset threshold, then randomly selecting 2 individuals from the initialization population, and arbitrarily selecting 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 codes of the 2 individuals for exchange, otherwise randomly selecting 1 individual from the initialization population, and regenerating any element value of the code of the individual that meets the constraint conditions, wherein the third preset threshold is a custom parameter. Preferably, the third preset threshold is set to 0.8.

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

[0125]

[0126] Where 1≤n≤N, N represents the total number of individuals in the initialized population, and Represent the codes of the nth individual whose current iterations are t+1 and t, respectively. Indicates the code of the individual with the largest fitness value at the current iteration number t.

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

[0128]

[0129] Where 1≤n≤N, N represents the total number of individuals in the initialized population, and Represent the codes of the nth individual whose current iterations are t+1 and t, respectively. Indicates the code of the individual with the largest fitness value at the current iteration number t.

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

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

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

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

[0134] The fourth module 304 is used to update the codes of the individuals in the initialized population by using an optimization algorithm until the iteration termination condition is met, and the code of the individual with the largest fitness value is used as the stacking solution.

[0135] It should be noted that the intervals and thresholds are set for ease of comparison. The threshold size depends on the amount of sample data and the cardinality set by those skilled in the art for each set of sample data, as long as it does not affect the proportional relationship between the parameter and the quantized value. Furthermore, the above formulas are all dimensionless numerical calculations. These formulas are derived from software simulations of the most recent real-world conditions using large amounts of data. The preset parameters in these formulas are set by those skilled in the art based on actual conditions.

[0136] The above describes the embodiments of this embodiment, but this embodiment is not limited to the above specific implementation methods. The above specific implementation methods are merely illustrative and not restrictive. Ordinary technicians in this field can also make many forms based on the inspiration of this embodiment, all of which are protected by this embodiment.

Claims

1. A rice palletizing line intelligent control method, characterized in that: The following steps are involved: Step S101, identifying the parameters of the pallet and the parameters of rice packaging bags of different specifications in the image through the object detection model; Step S102, setting the constraints of the optimization algorithm according to the pallet parameters and the parameters of the rice packaging bags of different specifications; Step S103, randomly generating codes of individuals in the initialization population that meet the constraints in the optimization algorithm; The total number of individuals in the initialized population is a custom parameter; The individual codes are represented by the two-dimensional coordinates of the lower left corner and the stacking direction of rice bags of different specifications in the image; Step S104, updating the codes of the individuals in the initialized population by using an optimization algorithm until the iteration termination condition is met, and taking the code of the individual with the largest fitness value as the stacking solution; The fitness value is obtained through the calculation of the custom objective function. The larger the fitness value, the better the palletizing solution. Constraints include: Boundary constraints: The coordinates of the four vertices of any rice 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 Represents the horizontal and vertical coordinate values ​​of any vertex coordinate of the i-th rice bag, L and W represent the length and width of the tray, respectively. L and ∈ W They represent the tolerance length and width of the pallet, and are custom parameters. 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: 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 Indicates the stacking direction of the i-th rice bag, x i and y i Respectively represent the horizontal and vertical coordinate values ​​of the two-dimensional coordinates of the lower left corner of the i-th rice bag in the image, length i and width i Represent the length and width of the i-th rice bag respectively; Maximum load height constraint: where height i represents the height of the i-th rice bag, median(tier) represents the median number of single-layer rice bags loaded on the pallet, Height max Indicates the maximum load height of the pallet; Maximum load weight limit: where weight i Indicates the weight of the i-th rice bag, Weight max Indicates the maximum load 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≠j, 1≤j≤K, x j and y j They represent the horizontal and vertical coordinate values ​​of the two-dimensional coordinates of the lower left corner of the j-th rice bag in the image, respectively. j and width j They represent the length and width of the j-th rice bag respectively, and ∨ represents the logical OR; Support area constraint: The overlap coefficient between the second and subsequent rice bags and the corresponding rice bags in the lower layer must be greater than or equal to the preset overlap coefficient threshold; The calculation formula of the overlap coefficient is as follows: The preset overlap coefficient threshold is a custom parameter, and Area represents the area of ​​the second layer and above of rice packaging bags. overlap Indicates the overlapping area of ​​the second and above rice packaging bags and the corresponding lower rice packaging bags; Center of gravity balance constraint: The horizontal and vertical coordinate values ​​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; 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 includes: where x ci and y ci They represent the horizontal and vertical coordinate values ​​of the center of gravity of the i-th rice bag, θ i Indicates the stacking direction of the i-th rice bag; Stacking method constraints: Each layer of rice packaging bags must be stacked before the next layer can be stacked; The codes of individuals in the initialized population are updated through an optimization algorithm, which includes the following steps: Step S201, calculating the fitness values ​​of all individuals in the initialized population through the objective function; Step S202: Generate the iteration factor iter corresponding to the current number of iterations t , and if it is determined that the iteration factor is greater than or equal to the first preset threshold, then step S203 is executed, otherwise step S204 is executed; Where t represents the current number of iterations, and the starting value of the current number of iterations is 1, T represents the maximum number of iterations, and T is a custom parameter, α represents the control factor, and the assigned value is a constant 3, and e represents a natural constant; wherein the first preset threshold is a custom parameter; Step S203: Generate a random number between 0 and 1, and if the random number is greater than or equal to a second preset threshold, update the codes of the individuals in the initialized population using the first update strategy; otherwise, update the codes of the individuals in the initialized population using the second update strategy; wherein the second preset threshold is a custom parameter; Step S204, updating the codes of individuals in the initialized population using a third updating strategy; Step S205: If it is determined that the iteration termination condition is met, the code of the individual with the largest fitness value is used as the palletizing solution, otherwise the process returns to step S201 to continue execution; The iteration termination condition is that the current number of iterations is greater than or equal to the maximum number of iterations.

2. A rice palletizing line intelligent control method according to claim 1, characterized in that, The target detection model is YOLOv8, and the sample labels of the training samples used to train the target detection model are obtained by manual labeling using labeling tools.

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

4. A rice palletizing line intelligent control method according to claim 1, characterized in that, The calculation formula of the objective function includes: Fitness=w1×space+w2×use+w3×stability-w4×skewness; Among them, space represents space utilization, use represents load utilization, stability represents structural stability, skewness represents center of gravity offset, overlap represents i represents the overlap coefficient between the second and above rice packaging bags and the corresponding lower rice packaging bags, x mid and y mid They represent the horizontal and vertical coordinate values ​​of the center of the pallet respectively, w1, w2, w3 and w4 represent the first, second, third and fourth customized weight coefficients respectively, and the total value is 1.

5. A rice palletizing line intelligent control method according to claim 1, characterized in that, The first update strategy represents generating a random number between 0 and 1, and judging that the random number is greater than or equal to the third preset threshold, then randomly selecting 2 individuals from the initialization population, and arbitrarily selecting 2 element values ​​from the codes of the 2 individuals to exchange, otherwise randomly selecting 1 individual from the initialization population, and regenerating any element value of the code of the individual that meets the constraint conditions, where the third preset threshold is a custom parameter.

6. A rice palletizing line intelligent control method according to claim 1, characterized in that, The calculation formula of the second update strategy is as follows: Where 1≤n≤N, N represents the total number of individuals in the initialized population, and Represent the codes of the nth individual whose current iterations are t+1 and t, respectively. Indicates the code of the individual with the largest fitness value at the current iteration number t.

7. A rice palletizing line intelligent control method according to claim 1, characterized in that: The calculation formula of the third update strategy is as follows: Where 1≤n≤N, N represents the total number of individuals in the initialized population, and Represent the codes of the nth individual whose current iterations are t+1 and t, respectively. Indicates the code of the individual with the largest fitness value at the current iteration number t.

8. An intelligent control system for a rice palletizing line, characterized in that: Executing the intelligent control method for a rice palletizing line according to any one of claims 1 to 7, comprising: The first module is used to identify the parameters of the pallet and the parameters of rice packaging bags of different specifications in the image through the object detection model; The second module is used to set the constraints of the optimization algorithm according to the parameters of the pallet and the parameters of the rice packaging bags of different specifications; The third module is used to randomly generate the encoding of individuals in the initialization population that meet the constraints in the optimization algorithm; The fourth module is used to update the codes of the individuals in the initialized population through an optimization algorithm until the iteration termination condition is met, and the code of the individual with the largest fitness value is used as the stacking solution.

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