Model training method, path planning method and related device

By building a pre-trained neural network model and optimizing it with improved TLBO algorithm, the problems of large amount of computation and poor adaptability of traditional path planning algorithms in complex environments are solved, and more efficient and accurate path planning is achieved.

CN119646507APending Publication Date: 2025-03-18SHENZHEN INST OF ARTIFICIAL INTELLIGENCE & ROBOTICS FOR SOC +1
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411677598.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-21
Publication Date
2025-03-18

AI Technical Summary

Technical Problem

Traditional path planning algorithms have large calculations and poor adaptability in high-dimensional space and complex and changeable environments, resulting in slow planning speed and unsuitable for dynamically changing scenarios.

Method used

The pre-trained neural network model is constructed through model training methods, and the neural network model is trained using improved teaching and learning optimization TLBO algorithms to generate pre-trained models to replace traditional algorithms to achieve efficient prediction of path point sequences and path lengths.

Benefits of technology

It improves the accuracy and computing efficiency of path planning, can generate highly adaptable obstacle avoidance paths in a dynamic environment, and reduces dependence on traditional algorithms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119646507A_ABST
    Figure CN119646507A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a model training method, a path planning method and a related device. The method comprises the steps of obtaining an environment data set in a current environment according to a preset sample type set; the preset sample type comprises a map size, an obstacle position point, and a starting position point and a target position point of the robot; based on a path planning algorithm, according to the environment data set, generating a path data set comprising the shortest obstacle avoidance path between the position points; the path data set comprises a path point sequence and a path length; forming a training data set according to the environment data set and the path data set; training the initial neural network model based on the training data set and an improved teaching and learning optimization TLBO algorithm to obtain a pre-trained neural network model; wherein the improved TLBO algorithm is an algorithm for selecting two hyper-parameter combinations with the highest fitness to carry out cross learning. According to the embodiment of the invention, the path planning accuracy and reliability can be improved, and the dynamic environment adaptability is enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] In enterprise warehousing operations, order picking accounts for most of the warehouse operating costs. By rationally planning the picking sequence of robots, the efficiency of order picking can be significantly improved, and the time and cost required for picking can be reduced.

[0003] Traditional path planning algorithms have large computational complexity, poor adaptability, and slow planning speed when facing high-dimensional spaces and complex and changing environments. In dynamically changing scenarios, the above algorithms usually need to replan the path frequently, further affecting the real-time performance and overall efficiency of the system. Summary of the invention

[0004] Based on the above problems, the embodiments of the present application provide a model training method, a path planning method and related devices, the purpose of which is to improve the accuracy and computational efficiency of path planning.

[0005] In a first aspect, the present application provides a model training method, including:

[0006] According to a preset sample type set, an environmental data set in the current environment is obtained; the preset sample types include map size, obstacle location points, robot starting location points and target location points;

[0007] Based on the path planning algorithm, a path data set including the shortest obstacle avoidance path between each position point is generated according to the environmental data set; the path data set includes a path point sequence and a path length;

[0008] Constructing a training data set according to the environment data set and the path data set;

[0009] The initial neural network model is trained based on the training data set and an improved teaching-learning-based optimization (TLBO) algorithm to obtain a pre-trained neural network model; wherein the improved TLBO algorithm is an algorithm that includes selecting two hyperparameter combinations with the highest fitness for cross-learning.

[0010] In one embodiment, the path planning algorithm is based on which a path data set including the shortest obstacle avoidance path between each position point is generated according to the environment data set, including:

[0011] Based on the path planning algorithm, an initial shortest path between any two location points in the map is calculated according to the environmental data set;

[0012] The path sequence of each of the initial shortest paths is rearranged using a perturbation function to generate a path data set consisting of the obstacle-avoiding shortest paths between any two position points; wherein the perturbation function is used to traverse the interference conditions of all obstacles on the initial shortest path and output the obstacle-avoiding shortest paths under different interference conditions.

[0013] In one embodiment, the initial neural network model is trained based on the training data set and the improved teaching and learning optimization TLBO algorithm to obtain a pre-trained neural network model, including:

[0014] Inputting the training data set into an initial neural network model for training, and performing regularization and pruning processing on the initial neural network model to obtain an intermediate neural network model;

[0015] Based on the improved TLBO algorithm, the intermediate neural network is subjected to hyperparameter optimization processing to obtain a pre-trained neural network model.

[0016] In one embodiment, the hyperparameter optimization processing of the intermediate neural network based on the improved TLBO algorithm to obtain a pre-trained neural network model includes:

[0017] Randomly generate multiple hyperparameter combinations according to the hyperparameter limit range, regard different hyperparameter combinations as corresponding to different individuals, and use the value of the model loss function as the fitness of each individual;

[0018] Select the individual with the highest fitness as the teacher of the class, and select the individual with the lowest fitness as the student of the teacher;

[0019] Based on the first updating formula, the hyperparameter combination corresponding to the student with the lowest fitness is used to update the hyperparameter combination corresponding to the teacher, and the hyperparameter combination and fitness corresponding to the student with the lowest fitness are updated according to the updated hyperparameter combination corresponding to the teacher;

[0020] For each student, randomly select another student in the class and compare the fitness of the two students, determine the student with high fitness as the teacher of the student with low fitness, and update the hyperparameter combination corresponding to the student with low fitness based on the second update formula;

[0021] Recalculate the fitness of each individual, select a preset number of individuals with the highest fitness for cross-learning, and generate and retain new individuals;

