Stacking planning model training method, stacking method and related device

By designing a total reward function in deep reinforcement learning, the object is placed in a position where the palletizing robot is farther away and lower, which solves the problem of insufficient stability and safety in the existing palletizing algorithm and improves the palletizing operation. security and stability.

CN118701757APending Publication Date: 2024-09-27FAIR INNOVATION (SUZHOU) ROBOTIC SYSTEM CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410958535.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-17
Publication Date
2024-09-27

AI Technical Summary

Technical Problem

In the palletizing algorithm based on deep reinforcement learning, the single-step reward function only considers the space occupancy of the boxes, which fails to effectively ensure that the order of object placement meets the stability and safety of palletizing.

Method used

By performing position planning based on object size information in the process of deep reinforcement learning, designing a total reward function, giving priority to placing objects at farther and lower positions of the palletizing robot, and updating the palletizing planning model to improve palletizing safety. and stability.

Benefits of technology

During the actual stacking process, objects are prioritized to be placed farther and lower from the palletizing robot, which improves the safety and stability of the palletizing operation and reduces the risk of interference and upper boxes slipping and falling.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118701757A
    Figure CN118701757A
Patent Text Reader

Abstract

The invention provides a stacking planning model training method, a stacking method and a related device, and relates to the technical field of computers. The method comprises the steps that in the deep reinforcement learning process, based on first object size information of a first to-be-stacked object, position planning is conducted in the whole stacking space through a current stacking planning model, and a first placement position of the first to-be-stacked object is obtained; according to the total reward function, the first object size information and the first placing position, a total reward is obtained through calculation, the farther the first placing position is in the plane where the coded disc plane is located from the stacking robot, the lower the height of the first placing position is, and the larger the total reward obtained based on the total reward function is; and parameters of the current stacking planning model are updated according to the obtained total reward, so that a target stacking planning model is obtained. Therefore, in the actual stacking process, objects can be preferentially placed at the position, far away from the stacking robot and low away from the stacking robot, on the stacking disc plane as much as possible, and therefore stability and safety are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a palletizing planning model training method, a palletizing method and related devices. Background Art

[0002] In palletizing algorithms based on deep reinforcement learning, a single-step reward function is usually used to guide the learning direction of the agent. The single-step reward function is generally designed based only on the current box's space occupancy. The role of the reward function is to guide the agent to place as many boxes as possible in the palletizing space, without considering the order in which the boxes are placed. As a result, after training, when palletizing based on the above agent, the order in which objects are placed may not meet the requirements of stability and safety for actual palletizing. Summary of the invention

[0003] The embodiments of the present application provide a palletizing planning model training method, a palletizing method and related devices, which can place objects at a position farther away from and lower to the palletizing robot on the pallet plane as much as possible during the actual stacking process, thereby improving safety and stability.

[0004] The embodiments of the present application can be implemented as follows:

[0005] In a first aspect, an embodiment of the present application provides a method for training a palletizing planning model, the method comprising:

[0006] In the deep reinforcement learning process, based on the first object size information of the first object to be palletized, the current palletizing planning model is used to perform position planning in the entire palletizing space to obtain a first placement position of the first object to be palletized;

[0007] A total reward is calculated according to the total reward function, the first object size information and the first placement position, wherein the farther the distance between the first placement position and the palletizing robot on the plane where the code plate plane is located and the lower the height of the placement position, the greater the total reward obtained based on the total reward function, and the total reward includes a space reward;

[0008] The parameters of the current palletizing planning model are updated according to the total reward obtained to obtain the target palletizing planning model.

[0009] In a second aspect, an embodiment of the present application provides a palletizing method, the method comprising:

[0010] Obtaining a second placement position based on second object size information of a second object to be palletized using the trained palletizing planning model;

[0011] Obtain at least one third placement position according to the palletizing height map and the second object size information;

[0012] For each of the multiple candidate positions, a position score of the candidate position is calculated according to a position score calculation formula and the candidate position, wherein the second placement position and the at least one third placement position constitute the multiple candidate positions, and the farther the candidate position is from the palletizing robot on the plane where the code plate plane is located and the lower the height is, the greater the position score obtained based on the position score calculation formula;

[0013] A candidate position with the largest position score among the multiple candidate positions is used as a target placement position, and a palletizing operation is performed on the second object to be palletized according to the target placement position.

[0014] In a third aspect, an embodiment of the present application provides a palletizing planning model training device, the device comprising:

[0015] A planning module, used to perform position planning in the entire palletizing space based on first object size information of the first object to be palletized and using the current palletizing planning model in the deep reinforcement learning process to obtain a first placement position of the first object to be palletized;

[0016] A reward calculation module, configured to calculate a total reward according to a total reward function, the first object size information and a first placement position, wherein the farther the distance between the first placement position and the palletizing robot on the plane where the code plate plane is located and the lower the height of the placement position, the greater the total reward obtained based on the total reward function, and the total reward includes a space reward;

[0017] The adjustment module is used to update the parameters of the current palletizing planning model according to the total reward obtained to obtain the target palletizing planning model.

[0018] In a fourth aspect, an embodiment of the present application provides a palletizing device, the device comprising:

[0019] A position acquisition module, used for obtaining a second placement position based on second object size information of a second object to be palletized by using the trained palletizing planning model;

[0020] The position acquisition module is further used to obtain at least one third placement position according to the stacking height map and the second object size information;

[0021] A score calculation module is used to calculate, for each of the multiple candidate positions, a position score of the candidate position according to a position score calculation formula and the candidate position, wherein the second placement position and the at least one third placement position constitute the multiple candidate positions, and the farther the candidate position is from the palletizing robot on the plane where the code plate plane is located and the lower the height is, the greater the position score obtained based on the position score calculation formula;

[0022] The processing module is used to select a candidate position with the largest position score among the multiple candidate positions as a target placement position, and perform a palletizing operation on the second object to be palletized according to the target placement position.

[0023] In a fifth aspect, an embodiment of the present application provides an electronic device, comprising a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor can execute the machine executable instructions to implement the palletizing planning model training method described in the aforementioned embodiment or the palletizing method described in the aforementioned embodiment.

[0024] In a sixth aspect, an embodiment of the present application provides a readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the palletizing planning model training method as described in the aforementioned embodiment or the palletizing method as described in the aforementioned embodiment is implemented.

[0025] The stacking planning model training method, stacking method and related device provided by the embodiment of the present application, in the process of training the stacking planning model based on deep reinforcement learning, based on the first object size information of the first object to be stacked, the current stacking planning model is used to perform position planning in the entire stacking space to obtain the first placement position of the first object to be stacked; then, according to the total reward function, the first object size information and the first placement position, the total reward is calculated, and then the parameters of the current stacking planning model are updated according to the obtained total reward to obtain the target stacking planning model. Among them, the farther the distance between the first placement position and the stacking robot on the plane where the code plate plane is located and the lower the height of the placement position, the greater the total reward obtained based on the total reward function, and the total reward includes a space reward. In this way, in the actual stacking process, objects can be placed as far away and lower as possible from the stacking robot on the code plate plane, thereby improving safety and stability. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0027] Figure 1 A block diagram of an electronic device provided in an embodiment of the present application;

[0028] Figure 2 A schematic diagram of a process flow of a palletizing planning model training method provided in an embodiment of the present application;

[0029] Figure 3This is a diagram of the principle of reinforcement learning;

[0030] Figure 4 for Figure 2 A schematic flow chart of the sub-steps included in step S120;

[0031] Figure 5 for Figure 4 A schematic flow chart of the sub-steps included in sub-step S122;

[0032] Figure 6 for Figure 4 A schematic flow chart of the sub-steps included in sub-step S123;

[0033] Figure 7 A complete schematic diagram for training the palletizing planning model;

[0034] Figure 8 A schematic diagram of a palletizing method according to an embodiment of the present application;

[0035] Fig. 9 A block diagram of a palletizing planning model training device provided in an embodiment of the present application;

[0036] Fig.10 A block diagram of a palletizing device provided in an embodiment of the present application.

[0037] Icons: 100 - electronic device; 110 - memory; 120 - processor; 130 - communication unit; 200 - palletizing planning model training device; 210 - planning module; 220 - reward calculation module; 230 - adjustment module; 300 - palletizing device; 310 - position acquisition module; 320 - score calculation module; 330 - processing module. DETAILED DESCRIPTION

[0038] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various different configurations.

[0039] Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the present application for which protection is sought, but merely represents selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.

[0040] It should be noted that relational terms such as "first" and "second" are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0041] In the current palletizing algorithm based on deep reinforcement learning, a single-step reward function is usually used to guide the learning direction of the agent. The single-step reward function is generally designed based only on the space occupancy of the current box and has the following form:

[0042]

[0043] Where n represents the current box number, (l n , w n ,h n ) represents the size of the current box, (L, W, H) represents the size of the entire palletizing space, and α represents the adjustment coefficient.

[0044] The role of this reward function is to guide the agent to place as many boxes as possible in the palletizing space. It can be seen that the order in which the boxes are placed is not considered in the current learning process. However, in actual applications, if palletizing is performed at a location closer to the palletizing robot, when the boxes are subsequently placed at a farther location, the palletizing robot may interfere with boxes that are closer and at a certain height; and during the palletizing process, if the boxes are always placed in a small area in the palletizing space, the center of the pallet will become higher, and vibrations may easily cause the upper boxes to slip and fall. Therefore, the order in which the boxes are placed on the pallet also needs to be taken into consideration.

