CN116700291A - Path planning method, device, equipment and computer readable storage medium - Google Patents

Path planning method, device, equipment and computer readable storage medium Download PDF

Info

Publication number
CN116700291A
CN116700291A CN202310851198.3A CN202310851198A CN116700291A CN 116700291 A CN116700291 A CN 116700291A CN 202310851198 A CN202310851198 A CN 202310851198A CN 116700291 A CN116700291 A CN 116700291A
Authority
CN
China
Prior art keywords
path
target
sea area
information
feature vector
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310851198.3A
Other languages
Chinese (zh)
Inventor
牟林
王道胜
李琰
秦浩
牛茜如
刘川枫
苏翰祥
董俊
夏博强
黄志彬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Lightsun Technology Co ltd
Shenzhen University
CNOOC Information Technology Co Ltd
Original Assignee
Shenzhen Lightsun Technology Co ltd
Shenzhen University
CNOOC Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Lightsun Technology Co ltd, Shenzhen University, CNOOC Information Technology Co Ltd filed Critical Shenzhen Lightsun Technology Co ltd
Priority to CN202310851198.3A priority Critical patent/CN116700291A/en
Publication of CN116700291A publication Critical patent/CN116700291A/en
Pending legal-status Critical Current

Links

Landscapes

  • Feedback Control In General (AREA)

Abstract

The present disclosure relates to a path planning method, apparatus, device and computer readable storage medium, the method comprising: acquiring the current position and the target position of an aircraft, wherein the current position and the target position are both positioned in a target sea area; based on the information of the water craft and the environment information of the target sea area, carrying out rasterization modeling on the target sea area to obtain rasterization information of the target sea area; converting the rasterization information and a preset control variable sequence into path generation feature vectors through a preset encoder, wherein the preset control variable sequence is used for controlling the features of a target path; and using the probability generation model as a decoder, and generating a target path which takes the current position as a starting point and takes the target position as an end point based on the path generation feature vector. According to the method, the target sea area is subjected to rasterization modeling, and the characteristics of the target path controlled by the preset control variable sequence are introduced, so that the problem of low flexibility of a traditional offshore path planning method is solved.

Description