[0022] The hyperparameter combination corresponding to the individual with the highest fitness is selected as the optimal hyperparameter combination, and the intermediate neural network model is trained according to the optimal hyperparameter combination and the training data set to obtain a pre-trained neural network model.

[0023] In one embodiment, the first update formula is:

[0024]

[0025] in, represents the hyperparameter combination of the i-th teacher after update; represents the hyperparameter combination of the i-th teacher before updating; α represents the learning rate, which is used to control the degree to which the teacher learns from the student; Represents the hyperparameter combination of the “student” of the i-th teacher before updating;

[0026] The second update formula is:

[0027]

[0028] in, Represents the hyperparameter combination of the i-th student with low fitness after update; represents the hyperparameter combination of the i-th student with low fitness before updating; β represents the learning rate, which controls the degree to which the student with low fitness learns from the teacher; Denotes the hyperparameter combination corresponding to the teacher of the i-th student with low fitness.

[0029] In one embodiment, the step of selecting a preset number of individuals with the highest fitness for cross-learning to generate and retain new individuals includes:

[0030] Select a preset number of individuals with the highest fitness as parent individuals, and randomly select the same crossover point in each of the parent individuals;

[0031] Taking the crossover point as the boundary, dividing the chromosome of each parent individual into a first part and a second part;

[0032] The second part of the chromosome of each of the parent individuals after the division is exchanged to generate and retain a new individual.

[0033] In a second aspect, the embodiment of the present application further provides a path planning method, including:

[0034] According to the preset sample type set, obtain the environmental data set in the current environment;

[0035] The environmental data set is input into a pre-trained neural network model to obtain a target planning path; wherein the pre-trained neural network model is obtained by using the path planning method described in the first aspect of the embodiment of the present application or any specific implementation method of the first aspect.

[0036] In one embodiment, inputting the environment data set into a pre-trained neural network model to obtain a target planning path includes:

[0037] Inputting the environmental data set into a pre-trained neural network model to obtain a plurality of initial planning paths output by the pre-trained neural network model;

[0038] The value of the comprehensive objective function is defined as the fitness of each initial planned path; the comprehensive objective function is used to measure the path length and smoothness of each planned path;

[0039] According to the fitness of each initial planning path, the improved TLBO algorithm is used to optimize each initial planning path to obtain the target planning path corresponding to each initial planning path.

[0040] In a third aspect, the embodiment of the present application further provides a model training device, including:

[0041] An acquisition unit, used to acquire an environmental data set in a current environment according to a preset sample type set; the preset sample types include map size, obstacle location points, robot start location points and target location points;

[0042] A production unit, configured to generate a path data set including the shortest path between each location point in the current environment based on the environment data set based on a path planning algorithm; the path data set includes a path point sequence and a path length;

[0043] A data processing unit, configured to form a training data set according to the environment data set and the path data set;

[0044] A training processing unit is used to train the initial neural network model based on the training data set and the improved teaching and learning optimization TLBO algorithm to obtain a pre-trained neural network model; wherein the improved TLBO algorithm is an algorithm that includes selecting two model hyperparameter combinations with the highest fitness for cross-learning.

[0045] In a fourth aspect, an embodiment of the present application further provides a computer device, including:

[0046] CPU, memory, input and output interfaces;

[0047] The memory is a short-term storage memory or a persistent storage memory;

[0048] The central processing unit is configured to communicate with the memory and execute instruction operations in the memory to execute the model training method described in the first aspect or any specific implementation of the first aspect of the embodiment of the present application and the path planning method described in the second aspect or any specific implementation of the second aspect.

[0049] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the model training method described in the first aspect of the embodiment of the present application or any specific implementation of the first aspect and the path planning method described in the second aspect or any specific implementation of the second aspect are executed.

[0050] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:

[0051] The embodiment of the present application constructs a training data set to train a neural network model by comprehensively considering variables such as map size and obstacle location in a dynamic environment, so that it can generate paths directly based on environmental features without repeatedly running traditional algorithms with complex calculations. The pre-trained neural network model is used to replace the traditional algorithm to achieve efficient prediction of path point sequences and path lengths. In addition, the improved TLBO algorithm optimizes the hyperparameters of the neural network, adopts a cross-learning mechanism between students, increases population diversity, avoids falling into local optimality, and improves the prediction accuracy and generalization ability of the model. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0053] Figure 1 A schematic diagram of a model training method flow provided in an embodiment of the present application;

[0054] Figure 2 A schematic diagram of a hyperparameter optimization process provided in an embodiment of the present application;

[0055] Figure 3 A schematic diagram of an improved TLBO algorithm flow chart provided in an embodiment of the present application;

[0056] Figure 4 A schematic diagram of cross-learning provided in an embodiment of the present application;

[0057] Figure 5 A schematic diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0058] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0059] It should be understood that the references to "one embodiment" or "an embodiment" throughout the specification mean that the specific features, structures, or characteristics associated with the embodiment are included in at least one embodiment of the present invention. Therefore, the references to "in one embodiment" or "in an embodiment" appearing throughout the specification do not necessarily refer to the same embodiment. In addition, these specific features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.

[0060] In the various embodiments of the present application, it should be understood that the size of the serial numbers of the following processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0061] In enterprise warehousing operations, order picking accounts for most of the warehouse operating costs. By rationally planning the picking sequence of robots, the efficiency of order picking can be significantly improved, and the time and cost required for picking can be reduced.

[0062] Traditional path planning algorithms (such as grid-based methods, A* algorithms, and Dijkstra algorithms) have large computational complexity, poor adaptability, and slow planning speed when faced with high-dimensional spaces and complex and changing environments. In dynamically changing scenarios, the above algorithms usually require frequent re-planning of paths, further affecting the real-time performance and overall efficiency of the system.