[0045] In view of the above situation, the embodiments of the present application provide a palletizing planning model training method, a palletizing method and related devices, which can place objects as far away and lower as possible from the palletizing robot on the code plate plane during the actual stacking process, thereby improving the safety of the palletizing operation and the stability of the stacking (i.e., palletizing). It is worth noting that the defects of the above existing processing schemes are the results obtained by the inventor after practice and careful research. Therefore, the discovery process of the above problems and the solutions proposed by the embodiments of the present application for the above problems below should be the contributions made by the inventor to the present application during the application process.

[0046] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.

[0047] Please refer to Figure 1 , Figure 1 A block diagram of an electronic device 100 provided in an embodiment of the present application. The electronic device 100 may be, but is not limited to, a computer, a server, a palletizing robot, etc., which may be determined in combination with a specific application scenario. The electronic device 100 may include a memory 110, a processor 120, and a communication unit 130. The memory 110, the processor 120, and the communication unit 130 are electrically connected to each other directly or indirectly to achieve data transmission or interaction. For example, these components may be electrically connected to each other via one or more communication buses or signal lines.

[0048] The memory 110 is used to store programs or data. The memory 110 may be, but is not limited to, a random access memory (RAM), a read only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), etc.

[0049] The processor 120 is used to read / write the data or programs stored in the memory 110 and execute the corresponding functions. For example, the memory 110 stores a palletizing planning model training device or a palletizing device, and the palletizing planning model training device or the palletizing device includes at least one software function module that can be stored in the memory 110 in the form of software or firmware. The processor 120 executes various functional applications and data processing by running the software programs and modules stored in the memory 110, such as the palletizing planning model training device or the palletizing device in the embodiment of the present application, that is, realizing the palletizing planning model training method or the palletizing method in the embodiment of the present application.

[0050] The communication unit 130 is used to establish a communication connection between the 110 and other communication terminals through a network, and to send and receive data through the network.

[0051] It should be understood that Figure 1The structure shown is only a schematic diagram of the structure of the electronic device 100. The electronic device 100 may also include Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown. Figure 1 Each component shown in the figure can be implemented by hardware, software or a combination thereof.

[0052] Please refer to Figure 2 , Figure 2 A schematic flow chart of a palletizing planning model training method provided in an embodiment of the present application. The palletizing planning model training method can be applied to the above-mentioned electronic device. The specific process of the palletizing planning model training method is described in detail below. In this embodiment, the method may include steps S110 to S130.

[0053] Step S110, in the deep reinforcement learning process, based on the first object size information of the first object to be palletized, position planning is performed in the entire palletizing space using the current palletizing planning model to obtain a first placement position of the first object to be palletized.

[0054] Step S120: calculating a total reward according to the total reward function, the first object size information and the first placement position.

[0055] Step S130, updating the parameters of the current palletizing planning model according to the obtained total reward to obtain a target palletizing planning model.

[0056] The principle of reinforcement learning is as follows Figure 3 As shown in the figure, the agent obtains the data needed for learning from the observed state of the environment, and then, after an internal reasoning process, outputs an action and executes it in the environment. The reward calculated based on the state of the environment after executing the action and the reward function is fed back to the agent, guiding the agent to update its own parameters, that is, the agent learns. The updated agent will infer the next state of the environment and output the next action, and the cycle continues.

[0057] In reinforcement learning, the reward function is a signal provided by the environment to the agent. Its function is to evaluate the goodness or badness of the agent's action in a certain state. The reward can be positive, negative or zero, indicating positive, punitive or neutral feedback on the agent's behavior. The reward is the main driving force for the agent to learn. The agent's goal is to maximize the cumulative reward. In other words, the reward function guides the agent's learning direction. For example, the reward function shown in the above formula (1) shows that the larger the volume of the boxes placed in the palletizing space, the higher the positive reward the agent receives. That is, the role of the reward function is to encourage the agent to place as many boxes as possible in the palletizing space.

[0058] When training a palletizing planning model based on deep reinforcement learning, the palletizing planning model can be a network for decision-making actions in an intelligent agent. In the process of training the palletizing planning model, the object size information of the first object to be palletized that is currently required to be palletized can be first obtained as the first object size information. The first object size information is used to describe the length, width, height, etc. of the first object to be palletized.

[0059] Afterwards, the current palletizing planning model can be used to perform position planning based on the first object size training, so as to obtain a position as the first placement position of the first object to be palletized. Among them, the current palletizing planning model is performing position planning based on the entire palletizing space, that is, a position is selected from the free space in the entire palletizing space where no objects are placed as the placement position of the first position to be palletized. Compared with the method of pre-dividing the entire palletizing space into several areas and then performing position planning for each area, the above-mentioned method of planning based on the entire palletizing space can make higher space utilization. Among them, in the method of performing position division for each area, several areas are sorted, and after one area is full, position division is performed for the next area to fill the next area.

[0060] The first placement position is represented by the coordinates of a point, and when the first palletizing object is placed based on the first placement position, the first placement position can be used as the position of a point on the first palletizing object to perform the palletizing operation. For example, the first object to be palletized is a rectangular box, and the first placement position is the lower left corner position of the rectangular box after placement.

[0061] After obtaining the first placement position, the total reward corresponding to the first placement position can be calculated according to the total reward function, the first object size information and the first placement position. Among them, the total reward function is a pre-set function for calculating the total reward. In the total reward function, the farther the distance between the first placement position and the palletizing robot on the plane where the code disc plane is located and the lower the height of the placement position, the greater the total reward obtained based on the total reward function. The total reward includes a spatial reward. Among them, it is worth explaining that the one position mentioned in the embodiment of the present application is far from the palletizing robot, which means that the position and the position of the palletizing robot are far in a two-dimensional distance on the infinitely large plane where the code disc plane is located. The code disc plane is the surface of the code disc used to contact the placed object, that is, the upper surface. The code disc can be rectangular or other shapes, which can be determined in combination with actual conditions.

[0062] In the case of obtaining the total reward of the first placement position, the cumulative reward can be maximized as the goal, and the parameters in the current palletizing planning model can be updated according to the total reward. After that, the updated current palletizing planning model is used as the new current palletizing planning model, and the above steps are repeated to obtain the target palletizing planning model when the training is completed. It can be understood that after obtaining the first placement position, the environment can be updated accordingly based on the first placement position so as to continue training based on a new first object to be palletized. The target palletizing planning model can be used for palletizing objects of different sizes (i.e., mixed palletizing), and can also be used for palletizing objects of the same size, which can be determined in combination with actual conditions.

[0063] The reward function used in the current hybrid palletizing algorithm based on deep reinforcement learning is designed based on the space occupancy of a single box, with the purpose of guiding the agent to place as many boxes as possible in the palletizing space, but without considering the requirements for the order of box placement in practice, which may cause problems with palletizing safety and stability. The total reward function in this embodiment is used to guide the agent to place boxes as far away and lower from the palletizing robot as possible when stacking multiple boxes. The palletizing planning model trained in this way can improve safety and stability when used in actual palletizing, that is, it takes both safety and stability into consideration.

[0064] Optionally, you can Figure 4 The total reward is calculated by this method. Please refer to Figure 4 , Figure 4 for Figure 2 Schematic diagram of the flow of sub-steps included in step S120. In this embodiment, step S120 may include sub-steps S121 to S124.

[0065] Sub-step S121, calculating the space reward according to the space reward function, the size information of the first object and the size information of the stacking space.

[0066] In this embodiment, the total reward function includes a spatial reward function, and the spatial reward function can be shown as the following formula (2):

[0067]

[0068] Where n represents the number of the current box (i.e., the first object to be stacked), (l n , w n ,h n ) represents the size of the current box, and (L, W, H) represents the size of the entire palletizing space.

[0069] The volume of the first object to be palletized can be calculated based on the first object size information, and the ratio of the volume to the volume of the palletizing space can be calculated, and the obtained ratio can be used as the space reward.

[0070] Sub-step S122, calculating a first distance between the first placement position and the farthest point on the plane of the code disk, and obtaining a distance reward according to the first distance.

[0071] In this embodiment, for the convenience of calculation, the distance between the first placement position and the palletizing robot on the plane where the code disc plane is located can be represented by the first distance d1. The first distance d1 is the distance between the first placement position and the farthest point F on the code disc plane, and the farthest point F is the point on the code disc plane farthest from the palletizing robot; that is, the first distance d1 is the two-dimensional distance between the vertical projection point of the first placement position on the code disc plane and the farthest point F. Among them, the smaller the first distance, the greater the distance reward; that is, the farther the distance between the first placement position and the palletizing robot on the plane where the code disc plane is located, the greater the distance reward.

[0072] Among them, the calculation of the first distance d1 is consistent with the calculation of the farthest point F(x F ,y F ), (x, y) represents the position of the first placement position on the plane of the code plate. For example, if the code plate origin O is the point farthest from the palletizing robot, then

[0073] When the first distance is obtained, the height reward of the first placement position can be obtained based on the first distance according to a set height reward calculation method, which is not specifically limited here.

[0074] As a possible implementation, Figure 5 Please refer to the method shown to obtain the distance reward. Figure 5 , Figure 5 for Figure 4 Schematic diagram of the flow of sub-steps included in sub-step S122. In this embodiment, sub-step S122 may include sub-steps S1221 to S1222.

[0075] Sub-step S1221, calculating and obtaining a first distance ratio between the first distance and the farthest distance.

[0076] In this embodiment, the farthest distance can be obtained first, and the farthest distance is the two-dimensional distance between the closest point and the farthest point on the plane of the code disk. Among them, the closest point is the point on the plane of the code disk that is closest to the palletizing robot. For example, if the code disk is a rectangle, and the palletizing robot is close to the lower left corner of the code disk, the closest point is the lower left corner of the code disk, the farthest point is the upper right corner of the code disk, and the farthest distance is the diagonal length of the code disk. Afterwards, the ratio of the first distance to the farthest distance can be calculated, and the ratio is used as the first distance ratio.

[0077] Sub-step S1222: obtaining the distance reward according to the first distance ratio.

[0078] When the first distance ratio is obtained, the distance reward can be obtained in combination with the set distance reward calculation method. The smaller the first distance ratio is, the greater the distance reward is. Optionally, the range of the distance reward can be 0 to 1. In this case, on the plane of the code disk, the closer the placement position is to the farthest point F, the closer the distance reward is to 1, and the farther the placement position is from the farthest point F, the closer the distance reward is to 0.

[0079] Optionally, the first distance ratio may be directly used as the distance reward. Alternatively, the distance reward may be obtained by combining a set function calculation. For example, an exponential function, a reciprocal function, a power function, a Gaussian function, etc. may be used. The exponential function is in the form of: y=e -ax , the reciprocal form is: The power function form is: y = (1 + ax) -k , the Gaussian function is: a>0, k is a positive integer.

[0080] As a possible implementation method, the preset distance reward function is an exponential function y=e -ax , the distance reward can be calculated based on the distance reward function and the first distance ratio. In this way, the reward for good actions can be maximized.

[0081] Sub-step S123, obtaining a first position height according to the first placement position, and obtaining a height reward according to the first position height.

[0082] In this embodiment, the first position height corresponding to the position can be obtained based on the first placement position. For example, when the code disk is rectangular, one of the corner points is the origin of the three-dimensional coordinate system of the stacking space, and the stacking space is a space surrounded by the positive semi-axis of the three-dimensional coordinate system, the coordinate value of the height direction of the first placement position in the three-dimensional coordinate system can be directly used as the first position height.

[0083] The height reward of the first placement position can be determined according to the height of the first position. The smaller the height of the first position, the greater the height reward. The specific calculation method of the height reward can be determined in combination with actual needs.

[0084] As a possible implementation, Figure 6 Please refer to Figure 6 , Figure 6 for Figure 4 Schematic diagram of the flow of sub-steps included in sub-step S123. In this embodiment, sub-step S123 may include sub-steps S1231 to S1232.

[0085] Sub-step S1231, calculating a first height ratio according to the first position height and the maximum height of the palletizing space.

[0086] Sub-step S1232, obtaining the height reward according to the first height ratio.

[0087] In this embodiment, the space of the palletizing space can be obtained as the maximum height. Then, the ratio of the height of the first position to the maximum height can be calculated as the first height ratio. Afterwards, the height reward can be obtained according to the first height ratio, that is, the set height reward calculation method. Among them, the smaller the first height ratio, the greater the height reward. Optionally, the range of the height reward can be 0 to 1. In this case, the lower the height placement position, the closer the height reward is to 1, and the higher the position, the closer it is to 0.

[0088] Optionally, the first height ratio may be directly used as the height distance. Alternatively, the height distance may be calculated in combination with a set function. For example, an exponential function, a reciprocal function, a power function, a Gaussian function, etc. may be used.

[0089] As a specific implementation method, the preset height reward function is an exponential function y=e -ax , the height reward can be calculated based on the height reward function and the first height ratio. In this way, the reward for good actions can be maximized. It is worth noting that when the height reward function and the distance reward function are both in the form of exponential functions, the two have the same form but the constant value a can be different.

[0090] Sub-step S124, calculating the total reward based on the space reward, distance reward and height reward.

[0091] In this embodiment, as a possible implementation method, the total reward can be calculated by weighted summation based on the space reward, distance reward and height reward. Then, the current palletizing planning model can be updated based on the total reward.

[0092] Among them, the model can be updated based on the actor-critic algorithm. The agent is mainly composed of an actor network and a critic network. The actor network is used to generate actions, and the critic network evaluates the long-term return of the agent in the current state based on the reward function value (which only reflects the quality of the current action without considering the long-term effect) to evaluate the quality of this action. During the learning process, the critic uses the "temporal difference error" (that is, the difference between the actual reward and the critic's estimate) to update its own value function parameters, with the goal of making future value estimates more accurate; the actor also relies on the temporal difference error to update its own strategy parameters. The actor network at the completion of training can be used as the target palletizing planning model obtained after training.

[0093] In order to encourage the agent to place boxes at a farther and lower position first, in this embodiment, the currently used reward function is rewritten into the total reward function provided in the embodiment of this application. As a possible implementation, the code tray is a rectangle, the stacking space is a cuboid, and the total reward function is:

[0094]

[0095] Among them, (l n , w n ,h n ) represents the object size, (L, W, H) represents the size of the code disk space, r far Represents the distance reward for the position, r low Indicates the high reward for the position; α, β, λ, ω, ψ are all adjustment coefficients greater than 0 and can be set in advance.

[0096] One corner of the rectangular code disk can be regarded as the origin of the three-dimensional coordinate system, the top of the code disk is the positive semi-axis of the Z axis of the three-dimensional coordinate system, and the two sides of the code disk where the origin is located are the positive semi-axis of the X and Y axes. 1 ,y 1 , z 1 ) indicates the first placement position.

[0097] In this total reward function, first (x 1 ,y 1 ) and the distance d1 between the nearest point F on the pallet plane and the palletizing robot, and the box placement height z 1 Normalize to convert the distance d1 and height z 1 Map to the interval [0, 1); then use the exponential function y = e -ax The normalized d1 and height z 1Mapped to the interval (0, 1], the distance reward and height reward are obtained, that is, on the code disk plane, the closer the placement position is to point F, the closer the reward value is to 1, and the farther the distance is to point F, the closer it is to 0; the lower the placement position is, the closer the reward value is to 1, and the higher the placement position is, the closer it is to 0. Finally, based on the calculated space reward, distance reward and height reward, the total reward of the first placement position is obtained by weighted summation. In this total reward function, r far and r low The two separate designs can reduce the coupling between the distance and height rewards, allowing the total reward function to be flexibly adjusted according to actual conditions.

[0098] Combine the following Figure 7 Taking boxes as an example, this paper briefly describes how to use the palletizing planning model training method to train the target palletizing planning model.

[0099] S1. Initialize the agent and palletizing related parameters. The palletizing related parameters may include: the length and width of the pallet, the final desired palletizing height, the look-ahead number, etc. The look-ahead number is used to indicate the sizes of the next few boxes that can be obtained during online palletizing. For example, if the look-ahead number is 2, it means that the sizes of the next two boxes can be obtained during online palletizing.

[0100] S2. Obtain the current box size (l, w, h) by measurement or visual recognition.

[0101] S3. The agent infers the location (x, y, z) of the box, and the robot performs the packing operation.

[0102] S4. After the packing operation is completed, the total reward of the current step is calculated using the above formula (3).

[0103] S5. Update the agent parameters according to the total reward.

[0104] Repeat steps S2 to S5 until the palletizing is completed, and the training can be determined to be completed. The actor network in the agent when the training is completed can be used as the target palletizing planning model.

[0105] The palletizing planning model training method provided in the embodiment of the present application is a palletizing sequence optimization method based on an improved reward function, which can guide the intelligent agent to prioritize palletizing at a position farther away from the robot, reducing the possibility of interference between the robot and the boxes, and guide the agent to prioritize palletizing at a position with a lower height, which helps to increase the stability of the pallet base and reduce the risk of upper boxes slipping and falling, thereby improving the safety and stability of the palletizing operation.

[0106] The present application also provides a palletizing method for improving the safety and stability of palletizing operations. Figure 8 , Figure 8 The present invention provides a schematic flow chart of a palletizing method according to an embodiment of the present invention. The method can be applied to the above-mentioned electronic device. In this embodiment, the method can include steps S210 to S240.

[0107] Step S210: obtaining a second placement position based on second object size information of a second object to be palletized by using the trained palletizing planning model.

[0108] In this embodiment, in actual palletizing, the second object information of the second object to be palletized can be input into the palletizing planning model, and the placement position output by the palletizing planning model is used as the second placement position. Among them, the object currently to be placed is the second object to be palletized, which can be a box or other object to be placed on the pallet, which can be determined in combination with actual needs. The second object information can be used to describe the length, width and height of the second object to be palletized. The number of the second placement positions is 1, that is, the palletizing planning model only outputs one position.

[0109] Step S220: obtaining at least one third placement position according to the palletizing height map and the second object size information.

[0110] In this embodiment, when the size information of the second object is obtained, it is also possible to combine the palletizing height map and use other methods to analyze and obtain a potential placement position that meets the conditions as the third placement position. Among them, the above-mentioned conditions are space constraints and stability conditions, where the space constraints are used to constrain that the second object to be palletized can be placed based on the determined position; the stability conditions are used to constrain that the second object to be palletized can be placed stably based on the determined position. For example, assuming that the second code palletizing object is a cuboid, the stability condition can require that three of the four corner points at the bottom of the second code palletizing object are supported, or that the supported area at the bottom of the second code palletizing object is greater than 80% of the total area of ​​the bottom.

[0111] Step S230, for each candidate position among the multiple candidate positions, calculate the position score of the candidate position according to the position score calculation formula and the candidate position.

[0112] In this embodiment, a second placement position obtained through step S210 and at least one third placement position obtained through step S220 can be used as candidate positions. For each of the multiple candidate positions obtained, the position score of each candidate position can be calculated according to a preset position score calculation formula and the candidate position. The farther the candidate position is from the plane where the palletizing robot is located and the lower the height is, the greater the position score obtained based on the position score calculation formula. The position score calculation formula can be specifically determined in combination with actual needs.

[0113] In this embodiment, the position score calculation formula can be set to be similar to the part of the total reward function except for the space reward. As a possible implementation, the code disk is a L×W rectangular code disk, the height of the code disk space is H, and the position score calculation formula is:

[0114]

[0115] Among them, v n represents the position score, v far represents the distance score, v low represents the height score, β 1 , 1 , ω, ψ are adjustment coefficients greater than 0; d2 represents the second distance, which is the distance between the selected position and the point F on the plane of the code plate farthest from the palletizing robot. Represents the second distance ratio; z 2 Indicates the second position height of the selected position, Represents the second height ratio.

[0116] Assume that two adjacent sides of the code disk are the positive semi-axis of the X and Y coordinate axes, and the other is the positive semi-axis of the Z axis, and the intersection of the two adjacent sides is the origin of the three-dimensional coordinate system. In this case, a candidate position is (x 2 ,y 2 , z 2 ),but Then the second distance ratio is obtained; at the same time, the z in the candidate position 2 Value Substitution , then the second height ratio of the candidate position can be obtained.

[0117] Step S240: taking a candidate position with the largest position score among the multiple candidate positions as a target placement position, and performing a palletizing operation on the second object to be palletized according to the target placement position.

[0118] After obtaining the position score of each candidate position, the position score of each candidate position can be compared to determine the maximum position score, and the candidate position corresponding to the maximum position score is used as the target placement position. Afterwards, the second object to be stacked can be stacked according to the target placement position. In this way, the objects to be stacked can be stacked at a position farther and lower from the stacking robot by means of real-time scheduling, thereby reducing the possibility of interference between the robot and the object, increasing the stability of the stack base, and reducing the risk of objects on the upper layer of the stack slipping and falling, thereby improving the safety and stability of the stacking operation.

[0119] In order to execute the corresponding steps in the above embodiments and various possible methods, a method for implementing a stacking planning model training device and a stacking device is provided below. Optionally, the stacking planning model training device and the stacking device can adopt the above Figure 1 It should be noted that the basic principle and technical effects of the palletizing planning model training device and palletizing device provided in this embodiment are the same as those in the above embodiments. For the sake of brief description, for the parts not mentioned in this embodiment, reference can be made to the corresponding contents in the above embodiments.

[0120] Please refer to Fig. 9 , Fig. 9 A block diagram of a palletizing planning model training device 200 provided in an embodiment of the present application. In this embodiment, the palletizing planning model training device 200 may include: a planning module 210 , a reward calculation module 220 , and an adjustment module 230 .

[0121] The planning module 210 is used to perform position planning in the entire palletizing space based on the first object size information of the first object to be palletized and to obtain the first placement position of the first object to be palletized by using the current palletizing planning model during the deep reinforcement learning process.

[0122] The reward calculation module 220 is used to calculate the total reward according to the total reward function, the first object size information and the first placement position. The farther the distance between the first placement position and the palletizing robot on the plane where the palletizing plane is located and the lower the height of the placement position, the greater the total reward obtained based on the total reward function, and the total reward includes a space reward.

[0123] The adjustment module 230 is used to update the parameters of the current palletizing planning model according to the obtained total reward to obtain the target palletizing planning model.

[0124] Please refer to Fig.10 , Fig.10 The block diagram of the palletizing device 300 provided in the embodiment of the present application is shown in FIG.

[0125] The position obtaining module 310 is used to obtain a second placement position based on second object size information of a second object to be palletized by using the trained palletizing planning model.

[0126] The position obtaining module 310 is further used to obtain at least one third placement position according to the palletizing height map and the second object size information.

[0127] The score calculation module 320 is used to calculate the position score of each of the multiple candidate positions according to the position score calculation formula and the candidate position. The second placement position and the at least one third placement position constitute the multiple candidate positions. The farther the candidate position is from the palletizing robot on the plane where the palletizing plane is located and the lower the height, the greater the position score obtained based on the position score calculation formula.

[0128] The processing module 330 is configured to select a candidate position with the largest position score among the multiple candidate positions as a target placement position, and perform a palletizing operation on the second object to be palletized according to the target placement position.

[0129] Optionally, the above modules can be stored in the form of software or firmware. Figure 1 The memory 110 shown in the figure may be fixed in the operating system (OS) of the electronic device 100 and may be Figure 1 Meanwhile, the data and program codes required for executing the above modules may be stored in the memory 110.

[0130] An embodiment of the present application also provides a readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the palletizing planning model training method or the palletizing method is implemented.

[0131] In summary, the embodiments of the present application provide a method for training a palletizing planning model, a palletizing method and a related device. In the process of training a palletizing planning model based on deep reinforcement learning, based on the first object size information of the first object to be palletized, the current palletizing planning model is used to perform position planning in the entire palletizing space to obtain the first placement position of the first object to be palletized; then, according to the total reward function, the first object size information and the first placement position, the total reward is calculated, and then the parameters of the current palletizing planning model are updated according to the total reward obtained to obtain the target palletizing planning model. Among them, the farther the distance between the first placement position and the palletizing robot on the plane where the code plate plane is located and the lower the height of the placement position, the greater the total reward obtained based on the total reward function, and the total reward includes a space reward. In this way, in the actual stacking process, objects can be placed as far away and lower as possible from the palletizing robot on the code plate plane, thereby improving safety and stability.

[0132] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.

[0133] In addition, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.

[0134] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0135] The above description is only an optional embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A palletizing planning model training method, characterized in that: The method comprises: In the deep reinforcement learning process, based on the first object size information of the first object to be palletized, the current palletizing planning model is used to perform position planning in the entire palletizing space to obtain a first placement position of the first object to be palletized; A total reward is calculated according to the total reward function, the first object size information and the first placement position, wherein the farther the distance between the first placement position and the palletizing robot on the plane where the code plate plane is located and the lower the height of the placement position, the greater the total reward obtained based on the total reward function, and the total reward includes a space reward; The parameters of the current palletizing planning model are updated according to the total reward obtained to obtain the target palletizing planning model.

2. The method according to claim 1, characterized in that The calculating the total reward according to the total reward function, the first object size information and the first placement position includes: Calculate the space reward according to the space reward function, the size information of the first object and the size information of the palletizing space; Calculate and obtain a first distance between the first placement position and the farthest point on the plane of the code disk, and obtain a distance reward according to the first distance, wherein the farthest point is the point on the plane of the code disk that is farthest from the palletizing robot, and the smaller the first distance, the greater the distance reward; Obtaining a first position height according to the first placement position, and obtaining a height reward according to the first position height; The total reward is calculated based on the space reward, distance reward and height reward.

3. The method according to claim 2, characterized in that The obtaining of a distance reward according to the first distance comprises: Calculate and obtain a first distance ratio between the first distance and the farthest distance, wherein the farthest distance is the distance between the closest point and the closest point on the plane of the code disk, and the closest point is the point on the plane of the code disk that is closest to the palletizing robot; The distance reward is obtained according to the first distance ratio, wherein the smaller the first distance ratio is, the greater the distance reward is.

4. The method according to claim 3, characterized in that The obtaining of the distance reward according to the first distance ratio includes: The distance reward is calculated according to a distance reward function and the first distance ratio, wherein the distance reward function is an exponential function.

5. The method according to claim 2, characterized in that: The step of obtaining a height reward according to the height of the first position includes: Calculating a first height ratio according to the first position height and the maximum height of the palletizing space; The height reward is obtained according to the first height ratio, wherein the smaller the first height ratio is, the greater the height reward is.

6. The method according to claim 5, characterized in that Obtaining the height reward according to the first height ratio includes: The height reward is calculated according to a height reward function and the first height ratio, wherein the height reward function is an exponential function.

7. A palletizing method, characterized in that: The method comprises: Obtaining a second placement position based on second object size information of a second object to be palletized using the trained palletizing planning model; Obtain at least one third placement position according to the palletizing height map and the second object size information; For each of the multiple candidate positions, a position score of the candidate position is calculated according to a position score calculation formula and the candidate position, wherein the second placement position and the at least one third placement position constitute the multiple candidate positions, and the farther the candidate position is from the palletizing robot on the plane where the code plate plane is located and the lower the height is, the greater the position score obtained based on the position score calculation formula; A candidate position with the largest position score among the multiple candidate positions is used as a target placement position, and a palletizing operation is performed on the second object to be palletized according to the target placement position.

8. A palletizing planning model training device, characterized in that: The device comprises: A planning module, used to perform position planning in the entire palletizing space based on first object size information of the first object to be palletized and using the current palletizing planning model in the deep reinforcement learning process to obtain a first placement position of the first object to be palletized; A reward calculation module, configured to calculate a total reward according to a total reward function, the first object size information and a first placement position, wherein the farther the distance between the first placement position and the palletizing robot on the plane where the code plate plane is located and the lower the height of the placement position, the greater the total reward obtained based on the total reward function, and the total reward includes a space reward; The adjustment module is used to update the parameters of the current palletizing planning model according to the total reward obtained to obtain the target palletizing planning model.

9. An electronic device, characterized in that: It includes a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor can execute the machine executable instructions to implement the palletizing planning model training method described in any one of claims 1 to 6 or the palletizing method described in claim 7.

10. A readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the palletizing planning model training method according to any one of claims 1 to 6 or the palletizing method according to claim 7 is implemented.

Citation Information

Cited By

  • Drip irrigation belt stacking equipment and drip irrigation belt stacking method

    CN119796746A