Path planning method, device, equipment and computer readable storage medium
Technical Field
The present disclosure relates to the field of data processing technologies, and in particular, to a path planning method, apparatus, device, and computer readable storage medium.
Background
The offshore environment is intricate, and it is important for the water craft to conduct path planning in advance. The water craft path planning is a process of planning a track from a current position to a target position from the entire target sea area in order to make the water craft avoid a dangerous area and efficiently travel to the target position.
The current path planning method for the water craft with high accuracy mainly depends on a shortest path algorithm. The path planning method based on the shortest path algorithm can quickly find the shortest path by using algorithm level optimization, but the shortest path does not necessarily mean the optimal path, so that the method lacks flexibility when facing a complex practical environment.
Disclosure of Invention
In order to solve the above technical problems, the present disclosure provides a path planning method, apparatus, device and computer readable storage medium, so as to improve flexibility of path planning.
In a first aspect, an embodiment of the present disclosure provides a path planning method, including:
acquiring the current position and the target position of an aircraft, wherein the current position and the target position are both positioned in a target sea area;
Based on the information of the water craft and the environment information of the target sea area, carrying out rasterization modeling on the target sea area to obtain rasterization information of the target sea area;
converting the rasterization information and a preset control variable sequence into path generation feature vectors through a preset encoder, wherein the preset control variable sequence is used for controlling the features of a target path;
and using the probability generation model as a decoder, and generating a target path which takes the current position as a starting point and takes the target position as an end point based on the path generation feature vector.
In some embodiments, the rasterizing modeling is performed on the target sea area based on the information of the water craft and the environmental information of the target sea area to obtain the rasterizing information of the target sea area, including:
scaling the target sea area according to the size of the water craft, and dividing the scaled target sea area into a preset number of grids, wherein the side length of each grid is the distance travelled by the water craft in unit time;
and calculating the environmental information of each grid according to the environmental information of the target sea area to obtain the grid information of the target sea area.
In some embodiments, the pre-set encoder comprises an a priori encoder and a transcoder;
the step of converting the rasterized information and a preset control variable sequence into a path generation feature vector through an a priori encoder comprises the following steps:
inputting the rasterized information and a preset control variable sequence into a pre-trained prior encoder to obtain a control feature vector;
and converting the control feature vector by the transcoder to obtain a path generation feature vector.
In some embodiments, the preset control variable sequence includes at least one or several of the following control variables:
total path length control variable, path smoothness control variable, path risk control variable, path energy consumption control variable.
In some embodiments, the converting, by the transcoder, the control feature vector into a path-generating feature vector includes:
obtaining a random transformation sequence from a standard normal distribution;
splicing the control feature vector with the conversion sequence to obtain a spliced vector;
inputting the spliced vector into the transcoder to obtain an output vector;
and dividing the output vector to obtain a path generation feature vector, wherein the dimension of the path generation feature vector is the same as that of the control feature vector.
In some embodiments, the generating, using the probability generation model as a decoder, a target path starting from the current position and ending from the target position based on the path generation feature vector includes:
inputting original input data and the path generation feature vector into the probability generation model for iterative computation for a first preset number of times to obtain target data, wherein the original input data is randomly sampled from standard normal distribution, and the size of the original input data is the same as that of the rasterization information;
and performing binarization processing on the target data to obtain a target path grid diagram corresponding to the target path.
In some embodiments, inputting the original input data and the path generation feature vector into the probability generation model to perform iterative computation for a first preset number of times to obtain target data includes:
in the iterative calculation process of the first preset times, path entropy calculation of the second preset times is performed alternately, each path entropy calculation is used for sending historical data obtained by the previous iterative calculation into a path entropy discriminator to calculate path entropy so that the probability generation model parameters are updated towards the gradient direction of path entropy reduction, the second preset times are smaller than or equal to the first preset times, and the path entropy is used for representing the dispersion degree of a plurality of pixels used for representing a target path in the target path grid graph;
And generating a model based on the updated probability of the model parameters, and performing the next iterative calculation.
In a second aspect, an embodiment of the present disclosure provides a path planning apparatus, including:
the acquisition module is used for acquiring the current position and the target position of the aircraft, wherein the current position and the target position are both positioned in a target sea area;
the modeling module is used for carrying out rasterization modeling on the target sea area based on the information of the water craft and the environmental information of the target sea area to obtain the rasterization information of the target sea area;
the transformation module is used for transforming the rasterization information and a preset control variable sequence into a path generation feature vector through a preset encoder, wherein the preset control variable sequence is used for controlling the features of a target path;
and the generation module is used for generating a target path taking the current position as a starting point and the target position as an end point based on the path generation feature vector by taking the probability generation model as a decoder.
In a third aspect, an embodiment of the present disclosure provides an electronic device, including:
a memory;
a processor; and
a computer program;
wherein the computer program is stored in the memory and configured to be executed by the processor to implement the method according to the first aspect.
In a fourth aspect, embodiments of the present disclosure provide a computer-readable storage medium having stored thereon a computer program for execution by a processor to implement the method of the first aspect.
In a fifth aspect, the disclosed embodiments also provide a computer program product comprising a computer program or instructions which, when executed by a processor, implement a path planning method as described above.
The path planning method, the device, the equipment and the computer readable storage medium provided by the embodiment of the disclosure solve the problem of low flexibility of the traditional offshore path planning method by performing gridding modeling on the target sea area and simultaneously introducing the characteristic of controlling the target path by the preset control variable sequence.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure.
In order to more clearly illustrate the embodiments of the present disclosure or the solutions in the prior art, the drawings that are required for the description of the embodiments or the prior art will be briefly described below, and it will be obvious to those skilled in the art that other drawings can be obtained from these drawings without inventive effort.
Fig. 1 is a flowchart of a path planning method provided in an embodiment of the present disclosure;
FIG. 2 is a schematic diagram of a prior encoder according to an embodiment of the present disclosure;
FIG. 3 is a schematic diagram of rasterized modeling provided by an embodiment of the present disclosure;
fig. 4 is a schematic diagram of a static obstacle treatment method according to an embodiment of the disclosure;
FIG. 5 is a schematic view of a steering scheme for an aquatic vehicle according to an embodiment of the present disclosure;
FIG. 6 is a schematic diagram of a prior encoder training process provided by an embodiment of the present disclosure;
fig. 7 is a schematic diagram of obtaining a path generating feature vector according to an embodiment of the present disclosure;
FIG. 8 is a schematic diagram of target data acquisition provided in an embodiment of the disclosure;
FIG. 9 is a schematic diagram of a probability generation model according to an embodiment of the present disclosure;
FIG. 10 is a schematic illustration of a target path grid provided by an embodiment of the present disclosure;
FIG. 11 is a schematic diagram of an iterative process provided by embodiments of the present disclosure;
fig. 12 is a schematic structural diagram of a path planning apparatus according to an embodiment of the present disclosure;
fig. 13 is a schematic structural diagram of an electronic device according to an embodiment of the disclosure.
Detailed Description
In order that the above objects, features and advantages of the present disclosure may be more clearly understood, a further description of aspects of the present disclosure will be provided below. It should be noted that, without conflict, the embodiments of the present disclosure and features in the embodiments may be combined with each other.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present disclosure, but the present disclosure may be practiced otherwise than as described herein; it will be apparent that the embodiments in the specification are only some, but not all, embodiments of the disclosure.
The offshore environment is intricate and has no frequent change, and the water craft is easily put into danger if the track is not planned in advance. For unmanned ships, because the navigation process lacks artificial control guidance, the path planning technology becomes the key of intelligent control, and the intelligent level of the unmanned ships is related. The water craft path planning is a process of planning a track from a current position to a target position from the entire target sea area in order to make the water craft avoid a dangerous area and efficiently travel to the target position.
The path planning methods for the high-accuracy water craft are mainly divided into three types: linear programming, shortest path algorithms, and deep learning. Linear programming methods are research to find the optimal path by maximizing or minimizing a linear function under linear constraints, often requiring the use of a solver for optimization. The linear programming method has the advantages that different paths can be solved according to different constraint conditions, and the defects that the linear function recalculation is required to be redetermined for each specific path programming problem, generalization is avoided, and complex constraint is difficult to determine. The path planning method based on the shortest path algorithm can quickly find the shortest path by utilizing algorithm level optimization, but the method has no generalization, different environments need different modeling, and meanwhile, the shortest path does not necessarily mean the best, lacks flexibility and is difficult to take effect when facing complex actual environments. With the development of artificial intelligence technology, many methods based on deep learning are proposed for path planning, and conventional deep learning path planning methods are based on an autoregressive model, i.e. processing and predicting path information in a sequential manner, and have a certain generalization capability, but the autoregressive model is a non-probabilistic model, and can only generate an optimal path calculated by a neural network for a given starting point and an end point, so that flexibility is lacking.
In the method, the linear programming method needs to redetermine the optimized linear function and the constraint condition for each path programming problem, has no generalization and has low availability; the shortest path algorithm is efficient but can only need the shortest path instead of the optimal path, has no generalization, lacks flexibility, is difficult to process for complex environments, and has low availability; the traditional deep learning path planning algorithm based on the autoregressive model generates paths in a sequence mode, cannot capture the overall characteristics of the paths, and has lower accuracy compared with a linear planning method and a shortest path algorithm. The neural network has certain generalization capability, but is not based on a probability model, so that the flexibility is low and the usability is low.
In view of the foregoing, embodiments of the present disclosure provide a path planning method, which is described below with reference to specific embodiments.
Fig. 1 is a flowchart of a path planning method according to an embodiment of the present disclosure. The method can be applied to any terminal equipment with a data processing function, such as a smart phone, a palm computer, a tablet computer, a wearable equipment with a display screen, a desktop computer, a notebook computer, an integrated machine, intelligent household equipment and the like. It can be appreciated that the path planning method provided by the embodiment of the present disclosure may also be applied in other scenarios.
The following describes a path planning method shown in fig. 1, which includes the following specific steps:
s101, acquiring the current position and the target position of the water craft, wherein the current position and the target position are both located in a target sea area.
The water craft generally refers to various water vehicles which can navigate or berth and transport or operate in water areas, and comprises manually driven ships and unmanned ships.
For path planning of an aquatic craft, first, the start point and the end point of a target path to be planned need to be determined. Specifically, the current position of the water craft can be used as the starting point of the target path, and the target position of the water craft can be used as the end point of the target position, so that the target path (namely the target track) from the current position to the target position of the water craft can be planned.
The current position of the water craft can be obtained based on a positioning system carried on the craft, including but not limited to a global positioning system (Global Positioning System, GPS), etc. The target position of the water craft may be determined from specific data, which is not limited by the disclosed embodiments.
The target sea area is a piece of sea area containing the current location and the target location. Alternatively, the target sea area may be a rectangular sea area, including the area through which the current position of the vehicle may travel to the target position.
S102, based on the information of the water craft and the environment information of the target sea area, rasterizing modeling is carried out on the target sea area, and the rasterizing information of the target sea area is obtained.
Information of the water craft and environment information of the target sea area are obtained, wherein the information of the water craft at least comprises the running speed of the water craft, the size of the water craft and the like.
The environmental information of the target sea area includes information of water flow, water depth, static obstacles (e.g., reefs, islands) and the like in the target sea area. Specifically, the related observation information, digital elevation information and the like are obtained through technical means such as an atmospheric observation station, a hydrological observation station, a buoy, a submerged buoy, a tide checking station, image acquisition and identification. The water flow information in the target sea area can be used for calculating the energy consumption of the water craft when the water craft is sailing, and the water depth information and the static obstacle information can be used for calculating the safety of the water craft when the water craft is sailing.
Optionally, the environmental information can also be obtained by simulating the target sea area through a physical numerical model.
In the rasterization modeling, the environmental information of the target sea area is divided into a plurality of grids, and whether the grids are suitable for navigation of the water craft is determined according to the environmental information of the target sea area in each grid area. For example, if a static obstacle exists in any one grid area and all areas of the grid belong to the coverage area of the static obstacle, the grid is marked as an obstacle grid, and the navigation of the water craft is not suitable.
Meanwhile, according to the environmental information of the target sea area, the environmental information in each grid can be determined. For example, calculating an average water flow rate in each grid according to the water flow rate of the target sea area as the water flow rate information of the grid; according to the water depth information of the target sea area, calculating the average water depth in each grid to be used as the water depth information of the grid; the average flow direction in each grid is calculated according to the flow direction information of the target sea area, and the average flow direction is used as the flow direction information of the grid.
And calculating or processing the information of each grid to obtain the grid information of the target sea area.
And S103, converting the rasterized information and a preset control variable sequence into a path generation feature vector through a preset encoder.
The preset control variable sequence is used for controlling the characteristics of the target path, the characteristics of the target path can be determined according to actual requirements, and the preset control variable is further set.
Specifically, the characteristics of the target path may be the length of the target path, the smoothness of the target path, the safety of the target path, the energy consumption required for the water craft to travel along the target path, and the like, which is not limited by the embodiments of the present disclosure.
The preset encoder comprises a priori encoder and a transcoder, wherein the priori encoder is used for generating a control feature vector according to the rasterization information and a preset control variable sequence; the transcoder appliance converts the control feature vector into a path generation feature vector. Namely, the rasterized information and a preset control variable sequence are input into a pre-trained prior encoder to obtain a control feature vector; and converting the control feature vector by the transcoder to obtain a path generation feature vector.
The a priori encoder is a neural network model incorporating the attention mechanism. The rasterized information and a preset control variable sequence are used as input of the prior encoder, and a feature vector output by the prior encoder can be obtained and is called a control feature vector. The control feature vector represents some characteristics of the control variables and the environment, constraining the characteristics that the target path to be planned should have.
Fig. 2 is a schematic diagram of a prior encoder according to an embodiment of the disclosure. In one possible implementation, as shown in fig. 2, the a priori encoder consists of an embedded layer, a convolutional layer, a linear layer, a cross-attention layer, a residual block, and a linear layer. And inputting a preset control variable sequence into an embedded layer, inputting rasterized information into a convolution layer, respectively passing through a linear layer, introducing a dependency relationship between the two layers through a cross attention layer, and further sequentially passing through a residual block and the linear layer to obtain a control feature vector.
The transcoder is used for converting the control feature vector into a path generation feature vector. In some embodiments, an encoder neural network of a transducer model may be used as the transcoder and modifications to the input and output portions of the model may be made to enable the encoder to function off of the transducer structure.
S104, using the probability generation model as a decoder, and generating a target path based on the path generation feature vector.
Probability generation models are an important class of models in probability statistics and machine learning, referring to a series of models for randomly generating observable data.
Taking the diffration probability generation model as an example, the process of generating the target path based on the path generation feature vector can be divided into a forward process and a reverse process. The forward process may be described as a process of continuously adding random noise to the original data, and the reverse process is a data generation process, and may generate data from the random noise.
According to the method, the current position and the target position of the aircraft are obtained, and the current position and the target position are both located in a target sea area; based on the information of the water craft and the environment information of the target sea area, carrying out rasterization modeling on the target sea area to obtain rasterization information of the target sea area; converting the rasterization information and a preset control variable sequence into path generation feature vectors through a preset encoder, wherein the preset control variable sequence is used for controlling the features of a target path; the probability generation model is used as a decoder, a target path taking the current position as a starting point and the target position as an end point is generated based on the path generation feature vector, and the problem of low flexibility of the traditional marine path planning method is solved by performing rasterization modeling on a target sea area and simultaneously introducing the feature of controlling the target path by a preset control variable sequence.
Based on the above embodiment, the rasterizing modeling is performed on the target sea area based on the information of the water craft and the environmental information of the target sea area, to obtain the rasterizing information of the target sea area, including: scaling the target sea area according to the size of the water craft, and dividing the scaled target sea area into a preset number of grids, wherein the side length of each grid is the distance travelled by the water craft in unit time; and calculating the environmental information of each grid according to the environmental information of the target sea area to obtain the grid information of the target sea area.
The method comprises the step of gridding modeling of a target sea area by considering the speed and the size of the water craft. Specifically, the water craft is considered as a particle according to the actual size of the water craft, and the static obstacle in the target sea area is expanded or compressed.
Fig. 3 is a schematic diagram of rasterization modeling according to an embodiment of the present disclosure. As shown in FIG. 3, in one possible embodiment, assuming that the original area of the target sea area is H×W and the speed value of the water craft per unit time is V, the target sea area can be divided into Each grid having a size V x V and defining a unique coordinate identity for each grid, e.g., the lower left-hand grid is defined as (1, 1) and the upper right-hand grid is defined as (n, m) in fig. 3. The speed per unit time of the water craft can be adjusted according to the time situation, but the water craft is required to be almost unchanged in course per unit time.
And further calculating the environmental information of each grid according to the environmental information of the target sea area to obtain the grid information of the target sea area. Optionally, determining whether each grid belongs to an obstacle grid according to the static obstacle information in the target sea area, taking the circumscribed rectangular frame line of the static obstacle as the actual size of the obstacle, and taking all the grids in the rectangular frame line as obstacle grids.
Fig. 4 is a schematic diagram of a static obstacle treatment method according to an embodiment of the disclosure. As shown in fig. 4, when two static obstacles are closer, the distance between the two outer frame lines of the obstacles is calculated to be compared with the actual size of the aircraft, if the distance is larger, the obstacle grids are correspondingly deleted, and otherwise, the obstacle grids are correspondingly increased.
On the basis of the above embodiment, the preset control variable sequence at least includes one or several of the following control variables: total path length control variable, path smoothness control variable, path risk control variable, path energy consumption control variable.
The preset encoder comprises an priori encoder and a transcoder; the step of converting the rasterized information and a preset control variable sequence into a path generation feature vector through an a priori encoder comprises the following steps: inputting the rasterized information and a preset control variable sequence into a pre-trained prior encoder to obtain a control feature vector; and converting the control feature vector by the transcoder to obtain a path generation feature vector.
Specifically, the preset control variable sequence includes a path total length control variable l, a path smoothness control variable s, a path risk control variable r and a path energy consumption control variable e. These four variables can be set according to specific requirements, directly affecting the final path planning tendency.
In some embodiments, the values of the four control variables are limited as follows:
l,s,r,e∈[0,1]
l+s+r+e=1
the path total length control variable l constrains the total length of the target path. In a rasterizing environment, the total length of the target path p in the embodiment of the disclosure is:
where c (i, j) =0 or 1, respectively, represents whether or not the mesh (i, j) is selected as the mesh through which the target path passes, and if the mesh (i, j) is selected as the mesh through which the target path passes, i.e., (i, j) ∈p, c (i, j) =1; conversely, if the mesh (i, j) is not selected as the mesh through which the target path passes, c (i, j) =0. The target path p is defined as the set of grids of all c (i, j) =1. The closer L is to 1 indicates a path that tends to be shorter in total length when planning a path, i.e., a path that is smaller in L (p), the shortest path is considered when l=0, and the total path length problem is not considered at all when planning a path when l=0.
The path smoothness control variable s constrains the overall smoothness of the path. Since it is difficult for the water craft to make a turn with a large turning angle while traveling, it is necessary to restrict the turning angle in the target path. For example, fig. 5 is a schematic diagram of a steering scheme of an above-water craft according to an embodiment of the present disclosure, where as shown in fig. 5, a steering range of the above-water craft is defined to be within 90 ° right in front of a vehicle, that is, steering angles to the left and right are all within 45 °. The overall smoothness of the target path p may be calculated as S (p) = Σ i∈p θ i Represented by/L (p), wherein θ i Represents the rotation angle theta of the water craft when passing through two adjacent grids i =1 means that the rotation angle is 45 °, θ i =0 indicates that the original traveling direction is maintained. The closer S is to 1 indicates that the path is more prone to overall smoother paths when planning, i.e., paths with smaller S (p).
The path risk control variable r constrains the overall security of the path. The water craft has limitation of draft when running, and is easy to cause danger through too shallow sea areas. Defining a minimum safe water depth (d) for an above-water craft min ) Maximum draft of the water craft (d vehicle ) The method comprises the steps of carrying out a first treatment on the surface of the Depth of water (d) ample )=d min The +surplus water depth (UKC) is related to the aircraft itself, and the surplus water depth may be a constant value or may be set according to factors such as the environment and the aircraft. In a grid environment, the overall security of path p may be defined as:
Where d (i, j) represents the average water depth of grid (i, j), the clip () function is used to limit the value in the function between 0, 1. The closer R is to 1 indicates that a path more prone to high security in path planning, that is, a path with smaller R (p).
The path energy consumption control variable e constrains the total energy consumption of the path. The energy consumption of an aquatic craft is related to the time of flight, which depends on the actual flight, and the resistance of the craft to flow per unit areaThe speed, the resistance per unit area, which is experienced, depends on the relative speed of the craft and the water flow. Let the actual sailing speed of the water craft beThe flow rate of the water body is->As can be seen from the above embodiments, the single grid size is +.>When the aircraft sails from one grid to the next, the sailing time t can be divided into +.>And T. The relative velocity is the vector difference between the actual velocity and the flow rate, denoted +.>Frictional resistance R of unit area of water craft in water body f The calculation process is as follows:
wherein C is f C is the coefficient of friction resistance r And (3) supplementing the coefficient for the roughness, wherein ρ is the water density, and S is the contact area of the water craft and the water body. In a grid environment, the total energy consumption of path p is noted as:
Where ε is the energy consumption parameter. The closer E is to 1 indicates that paths with a lower power consumption are more prone to path planning, i.e., paths with smaller E (p).
According to the method and the device for planning the path of the water craft, the characteristics of the target path are constrained by introducing the preset control variable sequence in the path planning process, so that the flexibility of path planning of the water craft is further improved.
On the basis of the above embodiments, the a priori encoder needs to be trained. Specifically, the a priori encoder is trained using a contrast learning approach. In contrast learning, an additional encoder is introduced, called a path encoder, and the prior encoder and the path encoder are trained simultaneously.
Fig. 6 is a schematic diagram of a priori encoder training process according to an embodiment of the present disclosure. As shown in fig. 6, there are b samples for one training batch, b sets of control variable sequences and corresponding trellis environments for a priori encoders, and b paths and trellis environments for path encoders corresponding to b sets of control variables, respectively. Taking four samples as an example, the training procedure for this batch is: the a priori encoder sequences the b sets of control variables (l 1 ,s 1 ,r 1 ,e 1 )、(l 2 ,s 2 ,r 2 ,e 2 )、(l 3 ,s 3 ,r 3 ,e 3 )、(l 4 ,s 4 ,r 4 ,e 4 ) And grid environment conversion to control feature vector { v control V shown in FIG. 5 c_1 ,v c_2 ,v c_3 ,v c_4 The method comprises the steps of carrying out a first treatment on the surface of the The path encoder converts the b paths P1, P2, P3, P4 and the trellis environment into path feature vectors { v } path V shown in FIG. 5 p_1 ,v p_2 ,v p_3 ,v p_4 The method comprises the steps of carrying out a first treatment on the surface of the And calculating cosine similarity between all the control feature vectors and the path feature vectors:
arranging all the similarities into a b x b matrix, wherein the main diagonal is the similarity of the corresponding control feature vector and the path feature vector; and calculating the loss of the similarity matrix and the matrix with the main diagonal elements of 1 and the rest of-1, counter propagating the gradient, and optimizing the parameters of the prior encoder.
Further, the rasterized information and a preset control variable sequence are input into a pre-trained prior encoder to obtain a control feature vector.
On the basis of the foregoing embodiment, the converting, by the transcoder, the control feature vector to obtain a path generation feature vector includes: obtaining a random transformation sequence from a standard normal distribution; splicing the control feature vector with the conversion sequence to obtain a spliced vector; inputting the spliced vector into the transcoder to obtain an output vector; and dividing the output vector to obtain a path generation feature vector, wherein the dimension of the path generation feature vector is the same as that of the control feature vector.
In some embodiments, an encoder neural network of a transducer model is used as the transcoder and modifications are made to the input and output portions of the model to enable the encoder to function off of the transducer structure. Fig. 7 is a schematic diagram of path generation feature vector acquisition according to an embodiment of the present disclosure. As shown in fig. 7, a control feature vector v is set control Is of dimension (dim) n 1), the path-generating feature vector has a dimension (dim m ,1),
Then a random transformation sequence g is generated from the standard normal distribution N (0, 1), the dimension of g being (dim m ,1). Will control the feature vector v control Splicing with g to obtain splicing vector, and specific v control The preceding g follows, yielding a vector of dimensions (dim n +dim m Splice vector v of 1) joint Will v joint The encoder fed as input into the transducer, yielding an output vector v out Its dimension is (dim n +dim m 1) v is calculated out According to dim n +dim m Dividing dimension and taking the second half dim m The data of the dimension is used as a path to generate a feature vector.
On the basis of the above embodiment, the generating, using the probability generation model as a decoder, a target path starting from the current position and ending from the target position based on the path generation feature vector includes: inputting original input data and the path generation feature vector into the probability generation model for iterative computation for a first preset number of times to obtain target data, wherein the original input data is randomly sampled from standard normal distribution, and the size of the original input data is the same as that of the rasterization information; and performing binarization processing on the target data to obtain a target path grid diagram corresponding to the target path.
Inputting the original input data and the path generation feature vector into the probability generation model for iterative computation for a first preset number of times to obtain target data, wherein the method comprises the following steps: in the iterative calculation process of the first preset times, path entropy calculation of the second preset times is performed alternately, each path entropy calculation is used for sending historical data obtained by the previous iterative calculation into a path entropy discriminator to calculate path entropy so that the probability generation model parameters are updated towards the gradient direction of path entropy reduction, the second preset times are smaller than or equal to the first preset times, and the path entropy is used for representing the dispersion degree of a plurality of pixels used for representing a target path in the target path grid graph; and generating a model based on the updated probability of the model parameters, and performing the next iterative calculation.
The above steps are described below using a diffration probability generation model as an example. As in the above embodiments, the probability production model for Diffusion is divided into two parts, the forward process and the reverse process. The forward process can be described as a process of continuously adding random noise to the original data, and the distribution of the data after adding noise at time t is Therein {(s) t The sequence of monotonically decreasing time t is predefined, z t Is a standard normally distributed noise. From the original data x 0 Data distribution at time t can be directly calculatedWherein-> Obeys a standard normal distribution.
The reverse process is a data generation process, and can generate original data from random noise. The distribution of the data at time t-1 can be deduced from the data at time t,wherein:
use of neural networks to predict x in the reverse process in this embodiment 0 And z t . Fig. 8 is a schematic diagram of target data acquisition according to an embodiment of the disclosure. As shown in fig. 8, by calculating a weighted averageThe model can be made smoother. To reduce model size and improve efficiency, predict z t Is the prediction x 0 Is a sub-network z of the neural network 2 t Equivalent to prediction of x 0 The output of an intermediate variable of the process,
let T times total, at time T, input data x t Path generation feature vector v generate Given a predefined parameter sequence { t On the premise of }, generating data x at t-1 time t-1 The process of (1) is as follows: calculating x through neural network 0 And z t The method comprises the steps of carrying out a first treatment on the surface of the Taking out Calculated to obtain In normal distributionRandom sampling to obtain x t-1
The above process is iterated for T times until t=1 finally to generate target data x 0 . Raw input data x of model T The samples can be randomly sampled from a standard normal distribution, with a size of n x m consistent with the grid environment. The finally obtained data x 0 The target path raster image can be obtained by performing binarization processing in which 1 represents the path 0 and the other paths are represented. Various neural networks may be employed for structures within the Diffusion model, which are not limited by embodiments of the present disclosure.
Fig. 9 is a schematic diagram of a probability generation model according to an embodiment of the disclosure. As shown in fig. 9, the structure is a composite network structure based on U-Net and res Net with an attention mechanism added, and further includes a convolution layer, a linear layer, a cross-attention, a residual block, and a linear layer.
The diffration model has larger randomness in the whole generation process, so that a path entropy discriminator is introduced. The path entropy discriminator acts on the training stage to guide the generation process to be carried out towards the direction of path entropy reduction, so that convergence can be quickened, and iteration times can be reduced. The path entropy is defined as the dispersion degree of a plurality of pixels of the target path raster image obtained after binarization, namely a plurality of grids representing the target path in the target path raster image have multi-image paths.
Fig. 10 is a schematic diagram of a target path grid provided in an embodiment of the present disclosure. As shown in fig. 10, in the binary image, assuming that 1 is a black pixel 0 and that it is a white pixel, the lower the path entropy is, the more the image composed of black pixels resembles a path, the higher the path entropy is, and the more the black pixel distribution is disordered.
Fig. 11 is a schematic diagram of an iterative process provided in an embodiment of the disclosure. As shown in FIG. 11, at time t, the output x of the Diffusion model t-1 Before the iteration at time t-1, the iteration is sent to a path entropy discriminator to calculate path entropy PE (x) t-1 ) And updating the model parameters towards the gradient direction with reduced path entropy through back propagation, and then carrying out generation iteration at the time t-1. The application of the path entropy discriminator is flexible, and the path entropy discriminator can be introduced at each moment, or can be introduced once every few iterations.
In some embodiments, path entropy may be measured by determining the aggregations of black pixels in a binary image. A connected piece of black pixels is defined as one group, pe= (number of groups-1)/total number of black pixels. The path entropy discriminator can also use a neural network, and the pre-trained discriminator can better judge the size of the path entropy.
The method for planning the path of the water craft based on the heuristic network structure and the probability generation model is mainly used for comprehensively optimizing and improving the existing method for planning the path of the water craft on the basis of keeping high accuracy aiming at two major aspects of generalization and flexibility of the model and improving the usability of the model.
Fig. 12 is a schematic structural diagram of a path planning apparatus according to an embodiment of the present disclosure. The path planning device may be a terminal device as described in the above embodiments, or the path planning device may be a part or component in the terminal device. The path planning apparatus provided in the embodiment of the present disclosure may execute the processing flow provided in the embodiment of the path planning method, as shown in fig. 12, where the path planning apparatus 120 includes: an acquisition module 121, a modeling module 122, a conversion module 123, and a generation module 124; the acquiring module 121 is configured to acquire a current position and a target position of the aircraft, where the current position and the target position are both located in a target sea area; the modeling module 122 is configured to perform rasterization modeling on the target sea area based on the information of the water craft and the environmental information of the target sea area, so as to obtain rasterization information of the target sea area; the conversion module 123 is configured to convert the rasterized information and a preset control variable sequence into a path generation feature vector through a preset encoder, where the preset control variable sequence is used to control a feature of a target path; the generating module 124 is configured to generate, using the probability generating model as a decoder, a target path using the current position as a start point and the target position as an end point based on the path generating feature vector.
Optionally, the modeling module 122 includes a scaling unit 1221, a first computing unit 1222; the scaling unit 1221 is configured to scale the target sea area according to the size of the water craft, and divide the scaled target sea area into a preset number of grids, where a side length of each grid is a distance traveled by the water craft in a unit time; the first calculating unit 1222 is configured to calculate the environmental information of each grid according to the environmental information of the target sea area, so as to obtain the rasterized information of the target sea area.
Optionally, the preset encoder includes an a priori encoder and a transcoder; the conversion module 123 includes an input unit 1231, a conversion unit 1232; the input unit 1231 is configured to input the rasterized information and a preset control variable sequence into a pre-trained prior encoder, to obtain a control feature vector; the conversion unit 1232 is configured to convert, by the transcoder, the control feature vector to obtain a path generation feature vector.
Optionally, the preset control variable sequence at least includes one or several of the following control variables: total path length control variable, path smoothness control variable, path risk control variable, path energy consumption control variable.
Optionally, the transformation unit 1232 is configured to obtain a random transformation sequence from a standard normal distribution; splicing the control feature vector with the conversion sequence to obtain a spliced vector; inputting the spliced vector into the transcoder to obtain an output vector; and dividing the output vector to obtain a path generation feature vector, wherein the dimension of the path generation feature vector is the same as that of the control feature vector.
Optionally, the generating module 124 includes a second calculating unit 1241 and a processing unit 1242; the second calculation unit 1241 is configured to input the original input data and the path generation feature vector into the probability generation model to perform iterative calculation for a first preset number of times, so as to obtain target data, where the original input data is randomly sampled from a standard normal distribution, and the size of the original input data is the same as the size of the rasterized information; the processing unit 1242 is configured to perform binarization processing on the target data, so as to obtain a target path raster image corresponding to the target path.
Optionally, the second calculating unit 1241 is configured to, in an iterative calculation process of a first preset number of times, alternate a path entropy calculation of a second preset number of times, where each path entropy calculation is configured to send the history data obtained by the previous iterative calculation to a path entropy discriminator to calculate a path entropy, so that the probability generation model parameter is updated towards a gradient direction in which the path entropy decreases, where the second preset number of times is less than or equal to the first preset number of times, and the path entropy is used to represent a degree of dispersion of a plurality of pixels in the target path grid diagram; and generating a model based on the updated probability of the model parameters, and performing the next iterative calculation.
The path planning apparatus of the embodiment shown in fig. 12 may be used to implement the technical solution of the above-mentioned method embodiment, and its implementation principle and technical effects are similar, and will not be described herein again.
Fig. 13 is a schematic structural diagram of an electronic device according to an embodiment of the disclosure. The electronic device may be a device to be upgraded as described in the above embodiments. The electronic device provided in the embodiment of the present disclosure may execute the processing flow provided in the embodiment of the path planning method, as shown in fig. 13, where the electronic device 130 includes: memory 131, processor 132, computer programs and communication interface 133; wherein the computer program is stored in the memory 131 and configured to be executed by the processor 132 for performing the path planning method as described above.
In addition, the embodiment of the present disclosure also provides a computer-readable storage medium having stored thereon a computer program that is executed by a processor to implement the path planning method described in the above embodiment.
Furthermore, the disclosed embodiments also provide a computer program product comprising a computer program or instructions which, when executed by a processor, implements a path planning method as described above.
It should be noted that in this document, relational terms such as "first" and "second" and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The foregoing is merely a specific embodiment of the disclosure to enable one skilled in the art to understand or practice the disclosure. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the disclosure. Thus, the present disclosure is not intended to be limited to the embodiments shown and described herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A method of path planning, the method comprising:
acquiring the current position and the target position of an aircraft, wherein the current position and the target position are both positioned in a target sea area;
based on the information of the water craft and the environment information of the target sea area, carrying out rasterization modeling on the target sea area to obtain rasterization information of the target sea area;
converting the rasterization information and a preset control variable sequence into path generation feature vectors through a preset encoder, wherein the preset control variable sequence is used for controlling the features of a target path;
and using the probability generation model as a decoder, and generating a target path which takes the current position as a starting point and takes the target position as an end point based on the path generation feature vector.
2. The method of claim 1, wherein the rasterizing modeling the target sea area based on the information of the water craft and the environmental information of the target sea area to obtain the rasterizing information of the target sea area comprises:
scaling the target sea area according to the size of the water craft, and dividing the scaled target sea area into a preset number of grids, wherein the side length of each grid is the distance travelled by the water craft in unit time;
And calculating the environmental information of each grid according to the environmental information of the target sea area to obtain the grid information of the target sea area.
3. The method of claim 1, wherein the pre-set encoder comprises an a priori encoder and a transcoder;
the step of converting the rasterized information and a preset control variable sequence into a path generation feature vector through an a priori encoder comprises the following steps:
inputting the rasterized information and a preset control variable sequence into a pre-trained prior encoder to obtain a control feature vector;
and converting the control feature vector by the transcoder to obtain a path generation feature vector.
4. A method according to claim 3, wherein the predetermined sequence of control variables comprises at least one or several of the following control variables:
total path length control variable, path smoothness control variable, path risk control variable, path energy consumption control variable.
5. A method according to claim 3, wherein said converting, by said transcoder, said control feature vector into a path-generating feature vector comprises:
obtaining a random transformation sequence from a standard normal distribution;
Splicing the control feature vector with the conversion sequence to obtain a spliced vector;
inputting the spliced vector into the transcoder to obtain an output vector;
and dividing the output vector to obtain a path generation feature vector, wherein the dimension of the path generation feature vector is the same as that of the control feature vector.
6. The method of claim 1, wherein the generating a target path starting at the current position and ending at the target position based on the path generation feature vector using the probability generation model as a decoder comprises:
inputting original input data and the path generation feature vector into the probability generation model for iterative computation for a first preset number of times to obtain target data, wherein the original input data is randomly sampled from standard normal distribution, and the size of the original input data is the same as that of the rasterization information;
and performing binarization processing on the target data to obtain a target path grid diagram corresponding to the target path.
7. The method of claim 6, wherein inputting the original input data and the path-generating feature vector into the probability generation model for a first preset number of iterative computations to obtain target data comprises:
In the iterative calculation process of the first preset times, path entropy calculation of the second preset times is performed alternately, each path entropy calculation is used for sending historical data obtained by the previous iterative calculation into a path entropy discriminator to calculate path entropy so that the probability generation model parameters are updated towards the gradient direction of path entropy reduction, the second preset times are smaller than or equal to the first preset times, and the path entropy is used for representing the dispersion degree of a plurality of pixels used for representing a target path in the target path grid graph;
and generating a model based on the updated probability of the model parameters, and performing the next iterative calculation.
8. A path planning apparatus, comprising:
the acquisition module is used for acquiring the current position and the target position of the aircraft, wherein the current position and the target position are both positioned in a target sea area;
the modeling module is used for carrying out rasterization modeling on the target sea area based on the information of the water craft and the environmental information of the target sea area to obtain the rasterization information of the target sea area;
the transformation module is used for transforming the rasterization information and a preset control variable sequence into a path generation feature vector through a preset encoder, wherein the preset control variable sequence is used for controlling the features of a target path;
And the generation module is used for generating a target path taking the current position as a starting point and the target position as an end point based on the path generation feature vector by taking the probability generation model as a decoder.
9. An electronic device, comprising:
a memory;
a processor; and
a computer program;
wherein the computer program is stored in the memory and configured to be executed by the processor to implement the method of any of claims 1-7.
10. A computer readable storage medium, on which a computer program is stored, which computer program, when being executed by a processor, implements the method according to any of claims 1-7.
CN202310851198.3A 2023-07-11 2023-07-11 Path planning method, device, equipment and computer readable storage medium Pending CN116700291A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310851198.3A CN116700291A (en) 2023-07-11 2023-07-11 Path planning method, device, equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310851198.3A CN116700291A (en) 2023-07-11 2023-07-11 Path planning method, device, equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN116700291A true CN116700291A (en) 2023-09-05