[0063] Below, taking the application of dynamic path planning of heterogeneous multi-robots for warehousing business as an example, the model training method provided by the embodiment of the present invention is further described in detail in combination with the accompanying drawings.

[0064] The present application embodiment provides a model training method, such as Figure 1 As shown, the method includes steps S101-S104.

[0065] S101: Acquire an environment data set in a current environment according to a preset sample type set; the preset sample types include map size, obstacle location points, robot start location points, and target location points;

[0066] The preset sample type set is a defined data template that contains the key elements required to describe the current environment information, which may include:

[0067] Map size: Geometric information such as length, width, and height of the environment, used to build the basic map structure.

[0068] Obstacle location points: The coordinates and shapes of fixed or dynamic obstacles in the environment, such as shelves, pillars, workstations, other robots, workers, mobile shelves, etc.

[0069] Robot starting position: The starting coordinates of the robot to perform tasks in the current environment.

[0070] Robot target position point: The target point coordinates of the robot task, usually the destination to be reached after completing the task.

[0071] Environmental data sets refer to specific data collected or generated from the actual environment according to preset sample types. The acquisition process can be completed through sensor measurement, system configuration or data loading. Specifically, the length, width, height and other geometric information of the environment can be obtained through warehouse management systems, laser scanners or cameras; the position of obstacles (such as mobile shelves or personnel) can be detected in real time through sensors, or the position of fixed obstacles can be loaded from static configuration files; the position of the robot can be read from its current state; and the target position point that the robot needs to reach can be set according to the task planning system or order information.

[0072] By clarifying the required information types (such as map size, obstacle location, etc.), a preset sample type set is designed to ensure that the environmental dataset can accurately reflect the current scene and provide support for path planning or other operations.

[0073] S102: Based on the path planning algorithm, generate a path data set including the shortest obstacle avoidance path between each position point according to the environmental data set; the path data set includes a path point sequence and a path length;

[0074] The path planning algorithm can choose A* algorithm, Dijkstra algorithm, etc. to calculate the shortest path between any two position points in the current environment. In the process of path planning by the path planning algorithm, the algorithm will consider the position of obstacles and generate an obstacle avoidance path. The path point sequence is an ordered set of a series of points (or nodes) passed on the path. For example, the path point sequence can be expressed as: P = {P1, P2, P3, ..., Pn}. Among them, P1 is the starting point, Pn is the end point, and the other points P2, P3, ... are the intermediate points in the path.

[0075] S103: constructing a training data set according to the environment data set and the path data set;

[0076] By combining the environmental dataset (input features) and the path dataset (output target), a training dataset is constructed for training the neural network model, so that the model can learn to predict the optimal path based on the environmental features presented by the environmental dataset, thereby improving the automation and efficiency of path planning.

[0077] In order to improve the training quality and generalization ability of the model, the dataset composed of the environment dataset and the path dataset can also be divided into training set, validation set and test set. The training set is used to optimize the model parameters, the validation set is used to adjust the hyperparameters and prevent overfitting, and the test set is used to evaluate the final performance of the model. The ratio is usually 70%:20%:10%.

[0078] S104: Training the initial neural network model based on the training data set and the improved teaching and learning optimization TLBO algorithm to obtain a pre-trained neural network model; wherein the improved TLBO algorithm is an algorithm that includes selecting two hyperparameter combinations with the highest fitness for cross-learning.

[0079] The initial neural network model is a neural network model that has not been optimized or trained and only contains the basic network structure (such as the number of layers, the number of neurons, the initial weights, etc.).

[0080] The teacher guidance and students in the TLBO algorithm optimize the fitness of the population individuals through mutual learning. In the embodiment of the present application, TLBO is used to optimize the hyperparameter combination, which includes the learning rate, the number of network layers, the number of neurons, the batch size, etc.

[0081] By evaluating the impact of hyperparameter combinations on model performance, we select two hyperparameter combinations with the highest fitness, extract the advantageous characteristics from them, and generate new hyperparameter combinations. The new hyperparameter combination inherits the high-quality genes of the hyperparameter combination with the highest fitness, which helps to further improve model performance.

[0082] The embodiment of the present application constructs a training data set to train a neural network model by comprehensively considering variables such as map size and obstacle location in a dynamic environment, so that it can generate paths directly based on environmental features without repeatedly running traditional algorithms with complex calculations. The pre-trained neural network model is used to replace the traditional algorithm to achieve efficient prediction of path point sequences and path lengths. In addition, the improved TLBO algorithm optimizes the hyperparameters of the neural network, adopts a cross-learning mechanism between students, increases population diversity, avoids falling into local optimality, and improves the prediction accuracy and generalization ability of the model.

[0083] In one embodiment, the path planning algorithm is based on the environmental data set to generate a path data set including the shortest obstacle avoidance path between each position point, including: based on the path planning algorithm, calculating the initial shortest path between any two position points in the map according to the environmental data set; using a perturbation function to rearrange the path sequence of each of the initial shortest paths to generate a path data set consisting of the obstacle avoidance shortest path between the any two position points; wherein the perturbation function is used to traverse the interference conditions of all obstacles on the initial shortest path and output the obstacle avoidance shortest path under different interference conditions.

[0084] The shortest path generated by traditional path planning algorithms is usually based on the assumption of a static environment and cannot adapt to the interference of dynamic obstacles on the path. By adding a perturbation function, the dynamic changes of obstacle interference are simulated, and the obstacle-avoiding shortest path that adapts to the dynamic environment is generated for any two positions.

[0085] Specifically, the perturbation function traverses all obstacles in the map, simulates different situations where obstacles block the initial shortest path one by one, rearranges the initial path sequence, and outputs the obstacle-avoiding shortest path from the starting point to the end point under different obstacle distribution conditions to ensure that the path is still feasible in a dynamic environment. Finally, the optimal path under different interference conditions is retained to form a path data set.

[0086] For example, assume there is a simple two-dimensional map containing the following information: starting point: A (0, 0); end point: B (4, 4);

[0087] Obstacle: Located at (2, 2).

[0088] In the absence of obstacles, the A* algorithm is used to calculate the initial shortest path: A→(1,1)→(2,2)→(3,3)→B. The path length is

[0089] Considering the interference of obstacle (2, 2) on the path, the perturbation function is used to rearrange the path:

[0090] Using the perturbation function, the shortest obstacle avoidance path around the obstacle is: A→(1,1)→(1,2)→(2,3)→(3,3)→B.

[0091] The new path length is

[0092] The path data set includes the length of the newly generated path, the shortest obstacle-avoiding path, and the location points of obstacles. Of course, it can also further include the original initial shortest path and path length for the neural network model to learn.

[0093] The embodiment of the present application simulates dynamic obstacle interference through a perturbation function to generate an obstacle avoidance path suitable for complex environments, avoid the situation where the path is unavailable due to obstacle changes, and improve the adaptability of path planning. The generated path data set includes not only the initial static path, but also the shortest obstacle avoidance path under various dynamic interference conditions, making the data richer and more diverse, and also helping the model to better learn path planning in dynamic environments.

[0094] In one embodiment, please refer to Figure 2 The initial neural network model is trained based on the training data set and the improved teaching and learning optimization TLBO algorithm to obtain a pre-trained neural network model, including: inputting the training data set into the initial neural network model for training, and performing regularization and pruning on the initial neural network model to obtain an intermediate neural network model; performing hyperparameter optimization on the intermediate neural network based on the improved TLBO algorithm to obtain a pre-trained neural network model.

[0095] The specific design of the initial neural network model can refer to the following design: select convolutional neural network as the network architecture, select activation function (ReLU, Rectified Linear Unit), select stochastic gradient descent (SGD, Stochastic Gradient Descent) as the optimizer, select MSE as the loss function, select the accuracy rate as the evaluation index to evaluate the performance of the model, and the number of iterations is 100000. The above is only an example of the design of an initial neural network model. The selection of the above specific data can be set as needed, and the embodiment of this application is not limited here.

[0096] In the embodiment of the present application, regularization is used to limit the size of model parameters to prevent overfitting. The specific implementation of regularization can be L1 regularization (Lasso Regression) / L2 regularization (Ridge Regression) by adding a weight penalty term to the loss function. The pruning process is to remove redundant or less contributing neurons or weights to obtain a more efficient and streamlined intermediate neural network model, thereby reducing model complexity.

[0097] After obtaining the intermediate neural network model, the hyperparameters of the intermediate neural network model (such as learning rate, number of network layers, number of neurons, batch size, etc.) can be optimized based on the improved TLBO algorithm. The core of the TLBO algorithm is to optimize the interaction of "teacher" and "student" population individuals (hyperparameter combination). The improved TLBO algorithm mainly selects the two hyperparameter combinations with the highest fitness for cross-learning, generates new hyperparameter combinations, and ensures the diversity of hyperparameter combinations.

[0098] According to the various hyperparameter combinations obtained after hyperparameter optimization based on the improved TLBO algorithm, the one with the highest fitness is selected as the target hyperparameter combination, and the intermediate neural network model is retrained to finally obtain the pre-trained neural network model.

[0099] The embodiment of the present application gradually optimizes the initial neural network model through four steps: training data, regularization, pruning, and hyperparameter optimization. This enables the final pre-trained model to have higher performance and adaptability in path planning tasks, and at the same time, the hyperparameter combination obtained by the improved TLBO algorithm optimizes the computational efficiency of the model in solving path planning problems in complex environments.

[0100] In one embodiment, the improved TLBO algorithm is used to perform hyperparameter optimization processing on the intermediate neural network to obtain a pre-trained neural network model, including: randomly generating multiple hyperparameter combinations according to a hyperparameter limit range, regarding different hyperparameter combinations as corresponding to different individuals, and using the value of the model loss function as the fitness of each individual; selecting the individual with the highest fitness as the teacher of the class, and selecting the individual with the lowest fitness as the student of the teacher; based on the first update formula, using the hyperparameter combination corresponding to the student with the lowest fitness to update the hyperparameter combination corresponding to the teacher, and updating the hyperparameter combination corresponding to the teacher according to the updated hyperparameter combination corresponding to the teacher. The hyperparameter combination and fitness corresponding to the student with the lowest fitness; for each student, randomly select another student in the class and compare the fitness of the two, determine the student with high fitness as the teacher of the student with low fitness, and based on the second update formula, update the hyperparameter combination corresponding to the student with low fitness; recalculate the fitness of each individual, and select a preset number of individuals with the highest fitness for cross-learning, generate and retain new individuals; select the hyperparameter combination corresponding to the individual with the highest fitness as the optimal hyperparameter combination, and train the intermediate neural network model according to the optimal hyperparameter combination and the training data set to obtain a pre-trained neural network model.

[0101] Specifically, the preset value range of the model parameters can be 7-9 layers of the network, 500-800 neurons, 0.01-0.03 learning rate, 30-64 batch size, and multiple hyperparameter combinations are randomly generated within the above range. Each hyperparameter combination is regarded as a "student" representing an individual. For example, the hyperparameter combination can be expressed as [7; 600; 0.02; 32], where 7 represents the number of network layers, 600 represents the number of neurons, 0.02 represents the learning rate, and 32 represents the batch size.

[0102] For example, please refer to Figure 3, generate a population of "students" with a population size of 200, each student corresponds to a set of randomly generated hyperparameter combinations. Use the model's loss function, such as mean squared error (MSE) as the fitness function, and use the value of the model loss function to evaluate the performance (fitness) of each student.

[0103] The student with the highest current fitness is selected from the student population as the teacher, and the teacher is used to guide the optimization of its students. The student with the lowest current fitness is selected as the teacher's "student".

[0104] Teacher teaching stage: The hyperparameter combination of the teacher and the student is optimized through the interaction between the teacher and the student with the lowest fitness. Based on the first update formula, the hyperparameter combination of the student with the lowest fitness is used to adjust the hyperparameter combination of the teacher. After the update, the hyperparameter combination of the teacher is fed back to the student with the lowest fitness. The hyperparameter combination of the teacher is used as the new update direction of the student with the lowest fitness, the hyperparameter combination corresponding to the student with the lowest fitness is updated, and the fitness of the student is recalculated.

[0105] It is understandable that the student with the lowest fitness usually represents the suboptimal or worst solution in the population, but these suboptimal solutions may contain search directions that have not yet been explored. Using the student with the lowest fitness as a reference, the teacher can try new optimization directions to avoid falling into the local optimal solution. Similarly, the teacher adjusts its own hyperparameters by updating the formula, while guiding the students to move towards the global optimal direction, further improving the overall fitness of the entire population.

[0106] Optionally, the first updating formula is:

[0107]

[0108] in, represents the updated hyperparameter combination of the i-th teacher (i.e., the student with the highest fitness or the individual with the highest fitness); represents the hyperparameter combination of the i-th teacher before updating; α represents the learning rate, which is used to control the degree to which the teacher learns from the student; Represents the hyperparameter combination of the “student” of the i-th teacher (that is, the student with the lowest fitness or the individual with the lowest fitness) before updating.

[0109] Student learning stage: For each student, another student is randomly selected from the population and the fitness of the two is compared. The student with high fitness is selected as the teacher, and the hyperparameter combination corresponding to the teacher is used as the update direction of the student with low fitness at present. The hyperparameter combination of the student with low fitness is adjusted using the second update formula. After the formula is updated, the hyperparameter combination of the student (learner) with low fitness will be adjusted, such as the number of network layers, the number of neurons, etc., to approach the hyperparameter combination of the student with high fitness. In this way, in a class (group), through mutual learning and interaction between students, the hyperparameter combination of each student is gradually optimized, so that the fitness of all students is improved.

[0110] Optionally, the second updating formula is:

[0111]

[0112] in, Represents the hyperparameter combination of the i-th student with low fitness after update; represents the hyperparameter combination of the i-th student with low fitness before updating; β represents the learning rate, which controls the degree to which the student with low fitness learns from the teacher; Denotes the hyperparameter combination corresponding to the teacher of the i-th student with low fitness.

[0113] After the student learning phase is over, the fitness of each individual is recalculated. The two students with the highest fitness are selected for cross-learning to further optimize the individual diversity in the population.

[0114] In one embodiment, a preset number of individuals with the highest fitness are selected for crossover learning to generate and retain new individuals, including: selecting a preset number of individuals with the highest fitness as parent individuals, and randomly selecting the same crossover point in each parent individual; dividing the chromosome of each parent individual into a first part and a second part based on the crossover point; exchanging the second part of the chromosome of each parent individual after the division, to generate and retain new individuals.

[0115] For example, Figure 4 As shown, the preset number is 2, assuming that the two parents selected are:

[0116] Parent 1: 7;600;0.02;32.

[0117] Parent 2: 8;700;0.01;64.

[0118] Each individual chromosome represents a combination of hyperparameters, including: number of network layers (number of layers); number of neurons in each layer (number of neurons); learning rate; batch size.

[0119] A crossover point is randomly selected in the chromosome of the parent individual as the boundary of chromosome division.

[0120] The intersection point can be a specific position in the hyperparameter combination, such as the second parameter (the number of neurons).

[0121] The chromosomes of parent individual 1 are divided into: first part: 7; 600. Second part: 0.02; 32.

[0122] The chromosome division of parent individual 2 is: first part: 8; 700; second part: 0.01; 64.

[0123] Exchange the second part of the chromosomes after the parent individual is divided:

[0124] New individual 1: the first part of parent individual 1 [7; 600] + the second part of parent individual 2 [0.01, 64].

[0125] New individual 1 chromosome: 7;600;0.01;64.

[0126] New individual 2: the first part of parent individual 2 [8; 700] + the second part of parent individual 1 [0.02; 32].

[0127] Chromosomes of new individual 2: 8;700;0.02;32.

[0128] The two new individuals generated are added to the population to participate in the next round of optimization.

[0129] The new individuals generated by cross-learning in the embodiment of the present application combine the advantages of the two parent individuals, have a larger search space, increase the diversity of the population, and the new hyperparameter combination may be more suitable for the current task than the parent, thereby avoiding falling into a local optimal solution due to the singleness of the population. In addition, the embodiment of the present application does not require manual intervention, and uses an algorithm to automatically complete cross-learning and individual generation, thereby improving optimization efficiency.

[0130] Accordingly, the embodiment of the present application also provides a path planning method, including:

[0131] S201: Acquire an environmental data set in the current environment according to a preset sample type set;

[0132] S202: Input the environmental data set into a pre-trained neural network model to obtain a target planning path; wherein the pre-trained neural network model is obtained by using the path planning method described in the first aspect of the embodiment of the present application or any specific implementation method of the first aspect.

[0133] The pre-trained neural network model is generated by the path planning method of the first aspect of the embodiment of the present application. Using the trained neural network model for path planning can avoid a lot of computational overhead in traditional path planning algorithms (such as A* and Dijkstra). In a dynamic environment, the environmental data set can be updated in real time and input into the pre-trained neural network model to obtain a planning path that is more suitable for complex scenarios.

[0134] In one embodiment, the step of inputting the environmental data set into a pretrained neural network model to obtain a target planning path includes: inputting the environmental data set into a pretrained neural network model to obtain multiple initial planning paths output by the pretrained neural network model; defining the value of a comprehensive objective function as the fitness of each initial planning path; the comprehensive objective function is used to measure the path length and smoothness of each planning path; and optimizing each initial planning path using an improved TLBO algorithm according to the fitness of each initial planning path to obtain a target planning path corresponding to each initial planning path.

[0135] Based on the input environment data set, the neural network outputs a set of possible initial planning paths, each of which contains a sequence of path points (such as a set of coordinate points). It should be understood that each path initially considers obstacles but has not been further optimized.

[0136] Next, we design a comprehensive objective function to measure the fitness of each initial planning path. The comprehensive objective function includes the following two key indicators:

[0137] Path length: The total distance of the path, the shorter the better.

[0138] Path smoothness: The continuity and smoothness of the path, the fewer bends the better.

[0139] The comprehensive objective function formula can be referred to: F 路径 =w1*L+w2*S

[0140] Where L represents the path length of the planned path, S represents the path smoothness, which can be measured by calculating the angle change or curvature between path points. w1 represents the weight of the path length, and w2 represents the weight of the path smoothness.

[0141] For each initial planned path, the improved TLBO is used for optimization, and the optimization goal is set to reduce the path length and improve the path smoothness. Specifically, each path can be regarded as an individual, and the path with the highest fitness is selected as the teacher path. The teacher path is used to guide the path with the lowest fitness for optimization. The student paths learn from each other to further optimize the path point sequence. Then, path cross-learning is performed, that is, the path combination with the highest fitness is cross-learned to generate a new path. After multiple rounds of iterations, the path with the highest fitness is selected as the optimized target planning path. The specific process of optimizing each initial planned path using the improved TLBO algorithm can be referred to in the aforementioned embodiment. Figure 4 The relevant description parts of the embodiments are not repeated here.

[0142] In order to implement the model training method of the embodiment of the present application, the embodiment of the present application also provides a model training device, which includes:

[0143] An acquisition unit, used to acquire an environmental data set in a current environment according to a preset sample type set; the preset sample types include map size, obstacle location points, robot start location points and target location points;

[0144] A production unit, configured to generate a path data set including the shortest path between each location point in the current environment based on the environment data set based on a path planning algorithm; the path data set includes a path point sequence and a path length;

[0145] A data processing unit, configured to form a training data set according to the environment data set and the path data set;

[0146] A training processing unit is used to train the initial neural network model based on the training data set and the improved teaching and learning optimization TLBO algorithm to obtain a pre-trained neural network model; wherein the improved TLBO algorithm is an algorithm that includes selecting two model hyperparameter combinations with the highest fitness for cross-learning.

[0147] In one embodiment, the data processing unit is further used to calculate an initial shortest path between any two location points in the map according to the environmental data set based on a path planning algorithm;

[0148] The data processing unit is also used to rearrange the path sequence of each of the initial shortest paths using a perturbation function to generate a path data set consisting of the obstacle-avoiding shortest paths between any two position points; wherein the perturbation function is used to traverse the interference conditions of all obstacles on the initial shortest path and output the obstacle-avoiding shortest path under different interference conditions.

[0149] In one embodiment, the training processing unit is further used to input the training data set into the initial neural network model for training, and perform regularization and pruning processing on the initial neural network model to obtain an intermediate neural network model;

[0150] The data processing unit is also used to perform hyperparameter optimization processing on the intermediate neural network based on the improved TLBO algorithm to obtain a pre-trained neural network model.

[0151] In one embodiment, the data processing unit is further used to randomly generate a plurality of hyperparameter combinations according to a hyperparameter limit range, regard different hyperparameter combinations as corresponding to different individuals, and use the value of the model loss function as the fitness of each individual;

[0152] The device also includes: a selection unit; the selection unit is used to select the individual with the highest fitness as the teacher of the class, and select the individual with the lowest fitness as the student of the teacher;

[0153] The data processing unit is further used to update the hyperparameter combination corresponding to the teacher using the hyperparameter combination corresponding to the student with the lowest fitness based on the first updating formula, and to update the hyperparameter combination and fitness corresponding to the student with the lowest fitness according to the updated hyperparameter combination corresponding to the teacher;

[0154] The data processing unit is further configured to randomly select another student in the class for each student and compare the fitness of the two students, determine that the student with high fitness is the teacher of the student with low fitness, and update the hyperparameter combination corresponding to the student with low fitness based on the second update formula;

[0155] The data processing unit is further used to recalculate the fitness of each individual, and select a preset number of individuals with the highest fitness for cross-learning, to generate and retain new individuals;

[0156] The training processing unit is also used to select the hyperparameter combination corresponding to the individual with the highest fitness as the optimal hyperparameter combination, and train the intermediate neural network model according to the optimal hyperparameter combination and the training set to obtain a pre-trained neural network model.

[0157] In one embodiment, the first update formula is:

[0158]

[0159] in, represents the hyperparameter combination of the i-th teacher after update; represents the hyperparameter combination of the i-th teacher before updating; α represents the learning rate, which is used to control the degree to which the teacher learns from the student; Represents the hyperparameter combination of the “student” of the i-th teacher before updating;

[0160] The second update formula is:

[0161]

[0162] in, Represents the hyperparameter combination of the i-th student with low fitness after update; represents the hyperparameter combination of the i-th student with low fitness before updating; β represents the learning rate, which controls the degree to which the student with low fitness learns from the teacher; Denotes the hyperparameter combination corresponding to the teacher of the i-th student with low fitness.

[0163] In one embodiment, the selection unit is further used to select a preset number of individuals with the highest fitness as parent individuals, and randomly select the same crossover point in each of the parent individuals;

[0164] The device further comprises: a segmentation unit, the segmentation unit being used to segment the chromosome of each parent individual into a first part and a second part with the crossover point as a boundary;

[0165] The data processing unit is also used to exchange the second part of the chromosome of each parent individual after the division, so as to generate and retain a new individual.

[0166] It should be noted that: the above embodiment provides a model training device, and only uses the division of the above program modules as an example when performing model training. In actual applications, the above processing can be assigned to different program modules as needed, that is, the internal structure of the device is divided into different program modules to complete all or part of the processing described above. In addition, the model training device and the model training method embodiment provided in the above embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.

[0167] In order to implement the path planning method of the embodiment of the present application, the embodiment of the present application also provides a path planning device, which includes:

[0168] An acquisition unit, used to acquire an environmental data set in a current environment according to a preset sample type set;

[0169] A path planning unit is used to input the environmental data set into a pre-trained neural network model to obtain a target planning path; wherein the pre-trained neural network model is obtained by using the model training method described in the first aspect of the embodiment of the present application or any specific implementation method of the first aspect.

[0170] Based on the hardware implementation of the above program modules, and in order to implement a model training method and a path planning method provided in the embodiment of the present application, the embodiment of the present application also provides a computer device, such as Figure 5 As shown, the computer device 500 includes:

[0171] CPU 501, memory 502 and input / output interface 503;

[0172] The memory 502 is a temporary storage memory or a permanent storage memory;

[0173] The central processing unit 501 is configured to communicate with the memory 502 and execute instruction operations in the memory 502 to perform the model training method described in the first aspect or any specific implementation of the first aspect of the embodiment of the present application and the path planning method described in the second aspect or any specific implementation of the second aspect.

[0174] Of course, in actual application, the various components in the computer device 500 are coupled together through the bus system 504. It can be understood that the bus system 504 is used to realize the connection and communication between these components. In addition to the data bus, the bus system 504 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, Figure 5 Various buses are labeled as bus system 504 .

[0175] The memory 502 in the embodiment of the present application is used to store various types of data to support the operation of the computer device 500. Examples of such data include: any computer program used to operate on the computer device 500.

[0176] It is understandable that when the processor in the computer device described above executes the computer program, it can also implement the functions of the various units in the above-mentioned corresponding device embodiments, which will not be repeated here. Exemplarily, the computer program can be divided into one or more modules / units, one or more modules / units are stored in the memory, and executed by the processor to complete the various embodiments of the present application. One or more modules / units can be a series of computer program instruction segments that can perform specific functions, and the instruction segments are used to describe the execution process of the computer program in the computer device. For example, the computer program can be divided into the various units in the above-mentioned computer device, and each unit can implement the specific functions described in the above-mentioned corresponding computer device.

[0177] The computer device may be a computing device such as a desktop computer, a notebook, a PDA, and a cloud server. The computer device may include, but is not limited to, a processor and a memory. Those skilled in the art will appreciate that the processor and the memory are merely examples of computer devices and do not constitute a limitation on the computer device. The computer device may include more or fewer components, or a combination of certain components, or different components. For example, the computer device may also include input and output devices, network access devices, buses, etc.

[0178] The processor can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor, etc. The processor is the control center of the computer device, and uses various interfaces and lines to connect various parts of the entire computer device.

[0179] The memory can be used to store computer programs and / or modules. The processor implements various functions of the computer device by running or executing the computer programs and / or modules stored in the memory, and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application required for a function, etc.; the data storage area can store data created according to the use of the terminal, etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (SMC, Smart Media Card), a secure digital (SD, Secure Digital) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0180] An embodiment of the present application also provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the model training method described in the first aspect of the embodiment of the present application or any specific implementation of the first aspect and the path planning method described in the second aspect or any specific implementation of the second aspect are executed.

[0181] An embodiment of the present application also provides a computer program product having a computer program / instruction stored thereon. When the computer program / instruction is executed by a processor, it is used to implement the model training method described in the first aspect or any specific implementation of the first aspect of the embodiment of the present application and the path planning method described in the second aspect or any specific implementation of the second aspect.

[0182] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0183] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0184] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0185] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0186] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program code.

Claims

1. A model training method, characterized in that: include: According to a preset sample type set, an environmental data set in the current environment is obtained; the preset sample types include map size, obstacle location points, robot starting location points and target location points; Based on the path planning algorithm, a path data set including the shortest obstacle avoidance path between each position point is generated according to the environmental data set; the path data set includes a path point sequence and a path length; Constructing a training data set according to the environment data set and the path data set; The initial neural network model is trained based on the training data set and the improved teaching and learning optimization TLBO algorithm to obtain a pre-trained neural network model; wherein the improved TLBO algorithm is an algorithm that includes selecting two hyperparameter combinations with the highest fitness for cross-learning.

2. The model training method according to claim 1, characterized in that: The method of generating a path data set including the shortest obstacle avoidance path between various position points based on the path planning algorithm according to the environmental data set includes: Based on the path planning algorithm, an initial shortest path between any two location points in the map is calculated according to the environmental data set; The path sequence of each of the initial shortest paths is rearranged using a perturbation function to generate a path data set consisting of the obstacle-avoiding shortest paths between any two position points; wherein the perturbation function is used to traverse the interference conditions of all obstacles on the initial shortest path and output the obstacle-avoiding shortest paths under different interference conditions.

3. The model training method according to claim 1, characterized in that: The initial neural network model is trained based on the training data set and the improved teaching and learning optimization TLBO algorithm to obtain a pre-trained neural network model, including: Inputting the training data set into an initial neural network model for training, and performing regularization and pruning processing on the initial neural network model to obtain an intermediate neural network model; Based on the improved TLBO algorithm, the intermediate neural network is subjected to hyperparameter optimization processing to obtain a pre-trained neural network model.

4. The model training method according to claim 3, characterized in that: The method of performing hyperparameter optimization processing on the intermediate neural network based on the improved TLBO algorithm to obtain a pre-trained neural network model includes: Multiple hyperparameter combinations are randomly generated according to the hyperparameter limit range, different hyperparameter combinations are regarded as corresponding to different individuals, and the value of the model loss function is used as the fitness of each individual; Select the individual with the highest fitness as the teacher of the class, and select the individual with the lowest fitness as the student of the teacher; Based on the first updating formula, the hyperparameter combination corresponding to the student with the lowest fitness is used to update the hyperparameter combination corresponding to the teacher, and the hyperparameter combination and fitness corresponding to the student with the lowest fitness are updated according to the updated hyperparameter combination corresponding to the teacher; For each student, randomly select another student in the class and compare the fitness of the two students, determine the student with high fitness as the teacher of the student with low fitness, and update the hyperparameter combination corresponding to the student with low fitness based on the second update formula; Recalculate the fitness of each individual, select a preset number of individuals with the highest fitness for cross-learning, and generate and retain new individuals; The hyperparameter combination corresponding to the individual with the highest fitness is selected as the optimal hyperparameter combination, and the intermediate neural network model is trained according to the optimal hyperparameter combination and the training data set to obtain a pre-trained neural network model.

5. The model training method according to claim 4, characterized in that: The first update formula is: in, represents the hyperparameter combination of the i-th teacher after update; represents the hyperparameter combination of the i-th teacher before updating; α represents the learning rate, which is used to control the degree to which the teacher learns from the student; Represents the hyperparameter combination of the "student" of the i-th teacher before updating; The second update formula is: in, Represents the hyperparameter combination of the i-th student with low fitness after update; represents the hyperparameter combination of the i-th student with low fitness before updating; β represents the learning rate, which controls the degree to which the student with low fitness learns from the teacher; Denotes the hyperparameter combination corresponding to the teacher of the i-th student with low fitness.

6. The model training method according to claim 4, characterized in that: The step of selecting a preset number of individuals with the highest fitness for cross-learning, generating and retaining new individuals, comprises: Select a preset number of individuals with the highest fitness as parent individuals, and randomly select the same crossover point in each of the parent individuals; Taking the crossover point as the boundary, dividing the chromosome of each parent individual into a first part and a second part; The second part of the chromosome of each of the parent individuals after the division is exchanged to generate and retain a new individual.

7. A path planning method, characterized in that: include: According to the preset sample type set, obtain the environmental data set in the current environment; The environmental data set is input into a pre-trained neural network model to obtain a target planning path; wherein the pre-trained neural network model is obtained by using the model training method as described in any one of claims 1 to 6.

8. The path planning method according to claim 7, characterized in that: The step of inputting the environmental data set into a pre-trained neural network model to obtain a target planning path includes: Inputting the environmental data set into a pre-trained neural network model to obtain a plurality of initial planning paths output by the pre-trained neural network model; The value of the comprehensive objective function is defined as the fitness of each initial planned path; the comprehensive objective function is used to measure the path length and smoothness of each planned path; According to the fitness of each initial planning path, the improved TLBO algorithm is used to optimize each initial planning path to obtain the target planning path corresponding to each initial planning path.

9. A model training device, characterized in that: include: An acquisition unit, used to acquire an environmental data set in a current environment according to a preset sample type set; the preset sample types include map size, obstacle location points, robot start location points and target location points; A production unit, configured to generate a path data set including the shortest path between each location point in the current environment based on the environment data set based on a path planning algorithm; the path data set includes a path point sequence and a path length; A data processing unit, configured to form a training data set according to the environment data set and the path data set; A training processing unit is used to train the initial neural network model based on the training data set and the improved teaching and learning optimization TLBO algorithm to obtain a pre-trained neural network model; wherein the improved TLBO algorithm is an algorithm that includes selecting two model hyperparameter combinations with the highest fitness for cross-learning.

10. A computer device, characterized in that: include: CPU, memory and input / output interface; The memory is a transient storage memory or a persistent storage memory; The central processing unit is configured to communicate with the memory and execute instructions in the memory to perform the method according to any one of claims 1 to 7.

Citation Information

Cited By

  • Path planning method and system based on improved teaching and learning algorithm

    CN120991882A

  • A path planning method and system based on improved teaching and learning algorithms

    CN120991882B