A method for obtaining a placement position, a model training method, and related equipment
Using artificial intelligence machine learning models to automatically generate placement locations in the field of warehousing and logistics, combined with accommodation space and object size information, solves the problem of relying on manual experience in placement location selection in the existing technology, and improves space utilization and loading rates.
Patent Information
- Application Number
- CN202011631359.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-30
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2040-12-30
AI Technical Summary
Existing technologies rely on manual experience to select placement locations in the field of warehousing and logistics, lacking automated and efficient solutions, resulting in low space utilization.
Adopt artificial intelligence methods, use machine learning models to generate placement locations, combine accommodation space and object size information, and select the optimal placement location through a scoring mechanism to improve space utilization.
It realizes automatic placement location selection, reduces dependence on the experience of technicians, and improves the utilization and loading rate of the accommodation space.
Smart Images

Figure CN112733910B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of warehousing and / or logistics, and in particular to a method for obtaining a placement position, a model training method, and related equipment. Background Art
[0002] With the development of society, the demand for logistics and warehousing is increasing. How to reasonably use the placement space or storage space has become a problem that needs to be solved. At present, the main algorithm used is the heuristic algorithm, which is designed based on artificial experience and relies too much on human experience to obtain the placement position.
[0003] With the development of computer technology, artificial intelligence (AI) has achieved better performance than humans in many problems, and it can automatically generate the optimal placement, avoiding a high degree of manual customization. Among them, AI is the use of computers or computer-controlled machines to simulate, extend and expand human intelligence. Artificial intelligence includes the study of the design principles and implementation methods of various intelligent machines, so that machines have the functions of perception, reasoning and decision-making.
[0004] Therefore, a solution that uses artificial intelligence to solve the placement problem end-to-end is urgently needed. Summary of the invention
[0005] The embodiments of the present application provide a method for obtaining a placement position, a model training method, and related equipment, which can use a first machine learning model to automatically generate a placement position, avoiding over-reliance on the experience of technicians; and in the process of selecting each placement position, the size information of the accommodation space and the size information of each object are fully considered, which is conducive to improving the utilization rate of the accommodation space.
[0006] To solve the above technical problems, the present application provides the following technical solutions:
[0007] In the first aspect, the embodiments of the present application provide a method for obtaining a placement position, which can apply artificial intelligence methods to the field of placement warehousing and / or logistics to improve the automation level, placement efficiency, and placement rate / loading rate of object placement. The execution device obtains first size information and N second size information, the first size information indicates the size of the unoccupied area in the accommodation space, N is an integer greater than or equal to 1, and the second size information indicates the size of the first object (a first object is composed of at least one second object); the execution device can use a three-dimensional tensor or a two-dimensional matrix to record the size information of the first object. The execution device generates M candidate placement positions according to the first size information and the N second size information; wherein the M candidate placement positions may also be referred to as M candidate placement positions, and M is an integer greater than or equal to 1; one of the M candidate placement positions indicates a placement position of a target object (the target object may be any first object among the N first objects) in an unoccupied area, that is, each candidate placement position points to a placement position of a first object among the N first objects in an unoccupied area of the accommodation space; further, each candidate placement position may be specifically expressed as a vector (the vector may also be referred to as an action vector), which may include position information of the target object in the unoccupied area and indication information of the target object, and the indication information of the target object is used to select a certain object from the N first objects. The execution device scores the degree of fit between each candidate placement position and the first size information through the first machine learning model according to the first size information and the M candidate placement positions, so as to obtain M first score values corresponding to the M candidate placement positions one by one. It should be noted that the score values generated by the execution device for different candidate placement positions through the first machine learning model can be the same. The concept of "one-to-one correspondence" here means that the execution device will generate a first score value for each candidate placement position, that is, although the values of different score values in the M first score values can be the same, the execution device will generate a first score value for each candidate placement position. The execution device selects a first placement position from the M candidate placement positions according to the M first score values. The higher the first score value corresponding to the first placement position, the greater the probability that the first placement position is selected. The first placement position indicates that a determined first object (referred to as the third object for the sake of distinction) among the N first objects is placed at a target position in an unoccupied area of the accommodation space.
[0008] In this implementation, the first machine learning model can be used to generate placement positions end-to-end, avoiding over-reliance on the experience of technical personnel; and first generate multiple candidate placement positions based on the size information of the unoccupied area and the size information of multiple objects to be placed, and then use the first machine learning model to score each of the multiple candidate placement positions based on the size information of the unoccupied area, and select a placement position from the multiple candidate placement positions based on the score value of each candidate placement position, that is, the size information of the accommodation space and the size information of each object are fully considered in the selection process of each placement position, which is conducive to improving the utilization rate of the accommodation space.
[0009] In a possible implementation of the first aspect, in one implementation, the training device inputs M candidate placement positions into the fully connected neural network of the first sub-model M times, that is, the training device inputs the next candidate placement position into the fully connected neural network of the first sub-model only after generating a scoring value for one candidate placement position; in another implementation, the training device inputs all M candidate placement positions into the fully connected neural network of the first sub-model at one time, so as to generate a scoring value for each of the M candidate placement positions through the fully connected neural network of the first sub-model.
[0010] In a possible implementation of the first aspect, the first size information is a two-dimensional matrix; the number of rows of the two-dimensional matrix indicates the first size of the bottom surface of the accommodating space, and the number of columns of the two-dimensional matrix indicates the second size of the bottom surface of the accommodating space. If the first size is length, the second size is width, that is, if the number of rows of the two-dimensional matrix indicates the length of the bottom surface of the accommodating space, the number of columns of the two-dimensional matrix indicates the width of the bottom surface of the accommodating space; or, if the first size is width and the second size is length, that is, if the number of rows of the two-dimensional matrix indicates the width of the bottom surface of the accommodating space, the number of columns of the two-dimensional matrix indicates the length of the bottom surface of the accommodating space. The bottom surface of the accommodating space is divided into multiple first areas, there is no intersection between different first areas, the sizes of different first areas can be the same, each first area can be specifically expressed as a square, the two-dimensional matrix includes multiple matrix values corresponding to the multiple first areas one by one, and each matrix value indicates the remaining space of one of the multiple first areas in the height direction.
[0011] In an embodiment of the present application, instead of using a three-dimensional tensor to represent the first size information, a two-dimensional matrix is used to represent the first size information, and the first size information in the form of a two-dimensional matrix is input into the first machine learning model. This reduces the dimension of the input first size information, which can greatly reduce the computing power required during the operation of the first machine learning model and improve the efficiency of the score value calculation process.
[0012] In a possible implementation of the first aspect, the first machine learning model includes a first sub-model and a second sub-model, and the execution device generates M first scoring values corresponding one-to-one to the M candidate placement positions through the first machine learning model according to the first size information and the M candidate placement positions, including: the execution device inputs the first size information and the M candidate placement positions into the first sub-model, and obtains M second scoring values output by the first sub-model corresponding one-to-one to the M candidate placement positions; it should be noted that the second scoring values generated by the execution device for different candidate placement positions through the first sub-model can be the same, and the aforementioned concept of "one-to-one correspondence" is that the execution device will generate a second scoring value for each candidate placement position through the first sub-model, that is, although the values of different scoring values in the M second scoring values can be the same, each candidate placement position will correspond to a second scoring value. The execution device inputs N first volume values corresponding to the N first objects into the second sub-model, and obtains N third score values corresponding to the N first objects output by the second sub-model. Correspondingly, the third score values generated by the execution device for different first objects through the second sub-model can be the same. The aforementioned concept of "one-to-one correspondence" means that the execution device will generate a third score value for each first object through the second sub-model, that is, although the values of different score values in the N third score values can be the same, the execution device will generate a third score value for each first object. Among them, a first object is composed of at least one second object, and the first volume is any one of the following: the average volume of at least one second object, the volume of the largest second object in at least one second object, or the volume of the smallest second object in at least one second object. The execution device performs a first operation on the M second score values and the N third score values according to the M second score values, the N third score values and the first corresponding relationship to generate M first score values; the first operation can be addition, subtraction or multiplication, and the first corresponding relationship is the corresponding relationship between the M second score values and the N third score values.
[0013] In the embodiment of the present application, not only is each candidate placement position scored according to the first size information and the M candidate placement positions, but also N third scoring values corresponding to the N first objects are generated according to the N first volumes corresponding to the N first objects, and then the final scoring value of each candidate placement position is obtained according to the N third scoring values and the M second scoring values, and each candidate placement position is scored in combination with more information to improve the accuracy of each generated scoring value, which is conducive to obtaining the most suitable placement position to improve the utilization rate of the storage space; and in the process of selecting the placement position through the first machine learning model, N first volume values corresponding to the N first objects are introduced, and the first volume value is related to at least one second object constituting the first object, which is conducive to the first machine learning model learning the order of placing objects according to the volume of the second object, such as first choosing to place objects with large volumes, and finally using small objects to fill, so that the container can be filled more fully, thereby improving the placement rate / loading rate of the storage space.
[0014] In a possible implementation manner of the first aspect, an execution device generates M first scoring values according to M second scoring values, N third scoring values, and a first corresponding relationship, including: the execution device obtains at least one third scoring value corresponding to a target scoring value from the N third scoring values according to the first corresponding relationship, where the target scoring value is any one of the M second scoring values; and the execution device adds each third scoring value in the at least one third scoring value corresponding to the target scoring value to the target scoring value to obtain a first scoring value.
[0015] In an embodiment of the present application, after obtaining M second scoring values and N third scoring values, an addition operation is performed on the M second scoring values and the N third scoring values according to a first corresponding relationship between the M second scoring values and the N third scoring values to generate a final first scoring value, thereby providing a specific implementation scheme for generating the first scoring value; and the addition method is used to avoid negative values in the first scoring value and to avoid excessively high values in the first scoring value, so as to improve the fluency of the placement position selection process.
[0016] In a possible implementation of the first aspect, the first sub-model can be further split into a feature extraction network and a fully connected neural network. The training device inputs the first size information into the feature extraction network of the first sub-model, so as to extract features of the first size information through the feature extraction network of the first sub-model to obtain the first feature information. Among them, the first size information can be expressed as a three-dimensional tensor or a two-dimensional matrix; the aforementioned feature extraction network can be specifically expressed as a convolutional neural network or other types of neural networks; the first feature information can be specifically expressed as a state vector corresponding to the first size information, which can also be called a state vector of an unoccupied area of the accommodation space. The training device inputs the first feature information and M candidate placement positions into the fully connected neural network of the first sub-model, so as to connect the first feature information with each of the M candidate placement positions through the fully connected neural network of the first sub-model (that is, to pair the first feature information with each candidate placement position) to generate M second scoring values. Among them, each candidate placement position can be specifically represented as an action vector, that is, the training device connects the state vector (that is, the first feature information) with each of the M action vectors through the fully connected neural network of the first sub-model, and generates M second scoring values corresponding to the connected M state-action vectors, that is, scoring the degree of adaptation of each action vector (that is, the candidate placement position) and the state vector (that is, the first size information of the unoccupied area).
[0017] In an embodiment of the present application, feature extraction is performed on the first size information to obtain first feature information, and the first feature information is connected to each of the M candidate placement positions to obtain M connection pairs, and then the degree of adaptation of the first feature information to each candidate placement position can be scored, that is, M second scoring values corresponding to the M candidate placement positions are obtained, a specific implementation method for generating the second scoring value is provided, and the process of generating the second scoring value is refined, thereby improving the level of refined management of the present solution.
[0018] In a possible implementation of the first aspect, the first sub-model is any one of the following neural networks: a deep Q neural network, a deep double Q neural network, a competitive deep double Q neural network, or a natural deep Q neural network; the second sub-model is a fully connected neural network. In the embodiment of the present application, a variety of specific implementations of the first sub-model are provided to improve the implementation flexibility of the present solution.
[0019] In a second aspect, an embodiment of the present application provides a model training method, which applies an artificial intelligence method to placement in the field of warehousing and / or logistics. A training device obtains first size information and N second size information, the first size information indicates the size of an unoccupied area in a storage space, N is an integer greater than or equal to 1, and the second size information indicates the size of a first object; the training device generates M candidate placement positions according to the first size information and the N second size information, one placement position among the M candidate placement positions indicates a placement position of a target object in an unoccupied area, the target object is one of the N first objects, and M is an integer greater than or equal to 1. The training device generates M first score values corresponding to the M candidate placement positions one by one through a first machine learning model according to the first size information and the M candidate placement positions. The training device trains the first machine learning model according to a first loss function until a convergence condition is met, the first loss function indicates the similarity between the maximum value of the M first score values and a fourth score value, and the fourth score value is a score value of a placement position selected from multiple candidate placement positions during the last training process.
[0020] In a possible implementation of the second aspect, the training device may also select a first placement position from M candidate placement positions according to the M first scoring values. The training device trains the first machine learning model according to the first loss function, including: the training device trains the first machine learning model according to the first loss function using a reinforcement learning method. Before calculating the first loss function, the training device also needs to calculate a first reward value, and generate a function value of the first loss function according to the first reward value, the scoring value of a placement position selected from multiple candidate placement positions during the last training process, and the maximum value of the M first scoring values generated in step 304. In one implementation, the first reward value only includes a local reward, and the local reward is negatively correlated with the ratio of the volume of the wasted space generated after a certain first object is placed at a certain position in the accommodation space to the total volume of the accommodation space. In another implementation, the first reward value is calculated based on the local reward and the global reward, which can be obtained by adding, multiplying, subtracting, etc. the local reward and the global reward, which is not limited this time. The concept of local reward is the same as in the previous implementation, and is not introduced here. The value of the global reward is negatively correlated with the ratio of the total occupied volume of the accommodation space to the volume of the accommodation space after the training device completes the first training task.
[0021] For the specific implementation methods of the steps in the second aspect of the embodiment of the present application and the various possible implementation methods of the second aspect, the specific meanings of the nouns in each possible implementation method, and the beneficial effects brought about by each possible implementation method, please refer to the description of the various possible implementation methods in the first aspect, and will not be repeated here one by one.
[0022] In a third aspect, an embodiment of the present application provides a device for acquiring a placement position, which applies an artificial intelligence method to placement in the field of warehousing and / or logistics. The device for acquiring a placement position includes: an acquisition module, which is used to acquire first size information and N second size information, the first size information indicating the size of an unoccupied area in the accommodation space, N is an integer greater than or equal to 1, and the second size information indicates the size of a first object; a generation module, which is used to generate M candidate placement positions based on the first size information and the N second size information, one of the M candidate placement positions indicating a placement position of a target object in an unoccupied area, the target object is one of the N first objects, and M is an integer greater than or equal to 1; the generation module is also used to generate M first scoring values corresponding to the M candidate placement positions one by one through a first machine learning model based on the first size information and the M candidate placement positions; and a selection module, which is used to select a first placement position from the M candidate placement positions based on the M first scoring values.
[0023] In the third aspect of the embodiment of the present application, the device for obtaining the placement position can also be used to implement the steps performed by the execution device in the various possible implementation methods of the first aspect. For the specific implementation methods of the third aspect of the embodiment of the present application and the various possible implementation methods of the third aspect, as well as the beneficial effects brought about by each possible implementation method, you can refer to the description of the various possible implementation methods in the first aspect, and will not be repeated here one by one.
[0024] In a fourth aspect, an embodiment of the present application provides a model training device, which applies an artificial intelligence method to placement in the field of warehousing and / or logistics. The model training device includes: an acquisition module, which is used to acquire first size information of an unoccupied area in a storage space and second size information of N first objects, where N is an integer greater than or equal to 1; a generation module, which is used to generate M candidate placement positions based on the first size information and the second size information, wherein one placement position among the M candidate placement positions indicates a placement position of a target object in an unoccupied area, and the target object is one of the N first objects, where M is an integer greater than or equal to 1; the generation module is also used to generate M first score values corresponding to the M candidate placement positions one by one through a first machine learning model based on the first size information and the M candidate placement positions; a training module, which is used to train the first machine learning model according to a first loss function until a convergence condition is met, wherein the first loss function indicates the similarity between the maximum value of the M first score values and a fourth score value, and the fourth score value is a score value of a placement position selected from multiple candidate placement positions during the last training process.
[0025] In the fourth aspect of the embodiment of the present application, the placement position acquisition device can also be used to implement the steps performed by the training device in the various possible implementation methods of the second aspect. For the specific implementation methods of the fourth aspect of the embodiment of the present application and the various possible implementation methods of the fourth aspect, as well as the beneficial effects brought about by each possible implementation method, you can refer to the description of the various possible implementation methods in the second aspect, and will not be repeated here one by one.
[0026] In a fifth aspect, an embodiment of the present application provides an execution device, which may include a processor, the processor and a memory are coupled, the memory stores program instructions, and when the program instructions stored in the memory are executed by the processor, the method for obtaining the placement position of the first aspect is implemented. For the steps executed by the execution device in each possible implementation method of the processor executing the first aspect, please refer to the first aspect for details, and no further description is given here.
[0027] In a possible implementation of the fifth aspect, the execution device may further include a robotic arm, which is used to select a third object from the N first objects based on the indication of the first placement position, and place the third object in the unoccupied space. The execution device may be specifically a robot equipped with a robotic arm, or may only include a robotic arm, etc., which is not limited here.
[0028] In a possible implementation of the fifth aspect, the execution device may further include an output interface, the output interface being used to output placement indication information, the placement indication information being used to indicate the placement position of at least one of the N first objects in the accommodation space. For example, after obtaining the first placement position, the execution device may directly output it, so that the user may place a determined first object according to the first placement position; or, after obtaining the placement positions corresponding to the multiple first objects, the execution device may present an overall placement indication diagram, so that the user may place the corresponding multiple first objects according to the indication diagram.
[0029] In a sixth aspect, an embodiment of the present application provides a training device, which may include a processor, the processor and a memory are coupled, the memory stores program instructions, and when the program instructions stored in the memory are executed by the processor, the training method of the model of the second aspect described above is implemented. For the steps performed by the training device in each possible implementation method of the processor performing the second aspect, please refer to the second aspect for details, and no further description is given here.
[0030] In the seventh aspect, an embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored. When the computer program is run on a computer, the computer executes the method for obtaining the placement position of the first aspect, or the method for training the model of the second aspect.
[0031] In an eighth aspect, an embodiment of the present application provides a circuit system, which includes a processing circuit, and the processing circuit is configured to execute the method for acquiring the placement position of the first aspect, or the processing circuit is configured to execute the method for training the model of the second aspect.
[0032] In a ninth aspect, an embodiment of the present application provides a computer program product, which includes instructions. When the instructions are loaded and executed by an electronic device, the electronic device executes the method for obtaining the placement position of the first aspect, or the electronic device executes the method for training the model of the second aspect.
[0033] In the tenth aspect, an embodiment of the present application provides a chip system, which includes a processor for supporting a training device or an execution device to implement the functions involved in the above aspects, for example, sending or processing the data and / or information involved in the above methods. In one possible design, the chip system also includes a memory, which is used to store program instructions and data necessary for the training device or communication device. The chip system can be composed of chips, or it can include chips and other discrete devices. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 A schematic diagram of the structure of the artificial intelligence main framework provided in the embodiment of the present application;
[0035] Figure 2 A system architecture diagram of a placement location acquisition system provided in an embodiment of the present application;
[0036] Figure 3 A flowchart of a training method for a model provided in an embodiment of the present application;
[0037] Figure 4 A schematic diagram of the size information of the accommodation space provided in the embodiment of the present application;
[0038] Figure 5 A schematic diagram of the size information of the accommodation space in the training method of the model provided in the embodiment of the present application;
[0039] Figure 6 Two schematic diagrams of the first object in the training method of the model provided in the embodiment of the present application;
[0040] Figure 7 Two schematic diagrams of the first object in the training method of the model provided in the embodiment of the present application;
[0041] Figure 8 Two schematic diagrams of candidate placement positions in the training method of the model provided in the embodiments of the present application;
[0042] Fig. 9A schematic diagram of a process for generating M first scoring values in the training method of the model provided in an embodiment of the present application;
[0043] Fig.10 A flowchart of a data processing method provided in an embodiment of the present application;
[0044] Fig.11 A schematic diagram of placement indication information in a method for obtaining a placement position provided in an embodiment of the present application;
[0045] Fig.12 A schematic diagram of a structure of a device for obtaining a placement position provided in an embodiment of the present application;
[0046] Fig.13 A schematic diagram of a structure of a training device for a model provided in an embodiment of the present application;
[0047] Fig.14 A schematic diagram of the structure of a training device provided in an embodiment of the present application;
[0048] Fig.15 A schematic diagram of the structure of an execution device provided in an embodiment of the present application;
[0049] Fig.16 A schematic diagram of the structure of a chip provided in an embodiment of the present application. DETAILED DESCRIPTION
[0050] The terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the terms used in this way can be interchanged under appropriate circumstances. This is merely a way of distinguishing objects with the same properties when describing the embodiments of the present application. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, so that a process, method, system, product, or device that includes a series of units is not necessarily limited to those units, but may include other units that are not explicitly listed or inherent to these processes, methods, products, or devices.
[0051] The embodiments of the present application are described below in conjunction with the accompanying drawings. Those skilled in the art will appreciate that, with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0052] First, the overall workflow of the artificial intelligence system is described. Figure 1 , Figure 1The figure shows a structural diagram of the main framework of artificial intelligence. The following is an explanation of the main framework of artificial intelligence from two dimensions: "intelligent information chain" (horizontal axis) and "IT value chain" (vertical axis). Among them, the "intelligent information chain" reflects a series of processes from data acquisition to processing. For example, it can be a general process of intelligent information perception, intelligent information representation and formation, intelligent reasoning, intelligent decision-making, intelligent execution and output. In this process, the data has undergone a condensation process of "data-information-knowledge-wisdom". The "IT value chain" reflects the value that artificial intelligence brings to the information technology industry from the underlying infrastructure of artificial intelligence, information (providing and processing technology implementation) to the industrial ecology process of the system.
[0053] (1) Infrastructure
[0054] The infrastructure provides computing power support for the artificial intelligence system, enables communication with the outside world, and is supported by the basic platform. It communicates with the outside world through sensors; computing power is provided by smart chips, as an example, the smart chip includes hardware acceleration chips such as central processing unit (CPU), neural-network processing unit (NPU), graphics processing unit (GPU), application specific integrated circuit (ASIC), field programmable gate array (FPGA); the basic platform includes distributed computing frameworks and networks and other related platform guarantees and support, which can include cloud storage and computing, interconnected networks, etc. For example, sensors communicate with the outside world to obtain data, and these data are provided to the smart chips in the distributed computing system provided by the basic platform for calculation.
[0055] (2) Data
[0056] The data on the upper layer of the infrastructure indicates the data source in the field of artificial intelligence. The data involves graphics, images, voice, text, and IoT data of traditional devices, including business data of existing systems and perception data such as force, displacement, liquid level, temperature, and humidity.
[0057] (3) Data processing
[0058] Data processing usually includes data training, machine learning, deep learning, search, reasoning, decision-making and other methods.
[0059] Among them, machine learning and deep learning can symbolize and formalize data for intelligent information modeling, extraction, preprocessing, and training.
[0060] Reasoning refers to the process of simulating human intelligent reasoning in computers or intelligent systems, using formalized information to perform machine thinking and solve problems based on reasoning control strategies. Typical functions are search and matching.
[0061] Decision-making refers to the process of making decisions after intelligent information is reasoned, usually providing functions such as classification, sorting, and prediction.
[0062] (4) General ability
[0063] After the data has undergone the data processing mentioned above, some general capabilities can be further formed based on the results of the data processing, such as an algorithm or a general system, for example, image classification, personalized image management, personalized battery charging management, text analysis, computer vision processing, speech recognition, etc.
[0064] (5) Smart products and industry applications
[0065] Smart products and industry applications refer to the products and applications of artificial intelligence systems in various fields. They are the encapsulation of the overall artificial intelligence solution, which productizes intelligent information decision-making and realizes practical application. Its application areas mainly include: smart terminals, smart manufacturing, smart transportation, smart homes, smart medical care, smart security, autonomous driving, safe cities, etc.
[0066] The embodiments of the present application are mainly used in application scenarios such as placement or storage in the above-mentioned various fields. As an example, for example, a user needs to put multiple objects into a truck to transport the aforementioned multiple objects by the truck, then there is the problem of how to reasonably use the placement space in the truck compartment. As another example, for example, a user needs to load multiple objects into multiple containers, there is also the problem of how to maximize the use of multiple containers. As another example, for example, a user needs to store multiple objects in a warehouse, there is also the problem of how to maximize the use of the storage space in the warehouse, etc. It should be understood that the application scenarios of the embodiments of the present application are not exhaustively listed here. In all of the aforementioned scenarios, the method for obtaining the placement position provided in the embodiments of the present application can be adopted, so that the first machine learning model can be used to automatically generate the placement position, avoiding over-reliance on the experience of the technician; and firstly, multiple candidate placement positions are generated according to the size information of the unoccupied area and the size information of multiple objects to be placed, and then each of the multiple candidate placement positions is scored according to the size information of the unoccupied area by the first machine learning model, and a placement position is selected from the multiple candidate placement positions according to the score value of each candidate placement position, that is, the size information of the accommodation space and the size information of each object are fully considered in the selection process of each placement position, which is conducive to improving the utilization rate of the accommodation space.
[0067] In order to facilitate the understanding of this solution, first combine Figure 2 For an introduction to the placement location acquisition system provided in the embodiment of the present application, please refer to Figure 2 , Figure 2 A system architecture diagram of a placement location acquisition system provided in an embodiment of the present application, in Figure 2 In the embodiment, the placement position acquisition system 200 includes an execution device 210 , a training device 220 , a database 230 and a data storage system 240 , and the execution device 210 includes a calculation module 211 .
[0068] During the training phase, a training data set is stored in the database 230, and the training data set may include multiple tasks, each of which is to place multiple objects into one or more containing spaces. The training device 220 generates a first machine learning model / rule 201, and iteratively trains the first machine learning model / rule 201 using the training data set in the database to obtain a mature first machine learning model / rule 201. It should be noted that the database 230 can be specifically expressed as any form of storage medium, and is not limited to a database in the traditional sense.
[0069] In the inference stage, the execution device 210 can call the data, code, etc. in the data storage system 240, or store the data, instructions, etc. in the data storage system 240. The data storage system 240 can be configured in the execution device 210, or it can be a memory outside the execution device 210. The calculation module 211 can generate M first score values corresponding to the M candidate placement positions one by one according to the first size information of the unoccupied area in the accommodation space and the M candidate placement positions through the mature first machine learning model / rule 201, so that the execution device 210 can select the first placement position from the M candidate placement positions according to the M first score values.
[0070] In some embodiments of the present application, for example Figure 2 In the embodiment, the "user" can interact directly with the execution device 210, that is, the execution device 210 and the client device are integrated into the same device. As an example, in some application scenarios, the execution device 210 can be expressed as an intelligent robot with a carrying function. In the reasoning stage, after the execution device 210 selects the first placement position, it can place a certain object among multiple objects into a certain position in the storage space according to the indication of the first placement position. In other application scenarios, the execution device 210 can be specifically expressed as an execution device equipped with a display screen. In the reasoning stage, after completing a task (that is, after repeatedly performing the placement position selection operation multiple times), the execution device 210 can display a three-dimensional schematic diagram to the user. The three-dimensional schematic diagram shows the indication information of the placement positions of multiple objects in the storage space, etc. The execution device 210 can also be expressed in other forms, which are not listed here one by one, but Figure 2 It is only a schematic diagram of the architecture of the acquisition system of two placement positions provided in an embodiment of the present invention, and the positional relationship between the devices, components, modules, etc. shown in the figure does not constitute any limitation.
[0071] In other embodiments of the present application, the execution device 210 and the client device may be separate devices. The execution device 210 is configured with an input / output interface to interact with the client device for data. The "user" may input at least one task to the execution device 210 through the input / output interface of the client device, and the execution device 210 may return the processing result to the client device through the input / output interface.
[0072] Depend on Figure 2 It can be seen from the description in that the embodiment of the present application includes a reasoning stage and a training stage, and the processes of the reasoning stage and the training stage are different. The specific implementation processes of the above two stages are described below.
[0073] 1. Training Phase
[0074] In the embodiments of this application, please refer to Figure 3, Figure 3 A flow chart of a method for training a model provided in an embodiment of the present application, the method may include:
[0075] 301. A training device obtains a first training task from a training data set.
[0076] In an embodiment of the present application, a training data set is stored in the training device, and there are multiple training tasks in the training data set. The training device can arbitrarily select a first training task from the multiple training tasks. The first training task instructs to place multiple second objects (also referred to as initial objects to be placed) in the accommodation space. Among them, each of the multiple second objects is a regular object. As an example, for example, the second object can be expressed as a cuboid, a cube, a cylinder, a cone or other types of regular objects, etc., which are not exhaustive here. The accommodation space can be specifically expressed as a physical space surrounded by physical substances. As an example, physical spaces such as containers, carriages, warehouses, etc. are not exhaustive here; the accommodation space can also be expressed as an artificially demarcated space, rather than a space surrounded by physical substances. As an example, for example, the accommodation space can be a space in an open space, and the user artificially demarcates the bottom area of the accommodation space and the height of the accommodation space, etc. The expression form of the accommodation space in the actual application scenario is not limited here.
[0077] Furthermore, the first training task includes identification information of each second object among multiple second objects, size information of each second object and size information of the entire accommodating space. The size information of the second object can be regarded as spatial state information in the state information of the second object, and the size information of the accommodating space can be regarded as spatial state information in the state information of the accommodating space.
[0078] Furthermore, in general, the storage space is specifically expressed as a cuboid or a cube, and the size information of the storage space includes the length, width and height of the storage space. Since no object has been placed in the storage space in this application scenario, in one implementation, the training device can directly record the size value of the storage space. In another implementation, the training device can also use a three-dimensional tensor to represent the size information of the storage space. Specifically, the storage space is divided into a plurality of blocks, and the training device can generate a three-dimensional tensor with the same size as the storage space, the three-dimensional tensor includes a plurality of two-dimensional matrices, the size of each of the plurality of two-dimensional matrices corresponds to the bottom surface of the storage space, and the height of the three-dimensional tensor corresponds to the height of the storage space; further, the number of rows of the two-dimensional matrix indicates the first size of the bottom surface of the storage space, and the number of columns of the two-dimensional matrix indicates the second size of the bottom surface of the storage space. If the first size is long, the second size is wide, or, if the first size is wide, the second size is long. Each value in the three-dimensional tensor corresponds to a block in the storage space. If the space represented by a block in the multiple blocks is occupied, the value corresponding to the block in the three-dimensional tensor is 1. If the space represented by a block in the multiple blocks is not occupied, the value corresponding to the block in the three-dimensional tensor is 0. As an example, if the storage space is 6 meters long, 3 meters wide, and 2 meters high, the storage space can be represented by a 12*6*4 three-dimensional tensor, that is, a value in the three-dimensional tensor corresponds to a 50 cm*50 cm*50 cm block in the storage space, which is used to indicate whether the space represented by the 50 cm*50 cm*50 cm block is occupied.
[0079] In another implementation, the training device may also use a two-dimensional matrix to represent the size information of the accommodation space after obtaining the size information of the accommodation space. The number of rows of the two-dimensional matrix indicates the first size of the bottom surface of the accommodation space, and the number of columns of the two-dimensional matrix indicates the second size of the bottom surface of the accommodation space. If the first size is length, the second size is width, that is, if the number of rows of the two-dimensional matrix indicates the length of the bottom surface of the accommodation space, the number of columns of the two-dimensional matrix indicates the width of the bottom surface of the accommodation space; or, if the first size is width and the second size is length, that is, if the number of rows of the two-dimensional matrix indicates the width of the bottom surface of the accommodation space, the number of columns of the two-dimensional matrix indicates the length of the bottom surface of the accommodation space. The bottom surface of the accommodation space is divided into a plurality of first areas, and there is no intersection between different first areas. The sizes of different first areas can be the same, and each first area can be specifically represented as a square. The two-dimensional matrix includes a plurality of matrix values corresponding to the plurality of first areas one by one, and each matrix value indicates the remaining space of a first area in the plurality of first areas in the height direction. In an embodiment of the present application, instead of using a three-dimensional tensor to represent the first size information, a two-dimensional matrix is used to represent the first size information, and the first size information in the form of a two-dimensional matrix is input into the first machine learning model, which greatly reduces the computing power required during the operation of the first machine learning model and improves the efficiency of the score value calculation process; it can reduce memory usage during model training, because as the number of objects to be placed included in the training task increases, if a three-dimensional tensor is used to represent the size information of the first object, the size of the memory used to describe the size information of the object will also increase, resulting in a memory overflow problem.
[0080] For a more intuitive understanding of this solution, please refer to Figure 4 , Figure 4 A schematic diagram of the size information of the accommodation space provided in an embodiment of the present application. Figure 4 It includes two sub-schematic diagrams (a) and (b). Figure 4 The schematic diagram (a) of the sub-schematic diagram is a schematic diagram of a storage space, which is 10 meters long, 6 meters wide, and 8 meters high. Figure 4 The (b) sub-schematic diagram shows a two-dimensional matrix corresponding to the accommodating space, the number of rows of the two-dimensional matrix is 6, which is used to indicate that the width of the bottom surface of the accommodating space is 6, and the number of columns of the two-dimensional matrix is 10, which is used to indicate that the length of the bottom surface of the accommodating space is 10; the bottom surface of the accommodating space is divided into 60 first areas, each of which indicates a 1 meter * 1 meter square, and each matrix value in the two-dimensional matrix is used to indicate the remaining space of a first area in the height direction. Since no object has been placed in the accommodating space, the matrix values corresponding to all the first areas are 8, which indicates that the remaining space of all the first areas in the height direction is 8 meters. It should be understood that Figure 4The examples are only for facilitating the understanding of the present solution and are not intended to limit the present solution. It should be noted that the example here only takes the accommodation space as a cuboid or a cube, and the accommodation space can also be other regular objects, which are not exhaustive here.
[0081] The identification information of each second object is used to uniquely identify a second object. The identification information can be specifically expressed as a digital code, a character code or other forms. As an example, the identification information of a second object can be "0000001", "0000023", "FM000369", etc., which are not exhaustive here.
[0082] Correspondingly, the training device can directly record the size value of each second object as the size information of each second object. For example, if the second object is a cuboid, the length, width and height of the second object are recorded as the size information of each second object. For another example, if the second object is a cylinder, the bottom radius and height of the second object are recorded, etc., which are not exhaustively listed here. The training device can also represent the size information of the second object through a three-dimensional tensor or a two-dimensional matrix, and the specific representation method is similar to that of representing the size information of the accommodation space through a three-dimensional tensor or a two-dimensional matrix, which is not repeated here.
[0083] 302. The training device obtains first size information and N second size information according to the first training task, where the first size information indicates the size of an unoccupied area in the accommodation space, and the second size information indicates the size of the first object.
[0084] In the embodiment of the present application, the training device needs to obtain first size information, where the first size information indicates the size of the unoccupied area in the accommodation space; and obtain N first objects (i.e., objects to be placed, which are stacked by at least one second object) according to the size information of the plurality of second objects. For the specific form of the first object, refer to the following Figure 6 and Figure 7 The second size information of each first object in the description in the corresponding embodiment).
[0085] For the first size information of the unoccupied area in the accommodation space. If the training device enters step 302 through step 301, that is, no object has been placed in the accommodation space, the unoccupied area of the accommodation space is the entire accommodation space, and the first size information of the unoccupied area in the accommodation space is the size information of the entire accommodation space, then the training device can directly obtain the first size information of the unoccupied area in the accommodation space from the first training task.
[0086] If the training device enters step 302 through step 305 or step 306, that is, at least one object has been placed in the accommodation space, and the unoccupied area of the accommodation space is a partial area of the entire accommodation space, then the training device needs to generate first size information of the unoccupied area in the accommodation space based on the first training task and the position information of each first object in the at least one first object placed in the accommodation space.
[0087] Correspondingly, the training device may directly record the size value of the unoccupied area in the accommodating space, or may use a three-dimensional tensor or a two-dimensional matrix to represent the first size information of the unoccupied area in the accommodating space.
[0088] For a more intuitive understanding of this solution, please refer to Figure 5 , Figure 5 A schematic diagram of the size information of the accommodation space in the training method of the model provided in an embodiment of the present application. Figure 5 It includes two sub-schematic diagrams (a) and (b). Figure 5 The schematic diagram (a) of the sub-schematic diagram is a schematic diagram of a storage space, which is 10 meters long, 6 meters wide, and 8 meters high. Figure 5 The (b) sub-schematic diagram shows a two-dimensional matrix corresponding to the accommodation space, the number of rows of the two-dimensional matrix is 6, which is used to indicate that the width of the bottom surface of the accommodation space is 6, and the number of columns of the two-dimensional matrix is 10, which is used to indicate that the length of the bottom surface of the accommodation space is 10; the bottom surface of the accommodation space is divided into 60 first areas, each of which indicates a 1 meter * 1 meter square, and each matrix value in the two-dimensional matrix is used to indicate the remaining space of a first area in the height direction. Since an object is placed in the space of 3 meters wide, 6 meters long, and 6 meters high in the accommodation space, as shown in FIG. Figure 5 As shown in the sub-schematic diagram (b), the matrix value corresponding to the part of the first area is 2, which indicates that the remaining space in the height direction of the part of the first area is 2 meters (8 meters minus 6 meters is 2 meters); the matrix value corresponding to the other part of the area is 8, which indicates that the remaining space in the height direction of the first area is 8 meters (no object is placed in this part of the area). It should be understood that Figure 5 The examples are only for facilitating the understanding of the present solution and are not intended to limit the present solution. It should be noted that the example here only takes the accommodation space as a cuboid or a cube, and the accommodation space can also be other regular objects, which are not exhaustive here.
[0089] A process for obtaining the second size information of each first object in N first objects based on the size information of multiple second objects. In one case, the training device divides the multiple second objects into L groups of second objects, each group of second objects includes at least one second object, the sizes of the second objects in the same group are the same, and the sizes of the second objects in different groups are different, and L is a positive integer. For the second objects of the target group in at least two groups of second objects, the second objects in the target group include at least two second objects, and the training device stacks the at least two second objects in S different stacking methods to obtain S first objects; and generates the second size information of each first object in the S first objects based on the size information of each second object in the target group of second objects. Among them, stacking along the length direction, along the width direction, and along the height direction are different stacking methods, respectively, and all stacking methods are not exhaustively listed here.
[0090] The training device performs the above operation on each of the at least two groups of second objects to obtain the second size information of each of the N first objects. S i Representative training equipment adopts S i The second objects of the i-th group in the L groups are stacked in different stacking ways.
[0091] For a more intuitive understanding of this solution, please refer to Figure 6 , Figure 6 Two schematic diagrams of the first object in the training method of the model provided in an embodiment of the present application. Figure 6 In the example, the second objects of the target group include 12 second objects of the same size. Figure 6 It includes two sub-schematic diagrams (a) and (b). Figure 6 (a) Sub-diagram and Figure 6 The sub-schematic diagram (b) of FIG. 1 shows two different stacking methods of 12 second objects. It should be understood that Figure 6 The examples are only for facilitating the understanding of this solution and are not intended to limit this solution.
[0092] In another case, the training device directly determines the second object as the first object, that is, the concepts of the first object and the second object are exactly the same, then the training device directly obtains the second size information of each first object among the N first objects (that is, the second objects) from the first training task.
[0093] In another case, the training device divides a plurality of second objects into at least two groups of second objects, and one of the at least two groups of second objects includes at least one second object, and the sizes of the second objects in the same group are the same, and the sizes of the second objects in different groups are different. At least two groups of second objects include a first group of objects and a second group of objects, and the first group of objects and the second group of objects are different groups in the at least two groups of second objects; the training device stacks at least one second object included in the first group of objects in a first stacking manner to obtain a first object to be combined (also referred to as a simple block); stacks at least one second object included in the second group of objects in a second stacking manner to obtain a second object to be combined, and then stacks the first object to be combined and the second object to be combined again to obtain a first object (also referred to as a complex block) among N first objects; the training device calculates the second size information of the first object based on the size information of each second object. That is, after the training device stacks objects of the same size, it obtains an object to be combined, and then stacks one or more objects to be combined to obtain a first object.
[0094] For a more intuitive understanding of this solution, please refer to Figure 7 , Figure 7 Two schematic diagrams of the first object in the training method of the model provided in an embodiment of the present application. Figure 7 It includes two sub-schematic diagrams (a) and (b). Figure 7 The sub-schematic diagram (a) of FIG. 1 represents a simple block composed of 12 second objects of the same size (i.e., an example of the objects to be combined). Figure 7 The (b) sub-diagram represents a complex block (ie, an example of the first object), Figure 7 The (b) sub-schema is formed by stacking multiple simple blocks, where A1 represents Figure 7 The simple blocks in the sub-schematic diagram (a) should be understood as follows: Figure 7 The examples are only for facilitating the understanding of this solution and are not intended to limit this solution.
[0095] 303. The training device generates M candidate placement positions according to the first size information and the N second size information.
[0096] In the embodiment of the present application, after obtaining the first size information of the unoccupied area in the accommodation space and the second size information of each first object among the N first objects (the objects to be placed in the end), the training device can generate M candidate placement positions corresponding to the N first objects. Among them, the M candidate placement positions can also be referred to as M candidate placement positions, where M is an integer greater than or equal to 1; one of the M candidate placement positions indicates a placement position of the target object in the unoccupied area, and the target object is one of the N first objects, that is, each candidate placement position uniquely points to a placement position of one of the N first objects in the unoccupied area of the accommodation space.
[0097] It should be noted that the training device needs to meet at least the following constraints during the execution of step 303: the first object cannot exceed the boundary of the storage space, the positions of different first objects cannot overlap, and different first objects are placed vertically in the storage space. Optionally, the training device also needs to meet the following constraints during the execution of step 303: the first object is not allowed to be suspended, that is, the bottom surface of any first object must be fully supported by the bottom surface of the storage space or other first objects; each first object can only be placed in one or more specified directions.
[0098] Furthermore, each candidate placement position may be specifically represented by a vector (the vector may also be referred to as an action vector), which may include position information of a target object (ie, any first object among the N first objects) in an unoccupied area and indication information of the target object.
[0099] The training device can establish a first coordinate system corresponding to the accommodation space, the first coordinate system is a three-dimensional coordinate system (also referred to as a spatial coordinate system), and the origin of the coordinate system of the first coordinate system can be any vertex of the accommodation space, the center point of the accommodation space, the center point of the bottom surface of the accommodation space, or other position points, etc., which are not limited here. If the target object is a cuboid or a cube, the position information of the target object in the unoccupied area can be the three-dimensional coordinates of each vertex of the target object in the first coordinate system (also referred to as spatial coordinates), or the three-dimensional coordinates of the two farthest vertices among the eight vertices included in the target object in the first coordinate system, or the three-dimensional coordinates of the center point of the target object and any vertex of the target object in the first coordinate system, etc. If the target object is a cylinder, the position information of the target object in the unoccupied area may include the three-dimensional coordinates of the bottom center and the top center of the cylinder in the first coordinate system and the bottom radius / diameter of the cylinder, or may include the three-dimensional coordinates of the bottom center and the center of the cylinder in the first coordinate system and the bottom radius / diameter of the cylinder, or may include the three-dimensional coordinates of the top center and the center of the cylinder in the first coordinate system and the bottom radius / diameter of the cylinder, etc. If the target object is a cone, the position information of the target object in the unoccupied area may include the three-dimensional coordinates of the bottom center of the cone in the first coordinate system, the three-dimensional coordinates of the tip of the cone in the first coordinate system and the bottom radius / diameter of the cone, etc. It should be understood that the specific information of the position information of the target object in the unoccupied area should be flexibly set in combination with the actual application environment, and is not limited here.
[0100] The indication information of the target object is used to point to the target object determined in the N first objects. The indication information of the target object can use the identification information of the target object; since the target object is composed of at least one second object, if the volume of the entire target object can be calculated based on the position information of the target object in the unoccupied area, the indication information of the target object may include the average volume of all the second objects in the at least one second object and the position information of the target object in the unoccupied area, etc., and the indication information of the target object is not exhaustively enumerated here.
[0101] As an example, the first object is a cuboid or a cube. For example, each of the M candidate placement positions is Among them, [x1, y1, z1] and [x2, y2, z2] respectively represent the three-dimensional coordinates of the two farthest vertices in the first object in the first coordinate system. [x1, y1, z1] and [x2, y2, z2] can also represent the volume of the first object. It represents the average volume of at least one second object that constitutes the first object. It should be understood that the above example is only an example and is not used to limit this solution.
[0102] Specifically, for any first object among the N first objects, after obtaining the first size information of the unoccupied area in the accommodating space and the second size information of the aforementioned first object, the training device determines whether the first object can be placed in the unoccupied area in the accommodating space; if the first object can be placed in the unoccupied area in the accommodating space, the training device obtains m placement positions where the first object can be placed in the unoccupied area of the accommodating space, and generates m candidate placement positions corresponding to the first object, where m is an integer greater than or equal to 1; if the first object cannot be placed in the unoccupied area in the accommodating space, the training device continues to obtain the next first object from the N first objects. The training device performs the aforementioned operation on each first object among the N first objects, and obtains M candidate placement positions corresponding to each first object of the N first objects. For a more intuitive understanding of this solution, please refer to Figure 8 , Figure 8 Two schematic diagrams of candidate placement positions in the training method of the model provided in an embodiment of the present application. Figure 8 It includes three sub-schematic diagrams (a), (b) and (c). Figure 8 The (a) sub-diagram represents the unoccupied area in the accommodation space. Figure 8 The (b) and (c) sub-schematic diagrams of the first object (i.e. Figure 8 B1) in the unoccupied area of the accommodation space has two different candidate placement locations, it should be understood that Figure 8 The examples are only for facilitating the understanding of this solution and are not intended to limit this solution.
[0103] 304. The training device generates M first scoring values corresponding to the M candidate placement positions one by one through a first machine learning model according to the first size information and the M candidate placement positions.
[0104] In an embodiment of the present application, after generating M candidate placement positions, the training device can score the degree of fit between each candidate placement position and the first size information through a first machine learning model to obtain M first scoring values corresponding one-to-one to the M candidate placement positions; wherein the first machine learning model can specifically adopt a neural network, or an algorithm other than a neural network. It should be noted that the scoring values generated by the execution device for different candidate placement positions through the first machine learning model can be the same, and the concept of "one-to-one correspondence" here means that the execution device will generate a first scoring value for each candidate placement position, that is, although the values of different first scoring values in the M first scoring values can be the same, each candidate placement position will clearly correspond to a first scoring value. For example, an array can be used to store the M first scoring values, and the array subscript can be used to distinguish each candidate placement position.
[0105] Specifically, in one implementation, the first machine learning model includes a first sub-model and a second sub-model. Step 304 may include: the training device inputs the first size information and the M candidate placement positions into the first sub-model, and obtains the M second score values output by the first sub-model that correspond one-to-one to the M candidate placement positions; it should be noted that the second score values generated by the execution device for different candidate placement positions through the first sub-model may be the same, and the aforementioned concept of "one-to-one correspondence" is that the execution device will generate a second score value for each candidate placement position through the first sub-model, that is, although the values of different second score values in the M second score values may be the same, each candidate placement position will correspond to a second score value.
[0106] The training device inputs N first volume values corresponding one-to-one to the N first objects into the second sub-model, and obtains N third scoring values corresponding one-to-one to the N first objects output by the second sub-model. Correspondingly, the third scoring values generated by the execution device for different first objects through the second sub-model can be the same. The aforementioned concept of "one-to-one correspondence" means that the execution device will generate a third scoring value for each first object through the second sub-model, that is, although the values of different third scoring values among the N third scoring values can be the same, each first object will correspond to a third scoring value.
[0107] The training device generates M first scoring values according to the M second scoring values, the N third scoring values and the first corresponding relationship (the specific meaning of the first corresponding relationship will be introduced later), and the first corresponding relationship is the corresponding relationship between the M second scoring values and the N third scoring values. Fig. 9 The specific implementation steps of this implementation method are described, and it should be understood that Fig. 9 This is only a specific example of this implementation and does not constitute a limitation to this implementation.
[0108] Among them, since a first object is composed of at least one second object, if the first object is composed of at least one second object with the same volume, the first volume can be the average volume of the at least one second object; if the first object is composed of at least two second objects with different volumes, the first volume can be any one of the following: the average volume of at least one second object, the volume of the largest second object among at least one second object, or the volume of the smallest second object among at least one second object.
[0109] The first sub-model is any one of the following neural networks: deep Q network (DQN), double deep Q network (DDQN), dueling deepQ network (Dueling DDQN) or nature deep Q network (Nature DQN); the second sub-model is a fully connected neural network. In the embodiment of the present application, a variety of specific implementations of the first sub-model are provided to improve the implementation flexibility of the present solution.
[0110] More specifically, for the process of generating a second score value for a candidate placement position. The first sub-model can be further split into a feature extraction network and a fully connected neural network. The training device inputs the first size information into the feature extraction network of the first sub-model to extract features of the first size information through the feature extraction network of the first sub-model to obtain first feature information. Among them, the first size information can be expressed as a three-dimensional tensor or a two-dimensional matrix; the aforementioned feature extraction network can be specifically expressed as a convolutional neural network or other types of neural networks; the first feature information can be specifically expressed as a state vector corresponding to the first size information, which can also be called a state vector of an unoccupied area of the accommodation space.
[0111] The training device inputs the first feature information and the M candidate placement positions into the fully connected neural network of the first sub-model, so as to connect the first feature information with each of the M candidate placement positions through the fully connected neural network of the first sub-model (that is, pair the first feature information with each candidate placement position) to generate M second scoring values. Each candidate placement position can be specifically represented as an action vector, that is, the training device connects the state vector (that is, the first feature information) with each of the M action vectors through the fully connected neural network of the first sub-model, and generates M second scoring values corresponding to the connected M state-action vectors, that is, the degree of adaptation of each action vector (that is, the candidate placement position) and the state vector (that is, the first size information of the unoccupied area) is scored.
[0112] Furthermore, in one implementation, the training device inputs M candidate placement positions into the fully connected neural network of the first sub-model M times, that is, the training device inputs the next candidate placement position into the fully connected neural network of the first sub-model only after generating a scoring value for one candidate placement position; in another implementation, the training device inputs all M candidate placement positions into the fully connected neural network of the first sub-model at one time, so as to generate a scoring value for each of the M candidate placement positions through the fully connected neural network of the first sub-model.
[0113] In an embodiment of the present application, feature extraction is performed on the first size information to obtain first feature information, and the first feature information is connected to each of the M candidate placement positions to obtain M connection pairs, and then the degree of adaptation of the first feature information to each candidate placement position can be scored, that is, M second scoring values corresponding to the M candidate placement positions are obtained, a specific implementation method for generating the second scoring value is provided, and the process of generating the second scoring value is refined, thereby improving the level of refined management of the present solution.
[0114] The training device generates M first scoring values according to M second scoring values, N third scoring values and the first corresponding relationship. Since the M second scoring values correspond to the M candidate placement positions one by one, referring to the description in the above step 303, it can be known that the M candidate placement positions correspond to at least one first object among the N first objects; the N third scoring values correspond to the N first objects one by one. Then the training device can generate the first corresponding relationship according to the second corresponding relationship and the third corresponding relationship, the second corresponding relationship is the corresponding relationship between the M candidate placement positions and at least one first object among the N first objects, and the third corresponding relationship is the corresponding relationship between the N third scoring values and the N first objects. According to the first corresponding relationship, the training device obtains at least one third scoring value corresponding to the target scoring value from the N third scoring values, and the target scoring value is any one of the M second scoring values; each of the at least one third scoring value corresponding to the target scoring value is subjected to a first calculation with the target scoring value to obtain a first scoring value, and the first calculation can be addition, subtraction, multiplication or other operations.
[0115] In an embodiment of the present application, after obtaining M second scoring values and N third scoring values, an addition operation is performed on the M second scoring values and the N third scoring values according to a first corresponding relationship between the M second scoring values and the N third scoring values to generate a final first scoring value, and a specific implementation scheme for generating the first scoring value is provided; the addition method is used to avoid negative values in the first scoring value, and compared with the multiplication method, an excessively high value in the first scoring value is avoided, so as to improve the fluency of the placement position selection process.
[0116] For a more intuitive understanding of this solution, please refer to Fig. 9 , Fig. 9A flow chart of generating M first scoring values in the training method of the model provided in the embodiment of the present application. C1. The training device inputs the first size information in the form of a two-dimensional matrix (that is, the size information of the unoccupied area of the accommodation space) into the feature extraction network of the first sub-model. C2. The training device extracts features from the first size information through the feature extraction network of the first sub-model, and outputs the first feature information in the form of a vector (also referred to as a state vector). C3. The training device generates M candidate placement positions based on the first size information and the second size information of each first object, each candidate placement position being specifically represented by a vector (also referred to as an action vector) for indicating that one of the N first objects is placed at a candidate placement position in the unoccupied area of the accommodation space. C4. The training device inputs the first feature information and the M candidate placement positions into the fully connected neural network of the first sub-model. C5. The training device connects the first feature information and each candidate placement position through the fully connected neural network, and generates M second scoring values corresponding to the M candidate placement positions one by one. C6. The training device inputs the N first volumes corresponding to the N first objects into the second sub-model to generate N third scoring values corresponding to the N first objects one by one through the second sub-model. C7. The training device performs an addition operation based on the M second scoring values, the N third scoring values, and the first corresponding relationship to generate M first scoring values, where the first corresponding relationship is the corresponding relationship between the M second scoring values and the N third scoring values. It should be understood that Fig. 9 The examples are only for facilitating the understanding of this solution and are not intended to limit this solution.
[0117] In the embodiment of the present application, not only is each candidate placement position scored according to the first size information and the M candidate placement positions, but also N third scoring values corresponding to the N first objects are generated according to the N first volumes corresponding to the N first objects, and then the final scoring value of each candidate placement position is obtained according to the N third scoring values and the M second scoring values, and each candidate placement position is scored in combination with more information to improve the accuracy of each generated scoring value, which is conducive to obtaining the most suitable placement position to improve the utilization rate of the storage space; and in the process of selecting the placement position through the first machine learning model, N first volume values corresponding to the N first objects are introduced, and the first volume value is related to at least one second object constituting the first object, which is conducive to the first machine learning model learning the order of placing objects according to the volume of the second object, such as first choosing to place objects with large volumes, and finally using small objects to fill, so that the container can be filled more fully, thereby improving the placement rate / loading rate of the storage space.
[0118] In another implementation, step 304 may include: the training device inputs the first size information and the M candidate placement positions into a first machine learning model, and directly obtains M first score values output by the first machine learning model that correspond one to one to the M candidate placement positions. The first machine learning model may be specifically represented by any of the following neural networks: a deep Q neural network, a deep double Q neural network, a competitive deep double Q neural network, or other types of neural networks, etc., which are not exhaustive here.
[0119] More specifically, the first machine learning model can be split into a feature extraction network and a fully connected neural network. The training device inputs the first size information into the feature extraction network of the first machine learning model to extract features of the first size information through the feature extraction network of the first machine learning model to obtain the first feature information. The training device inputs the first feature information and M candidate placement positions into the fully connected neural network of the first machine learning model to connect the first feature information to each of the M candidate placement positions (that is, to pair the first feature information with each candidate placement position) through the fully connected neural network of the first machine learning model to directly generate M first scoring values. The concept of the first feature information in this implementation is the same as that in the previous implementation, and you can refer to the above description, which will not be repeated here.
[0120] 305. The training device selects a first placement position from the M candidate placement positions according to the M first scoring values.
[0121] In some embodiments of the present application, after generating M first scoring values corresponding to M candidate placement positions, the training device will select a first placement position from the M candidate placement positions according to the M first scoring values, wherein the first placement position indicates selecting a determined first object (referred to as the third object for ease of distinction) from the N first objects, and placing the third object at a target position in an unoccupied area in the accommodation space. It should be noted that each of the M candidate placement positions includes the position information of the third object in the unoccupied area and the indication information of the third object, and if the first placement position is one of the M candidate placement positions, then the first placement position also includes the position information of the third object in the unoccupied area and the indication information of the third object. For the specific meaning of each candidate placement position, please refer to the description in the above step 303, which will not be repeated here.
[0122] Specifically, in one implementation, the training device may select a first placement position with the highest first score value from the M candidate placement positions. If there are at least two candidate placement positions with the highest and identical first score values, one candidate placement position is randomly selected from the aforementioned at least two candidate placement positions to be determined as the first placement position. In another implementation, the training device may randomly select a first placement position from the M candidate placement positions. In another implementation, the training device may obtain multiple candidate placement positions with first score values higher than a first threshold from the M candidate placement positions, and randomly select one candidate placement position from the aforementioned multiple candidate placement positions to be determined as the first placement position, and so on. The methods of selecting a first placement position from the M candidate placement positions are not exhaustively enumerated here.
[0123] After the training device selects a first placement position from M candidate placement positions, the first placement position can be specifically expressed as a vector, which includes the position information of the third object in the unoccupied area and the indication information of the third object. After obtaining the first placement position, the training device places the third object in the target position in the unoccupied area of the accommodating space based on the indication of the first placement position.
[0124] 306. The training device trains the first machine learning model according to the first loss function until a convergence condition is met.
[0125] In the embodiment of the present application, the training device calculates the function value of the first loss function and performs gradient derivation on the function value of the first loss function to reversely update the weight parameters of the first machine learning model to complete a training of the first machine learning model. The training device iteratively trains the first machine learning model until the convergence condition is met to obtain a mature first machine learning model.
[0126] Among them, the first loss function indicates the similarity between the maximum value of the M first score values and the fourth score value, and the fourth score value is the score value of a placement position selected from multiple candidate placement positions during the last training process. The first loss function can specifically use the mean square error between the maximum value of the M first score values and the fourth score value (that is, a calculation method of similarity), the variance between the maximum value of the M first score values and the fourth score value, or other types of loss functions. The convergence condition can be that the number of training times reaches a preset number of times, or the fluctuation value of the first loss function is less than or equal to a preset threshold.
[0127] Specifically, step 306 includes: the training device trains the first machine learning model using a reinforcement learning method according to the first loss function. Before calculating the first loss function, the training device also needs to calculate the first reward value, and generate a function value of the first loss function according to the first reward value, the score value of a placement position selected from multiple candidate placement positions in the last training process, and the maximum value of the M first score values generated in step 304.
[0128] Among them, in one implementation, the first reward value only includes local rewards, and the local reward is negatively correlated with the ratio of the volume of the wasted space generated after executing step 305 to the total volume of the accommodating space. The larger the ratio of the volume of the wasted space generated after executing step 305 to the total volume of the accommodating space, the smaller the value of the local reward, that is, the first reward value is negatively correlated with the ratio of the volume of the wasted space generated after the training device executes the first placement position to the total volume of the accommodating space.
[0129] Specifically, after executing step 305, the training device can obtain the size information of the unoccupied space after the accommodation space is updated. The training device determines the volume of the wasted space based on the size information of each of the remaining multiple first objects and the size information of the updated unoccupied space, and then calculates the first reward value, and then generates the function value of the first loss function based on the first reward value, and trains the first machine learning model. Then the training device can execute step 306 once each time after executing steps 301 to 305.
[0130] In another implementation, the first reward value is calculated based on the local reward and the global reward, which can be obtained by adding, multiplying, or subtracting the local reward and the global reward, etc., which is not limited in the embodiment of the present application. The concept of local reward is the same as in the previous implementation and is not introduced here. The global reward is negatively correlated with the ratio of the total occupied volume of the accommodation space to the volume of the accommodation space after the first training task is completed.
[0131] The training device needs to execute steps 302 to 305 multiple times before generating a global reward. In one case, after executing steps 302 to 305 multiple times, the training device executes step 306 multiple times at once to complete multiple iterative training of the first machine learning model. Specifically, although the same global reward can be shared in the same training task, the training device can obtain a first local reward when executing steps 302 to 305 for the first time, and can obtain a second local reward when executing steps 302 to 305 for the second time. The first local reward and the second local reward can be different, that is, when the training device executes steps 302 to 305 for different times, different function values corresponding to the first loss function can be obtained. Therefore, after executing steps 302 to 305 multiple times (that is, completing the first training task), the training device can obtain multiple function values of the first loss function. The training device can use the multiple function values to update the weight parameters of the first machine learning model multiple times, that is, train the first machine learning model multiple times.
[0132] In another case, after executing steps 302 to 305 multiple times, the training device can obtain multiple function values of the first loss function. The training device calculates the average of the multiple function values and uses the average to update the weight parameters of the first machine learning model to complete one training of the first machine learning model.
[0133] In another case, after executing steps 302 to 305 multiple times, the training device can obtain multiple function values of the first loss function. The training device obtains the maximum / minimum value among the multiple function values, and uses the maximum / minimum value to update the weight parameters of the first machine learning model to complete one training of the first machine learning model.
[0134] It should be noted that after obtaining multiple function values of the first loss function, the training device can also use other methods to train the first machine learning model, which are not exhaustive here.
[0135] To more intuitively understand the present solution, an example of the formula of the first machine learning model is disclosed below:
[0136] L(w)=E[(r t +γmaxQ(s′,a′,w)-Q(s,a,w)) 2 ];(1)
[0137] Among them, L(w) represents the first loss function, E[(r t +γmaxQ(s′,a′,w)-Q(s,a,w)) 2 ] represents the calculation (r t+γmaxQ(s′,a′,w)-Q(s,a,w)) 2 Expectations, r t Represents the first reward value, γ is a hyperparameter, maxQ(s′,a′,w) represents the maximum value of the M first score values generated in this training process, Q(s,a,w) represents the score value of a placement position selected from multiple candidate placement positions in the previous training process. It should be understood that the example in formula (1) is only for the convenience of understanding this scheme and is not used to limit this scheme. The first loss function can also take other forms.
[0138] r t =lr t +gr t ; (2)
[0139]
[0140]
[0141] Among them, r t represents the first reward value in formula (1), lr t represents local reward, gr t represents the global reward. In formula (2), the first reward value is obtained by adding the local reward and the global reward. t represents the volume of wasted space in the accommodation space after the training device executes steps 302 to 305 once (i.e., after the placement is executed once), L represents the length of the accommodation space, W represents the width of the accommodation space, H represents the height of the accommodation space, and L·W·H represents the volume of the accommodation space. su represents the volume of the occupied space in the accommodation space after executing a first training task, τ represents a hyperparameter, and it should be understood that the examples in equations (2) to (4) are only for the convenience of understanding the present solution and are not used to limit the present solution.
[0142] In an embodiment of the present application, a training process of a first machine learning model is provided, which improves the completeness of the present solution; the trained first machine learning model can be used to automatically generate placement positions, avoiding over-reliance on the experience of technicians; and multiple candidate placement positions are first generated based on the size information of the unoccupied area and the size information of multiple objects to be placed, and then each of the multiple candidate placement positions is scored based on the size information of the unoccupied area through a mature first machine learning model, and a placement position is selected from the multiple candidate placement positions based on the score value of each candidate placement position, that is, the size information of the accommodating space and the size information of each object are fully considered in the selection process of each placement position, which is conducive to improving the utilization rate of the accommodating space.
[0143] 2. Reasoning Stage
[0144] For details, please refer to Fig.10 , Fig.10 A flow chart of a data processing method provided in an embodiment of the present application, the method may include:
[0145] 1001. Execute a device to obtain a first task.
[0146] In an embodiment of the present application, the execution device needs to obtain the original task, which may be a placement task for multiple storage spaces or a placement task for a single storage space (also referred to as a single-box placement task). If the original task is a placement task for multiple storage spaces (also referred to as a multi-box placement task), the execution device may convert the original task into multiple single-box placement tasks, and then determine the single-box placement task as a first task; if the original task is a single-box placement task, the execution device may directly determine the original task as a first task.
[0147] The first task instructs to place multiple second objects (also referred to as initial objects to be placed) in the accommodation space. The first task includes identification information of each second object in the multiple second objects, size information of each second object, and size information of the entire accommodation space. The concept of the first task is similar to that of the first training task. The specific form of the first task can be found in Figure 3 The description in the corresponding embodiment is not repeated here.
[0148] Specifically, in one implementation, the execution device may be configured with a display screen, through which the user may directly input the size value of each second object and the size value of the accommodation space. In another implementation, the execution device may obtain a text document describing the first task, and identify the first task from the text document describing the first task, wherein the text document describing the first task carries the size information of each second object and the size information of the accommodation space. In another implementation, the execution device may also obtain an image of each second object and an image of the accommodation space, and the execution device may identify the size information of each second object and the size information of the accommodation space by itself, etc. The manners in which the execution device obtains the first task are not exhaustively enumerated herein.
[0149] 1002. The execution device obtains first size information and N second size information, where the first size information indicates the size of an unoccupied area in the accommodation space, and the second size information indicates the size of the first object.
[0150] 1003. The execution device generates M candidate placement positions according to the first size information and the N second size information.
[0151] 1004. The execution device generates M first scoring values corresponding to the M candidate placement positions one by one through a first machine learning model according to the first size information and the M candidate placement positions.
[0152] In the embodiment of the present application, the specific implementation of steps 1002 to 1005 can be found in Figure 3 In the description of steps 302 to 304 in the corresponding embodiment, the concepts of the first size information, the second size information, the candidate placement position, the first machine learning model, and the first scoring value can all be referred to in the above Figure 3 The description in the corresponding embodiment is not repeated here.
[0153] It should be noted that the scoring values generated by the execution device for different candidate placement positions through the first machine learning model can be the same. The concept of "one-to-one correspondence" here means that the execution device will generate a first scoring value for each candidate placement position. That is, although the values of different first scoring values in the M first scoring values can be the same, each candidate placement position will clearly correspond to a first scoring value.
[0154] 1005. The execution device selects a first placement position from M candidate placement positions according to the M first scoring values.
[0155] In an embodiment of the present application, after the execution device generates M first scoring values corresponding one-to-one to the M candidate placement positions, it will select a first placement position from the M candidate placement positions based on the M first scoring values, wherein the higher the first scoring value corresponding to the first placement position, the greater the probability that the first placement position will be selected.
[0156] Specifically, the execution device can select a first placement position with the highest first score value from the M candidate placement positions. If there are at least two candidate placement positions with the highest and identical first scores, one candidate placement position is selected from the at least two candidate placement positions to be determined as the first placement position.
[0157] Furthermore, in some application scenarios, if the execution device is a robot for transporting, the robot is equipped with a robotic arm, or the execution device is a robotic arm. After selecting the first placement position, the execution device places a third object determined among the N first objects at the target position in the unoccupied area of the accommodation space through the robotic arm based on the indication of the first placement position, and re-enters step 1102 to generate the next placement position. It should be noted that each of the M candidate placement positions includes position information of a determined first object in the unoccupied area and indication information of the determined first object, and the first placement position is one of the M candidate placement positions, then the first placement position also includes position information of the third object in the unoccupied area and indication information of the third object. For the specific meaning of each candidate placement position, please refer to the above. Figure 3 The description in the corresponding embodiment is not repeated here.
[0158] In other application scenarios, the execution device may execute steps 302 to 305 multiple times to complete the first task, that is, after determining the stacking method of multiple first objects and the positions of multiple first objects in the storage space, it may output placement instruction information. The execution device may also output placement instruction information once each time it executes steps 302 to 305. Furthermore, the execution device may output the placement instruction information in such a way that the execution device displays the placement instruction information to the user so that the user places the N first objects in the storage space according to the placement instruction information; wherein the placement instruction information indicates the position of each first object in the storage space in the first task, and the placement instruction information may be specifically expressed in the form of a stereogram or in the form of text data, etc., which are not exhaustively listed this time. Alternatively, the execution device sends the placement instruction information to other execution devices to instruct other execution devices to place the N first objects in the storage space, which may be specifically expressed as a placement robot to other execution devices.
[0159] For a more intuitive understanding of this solution, please refer to Fig.11 , Fig.11 A schematic diagram of placement indication information in a method for obtaining a placement position provided in an embodiment of the present application. Fig.11 Take the carriage as an example, Fig.11 The placement positions of multiple second objects are shown in FIG. 1 . In actual situations, the execution device may use different colors to distinguish second objects of different sizes, that is, a second object of one size corresponds to only one color. It should be noted that, in actual situations, the execution device may show placement schematic diagrams at multiple angles. Fig.11 This is only an example and is not intended to limit this solution.
[0160] In an embodiment of the present application, the first machine learning model can be used to automatically generate placement positions end-to-end, avoiding over-reliance on the experience of technical personnel; and first generate multiple candidate placement positions based on the size information of the unoccupied area and the size information of multiple objects to be placed, and then use the first machine learning model to score each of the multiple candidate placement positions based on the size information of the unoccupied area, and select a placement position from the multiple candidate placement positions based on the score value of each candidate placement position, that is, the size information of the accommodation space and the size information of each object are fully considered in the selection process of each placement position, which is conducive to improving the utilization rate of the accommodation space.
[0161] In order to more intuitively understand the beneficial effects of this solution, the following is a description of the beneficial effects of the embodiment of this application in combination with data. The test data set is 145 packing orders, and the following is a description of the beneficial effects of the embodiment of this application in combination with a table.
[0162] Adoption Method Number of containers in multi-container placement Placement rate / loading rate in single box placement First Fit 803 83.54% Best Fit 817 78.31% Embodiments of the present application 770 89.42%
[0163] Table 1
[0164] Among them, First Fit and Best Fit are two technologies for solving the packing problem in the form of construction methods. Referring to Table 1, in the multi-box placement / loading problem, the placement position acquisition method provided in the embodiment of the present application can reduce the number of containers required; and in the single-box placement problem, the placement position acquisition method provided in the embodiment of the present application can improve the placement rate / loading rate in the single-box placement, and the placement rate / loading rate refers to the ratio between the volume of the occupied area of a single container and the total volume of the container.
[0165] Continuing to refer to the following Table 2, Table 2 shows a method for obtaining a placement position provided by an embodiment of the present application, that is, generating M candidate placement positions and scoring each candidate placement position to select a certain placement position; and directly scoring the N first objects through a machine learning model to select a certain object to be placed from the N first objects for comparison.
[0166] The neural network used Score the first object Scoring candidate placements DQN 85.79 87.11 DDQ 86.64 89.42 Dueling DDQN 86.04 88.91
[0167] Table 2
[0168] Among them, the data in Table 2 indicates the placement rate / loading rate of a single container in the single-box placement problem. By comparing the second column and the third column in Table 2, it can be seen that the placement position acquisition method provided in the embodiment of the present application (i.e., scoring the candidate placement positions) can improve the placement rate / loading rate of the single-box placement.
[0169] exist Figures 1 to 11 On the basis of the corresponding embodiments, in order to better implement the above solutions of the embodiments of the present application, the following also provides related devices for implementing the above solutions. Fig.12 , Fig.12 A structural schematic diagram of a placement position acquisition device provided in an embodiment of the present application. The placement position acquisition device 1200 includes an acquisition module 1201, a generation module 1202, and a selection module 1203. The acquisition module 1201 is used to acquire first size information and N second size information, the first size information indicating the size of the unoccupied area in the accommodation space, and N is an integer greater than or equal to 1; the generation module 1202 is used to generate M candidate placement positions according to the first size information and the N second size information, one of the M candidate placement positions indicates a placement position of the target object in the unoccupied area, the target object is one of the N first objects, and M is an integer greater than or equal to 1; the generation module 1202 is also used to generate M first score values corresponding to the M candidate placement positions one by one through a first machine learning model according to the first size information and the M candidate placement positions; the selection module 1203 is used to select a first placement position from the M candidate placement positions according to the M first score values.
[0170] In one possible design, the first size information is a two-dimensional matrix; the number of rows of the two-dimensional matrix indicates the first size of the bottom surface of the accommodating space, and the number of columns of the two-dimensional matrix indicates the second size of the bottom surface of the accommodating space. If the first size is length, the second size is width, or, if the first size is width, the second size is length; the bottom surface of the accommodating space is divided into multiple first areas, and there is no intersection between different first areas. The two-dimensional matrix includes multiple matrix values corresponding one-to-one to the multiple first areas, and each matrix value indicates the remaining space in the height direction of one of the multiple first areas.
[0171] In one possible design, the first machine learning model includes a first sub-model and a second sub-model, and the generation module 1202 is specifically used to: input the first size information and M candidate placement positions into the first sub-model to obtain M second scoring values output by the first sub-model that correspond one-to-one to the M candidate placement positions; input N first volume values corresponding one-to-one to N first objects into the second sub-model to obtain N third scoring values output by the second sub-model that correspond one-to-one to the N first objects, wherein a first object is composed of at least one second object, and the first volume is any one of the following: the average volume of at least one second object, the volume of the largest second object among at least one second object, or the volume of the smallest second object among at least one second object; generate M first scoring values according to the M second scoring values, the N third scoring values, and the first corresponding relationship, and the first corresponding relationship is the corresponding relationship between the M second scoring values and the N third scoring values.
[0172] In one possible design, the generation module 1202 is specifically used to: obtain at least one third scoring value corresponding to the target scoring value from the N third scoring values according to the first corresponding relationship, where the target scoring value is any one of the M second scoring values; and add each third scoring value in the at least one third scoring value corresponding to the target scoring value to the target scoring value to obtain a first scoring value.
[0173] In one possible design, the generation module 1202 is specifically used to extract features of the first size information through the first sub-model to obtain first feature information, and connect the first feature information with each of the M candidate placement positions through the first sub-model to generate M second scoring values.
[0174] In one possible design, the first sub-model is any one of the following neural networks: a deep Q neural network, a deep double Q neural network, a competitive deep double Q neural network, or a natural deep Q neural network; and the second sub-model is a fully connected neural network.
[0175] It should be noted that the information interaction, execution process, etc. between the modules / units in the placement position acquisition device 1200 are the same as those in the present application. Figure 10 to Figure 11 The corresponding method embodiments are based on the same concept. For specific contents, please refer to the description in the method embodiments shown above in this application, which will not be repeated here.
[0176] The present application also provides a model training device, see Fig.13 , Fig.13A schematic diagram of a structure of a model training device provided in an embodiment of the present application. The model training device 1300 includes an acquisition module 1301, a generation module 1302 and a training module 1303. The acquisition module 1301 is used to acquire first size information and N second size information, the first size information indicates the size of the unoccupied area in the accommodating space, N is an integer greater than or equal to 1, and the second size information indicates the size of the first object; the generation module 1302 is used to generate M candidate placement positions according to the first size information and the N second size information, one placement position among the M candidate placement positions indicates a placement position of the target object in the unoccupied area, the target object is one of the N first objects, and M is an integer greater than or equal to 1; the generation module 1302 is also used to generate M first scoring values corresponding to the M candidate placement positions one by one through a first machine learning model according to the first size information and the M candidate placement positions; the training module 1303 is used to train the first machine learning model according to a first loss function until a convergence condition is met, the first loss function indicates the similarity between the maximum value of the M first scoring values and a fourth scoring value, and the fourth scoring value is a scoring value of a placement position selected from multiple candidate placement positions during the previous training process.
[0177] In one possible design, the first size information is a two-dimensional matrix; the number of rows of the two-dimensional matrix indicates the first size of the bottom surface of the accommodating space, and the number of columns of the two-dimensional matrix indicates the second size of the bottom surface of the accommodating space. If the first size is length, the second size is width, or, if the first size is width, the second size is length; the bottom surface of the accommodating space is divided into multiple first areas, and there is no intersection between different first areas. The two-dimensional matrix includes multiple matrix values corresponding one-to-one to the multiple first areas, and each matrix value indicates the remaining space in the height direction of one of the multiple first areas.
[0178] In one possible design, the first machine learning model includes a first sub-model and a second sub-model, and a generation module 1302 is specifically used to: input the first size information and M candidate placement positions into the first sub-model to obtain M second scoring values output by the first sub-model that correspond one-to-one to the M candidate placement positions; input N first volume values corresponding one-to-one to N first objects into the second sub-model to obtain N third scoring values output by the second sub-model that correspond one-to-one to the N first objects, wherein a first object is composed of at least one second object, and the first volume is any one of the following: the average volume of at least one second object, the volume of the largest second object among at least one second object, or the volume of the smallest second object among at least one second object; generate M first scoring values according to the M second scoring values, the N third scoring values, and the first corresponding relationship, and the first corresponding relationship is the corresponding relationship between the M second scoring values and the N third scoring values.
[0179] It should be noted that the information interaction, execution process, etc. between the modules / units in the model training device 1300 are the same as those in the present application. Figures 3 to 9 The corresponding method embodiments are based on the same concept. For specific contents, please refer to the description in the method embodiments shown above in this application, which will not be repeated here.
[0180] The present application also provides a training device. Fig.14 , Fig.14 A schematic diagram of a structure of a training device provided in an embodiment of the present application. The training device 1400 may be deployed with Fig.13 The training device 1300 of the model described in the corresponding embodiment is used to implement Figures 3 to 9 Functions of the training device in the corresponding embodiment. Specifically, the training device 1400 may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPU) 1422 (for example, one or more processors) and memory 1432, one or more storage media 1430 (for example, one or more mass storage devices) storing application programs 1442 or data 1444. Among them, the memory 1432 and the storage medium 1430 can be short-term storage or permanent storage. In one embodiment, the memory 1432 is a random access memory (RAM), which can directly exchange data with the central processor 1422, and is used to load data 1444 and application programs 1442 and / or operating system 1441 for direct operation and use by the central processor 1422, usually as a temporary data storage medium for the operating system or other running programs. The program stored in the storage medium 1430 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the training device. Furthermore, the central processor 1422 can be configured to communicate with the storage medium 1430 and execute a series of instruction operations in the storage medium 1430 on the training device 1400.
[0181] The training device 1400 may also include one or more power supplies 1426, one or more wired or wireless network interfaces 1450, one or more input and output interfaces 1458, and / or, one or more operating systems 1441, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.
[0182] In one embodiment of the present application, the CPU 1422 is used to execute Figures 3 to 9The training method of the model executed by the training device in the corresponding embodiment, specifically, the training of the machine learning model includes multiple rounds of iterations, and in one round of iterations of the multiple rounds of iterations, the central processor 1422 is specifically used to:
[0183] Acquire first size information and N second size information, the first size information indicating the size of an unoccupied area in the accommodation space, N being an integer greater than or equal to 1, and the second size information indicating the size of the first object;
[0184] Generate M candidate placement positions according to the first size information and the N second size information, where one placement position among the M candidate placement positions indicates a placement position of the target object in the unoccupied area, the target object is one of the N first objects, and M is an integer greater than or equal to 1;
[0185] Generate, according to the first size information and the M candidate placement positions, M first scoring values corresponding to the M candidate placement positions one by one through a first machine learning model;
[0186] The first machine learning model is trained according to a first loss function, wherein the first loss function indicates the similarity between a maximum value among the M first scoring values and a fourth scoring value, wherein the fourth scoring value is a scoring value of a placement position selected from multiple candidate placement positions during a previous training process.
[0187] It should be noted that the CPU 1422 is also used to execute Figures 3 to 9 The other steps performed by the training device are performed by the central processor 1422 Figures 3 to 9 The specific implementation methods and beneficial effects of the steps performed by the training device in the corresponding embodiment can be referred to in Figures 3 to 9 The descriptions in the corresponding method embodiments will not be repeated here one by one.
[0188] The present application also provides an execution device. Fig.15 , Fig.15 A schematic diagram of the structure of an execution device provided in an embodiment of the present application. The execution device 1500 may be deployed with Fig.12 The placement position acquisition device 1200 described in the corresponding embodiment is used to implement Figure 10 to Figure 11 The functions of the execution device in the corresponding embodiment. Specifically, the execution device 1500 includes: a receiver 1501, a transmitter 1502, a processor 1503 and a memory 1504 (wherein the number of the processor 1503 in the execution device 1500 can be one or more, Fig.15In the example of FIG. 1501 , the processor 1503 may include an application processor 15031 and a communication processor 15032. In some embodiments of the present application, the receiver 1501, the transmitter 1502, the processor 1503 and the memory 1504 may be connected via a bus or other means.
[0189] The memory 1504 may include a read-only memory and a random access memory, and provides instructions and data to the processor 1503. A portion of the memory 1504 may also include a non-volatile random access memory (NVRAM). The memory 1504 stores processor and operation instructions, executable modules or data structures, or subsets thereof, or extended sets thereof, wherein the operation instructions may include various operation instructions for implementing various operations.
[0190] The processor 1503 controls the operation of the execution device. In a specific application, the various components of the execution device are coupled together through a bus system, wherein the bus system includes not only a data bus but also a power bus, a control bus, and a status signal bus, etc. However, for the sake of clarity, various buses are referred to as bus systems in the figure.
[0191] The method disclosed in the above embodiment of the present application can be applied to the processor 1503, or implemented by the processor 1503. The processor 1503 can be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 1503. The above processor 1503 can be a general processor, a digital signal processor (digital signal processing, DSP), a microprocessor or a microcontroller, and can further include an application specific integrated circuit (application specific integrated circuit, ASIC), a field programmable gate array (field-programmable gate array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The processor 1503 can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiments of the present application. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to execute, or the hardware and software modules in the decoding processor can be combined and executed. The software module may be located in a storage medium mature in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 1504, and the processor 1503 reads the information in the memory 1504 and completes the steps of the above method in combination with its hardware.
[0192] The receiver 1501 can be used to receive input digital or character information and generate signal input related to the relevant settings and function control of the execution device. The transmitter 1502 can be used to output digital or character information through the interface; the transmitter 1502 can also be used to send instructions to the disk group through the above interface to modify the data in the disk group; the transmitter 1502 can also include a display device such as a display screen.
[0193] In one embodiment of the present application, the application processor 15031 is used to execute Fig.10 or Fig.11 In the training method of the model executed by the execution device in the corresponding embodiment, specifically, the application processor 15031 is specifically used for:
[0194] Acquire first size information and N second size information, the first size information indicating the size of an unoccupied area in the accommodation space, N being an integer greater than or equal to 1, and the second size information indicating the size of the first object;
[0195] Generate M candidate placement positions according to the first size information and the N second size information, where one of the M candidate placement positions indicates a placement position of the target object in the unoccupied area, the target object is one of the N first objects, and M is an integer greater than or equal to 1;
[0196] Generate, by using a first machine learning model, M first scoring values corresponding to the M candidate placement positions one by one according to the first size information and the M candidate placement positions;
[0197] According to the M first scoring values, a first placement position is selected from the M candidate placement positions.
[0198] It should be noted that the application processor 15031 is also used to execute Figures 3 to 9 Other functions executed by the corresponding embodiment of the execution device. Figures 3 to 9 For the specific implementation methods and beneficial effects of the functions of the execution device in the corresponding embodiments, please refer to Figures 3 to 9 The descriptions in the corresponding method embodiments will not be repeated here one by one.
[0199] Optionally, in some application scenarios, the execution device 1500 may be a robot for transporting, the robot being equipped with a mechanical arm, or the execution device 1500 is a mechanical arm, etc., which is not limited here. Based on the indication of the first placement position, the execution device 1500 selects a third object from the N first objects through the mechanical arm, and places the third object in the unoccupied space.
[0200] In some other application scenarios, the execution device 1500 may also output placement indication information through the above interface, where the placement indication information is used to indicate the placement position of the first object in the accommodation space.
[0201] The present application also provides a computer-readable storage medium in which a program is stored. When the program is run on a computer, the computer executes the above-mentioned Figures 3 to 9 The steps performed by the training device in the method described in the embodiment shown; or, causing the computer to perform the steps as described above Figure 10 to Figure 11 The illustrated embodiment describes the steps performed by the device in the method.
[0202] The present application also provides a computer program product which, when executed on a computer, enables the computer to execute the above Figures 3 to 9 The steps performed by the training device in the method described in the embodiment shown; or, causing the computer to perform the steps as described above Figure 10 to Figure 11 The illustrated embodiment describes the steps performed by the device in the method.
[0203] The present application also provides a circuit system, which includes a processing circuit, wherein the processing circuit is configured to perform the above Figures 3 to 9 The steps performed by the training device in the method described in the embodiment shown, or the processing circuit is configured to perform the above Figure 10 to Figure 11 The illustrated embodiment describes the steps performed by the device in the method.
[0204] The execution device and training device provided in the embodiment of the present application may be specifically a chip, and the chip includes: a processing unit and a communication unit, the processing unit may be, for example, a processor, and the communication unit may be, for example, an input / output interface, a pin or a circuit. The processing unit may execute the computer execution instructions stored in the storage unit to enable the chip to execute the above Figures 3 to 9 The method of training the model described in the embodiment shown, or to enable the chip to perform the above Figure 10 to Figure 11 The method for obtaining the placement position described in the illustrated embodiment. Optionally, the storage unit is a storage unit in the chip, such as a register, a cache, etc. The storage unit may also be a storage unit located outside the chip in the wireless access device, such as a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM), etc.
[0205] For details, please refer to Fig.16 , Fig.16 A schematic diagram of the structure of a chip provided in an embodiment of the present application, the chip can be expressed as a neural network processor NPU 160, NPU 160 is mounted on the host CPU (Host CPU) as a coprocessor, and the host CPU assigns tasks. The core part of the NPU is the operation circuit 1603, which is controlled by the controller 1604 to extract matrix data from the memory and perform multiplication operations.
[0206] In some implementations, the operation circuit 1603 includes multiple processing units (Process Engine, PE) inside. In some implementations, the operation circuit 1603 is a two-dimensional systolic array. The operation circuit 1603 can also be a one-dimensional systolic array or other electronic circuits capable of performing mathematical operations such as multiplication and addition. In some implementations, the operation circuit 1603 is a general-purpose matrix processor.
[0207] For example, assume there is an input matrix A, a weight matrix B, and an output matrix C. The operation circuit takes the corresponding data of matrix B from the weight memory 1602 and caches it on each PE in the operation circuit. The operation circuit takes the matrix A data from the input memory 1601 and performs matrix operation with matrix B, and the partial result or final result of the matrix is stored in the accumulator 1608.
[0208] The unified memory 1606 is used to store input data and output data. The weight data is directly transferred to the weight memory 1602 through the direct memory access controller (DMAC) 1605. The input data is also transferred to the unified memory 1606 through the DMAC.
[0209] The bus interface unit 1610 (Bus Interface Unit, BIU for short) is used for the instruction fetch memory 1609 to obtain instructions from the external memory, and is also used for the storage unit access controller 1605 to obtain the original data of the input matrix A or the weight matrix B from the external memory.
[0210] DMAC is mainly used to transfer input data in the external memory DDR to the unified memory 1606 or to transfer weight data to the weight memory 1602 or to transfer input data to the input memory 1601.
[0211] The vector calculation unit 1607 includes multiple operation processing units, and further processes the output of the operation circuit when necessary, such as vector multiplication, vector addition, exponential operation, logarithmic operation, size comparison, etc. It is mainly used for non-convolutional / fully connected layer network calculations in neural networks, such as Batch Normalization, pixel-level summation, upsampling of feature planes, etc.
[0212] In some implementations, the vector calculation unit 1607 can store the processed output vector to the unified memory 1606. For example, the vector calculation unit 1607 can apply a linear function and / or a nonlinear function to the output of the operation circuit 1603, such as linear interpolation of the feature plane extracted by the convolution layer, and then, for example, a vector of accumulated values to generate an activation value. In some implementations, the vector calculation unit 1607 generates a normalized value, a pixel-level summed value, or both. In some implementations, the processed output vector can be used as an activation input to the operation circuit 1603, for example, for use in a subsequent layer in a neural network.
[0213] The controller 1604 is connected to an instruction fetch buffer 1609, which is used to store instructions used by the controller 1604; the unified memory 1606, the input memory 1601, the weight memory 1602 and the instruction fetch buffer 1609 are all on-chip memories. The external memory is private to the NPU hardware architecture.
[0214] Among them, the operations of each layer in the recurrent neural network can be performed by the operation circuit 1603 or the vector calculation unit 1607.
[0215] The processor mentioned in any of the above places may be a general-purpose central processing unit, a microprocessor, an ASIC, or one or more integrated circuits for controlling the execution of the program of the above-mentioned first aspect method.
[0216] It should also be noted that the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the drawings of the device embodiments provided by the present application, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines.
[0217] Through the description of the above implementation methods, the technical personnel in the relevant field can clearly understand that the present application can be implemented by pure software or software plus necessary general hardware, and of course it can also be implemented by dedicated hardware including dedicated integrated circuits, dedicated CLUs, dedicated memories, dedicated components, etc. In general, all functions performed by computer programs can be easily implemented with corresponding hardware, and the specific hardware structures used to implement the same function can also be various, such as analog circuits, digital circuits or dedicated circuits. However, for this application, software program implementation is a better implementation method in more cases. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product is stored in a readable storage medium, such as a computer floppy disk, U disk, mobile hard disk, ROM, RAM, disk or optical disk, etc., including several instructions to enable a computer device (which can be a personal computer, training equipment, or network equipment, etc.) to execute the methods described in each embodiment of the present application. In addition, the computer software product can also be embodied in the form of a control, a driver, an independent or downloadable software object, etc.
[0218] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product.
[0219] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website site, a computer, a training device, or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, training device, or data center. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device, a data center, etc. that includes one or more available media integrations. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)), etc.
Claims
1. A method for obtaining a placement position, It is characterized in that The method comprises: Acquire first size information and N second size information, wherein the first size information is used to indicate the size of an unoccupied area in the accommodation space, N is an integer greater than or equal to 1, and the second size information is used to indicate the size of the first object; the first size information is a two-dimensional matrix; Generate M candidate placement positions according to the first size information and the N second size information, wherein one candidate placement position among the M candidate placement positions is used to indicate a placement position of a target object in the unoccupied area, the target object is one of the N first objects, and M is an integer greater than or equal to 1; According to the first size information and the M candidate placement positions, generate M first scoring values corresponding to the M candidate placement positions one-to-one through a first machine learning model, the M first scoring values are generated through M second scoring values, N third scoring values, and a first corresponding relationship, the first corresponding relationship is a corresponding relationship between the M second scoring values and the N third scoring values, the second scoring value is obtained by scoring the degree of adaptation of the M candidate placement positions to the first size information, and the N third scoring values correspond to the N first objects one-to-one; A first placement position is selected from the M candidate placement positions according to the M first scoring values.
2. The method according to claim 1, It is characterized in that The number of rows of the two-dimensional matrix indicates a first size of the bottom surface of the accommodating space, and the number of columns of the two-dimensional matrix indicates a second size of the bottom surface of the accommodating space. If the first size is length, the second size is width, or if the first size is width, the second size is length; The bottom surface of the accommodating space is divided into a plurality of first areas, and there is no intersection between different first areas. The two-dimensional matrix includes a plurality of matrix values corresponding one-to-one to the plurality of first areas, and each matrix value indicates a remaining space in a height direction of a first area among the plurality of first areas.
3. The method according to claim 1 or 2, It is characterized in that The first machine learning model includes a first sub-model and a second sub-model, and generating, according to the first size information and the M candidate placement positions, M first scoring values corresponding to the M candidate placement positions one by one through the first machine learning model, includes: Inputting the first size information and the M candidate placement positions into the first sub-model, obtaining M second scoring values output by the first sub-model and corresponding to the M candidate placement positions one by one; Inputting N first volume values corresponding to the N first objects one by one into the second sub-model, obtaining N third score values corresponding to the N first objects output by the second sub-model, wherein one first object is composed of at least one second object, and the first volume is any one of the following: an average volume of the at least one second object, a volume of the largest second object among the at least one second object, or a volume of the smallest second object among the at least one second object; The M first scoring values are generated according to the M second scoring values, the N third scoring values, and a first corresponding relationship, where the first corresponding relationship is a corresponding relationship between the M second scoring values and the N third scoring values.
4. The method according to claim 3, It is characterized in that The generating the M first scoring values according to the M second scoring values, the N third scoring values and the first corresponding relationship comprises: According to the first corresponding relationship, obtaining at least one third scoring value corresponding to a target scoring value from the N third scoring values, wherein the target scoring value is any one of the M second scoring values; Each third score value of the at least one third score value corresponding to the target score value is added to the target score value to obtain the first score value.
5. The method according to claim 3, It is characterized in that The step of inputting the first size information and the M candidate placement positions into the first sub-model to obtain M second scoring values output by the first sub-model and corresponding to the M candidate placement positions one by one includes: The first size information is feature extracted through the first sub-model to obtain first feature information, and the first feature information is respectively connected with each of the M candidate placement positions through the first sub-model to generate the M second scoring values.
6. The method according to claim 3, It is characterized in that The first sub-model is any one of the following neural networks: a deep Q neural network, a deep double Q neural network, a competitive deep double Q neural network or a natural deep Q neural network; the second sub-model is a fully connected neural network.
7. A model training method, It is characterized in that The method comprises: Acquire first size information and N second size information, wherein the first size information is used to indicate the size of an unoccupied area in the accommodation space, N is an integer greater than or equal to 1, and the second size information is used to indicate the size of the first object; the first size information is a two-dimensional matrix; Generate M candidate placement positions according to the first size information and the N second size information, wherein one placement position among the M candidate placement positions indicates a placement position of a target object in the unoccupied area, the target object is one of the N first objects, and M is an integer greater than or equal to 1; According to the first size information and the M candidate placement positions, generating M first scoring values corresponding to the M candidate placement positions one-to-one through a first machine learning model, the M first scoring values being generated through M second scoring values, N third scoring values, and a first corresponding relationship, the first corresponding relationship being a corresponding relationship between the M second scoring values and the N third scoring values, the second scoring value being obtained by scoring the degree of adaptation of the M candidate placement positions to the first size information, and the N third scoring values corresponding to the N first objects one-to-one; The first machine learning model is trained according to a first loss function until a convergence condition is met, wherein the first loss function indicates the similarity between a maximum value among the M first scoring values and a fourth scoring value, wherein the fourth scoring value is a scoring value of a placement position selected from multiple candidate placement positions during a previous training process.
8. The method according to claim 7, It is characterized in that The number of rows of the two-dimensional matrix indicates a first size of the bottom surface of the accommodating space, and the number of columns of the two-dimensional matrix indicates a second size of the bottom surface of the accommodating space. If the first size is length, the second size is width, or if the first size is width, the second size is length; The bottom surface of the accommodating space is divided into a plurality of first areas, and there is no intersection between different first areas. The two-dimensional matrix includes a plurality of matrix values corresponding one-to-one to the plurality of first areas, and each matrix value indicates a remaining space in a height direction of a first area among the plurality of first areas.
9. The method according to claim 7 or 8, It is characterized in that The first machine learning model includes a first sub-model and a second sub-model, and generating, according to the first size information and the M candidate placement positions, M first scoring values corresponding to the M candidate placement positions one by one through the first machine learning model, includes: Inputting the first size information and the M candidate placement positions into the first sub-model, obtaining M second scoring values output by the first sub-model and corresponding to the M candidate placement positions one by one; Inputting N first volume values corresponding to the N first objects one by one into the second sub-model, obtaining N third score values corresponding to the N first objects output by the second sub-model, wherein one first object is composed of at least one second object, and the first volume is any one of the following: an average volume of the at least one second object, a volume of the largest second object among the at least one second object, or a volume of the smallest second object among the at least one second object; The M first scoring values are generated according to the M second scoring values, the N third scoring values, and a first corresponding relationship, where the first corresponding relationship is a corresponding relationship between the M second scoring values and the N third scoring values.
10. A device for obtaining a placement position, It is characterized in that The device comprises: an acquisition module, used to acquire first size information and N second size information, wherein the first size information is used to indicate the size of an unoccupied area in the accommodation space, N is an integer greater than or equal to 1, and the second size information is used to indicate the size of the first object; the first size information is a two-dimensional matrix; a generating module, configured to generate M candidate placement positions according to the first size information and the N second size information, wherein one of the M candidate placement positions indicates a placement position of a target object in the unoccupied area, the target object is one of the N first objects, and M is an integer greater than or equal to 1; The generating module is further configured to generate, according to the first size information and the M candidate placement positions, M first scoring values corresponding one-to-one to the M candidate placement positions through a first machine learning model, the M first scoring values being generated through M second scoring values, N third scoring values, and a first corresponding relationship, the first corresponding relationship being a corresponding relationship between the M second scoring values and the N third scoring values, the second scoring value being obtained by scoring the degree of adaptation of the M candidate placement positions to the first size information, and the N third scoring values corresponding one-to-one to the N first objects; A selection module is used to select a first placement position from the M candidate placement positions according to the M first scoring values.
11. The device according to claim 10, It is characterized in that The number of rows of the two-dimensional matrix indicates a first size of the bottom surface of the accommodating space, and the number of columns of the two-dimensional matrix indicates a second size of the bottom surface of the accommodating space. If the first size is length, the second size is width, or if the first size is width, the second size is length; The bottom surface of the accommodating space is divided into a plurality of first areas, and there is no intersection between different first areas. The two-dimensional matrix includes a plurality of matrix values corresponding one-to-one to the plurality of first areas, and each matrix value indicates a remaining space in a height direction of a first area among the plurality of first areas.
12. The device according to claim 10 or 11, It is characterized in that The first machine learning model includes a first sub-model and a second sub-model, and the generating module is specifically used for: Inputting the first size information and the M candidate placement positions into the first sub-model, obtaining M second scoring values output by the first sub-model and corresponding to the M candidate placement positions one by one; Inputting N first volume values corresponding to the N first objects one by one into the second sub-model, obtaining N third score values corresponding to the N first objects output by the second sub-model, wherein one first object is composed of at least one second object, and the first volume is any one of the following: an average volume of the at least one second object, a volume of the largest second object among the at least one second object, or a volume of the smallest second object among the at least one second object; The M first scoring values are generated according to the M second scoring values, the N third scoring values, and a first corresponding relationship, where the first corresponding relationship is a corresponding relationship between the M second scoring values and the N third scoring values.
13. The device according to claim 12, It is characterized in that The generation module is specifically used for: According to the first corresponding relationship, obtaining at least one third scoring value corresponding to a target scoring value from the N third scoring values, wherein the target scoring value is any one of the M second scoring values; Each third score value of the at least one third score value corresponding to the target score value is added to the target score value to obtain the first score value.
14. The device according to claim 12, It is characterized in that The generation module is specifically used for: The first size information is feature extracted through the first sub-model to obtain first feature information, and the first feature information is respectively connected with each of the M candidate placement positions through the first sub-model to generate the M second scoring values.
15. The device according to claim 12, It is characterized in that The first sub-model is any one of the following neural networks: a deep Q neural network, a deep double Q neural network, a competitive deep double Q neural network or a natural deep Q neural network; the second sub-model is a fully connected neural network.
16. A model training device, It is characterized in that The device comprises: an acquisition module, used to acquire first size information and N second size information, wherein the first size information is used to indicate the size of an unoccupied area in the accommodation space, N is an integer greater than or equal to 1, and the second size information is used to indicate the size of the first object; the first size information is a two-dimensional matrix; a generating module, configured to generate M candidate placement positions according to the first size information and the N second size information, wherein one placement position among the M candidate placement positions indicates a placement position of a target object in the unoccupied area, the target object is one of the N first objects, and M is an integer greater than or equal to 1; The generating module is further configured to generate, according to the first size information and the M candidate placement positions, M first scoring values corresponding one-to-one to the M candidate placement positions through a first machine learning model, wherein the M first scoring values are generated through M second scoring values, N third scoring values, and a first corresponding relationship, wherein the first corresponding relationship is a corresponding relationship between the M second scoring values and the N third scoring values, the second scoring value is obtained by scoring the degree of adaptation of the M candidate placement positions to the first size information, and the N third scoring values correspond one-to-one to the N first objects; A training module is used to train the first machine learning model according to a first loss function until a convergence condition is met, wherein the first loss function indicates the similarity between a maximum value among the M first scoring values and a fourth scoring value, wherein the fourth scoring value is a scoring value of a placement position selected from multiple candidate placement positions during a previous training process.
17. The device according to claim 16, It is characterized in that The number of rows of the two-dimensional matrix indicates a first size of the bottom surface of the accommodating space, and the number of columns of the two-dimensional matrix indicates a second size of the bottom surface of the accommodating space. If the first size is length, the second size is width, or if the first size is width, the second size is length; The bottom surface of the accommodating space is divided into a plurality of first areas, and there is no intersection between different first areas. The two-dimensional matrix includes a plurality of matrix values corresponding one-to-one to the plurality of first areas, and each matrix value indicates a remaining space in a height direction of a first area among the plurality of first areas.
18. The device according to claim 16 or 17, It is characterized in that The first machine learning model includes a first sub-model and a second sub-model, and the generating module is specifically used for: Inputting the first size information and the M candidate placement positions into the first sub-model, obtaining M second scoring values output by the first sub-model and corresponding to the M candidate placement positions one by one; Inputting N first volume values corresponding to the N first objects one by one into the second sub-model, obtaining N third score values corresponding to the N first objects output by the second sub-model, wherein one first object is composed of at least one second object, and the first volume is any one of the following: an average volume of the at least one second object, a volume of the largest second object among the at least one second object, or a volume of the smallest second object among the at least one second object; The M first scoring values are generated according to the M second scoring values, the N third scoring values, and a first corresponding relationship, where the first corresponding relationship is a corresponding relationship between the M second scoring values and the N third scoring values.
19. An execution device, It is characterized in that The method comprises a processor, wherein the processor is coupled to a memory, wherein the memory stores program instructions, and when the program instructions stored in the memory are executed by the processor, the method according to any one of claims 1 to 6 is implemented.
20. The execution device according to claim 19, It is characterized in that Also includes: Robotic arm; The robotic arm is used to select a third object from the N first objects based on the indication of the first placement position, and place the third object in the unoccupied area.
21. The execution device according to claim 19, It is characterized in that Also includes: Output interface; The output interface is used to output placement indication information based on the first placement position, and the placement indication information is used to indicate the placement position of the first object in the accommodation space.
22. A training device, It is characterized in that The method comprises a processor, wherein the processor is coupled to a memory, wherein the memory stores program instructions, and when the program instructions stored in the memory are executed by the processor, the method according to any one of claims 7 to 9 is implemented.
23. A computer-readable storage medium, It is characterized in that The invention comprises a program which, when being executed on a computer, causes the computer to execute the method according to any one of claims 1 to 6, or causes the computer to execute the method according to any one of claims 7 to 9.
24. A circuit system, It is characterized in that The circuit system comprises a processing circuit configured to perform the method according to any one of claims 1 to 6 or the processing circuit configured to perform the method according to any one of claims 7 to 9.
25. A computer program product, It is characterized in that The computer program product includes instructions, and when the instructions are loaded and executed by an electronic device, the electronic device executes the method according to any one of claims 1 to 6, or the electronic device executes the method according to any one of claims 7 to 9.
Citation Information
Cited By
Placement position acquisition method, model training method, and related devices
WO2022142654A1
