Motion path construction method and device

By determining the reference point in the target grid map and constructing the motion path in combination with preset motion parameters, the problem of single paths and overlap caused by traditional pathfinding methods is solved, and a more natural and flexible motion path is achieved.

CN114049277BActive Publication Date: 2025-04-29ZHUHAI KINGSOFT ONLINE GAME TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111355272.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-16
Publication Date
2025-04-29
Estimated Expiration
2041-11-16

AI Technical Summary

Technical Problem

When using the traditional funnel method in the prior art, the path results are single, resulting in overlapping paths when multiple game characters move from the same point to the same end point.

Method used

By obtaining the target grid map, at least one reference point between the starting point and the end point of the target task is determined, and at least one path point is determined based on the preset motion parameters of the target object and the position information of the reference point, and finally construct the motion path.

Benefits of technology

It improves the reliability and diversity of the built motion paths, avoids the problem of path duplication, and reduces the amount of data processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114049277B_ABST
    Figure CN114049277B_ABST
Patent Text Reader

Abstract

The present application provides a motion path construction method and device, wherein the motion path construction method includes: obtaining a target grid map, wherein the endpoints and edges in the target grid map constitute the motion boundary of the target object in the process of performing the target task; determining at least one reference point between the starting point and the end point of the target task in the target grid map according to the position information of the endpoints and the edges in the target grid map; determining at least one path point based on the preset motion parameters of the target object and the position information of at least one reference point; and constructing the motion path of the target object in the process of performing the target task based on the starting point, the end point and the at least one path point. The reliability of the constructed motion path can be improved, which is conducive to improving the provision of motion paths that meet the preset motion parameters for different target objects, making the constructed motion path more natural, more diverse and more flexible. In addition, not only can the problem of motion path duplication be avoided, but also the amount of data processing is greatly reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and more particularly to a motion path construction method, a motion path construction device, a computing device, and a computer-readable storage medium. Background Art

[0002] With the continuous development of computer technology and Internet technology, various artificial intelligence designs have emerged in an endless stream. Pathfinding is one of the most important and widely influential topics of artificial intelligence in video-based online games (such as video games). Navigation Mesh (NavMesh, Navigation Mesh) is a widely used pathfinding technology that generates a continuous polygonal / triangular mesh of the walkable part of the map, and then uses the funnel algorithm to convert the polygonal / triangular mesh into a path. However, when using the traditional funnel method to find the path, the path result is single, and the same route is found based on the same starting point and end point, resulting in overlapping paths when multiple game characters move from the same starting point to the same end point. Therefore, an effective solution is urgently needed to solve the above problems. Summary of the invention

[0003] In view of this, the embodiment of the present application provides a motion path construction method to solve the technical defects existing in the prior art. The embodiment of the present application also provides a motion path construction device, a computing device, and a computer-readable storage medium.

[0004] According to a first aspect of an embodiment of the present application, a motion path construction method is provided, comprising:

[0005] Acquire a target grid map, wherein endpoints and edges in the target grid map constitute movement boundaries of the target object during the execution of the target task;

[0006] Determine at least one reference point between a start point and an end point of the target task in the target grid map according to the position information of the endpoints and the edges in the target grid map;

[0007] Determining at least one path point based on preset motion parameters of the target object and position information of the at least one reference point;

[0008] A motion path of the target object in the process of performing the target task is constructed based on the starting point, the end point and the at least one path point.

[0009] Optionally, constructing a motion path of the target object in the process of performing the target task based on the starting point, the end point and the at least one path point includes:

[0010] Connecting the starting point, the at least one path point and the end point to obtain an initial motion path of the target object in the process of performing the target task;

[0011] The initial motion path is smoothed according to a preset smoothing algorithm to generate a motion path of the target object in the process of performing the target task.

[0012] Optionally, before performing path smoothing processing on the initial motion path according to a preset smoothing algorithm to generate a motion path of the target object in the process of performing the target task, the method further includes:

[0013] Get preset smoothing parameters and smoothing algorithms;

[0014] The smoothing algorithm is set according to the preset smoothing parameters to obtain a preset smoothing algorithm.

[0015] Optionally, performing path smoothing processing on the initial motion path according to a preset smoothing algorithm to generate a motion path of the target object in the process of performing the target task includes:

[0016] Locating at least one inflection point on the initial motion path;

[0017] For any one of the at least one inflection point, a curve control point is respectively set on both sides of the inflection point, and the inflection point is smoothed according to the preset smoothing algorithm;

[0018] When the at least one inflection point is smoothed, a motion path of the target object in the process of performing the target task is generated.

[0019] Optionally, determining at least one reference point between a start point and an end point of the target task in the target grid map according to the position information of the endpoints and the edges in the target grid map comprises:

[0020] Determine a starting grid where the starting point is located and a terminal grid where the terminal is located in the target grid map;

[0021] From the starting grid to the end grid, at least one designated adjacent edge in the target grid map and a reference point on each designated adjacent edge are determined using a preset pathfinding algorithm according to the position information of the endpoints and edges in the target grid map.

[0022] Optionally, the step of determining at least one designated adjacent edge and a reference point on each designated adjacent edge in the target grid map from the starting grid to the end grid according to the position information of the endpoints and edges in the target grid map by using a preset pathfinding algorithm includes:

[0023] Determine a designated adjacent edge between the starting grid and a next adjacent grid, and determine a midpoint of the designated adjacent edge as a reference point;

[0024] Along the outer contour of the target grid map, according to the position information of the endpoints and edges in the target grid map, respectively determine the next adjacent endpoints adjacent to the two endpoints of the designated adjacent edge to form new two endpoints;

[0025] In the case where there is an adjacent edge between the new two end points, the adjacent edge is determined as a designated adjacent edge, and the step of determining the midpoint of the designated adjacent edge as a reference point is performed until the end point grid.

[0026] Optionally, after determining the next adjacent endpoints adjacent to the two endpoints of the designated adjacent edge along the outer contour of the target grid map according to the position information of the endpoints and edges in the target grid map to form new two endpoints, the method further includes:

[0027] In the case that there is no adjacent edge between the two new endpoints, determining the adjacent edge of the designated endpoint of the two new endpoints as the designated adjacent edge, wherein the designated endpoint is an endpoint of the two new endpoints to which the adjacent edge exists;

[0028] The step of determining the midpoint of the designated adjacent edge as the reference point is performed until the end point grid.

[0029] Optionally, the determining at least one path point based on the preset motion parameters of the target object and the position information of the at least one reference point includes:

[0030] For any one of the at least one reference point, based on the preset motion parameters of the target object and the position information of the reference point, a path point is determined on the designated adjacent edge where the reference point is located.

[0031] Optionally, the determining of a path point on a designated adjacent edge where the reference point is located based on preset motion parameters of the target object and position information of the reference point includes:

[0032] Determining path constraint conditions according to preset motion parameters of the target object;

[0033] According to the position information of the reference point, a path point that meets the path constraint condition is determined on the designated adjacent edge where the reference point is located.

[0034] Optionally, the preset motion parameters include at least one of a walking preference parameter, a walking disturbance parameter, a walking stability parameter and a volume parameter of the target object.

[0035] According to a second aspect of an embodiment of the present application, a motion path construction device is provided, including:

[0036] An acquisition module is configured to acquire a target grid map, wherein endpoints and edges in the target grid map constitute movement boundaries of the target object in the process of performing the target task;

[0037] A first determination module is configured to determine at least one reference point between a start point and an end point of the target task in the target grid map according to position information of endpoints and edges in the target grid map;

[0038] A second determination module is configured to determine at least one path point based on preset motion parameters of the target object and position information of the at least one reference point;

[0039] A construction module is configured to construct a motion path of the target object in the process of performing the target task based on the starting point, the end point and the at least one path point.

[0040] Optionally, the building module is further configured to:

[0041] Connecting the starting point, the at least one path point and the end point to obtain an initial motion path of the target object in the process of performing the target task;

[0042] The initial motion path is smoothed according to a preset smoothing algorithm to generate a motion path of the target object in the process of performing the target task.

[0043] Optionally, the building module is further configured to:

[0044] Get preset smoothing parameters and smoothing algorithms;

[0045] The smoothing algorithm is set according to the preset smoothing parameters to obtain a preset smoothing algorithm.

[0046] Optionally, the building module is further configured to:

[0047] Locating at least one inflection point on the initial motion path;

[0048] For any one of the at least one inflection point, a curve control point is respectively set on both sides of the inflection point, and the inflection point is smoothed according to the preset smoothing algorithm;

[0049] When the at least one inflection point is smoothed, a motion path of the target object in the process of performing the target task is generated.

[0050] Optionally, the first determining module is further configured to:

[0051] Determine a starting grid where the starting point is located and a terminal grid where the terminal is located in the target grid map;

[0052] From the starting grid to the end grid, at least one designated adjacent edge in the target grid map and a reference point on each designated adjacent edge are determined using a preset pathfinding algorithm according to the position information of the endpoints and edges in the target grid map.

[0053] Optionally, the first determining module is further configured to:

[0054] Determine a designated adjacent edge between the starting grid and a next adjacent grid, and determine a midpoint of the designated adjacent edge as a reference point;

[0055] Along the outer contour of the target grid map, according to the position information of the endpoints and edges in the target grid map, respectively determine the next adjacent endpoints adjacent to the two endpoints of the designated adjacent edge to form new two endpoints;

[0056] In the case where there is an adjacent edge between the new two end points, the adjacent edge is determined as a designated adjacent edge, and the step of determining the midpoint of the designated adjacent edge as a reference point is performed until the end point grid.

[0057] Optionally, the first determining module is further configured to:

[0058] In the case that there is no adjacent edge between the two new endpoints, determining the adjacent edge of the designated endpoint of the two new endpoints as the designated adjacent edge, wherein the designated endpoint is an endpoint of the two new endpoints to which the adjacent edge exists;

[0059] The step of determining the midpoint of the designated adjacent edge as the reference point is performed until the end point grid.

[0060] Optionally, the second determining module is further configured to:

[0061] For any one of the at least one reference point, based on the preset motion parameters of the target object and the position information of the reference point, a path point is determined on the designated adjacent edge where the reference point is located.

[0062] Optionally, the second determining module is further configured to:

[0063] Determining path constraint conditions according to preset motion parameters of the target object;

[0064] According to the position information of the reference point, a path point that meets the path constraint condition is determined on the designated adjacent edge where the reference point is located.

[0065] Optionally, the preset motion parameters include at least one of a walking preference parameter, a walking disturbance parameter, a walking stability parameter and a volume parameter of the target object.

[0066] According to a third aspect of an embodiment of the present application, a computing device is provided, including:

[0067] Memory and processor;

[0068] The memory is used to store computer executable instructions, and the processor implements the steps of the motion path construction method when executing the computer executable instructions.

[0069] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, which stores computer-executable instructions, and when the instructions are executed by a processor, the steps of the motion path construction method are implemented.

[0070] According to a fifth aspect of an embodiment of the present application, a chip is provided, which stores computer instructions, and when the computer instructions are executed by the chip, the steps of the motion path construction method are implemented.

[0071] The motion path construction method provided by the present application first obtains the target grid map, and the endpoints and edges in the target grid map constitute the motion boundaries of the target object in the process of performing the target task; then, according to the position information of the endpoints and edges in the target grid map, at least one reference point between the starting point and the end point of the target task is determined in the target grid map; then, based on the preset motion parameters of the target object and the position information of the at least one reference point, at least one path point is determined; further, based on the starting point, the end point and the at least one path point, the motion path of the target object in the process of performing the target task is constructed. By determining at least one reference point between the starting point and the end point of the target task according to the position information of the endpoints and the edges, the reliability of the constructed motion path can be improved; by determining at least one path point by presetting the motion parameters and the position information of at least one reference point, it is beneficial to improve the provision of motion paths that meet the preset motion parameters for different target objects, so that the constructed motion paths are more natural, more diverse and more flexible. In addition, when a large number of target objects are simultaneously searching for paths, not only can the problem of repeated motion paths be avoided, but also at least one reference point can be determined once, and then motion paths are constructed for each target object respectively, which greatly reduces the amount of data processing. BRIEF DESCRIPTION OF THE DRAWINGS

[0072] Figure 1 is a flow chart of a motion path construction method provided by an embodiment of the present application;

[0073] Figure 2 is a schematic diagram of a target grid map provided by an embodiment of the present application;

[0074] Figure 3 is a processing flow chart of a motion path construction method applied to a cargo handling task provided by an embodiment of the present application;

[0075] Figure 4 is a structural schematic diagram of a motion path construction device provided by an embodiment of the present application;

[0076] Figure 5 It is a structural block diagram of a computing device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0077] Many specific details are described in the following description to facilitate a full understanding of the present application. However, the present application can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of the present application, so the present application is not limited by the specific implementation disclosed below.

[0078] The terms used in one or more embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of the present application. The singular forms of "a", "said" and "the" used in one or more embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in one or more embodiments of the present application refers to any or all possible combinations of one or more associated listed items.

[0079] It should be understood that, although the terms first, second, etc. may be used to describe various information in one or more embodiments of the present application, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of the present application, the first may also be referred to as the second, and similarly, the second may also be referred to as the first.

[0080] In the present application, a motion path construction method is provided. The present application also relates to a motion path construction device, a computing device, and a computer-readable storage medium, which are described in detail one by one in the following embodiments.

[0081] Figure 1 A flow chart of a motion path construction method provided according to an embodiment of the present application is shown, which specifically includes the following steps:

[0082] Step 102: Obtain a target grid map, where endpoints and edges in the target grid map constitute movement boundaries of the target object in the process of performing the target task.

[0083] Specifically, the target grid map refers to the corresponding grid map from the starting point to the end point when the target object performs a task in a certain application. The grid can be a triangular grid, a quadrilateral grid, or other polygonal grid, and this application does not limit this. The target object refers to the subject that performs the task in the application, such as a game character in the game; the target task refers to the task that the task subject performs in the application, such as a path-finding task, a transportation task, a rescue task, etc.

[0084] In actual applications, when the user opens the target application on the client, he can operate the target object to make the target object perform the target task and move from one point to another, that is, from the starting point where the target object is located to the end point. When the user triggers the target task, the server will obtain the target grid map corresponding to the target task based on the target task.

[0085] See also Figure 2 , Figure 2 A schematic diagram of a target grid map provided by an embodiment of the present application is shown, wherein the target grid map is composed of triangular grids, wherein the target grid map includes eight endpoints 1, 2, 3, 4, 5, 6, 7 and 8, and thirteen edges, namely, edge 12 between endpoints 1 and 2, edge 13 between endpoints 1 and 3, edge 23 between endpoints 2 and 3, edge 25 between endpoints 2 and 5, edge 34 between endpoints 3 and 4, edge 35 between endpoints 3 and 5, edge 45 between endpoints 4 and 5, edge 46 between endpoints 4 and 6, edge 56 between endpoints 5 and 6, edge 57 between endpoints 5 and 7, edge 58 between endpoints 5 and 8, edge 67 between endpoints 6 and 7, and edge 78 between endpoints 7 and 8.

[0086] Step 104: Determine at least one reference point between the start point and the end point of the target task in the target grid map according to the position information of the endpoints and edges in the target grid map.

[0087] On the basis of acquiring the target grid map, further, according to the position information of the endpoints and edges in the target grid map, at least one reference point between the starting point and the end point of the target task is determined.

[0088] Specifically, the location information of endpoints and edges refers to the connection relationship between endpoints and endpoints, edges and edges, and endpoints and edges; the starting point of the target task refers to the position where the target object has not yet executed or has just started to execute the target task; the end point refers to the position to be reached by the target object when executing the target task; the reference point refers to the several reference points that need to be passed from the starting point to the end point.

[0089] In practical applications, after obtaining the target grid map, it is necessary to determine at least one reference point that needs to be passed from the starting point to the end point in the target grid map based on the location information of each endpoint and edge in the target grid map and based on a preset algorithm.

[0090] See also Figure 2 , according to Figure 2 The location information of the endpoints and edges in the target grid map shown is used to determine the four reference points between the starting point S1 and the end point S2: a, b, c and d.

[0091] In order to improve the efficiency of determining the reference points and further improve the efficiency of constructing the motion path, a preset pathfinding algorithm may be used to determine at least one reference point between the start point and the end point, that is, according to the position information of the endpoints and edges in the target grid map, at least one reference point between the start point and the end point of the target task is determined in the target grid map. The specific implementation process may be as follows:

[0092] Determine a starting grid where the starting point is located and a terminal grid where the terminal is located in the target grid map;

[0093] From the starting grid to the end grid, at least one designated adjacent edge in the target grid map and a reference point on each designated adjacent edge are determined using a preset pathfinding algorithm according to the position information of the endpoints and edges in the target grid map.

[0094] Specifically, the starting grid refers to the grid to which the starting point belongs. For example, if the starting point is in the first grid, the first grid is the starting grid; the end grid refers to the grid to which the end point belongs. For example, if the end point is in the eighth grid, the eighth grid is the end grid. The preset pathfinding algorithm refers to an algorithm for finding a path between two points, such as the A* (A-Star) algorithm, the Greed-Best-First-Search algorithm, the Dijkstra algorithm, and the Navigation Mesh (NavMesh) algorithm; the adjacent edge refers to the edge common to two grids; the specified adjacent edge refers to the adjacent edge selected in the preset pathfinding algorithm.

[0095] In practical applications, after obtaining the target grid map, first determine the starting and ending points of the target task in the target grid map, then determine the starting grid according to the starting point, and determine the ending grid according to the ending point, see Figure 2, where the triangle mesh where the starting point S1 is located, that is, the triangle mesh composed of endpoints 1, 2 and 3 is the starting mesh, and the triangle mesh where the end point S2 is located, that is, the triangle mesh composed of endpoints 5, 7 and 8 is the end mesh. Further, from the direction of the initial mesh to the end mesh, according to the position information of the endpoints and edges in the target mesh map, according to the rules of the preset pathfinding algorithm, at least one designated adjacent edge is determined in the target mesh map, and then the reference points on each designated adjacent edge are determined.

[0096] It should be noted that the reference point may be the midpoint of the specified adjacent edge, may be an endpoint of the specified adjacent edge, or may be any other point on the specified adjacent edge.

[0097] In order to improve the accuracy and speed of determining the reference point, the designated adjacent edge can be determined based on the navigation grid algorithm, and the midpoint of the designated adjacent edge is used as the reference point, that is, from the starting grid to the end grid, according to the position information of the endpoints and edges in the target grid map, using the preset path finding algorithm, at least one designated adjacent edge in the target grid map and the reference point on each designated adjacent edge are determined. The specific implementation process can be as follows:

[0098] Determine a designated adjacent edge between the starting grid and a next adjacent grid, and determine a midpoint of the designated adjacent edge as a reference point;

[0099] Along the outer contour of the target grid map, according to the position information of the endpoints and edges in the target grid map, respectively determine the next adjacent endpoints adjacent to the two endpoints of the designated adjacent edge to form new two endpoints;

[0100] In the case where there is an adjacent edge between the new two end points, the adjacent edge is determined as a designated adjacent edge, and the step of determining the midpoint of the designated adjacent edge as a reference point is performed until the end point grid.

[0101] Specifically, an adjacent grid refers to a grid adjacent to a grid; a midpoint refers to a point that can divide a specified adjacent edge into two equal line segments; an outer contour refers to the line that constitutes the outer edge of the target grid map, such as Figure 2 The polygon is formed by connecting the middle endpoints 1, 3, 4, 6, 7, 8, 5, 2 and 1 in sequence.

[0102] In practical applications, the next grid adjacent to the starting grid, that is, the next adjacent grid, is first determined on the target grid map, and then the adjacent edge of the starting grid and the next adjacent grid is determined as the designated adjacent edge, and then the midpoint of the designated adjacent edge is selected as the reference point. Further, along the outer contour of the target grid map, and in combination with the position information of the endpoints and edges in the target grid map, the next adjacent endpoints of the two endpoints of the designated adjacent edge are determined respectively to obtain two new endpoints. Then, it is determined whether there is an adjacent edge between the new two endpoints. If so, the adjacent edge between the new two endpoints is determined as the designated adjacent edge, and the midpoint of the designated adjacent edge is selected as the reference point. Then, along the outer contour of the target grid map, and in combination with the position information of the endpoints and edges in the target grid map, the next adjacent endpoints of the two endpoints of the designated adjacent edge are determined respectively, and so on, until the end grid is reached, that is, when the designated adjacent edge is the edge of the end grid, it stops.

[0103] In addition, there may not be an adjacent edge between the new two endpoints. In order to improve the effectiveness of the finally determined motion path, when there is no adjacent edge between the new two endpoints, an adjacent edge corresponding to any one of the two endpoints can be selected as the designated adjacent edge, that is, along the outer contour of the target grid map, according to the position information of the endpoints and the edges in the target grid map, the next adjacent endpoints adjacent to the two endpoints of the designated adjacent edge are respectively determined, and after the new two endpoints are formed, the method further includes:

[0104] In the case that there is no adjacent edge between the two new endpoints, determining the adjacent edge of the designated endpoint of the two new endpoints as the designated adjacent edge, wherein the designated endpoint is an endpoint of the two new endpoints to which the adjacent edge exists;

[0105] The step of determining the midpoint of the designated adjacent edge as the reference point is performed until the end point grid.

[0106] In practical applications, it is determined whether there is an adjacent edge between the two new endpoints. If not, the adjacent edge of any of the two new endpoints is determined as the designated adjacent edge, that is, the adjacent edge of one of the two new endpoints with an adjacent edge is determined as the designated adjacent edge, and the midpoint of the designated adjacent edge is selected as the reference point. Then, along the outer contour of the target grid map, combined with the position information of the endpoints and edges in the target grid map, the next adjacent endpoints of the two endpoints of the designated adjacent edge are determined respectively, and so on, until the end grid is reached, that is, when the designated adjacent edge is the edge of the end grid, it stops.

[0107] Preferably, when there is no adjacent edge between the two new endpoints, determining the adjacent edge of the designated endpoints of the two new endpoints as the designated adjacent edge includes:

[0108] When there is no adjacent edge between the two new endpoints, the adjacent edge between the designated endpoint and the specific endpoint of the two new endpoints is determined as the designated adjacent edge, and the specific endpoint is the previous adjacent endpoint of the non-designated endpoint of the two new endpoints.

[0109] like Figure 2 As shown, the starting grid where the starting point S1 is located, that is, the starting grid composed of endpoints 1, 2 and 3, corresponds to the next adjacent grid composed of endpoints 2, 3 and 5. It can be seen that the edge composed of endpoints 2 and 3 is the designated adjacent edge 23 between the starting grid and the next adjacent grid, and the midpoint a of the designated adjacent edge 23 is determined as the reference point; then along the outer contour of the target grid map, according to the position information of the endpoints and edges in the target grid map, the next adjacent endpoint adjacent to endpoint 2 is determined to be endpoint 5, and the next adjacent endpoint adjacent to endpoint 3 is endpoint 4, that is, endpoint 5 and endpoint 4 are new two endpoints. There is an adjacent edge 45 between endpoints 5 and endpoint 4, then the adjacent edge 45 between endpoints 5 and endpoint 4 is determined as the designated adjacent edge 45, and the midpoint b of the designated adjacent edge 45 is determined as the reference point; then along the outer contour of the target grid map, according to the position information of the endpoints and edges in the target grid map, the next adjacent endpoint adjacent to endpoint 5 is determined to be endpoint 8, and the next adjacent endpoint adjacent to endpoint 4 is endpoint 6, that is, endpoint 8 and endpoint 6 are new two endpoints. If there is no adjacent edge between endpoint 8 and endpoint 6, the adjacent edge 56 between endpoint 6 (specified endpoint) and the previous adjacent endpoint of endpoint 8, endpoint 5 (specific endpoint), is determined as the specified adjacent edge, and the midpoint c of the specified adjacent edge 56 is determined as the reference point. Then, along the outer contour of the target grid map, according to the position information of the endpoints and edges in the target grid map, the next adjacent endpoint adjacent to endpoint 5 is determined to be endpoint 8, and the next adjacent endpoint adjacent to endpoint 6 is determined to be endpoint 7, that is, endpoint 8 and endpoint 7 are the new two endpoints. If there is no adjacent edge between endpoint 8 and endpoint 7, the adjacent edge 57 between endpoint 7 (specified endpoint) and the previous adjacent endpoint of endpoint 8, endpoint 5 (specific endpoint), is determined as the specified adjacent edge 57, and the midpoint d of the specified adjacent edge 57 is determined as the reference point. At this time, the specified adjacent edge 57 between endpoint 7 and endpoint 5 is the edge of the end grid, so stop. That is, four designated adjacent edges (designated adjacent edge 23, designated adjacent edge 45, designated adjacent edge 56, and designated adjacent edge 57) and four reference points (midpoint a, midpoint b, midpoint c, and midpoint d) are determined.

[0110] It should be noted that the starting point S1, the midpoint a, the midpoint b, the midpoint c, the midpoint d and the end point S2 are connected in sequence to form a reference path. The reference path is combined with the specified adjacent edge 23, the specified adjacent edge 45, the specified adjacent edge 56 and the specified adjacent edge 57 to form the center line of the target grid map, and the motion path can be further determined on the center line.

[0111] Step 106: Determine at least one path point based on the preset motion parameters of the target object and the position information of the at least one reference point.

[0112] Based on determining at least one reference point between the start point and the end point according to the position information of the endpoints and edges in the target grid map, further, based on the preset motion parameters of the target object and the position information of at least one reference point, at least one path point is determined.

[0113] Specifically, the preset motion parameters refer to the parameters of the motion behavior of the target object, which can be set by the user or calculated based on the data of the user's historical motion path. The preset motion parameters include at least one of the walking preference parameters, walking disturbance parameters, walking stability parameters and the target object volume parameters. The walking preference parameters refer to the proportion of the target object tending to walk on the center line or the side line, that is, the proportion of the distance between the path point that the target object tends to walk and the reference point or the end point relative to the specified adjacent edge; the walking disturbance parameter refers to the disturbance of the walking preference parameter within a certain range; the stability coefficient refers to the stability of each path point with respect to the walking preference parameter. If the stability is high, each path point is calculated according to the fixed walking preference parameter; otherwise, the walking preference parameter of each path point fluctuates; the target object volume parameter refers to the radius of the target object and / or the area of ​​the target object.

[0114] In practical applications, after determining at least one reference point, the position information of each reference point can be obtained, and then at least one path point can be determined in the target grid map based on the position information of at least one reference point and the preset motion parameters of the target object.

[0115] In order to improve the efficiency of determining the path points, the path points correspond to the reference points one by one, and a path point can be determined in the target grid map according to the position information of a reference point and the preset motion parameters of the target object, that is, the at least one path point is determined based on the preset motion parameters of the target object and the position information of the at least one reference point, including:

[0116] For any one of the at least one reference point, based on the preset motion parameters of the target object and the position information of the reference point, a path point is determined on the designated adjacent edge where the reference point is located.

[0117] In practical applications, for each reference point, another position information can be determined on the specified adjacent edge according to the position information of the reference point and the preset motion parameters. The point pointed to by the position information is the path point. For example, according to the position information of the reference point and the preset motion parameters, the adjacent edge where the reference point is located is shrunk using the standard funnel algorithm to determine the path point. Each reference point is processed according to the above method to obtain at least one path point.

[0118] Furthermore, the constraint conditions of the path points may be determined according to the preset motion parameters, that is, the path constraint conditions are determined, and then at least one path point that meets the path constraint conditions is determined, that is, the path point is determined on the specified adjacent edge where the reference point is located based on the preset motion parameters of the target object and the position information of the reference point, including:

[0119] Determining path constraint conditions according to preset motion parameters of the target object;

[0120] According to the position information of the reference point, a path point that meets the path constraint condition is determined on the designated adjacent edge where the reference point is located.

[0121] Specifically, the path constraint condition refers to the constraint condition used to determine the path point, that is, the constraint condition used to determine the motion path.

[0122] In practical applications, the corresponding path constraint conditions of the path point are determined based on the preset motion parameters of the target object, and then a path point that meets the path constraint conditions is determined on the specified adjacent edge where the reference point is located according to the position information of the reference point.

[0123] For example, the preset motion parameters include walking preference parameters, walking disturbance parameters and walking stability parameters, where the walking preference parameter is 0.2, that is, the ratio of the distance from the path point to the reference point to the length of the designated adjacent edge where the reference point is located is 0.2; the walking disturbance parameter is 0.1, which means that for all path points, the walking preference parameter has a disturbance of 0.1, and when the walking disturbance parameter is 0.1, the range of the walking preference parameter is 0.18-0.22; the walking stability parameter is 1, which means that the path points can be calculated according to the fixed walking preference parameters. According to the walking preference parameter 0.2, the walking disturbance parameter 0.1 and the walking stability parameter 1, the path constraint condition can be determined as follows: the ratio of the distance from the path point to the reference point to the length of the designated adjacent edge where the reference point is located is 0.2, and the path point is on the designated adjacent edge where the reference point is located. At this time, according to the position information of the reference point, on the designated adjacent edge where the reference point is located, a point whose distance from the reference point is one-fifth of the length of the designated adjacent edge can be determined. At this time, there are two points that meet the requirements, located on both sides of the reference point. At this time, one can be randomly selected as a path point, or one of them can be determined as a path point according to a preset selection rule.

[0124] Step 108: Based on the starting point, the end point and the at least one path point, construct a motion path of the target object in the process of performing the target task.

[0125] On the basis of determining at least one path point based on preset motion parameters of the target object and position information of at least one reference point, further, a motion path of the target object in the process of performing the target task is constructed according to the starting point, the end point and at least one path point.

[0126] Specifically, the motion path is the path that the target object walks when performing the target task.

[0127] In practical applications, the starting point, at least one path point, and the end point can be directly connected in the order from the starting grid to the end grid to obtain the motion path of the target object in the process of performing the target task; the starting point, at least one path point, and the end point can also be first connected in the order from the starting grid to the end grid, and then the obtained path is adjusted to obtain the motion path of the target object in the process of performing the target task.

[0128] In order to make the obtained motion path more natural and more in line with the walking method, thereby improving the user stickiness of the target application, the starting point, at least one path point, and the end point can be connected in the order from the starting grid to the end grid, and then the obtained path is adjusted to obtain the motion path, that is, based on the starting point, the end point and the at least one path point, the motion path of the target object in the process of performing the target task is constructed. The specific implementation process can be:

[0129] Connecting the starting point, the at least one path point and the end point to obtain an initial motion path of the target object in the process of performing the target task;

[0130] The initial motion path is smoothed according to a preset smoothing algorithm to generate a motion path of the target object in the process of performing the target task.

[0131] Specifically, the preset smoothing algorithm refers to a preset algorithm for smoothing a motion path, such as a Bezier curve algorithm, a cubic spline curve algorithm, and the like.

[0132] In practical applications, it is necessary to first connect the starting point, at least one path point, and the end point in the order from the starting grid to the end grid, that is, to connect them in the order of motion, so as to obtain the initial motion path of the target object in the process of performing the target task. Since the initial motion path is obtained by directly connecting the starting point, each path point, and the end point, the initial motion path is not smooth enough. At this time, a preset smoothing algorithm is used to smooth the initial motion path, so as to obtain the motion path of the target object in the process of performing the target task.

[0133] It should be noted that the preset smoothing algorithm is divided into two parts: a smoothing algorithm and a preset smoothing parameter. Directly using the smoothing algorithm to perform path smoothing processing on the initial motion path has a poor effect, so the smoothing algorithm is adjusted based on the preset smoothing parameter to obtain the preset smoothing algorithm. That is, before performing path smoothing processing on the initial motion path according to the preset smoothing algorithm to generate the motion path of the target object in the process of performing the target task, it also includes:

[0134] Get preset smoothing parameters and smoothing algorithms;

[0135] The smoothing algorithm is set according to the preset smoothing parameters to obtain a preset smoothing algorithm.

[0136] Specifically, the preset smoothing parameter refers to a preset coefficient of path smoothing.

[0137] In practical applications, the preset smoothing parameters and smoothing algorithm are first obtained, and then the preset smoothing parameters are used to replace or adjust the parameters in the smoothing algorithm to obtain the preset smoothing algorithm. The preset smoothing algorithm is further used to smooth the initial motion path to obtain a more natural motion path that conforms to the personality of the target object.

[0138] Preferably, the initial motion path can be smoothed using a Bezier curve algorithm. The Bezier curve, also known as the Bezier curve or Bezier curve, is a mathematical curve applied to two-dimensional graphics applications. General vector graphics software uses it to accurately draw curves. The Bezier curve consists of line segments and nodes. The nodes are draggable fulcrums, and the line segments are like retractable rubber bands. That is, the initial motion path is smoothed according to the preset smoothing algorithm to generate the motion path of the target object in the process of performing the target task. The specific implementation process is:

[0139] Locating at least one inflection point on the initial motion path;

[0140] For any one of the at least one inflection point, a curve control point is respectively set on both sides of the inflection point, and the inflection point is smoothed according to the preset smoothing algorithm;

[0141] When the at least one inflection point is smoothed, a motion path of the target object in the process of performing the target task is generated.

[0142] Specifically, an inflection point refers to a path point at which the path direction of the point changes.

[0143] In practical applications, after obtaining the initial motion path, the inflection points on the initial motion path are determined, and each inflection point is smoothed using the Bezier curve algorithm: a control point is added on both sides of the inflection point, where the distance from the control point to the inflection point is determined by the parameter in the Bezier curve algorithm - the preset smoothing parameter, and then the inflection point is smoothed using the Bezier curve, so that the initial motion path where the inflection point is located becomes natural. After all inflection points are smoothed, the resulting motion path is the motion path of the target object in the process of performing the target task.

[0144] In addition, when using the Bezier curve algorithm for smoothing, the second-order Bezier curve algorithm can be selected. In this case, the smoothed curve is located in the triangle formed by the two endpoints and the control point of the specified adjacent edge where the inflection point is located. If the triangle formed by the two endpoints and the control point is located in the grid, the smooth path is available, that is, the inflection point and the two control points are all in the grid.

[0145] It should be noted that for the initial motion path without inflection points, that is, the initial motion path in which the starting point, at least one path point and the end point are on a straight line, separate adjustments can also be made: a Bezier control point can be added to the midpoint of the initial motion path, and the distance from the control point to the midpoint is determined by the parameters of the Bezier algorithm and the preset smoothing parameters, and then based on the Bezier control point, the midpoint is pulled outward to form a Bezier curve of a certain degree to obtain the motion path; a random support point can also be added to the end point of the initial motion path so that the route of the initial motion path moves first toward the support point and then to the end point, and then the motion path is obtained, that is, a smoothing algorithm is performed near the support point.

[0146] The motion path construction method provided by the present application first obtains the target grid map, and the endpoints and edges in the target grid map constitute the motion boundaries of the target object in the process of performing the target task; then, according to the position information of the endpoints and edges in the target grid map, at least one reference point between the starting point and the end point of the target task is determined in the target grid map; then, based on the preset motion parameters of the target object and the position information of the at least one reference point, at least one path point is determined; further, based on the starting point, the end point and the at least one path point, the motion path of the target object in the process of performing the target task is constructed. By determining at least one reference point between the starting point and the end point of the target task according to the position information of the endpoints and the edges, the reliability of the constructed motion path can be improved; by determining at least one path point by presetting the motion parameters and the position information of at least one reference point, it is beneficial to improve the provision of motion paths that meet the preset motion parameters for different target objects, so that the constructed motion paths are more natural, more diverse and more flexible. In addition, when a large number of target objects are simultaneously searching for paths, not only can the problem of repeated motion paths be avoided, but also at least one reference point can be determined once, and then motion paths are constructed for each target object respectively, which greatly reduces the amount of data processing.

[0147] The following combination Figure 3 Taking the application of the motion path construction method provided by the present application to the cargo handling task as an example, the motion path construction method is further described. Figure 3 A processing flow chart of a motion path construction method for a cargo handling task provided by an embodiment of the present application is shown, which specifically includes the following steps:

[0148] Step 302: Obtain a target grid map, where endpoints and edges in the target grid map constitute movement boundaries of the target game character during the cargo handling task.

[0149] Among them, the target game character is the target object, and the cargo handling task is the target task.

[0150] Step 304: Determine the starting grid where the starting point of the cargo handling task is located and the ending grid where the ending point is located in the target grid map.

[0151] Step 306: From the starting grid to the end grid, based on the location information of the endpoints and edges in the target grid map, using a preset pathfinding algorithm, determine at least one designated adjacent edge in the target grid map and a reference point on each designated adjacent edge.

[0152] Optionally, from the starting grid to the end grid, according to the position information of the endpoints and edges in the target grid map, using a preset pathfinding algorithm, at least one designated adjacent edge in the target grid map and a reference point on each designated adjacent edge are determined, including:

[0153] Determine the designated adjacent edge between the starting grid and the next adjacent grid, and determine the midpoint of the designated adjacent edge as the reference point;

[0154] Along the outer contour of the target grid map, according to the position information of the endpoints and edges in the target grid map, the next adjacent endpoints of the two endpoints of the specified adjacent edge are determined respectively to form new two endpoints;

[0155] In the case where there is an adjacent edge between the two new endpoints, the adjacent edge is determined as a designated adjacent edge, and the step of determining the midpoint of the designated adjacent edge as a reference point is performed until the end point grid;

[0156] When there is no adjacent edge between the two new endpoints, the adjacent edge of the specified endpoint of the two new endpoints is determined as the specified adjacent edge, and the specified endpoint is an endpoint of the two new endpoints where the adjacent edge exists; the step of determining the midpoint of the specified adjacent edge as the reference point is executed until the end point grid.

[0157] Step 308: Determine path constraints according to preset motion parameters of the target game character.

[0158] Step 310: For any one of the at least one reference point, based on the position information of the reference point, determine a path point that meets the path constraint condition on a designated adjacent edge where the reference point is located.

[0159] Step 312: Connect the starting point, at least one path point and the end point to obtain the initial motion path of the target game character in the process of performing the cargo handling role.

[0160] Step 314: Obtain preset smoothing parameters and smoothing algorithm.

[0161] Step 316: Setting the smoothing algorithm according to the preset smoothing parameters to obtain the preset smoothing algorithm.

[0162] Step 318: Perform path smoothing processing on the initial motion path according to a preset smoothing algorithm to generate a motion path of the target game character in the process of performing the cargo handling role.

[0163] Optionally, the initial motion path is smoothed according to a preset smoothing algorithm to generate a motion path of the target game character in the process of performing the cargo handling role, including:

[0164] Locating at least one inflection point on the initial motion path;

[0165] For any one of the at least one inflection point, a curve control point is set on both sides of the inflection point, and the inflection point is smoothed according to a preset smoothing algorithm;

[0166] When at least one inflection point is smoothed, a motion path of the target game character in the process of performing the cargo handling role is generated.

[0167] The motion path construction method provided by the present application can improve the reliability of the constructed motion path by determining at least one reference point between the starting point and the end point of the target task according to the position information of the endpoints and the edges; by presetting the motion parameters and the position information of at least one reference point, at least one path point is determined, which is conducive to providing motion paths that meet the preset motion parameters for different target objects, making the constructed motion paths more natural, more diverse and more flexible. In addition, when finding paths for a large number of target objects at the same time, not only can the problem of repeated motion paths be avoided, but also at least one reference point can be determined once, and then the motion path can be constructed for each target object respectively, which greatly reduces the amount of data processing.

[0168] Corresponding to the above method embodiment, the present application also provides a motion path construction device embodiment, Figure 4 FIG. 1 is a schematic diagram showing the structure of a motion path construction device provided by an embodiment of the present application. Figure 4 As shown, the device comprises:

[0169] An acquisition module 402 is configured to acquire a target grid map, wherein endpoints and edges in the target grid map constitute a motion boundary of a target object in a process of performing a target task;

[0170] A first determination module 404 is configured to determine at least one reference point between a start point and an end point of the target task in the target grid map according to the position information of the endpoints and the edges in the target grid map;

[0171] A second determination module 406 is configured to determine at least one path point based on the preset motion parameters of the target object and the position information of the at least one reference point;

[0172] The construction module 408 is configured to construct a motion path of the target object in the process of performing the target task based on the starting point, the end point and the at least one path point.

[0173] Optionally, the construction module 408 is further configured to:

[0174] Connecting the starting point, the at least one path point and the end point to obtain an initial motion path of the target object in the process of performing the target task;

[0175] The initial motion path is smoothed according to a preset smoothing algorithm to generate a motion path of the target object in the process of performing the target task.

[0176] Optionally, the construction module 408 is further configured to:

[0177] Get preset smoothing parameters and smoothing algorithms;

[0178] The smoothing algorithm is set according to the preset smoothing parameters to obtain a preset smoothing algorithm.

[0179] Optionally, the construction module 408 is further configured to:

[0180] Locating at least one inflection point on the initial motion path;

[0181] For any one of the at least one inflection point, a curve control point is respectively set on both sides of the inflection point, and the inflection point is smoothed according to the preset smoothing algorithm;

[0182] When the at least one inflection point is smoothed, a motion path of the target object in the process of performing the target task is generated.

[0183] Optionally, the first determining module 404 is further configured to:

[0184] Determine a starting grid where the starting point is located and a terminal grid where the terminal is located in the target grid map;

[0185] From the starting grid to the end grid, at least one designated adjacent edge in the target grid map and a reference point on each designated adjacent edge are determined using a preset pathfinding algorithm according to the position information of the endpoints and edges in the target grid map.

[0186] Optionally, the first determining module 404 is further configured to:

[0187] Determine a designated adjacent edge between the starting grid and a next adjacent grid, and determine a midpoint of the designated adjacent edge as a reference point;

[0188] Along the outer contour of the target grid map, according to the position information of the endpoints and edges in the target grid map, respectively determine the next adjacent endpoints adjacent to the two endpoints of the designated adjacent edge to form new two endpoints;

[0189] In the case where there is an adjacent edge between the new two end points, the adjacent edge is determined as a designated adjacent edge, and the step of determining the midpoint of the designated adjacent edge as a reference point is performed until the end point grid.

[0190] Optionally, the first determining module 404 is further configured to:

[0191] In the case that there is no adjacent edge between the two new endpoints, determining the adjacent edge of the designated endpoint of the two new endpoints as the designated adjacent edge, wherein the designated endpoint is an endpoint of the two new endpoints to which the adjacent edge exists;

[0192] The step of determining the midpoint of the designated adjacent edge as the reference point is performed until the end point grid.

[0193] Optionally, the second determining module 406 is further configured to:

[0194] For any one of the at least one reference point, based on the preset motion parameters of the target object and the position information of the reference point, a path point is determined on the designated adjacent edge where the reference point is located.

[0195] Optionally, the second determining module 406 is further configured to:

[0196] Determining path constraint conditions according to preset motion parameters of the target object;

[0197] According to the position information of the reference point, a path point that meets the path constraint condition is determined on the designated adjacent edge where the reference point is located.

[0198] Optionally, the preset motion parameters include at least one of a walking preference parameter, a walking disturbance parameter, a walking stability parameter and a volume parameter of the target object.

[0199] The motion path construction device provided by the present application first obtains the target grid map, and the endpoints and edges in the target grid map constitute the motion boundaries of the target object in the process of performing the target task; then, according to the position information of the endpoints and edges in the target grid map, at least one reference point between the starting point and the end point of the target task is determined in the target grid map; then, based on the preset motion parameters of the target object and the position information of the at least one reference point, at least one path point is determined; further, based on the starting point, the end point and the at least one path point, the motion path of the target object in the process of performing the target task is constructed. By determining at least one reference point between the starting point and the end point of the target task according to the position information of the endpoints and the edges, the reliability of the constructed motion path can be improved; by determining at least one path point by preset motion parameters and the position information of at least one reference point, it is beneficial to improve the provision of motion paths that meet the preset motion parameters for different target objects, so that the constructed motion paths are more natural, more diverse and more flexible. In addition, when a large number of target objects are simultaneously searching for paths, not only can the problem of repeated motion paths be avoided, but also at least one reference point can be determined once, and then motion paths are constructed for each target object respectively, which greatly reduces the amount of data processing.

[0200] The above is a schematic scheme of a motion path construction device of this embodiment. It should be noted that the technical scheme of the motion path construction device and the technical scheme of the motion path construction method described above belong to the same concept, and the details not described in detail in the technical scheme of the motion path construction device can be referred to the description of the technical scheme of the motion path construction method described above.

[0201] In addition, the components in the device embodiment should be understood as the functional modules that must be established to implement the steps of the program flow or the steps of the method, and the functional modules are not actually functionally divided or separated. The device claim defined by such a group of functional modules should be understood as the functional module architecture of the solution mainly implemented by the computer program recorded in the specification, and should not be understood as the physical device that mainly implements the solution by hardware.

[0202] Figure 5 The block diagram of a computing device 500 provided according to an embodiment of the present application is shown. The components of the computing device 500 include but are not limited to a memory 510 and a processor 520. The processor 520 is connected to the memory 510 via a bus 530, and the database 550 is used to store data.

[0203] The computing device 500 also includes an access device 540 that enables the computing device 500 to communicate via one or more networks 560. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 540 may include one or more of any type of network interface (e.g., a network interface card (NIC)) of wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a world-wide interoperability for microwave access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, a near field communication (NFC) interface, and the like.

[0204] In one embodiment of the present application, the above components of the computing device 500 and Figure 5 Other components not shown in the figure may also be connected to each other, for example, via a bus. It should be understood that Figure 5 The computing device structure block diagram shown is only for the purpose of illustration, and is not intended to limit the scope of the present application. Those skilled in the art may add or replace other components as needed.

[0205] The computing device 500 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smart phone), a wearable computing device (e.g., a smart watch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or PC. The computing device 500 may also be a mobile or stationary server.

[0206] The processor 520 is used to execute computer executable instructions of the motion path construction method.

[0207] The above is a schematic scheme of a computing device of this embodiment. It should be noted that the technical scheme of the computing device and the technical scheme of the motion path construction method described above are of the same concept, and the details not described in detail in the technical scheme of the computing device can be found in the description of the technical scheme of the motion path construction method described above.

[0208] An embodiment of the present application further provides a computer-readable storage medium storing computer instructions, which are used in a motion path construction method when executed by a processor.

[0209] The above is a schematic scheme of a computer-readable storage medium of this embodiment. It should be noted that the technical scheme of the storage medium and the technical scheme of the motion path construction method described above are of the same concept, and the details not described in detail in the technical scheme of the storage medium can be referred to the description of the technical scheme of the motion path construction method described above.

[0210] An embodiment of the present application discloses a chip storing computer instructions, which implement the steps of the motion path construction method as described above when executed by a processor.

[0211] The above describes specific embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0212] The computer instructions include computer program codes, which may be in source code form, object code form, executable files or some intermediate forms, etc. The computer readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc.

[0213] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described action sequence, because according to the present application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.

[0214] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0215] The preferred embodiments of the present application disclosed above are only used to help explain the present application. The optional embodiments do not describe all the details in detail, nor do they limit the invention to the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of the present application. The present application selects and specifically describes these embodiments in order to better explain the principles and practical applications of the present application, so that those skilled in the art can understand and use the present application well. The present application is only limited by the claims and their full scope and equivalents.

Claims

1. A motion path construction method, characterized in that: include: Acquire a target grid map, wherein endpoints and edges in the target grid map constitute movement boundaries of the target object during the process of performing the target task; Determining at least one reference point between the starting point and the end point of the target task in the target grid map according to the location information of the endpoints and the edges in the target grid map, including: determining a starting grid where the starting point is located and a terminal grid where the end point is located in the target grid map; from the starting grid to the terminal grid, determining at least one designated adjacent edge in the target grid map and a reference point on each designated adjacent edge according to the location information of the endpoints and the edges in the target grid map using a preset path-finding algorithm; Determining at least one path point based on the preset motion parameters of the target object and the position information of the at least one reference point includes: for any one of the at least one reference point, determining a path point on a designated adjacent edge where the reference point is located based on the preset motion parameters of the target object and the position information of the reference point; A motion path of the target object in the process of performing the target task is constructed based on the starting point, the end point and the at least one path point.

2. The method according to claim 1, characterized in that The step of constructing a motion path of the target object in the process of performing the target task based on the starting point, the end point and the at least one path point includes: Connecting the starting point, the at least one path point and the end point to obtain an initial motion path of the target object in the process of performing the target task; The initial motion path is smoothed according to a preset smoothing algorithm to generate a motion path of the target object in the process of performing the target task.

3. The method according to claim 2, characterized in that Before performing path smoothing processing on the initial motion path according to a preset smoothing algorithm to generate a motion path of the target object in the process of performing the target task, the method further includes: Get preset smoothing parameters and smoothing algorithms; The smoothing algorithm is set according to the preset smoothing parameters to obtain a preset smoothing algorithm.

4. The method according to claim 2 or 3, characterized in that: The performing path smoothing processing on the initial motion path according to a preset smoothing algorithm to generate a motion path of the target object in the process of performing the target task includes: Locating at least one inflection point on the initial motion path; For any one of the at least one inflection point, a curve control point is respectively set on both sides of the inflection point, and the inflection point is smoothed according to the preset smoothing algorithm; When the at least one inflection point is smoothed, a motion path of the target object in the process of performing the target task is generated.

5. The method according to claim 1, characterized in that The method of determining at least one designated adjacent edge and a reference point on each designated adjacent edge in the target grid map from the starting grid to the end grid according to the position information of the endpoints and edges in the target grid map by using a preset pathfinding algorithm includes: Determine a designated adjacent edge between the starting grid and a next adjacent grid, and determine a midpoint of the designated adjacent edge as a reference point; Along the outer contour of the target grid map, according to the position information of the endpoints and edges in the target grid map, respectively determine the next adjacent endpoints adjacent to the two endpoints of the designated adjacent edge to form new two endpoints; In the case where there is an adjacent edge between the new two end points, the adjacent edge is determined as a designated adjacent edge, and the step of determining the midpoint of the designated adjacent edge as a reference point is performed until the end point grid.

6. The method according to claim 5, characterized in that After determining the next adjacent endpoints of the two endpoints of the designated adjacent edge along the outer contour of the target grid map according to the position information of the endpoints and edges in the target grid map to form new two endpoints, the method further includes: In the case that there is no adjacent edge between the two new endpoints, determining the adjacent edge of the designated endpoint of the two new endpoints as the designated adjacent edge, wherein the designated endpoint is an endpoint of the two new endpoints to which the adjacent edge exists; The step of determining the midpoint of the designated adjacent edge as the reference point is performed until the end point grid.

7. The method according to claim 1, characterized in that The determining of the path point on the designated adjacent edge where the reference point is located based on the preset motion parameters of the target object and the position information of the reference point includes: Determining path constraint conditions according to preset motion parameters of the target object; According to the position information of the reference point, a path point that meets the path constraint condition is determined on the designated adjacent edge where the reference point is located.

8. The method according to claim 1, characterized in that The preset motion parameters include at least one of a walking preference parameter, a walking disturbance parameter, a walking stability parameter and a target object volume parameter.

9. A motion path construction device, characterized in that: include: An acquisition module is configured to acquire a target grid map, wherein endpoints and edges in the target grid map constitute a motion boundary of the target object in the process of performing the target task; A first determination module is configured to determine at least one reference point between a start point and an end point of the target task in the target grid map according to position information of endpoints and edges in the target grid map; The first determination module is further configured to determine a starting grid where the starting point is located and a destination grid where the destination is located in the target grid map; from the starting grid to the destination grid, according to the location information of the endpoints and edges in the target grid map, using a preset pathfinding algorithm, determine at least one designated adjacent edge in the target grid map and a reference point on each designated adjacent edge; A second determination module is configured to determine at least one path point based on preset motion parameters of the target object and position information of the at least one reference point; The second determination module is further configured to determine, for any one of the at least one reference point, a path point on a designated adjacent edge where the reference point is located based on preset motion parameters of the target object and position information of the reference point; The construction module is configured to construct a motion path of the target object in the process of performing the target task based on the starting point, the end point and the at least one path point.

10. A computing device, characterized in that include: Memory and processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement the steps of the motion path construction method according to any one of claims 1 to 8.

11. A computer-readable storage medium storing computer instructions, characterized in that: When the instruction is executed by the processor, the steps of the motion path construction method described in any one of claims 1 to 8 are implemented.

Citation Information

Patent Citations

  • Method and device for searching paths

    CN106730841A

  • Planning path based motion control method and device, and robot

    CN110162029A