Family

ID=87829380

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310851198.3A Pending CN116700291A (en) 2023-07-11 2023-07-11 Path planning method, device, equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN116700291A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117367435A (en) * 2023-12-06 2024-01-09 深圳大学 Evacuation path planning method, device, equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117367435A (en) * 2023-12-06 2024-01-09 深圳大学 Evacuation path planning method, device, equipment and storage medium
CN117367435B (en) * 2023-12-06 2024-02-09 深圳大学 Evacuation path planning method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
US11662210B2 (en) Performing navigation tasks using grid codes
Xiaofei et al. Global path planning algorithm based on double DQN for multi-tasks amphibious unmanned surface vehicle
Gao et al. Ship collision avoidance anthropomorphic decision-making for structured learning based on AIS with Seq-CGAN
CN108416152A (en) The optimal global path planning method of unmanned boat ant colony energy consumption based on electronic chart
CN116700291A (en) Path planning method, device, equipment and computer readable storage medium
CN111462129A (en) Image segmentation method and apparatus using weighted convolution filter per grid cell
Wang et al. Local path optimization method for unmanned ship based on particle swarm acceleration calculation and dynamic optimal control
CN110906935A (en) Unmanned ship path planning method
CN112819873A (en) High-generalization cross-domain road scene semantic segmentation method and system
CN113807460A (en) Method and device for determining intelligent body action, electronic equipment and medium
Lan et al. Path planning for underwater gliders in time-varying ocean current using deep reinforcement learning
CN112880678A (en) Unmanned ship navigation planning method in complex water area environment
CN117454495A (en) CAD vector model generation method and device based on building sketch outline sequence
Yao et al. Vision-based environment perception and autonomous obstacle avoidance for unmanned underwater vehicle
Lang et al. Physics-informed machine learning models for ship speed prediction
Liu et al. Towards socially responsive autonomous vehicles: A reinforcement learning framework with driving priors and coordination awareness
Zhang et al. A path planning method for the autonomous ship in restricted bridge area based on anisotropic fast marching algorithm
Ma et al. Solving heterogeneous USV scheduling problems by problem-specific knowledge based meta-heuristics with Q-learning
Gong et al. A mutation operator self-adaptive differential evolution particle swarm optimization algorithm for USV navigation
Sun et al. Path planning for an autonomous underwater vehicle in a cluttered underwater environment based on the heat method
CN112991744B (en) Automatic driving decision-making method and system suitable for long-distance urban road
CN114255616A (en) Unpowered ship track prediction method, device, equipment and storage medium
Gao et al. Artificial intelligence algorithms in unmanned surface vessel task assignment and path planning: A survey
EP3839830A1 (en) Trajectory estimation for vehicles
Xue et al. Improved BSO for ship path planning with grounding alert using interpolated Delaunay triangulation

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination