Virtual space path planning method, device, electronic device and storage medium

By increasing the grid height in virtual space and converting it into two-dimensional path planning, the complexity of path planning caused by complex terrain in virtual space is solved, and the efficiency and smoothness of path planning are improved.

CN112669466BActive Publication Date: 2024-09-27BEIJING PIXEL SOFTWARE TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011541171.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-23
Publication Date
2024-09-27
Estimated Expiration
2040-12-23

AI Technical Summary

Technical Problem

Due to the complex terrain in the virtual space, it is difficult for existing technology to efficiently plan a path from the starting point to the end point, resulting in a complex and time-consuming calculation process.

Method used

By acquiring multiple grid data, increasing the grid height to move the grid to a certain height, converting three-dimensional space path planning into two-dimensional space path planning, using the target grid and edge grid data to adjust the height gap, reducing the amount of calculation and improving Path planning efficiency.

Benefits of technology

It effectively reduces the calculation amount of path planning, improves the efficiency of path planning, and avoids consideration of unsuitable path areas, making the generated path smoother.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112669466B
    Figure CN112669466B
Patent Text Reader

Abstract

The present application provides a virtual space path planning method, device, electronic device and storage medium. The electronic device increases the height in the first grid data so that the grid originally covering the surface moves as a whole to a certain height from the surface, so that when planning the path, there is no need to consider how to avoid areas that are not suitable for planning the path. In addition, the path planning problem in the three-dimensional space is converted into a path planning problem in the two-dimensional space through the grid, further reducing the amount of calculation during path planning, thereby improving the efficiency of path planning.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computers, and in particular to a virtual space path planning method, device, electronic device and storage medium. Background Art

[0002] In entertainment projects based on virtual space, when the scope of the virtual space is large, it is often necessary to plan a path from the starting point to the end point for the user.

[0003] However, since the terrain of the ground in the actual virtual space is extremely complex, many factors need to be considered when performing path planning, which makes the calculation process of path planning more complicated and takes a long time to give the result of path planning. Summary of the invention

[0004] In a first aspect, an embodiment of the present application provides a virtual space path planning method, which is applied to an electronic device, and the method includes:

[0005] Acquire first grid data of a plurality of grids, wherein the plurality of grids are used to cover a surface of a three-dimensional terrain, and each of the first grid data includes a position of a grid corresponding to the first grid data and a height of the position;

[0006] Increasing the height of the first grid data to obtain second grid data;

[0007] Based on the second grid data, a two-dimensional path from a starting point to an end point is planned.

[0008] In a possible implementation, the step of planning a two-dimensional path from a starting point to an end point based on the second grid data includes:

[0009] Determine target grid data from the second grid data, wherein the height in the target grid data is lower than the height in the neighboring grid data, and the grid corresponding to the target grid data is adjacent to the grid corresponding to the neighboring grid data;

[0010] Reducing the height difference between the target grid data and the neighborhood grid data to obtain third grid data;

[0011] Based on the third grid data, a two-dimensional path from the starting point to the end point is planned.

[0012] In a possible implementation, the step of planning a two-dimensional path from the starting point to the end point based on the third grid data includes:

[0013] Determine edge mesh data from the third mesh data, wherein the number of neighborhood mesh data corresponding to the edge mesh data is less than a number threshold;

[0014] Increasing the height of the edge grid data to obtain fourth grid data;

[0015] Based on the fourth grid data, a two-dimensional path from the starting point to the end point is planned.

[0016] In a possible implementation, before increasing the height of the first grid data to obtain the second grid data, the method further includes:

[0017] Determining abnormal data from the first grid data, wherein a height of the abnormal data is lower than a reference height;

[0018] The abnormal data is removed from the first grid data.

[0019] In a possible implementation, the method further includes:

[0020] A three-dimensional path from the starting point to the end point in the three-dimensional terrain is planned along the two-dimensional path.

[0021] In a second aspect, an embodiment of the present application provides a virtual space path planning device, the virtual space path planning device comprising:

[0022] A data acquisition module, used to acquire first grid data of a plurality of grids, wherein the plurality of grids are used to cover a surface of a three-dimensional terrain, and each of the first grid data includes a position of a grid corresponding to the first grid data and a height of the position;

[0023] A data adjustment module, used for increasing the height of the first grid data to obtain second grid data;

[0024] A path planning module is used to plan a two-dimensional path from a starting point to an end point based on the second grid data.

[0025] In a possible implementation, the path planning module is specifically used to:

[0026] Determine target grid data from the second grid data, wherein the height in the target grid data is lower than the height in the neighboring grid data, and the grid corresponding to the target grid data is adjacent to the grid corresponding to the neighboring grid data;

[0027] Reducing the height difference between the target grid data and the neighborhood grid data to obtain third grid data;

[0028] Based on the third grid data, a two-dimensional path from the starting point to the end point is planned.

[0029] In a possible implementation, the path planning module is further used to:

[0030] A three-dimensional path from the starting point to the end point in the three-dimensional terrain is planned along the two-dimensional path.

[0031] In a third aspect, an embodiment of the present application provides an electronic device, comprising a processor and a memory, wherein the memory stores a computer program, the computer program comprises computer-trusted instructions, and when the processor runs the computer-executable instructions, the virtual space path planning method is implemented.

[0032] In a fourth aspect, an embodiment of the present application provides a storage medium, wherein the storage medium stores a computer program, wherein the computer program includes computer executable instructions, and when the computer executable instructions are executed by a processor, the virtual space path planning method is implemented.

[0033] Compared with the prior art, this application has the following beneficial effects:

[0034] The present application implements the virtual space path planning method, device, electronic device and storage medium. The electronic device increases the height in the first grid data so that the grid originally covering the surface moves as a whole to a certain height from the surface, so that when planning the path, there is no need to consider how to avoid areas that are not suitable for planning the path. In addition, the path planning problem in the three-dimensional space is converted into a path planning problem in the two-dimensional space through the grid, further reducing the amount of calculation during path planning, thereby improving the efficiency of path planning. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0036] Figure 1 A schematic diagram of the structure of an electronic device is provided for an embodiment of the present application;

[0037] Figure 2 A schematic diagram of the steps of a virtual space path planning method provided in an embodiment of the present application;

[0038] Figure 3 A schematic diagram of a neighborhood grid provided in an embodiment of the present application;

[0039] Figure 4 A grid schematic diagram corresponding to the third grid data provided in an embodiment of the present application;

[0040] Figure 5 A schematic diagram of an edge grid provided in an embodiment of the present application;

[0041] Figure 6 Schematic diagram of a virtual space path planning device provided in an embodiment of the present application.

[0042] Icon: 110 - virtual space path planning device; 120 - memory; 130 - processor; 201 - first grid; 202 - second grid; 1101 - data acquisition module; 1102 - data adjustment module; 1103 - path planning module. DETAILED DESCRIPTION

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

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

[0045] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.

[0046] In the related art, when performing path planning in a virtual space, since the terrain of the surface in the virtual space is extremely complex, many factors need to be considered when performing path planning, resulting in a more complicated calculation process for path planning and requiring a longer time to provide the result of path planning.

[0047] For example, as a possible implementation of the above-mentioned related technology, the electronic device divides the virtual three-dimensional space into multiple groups of three-dimensional grids at different levels, and then plans the path along the surface of the three-dimensional space through the three-dimensional A* algorithm. First, when the range of the three-dimensional space is large, the number of corresponding three-dimensional grids increases exponentially. In addition, since the electronic device is a high-precision complete virtualization of the three-dimensional space, the path planned by the electronic device will be very tortuous and complicated in areas that are not suitable as paths (for example, deep potholes or high cliffs), which is not only difficult to control through the three-dimensional A* algorithm, but also leads to a large amount of calculation, or even the situation where the calculation cannot be completed.

[0048] In view of at least some of the technical problems in the related art, the embodiment of the present application provides a virtual space path planning method for improving the efficiency of path planning. The virtual space path planning method is applied to electronic devices, which may be, but not limited to, servers, smart phones, personal computers (PCs), tablet computers, personal digital assistants (PDAs), mobile Internet devices (MIDs), etc.

[0049] The operating system configured in the electronic device may be, but is not limited to, an Android system, an IOS (iPhone operating system) system, a Windows phone system, a Windows system, and the like.

[0050] As a possible implementation, Figure 1 , which is a schematic diagram of the structure of the electronic device provided in an embodiment of the present application. The electronic device includes a virtual space path planning device 110, a memory 120 and a processor 130.

[0051] The memory 120, the processor 130, and the communication 140 are electrically connected to each other directly or indirectly to achieve data transmission or interaction. For example, these elements can be electrically connected to each other through one or more communication buses or signal lines. The virtual space path planning device 110 includes at least one software function module that can be stored in the memory 120 in the form of software or firmware or solidified in the operating system (OS) of the electronic device.

[0052] The processor 130 is used to execute executable modules stored in the memory 120, such as software function modules and computer programs included in the virtual space path planning device 110. When the computer executable instructions corresponding to the virtual space path planning device 110 are executed by the processor, the above-mentioned virtual space path planning method is implemented.

[0053] The memory 120 may be, but is not limited to, a random access memory (RAM), a read only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable read-only memory (EEPROM), etc. The memory 120 is used to store a program, and the processor 130 executes the program after receiving an execution instruction.

[0054] The processor 130 may be an integrated circuit chip with signal processing capabilities. The above-mentioned processor may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The various methods, steps and logic block diagrams disclosed in the embodiments of the present application may be implemented or executed. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0055] Combine the following Figure 2 The virtual space path planning method is described in detail in the flowchart of the steps of the virtual space path planning method shown in FIG. Figure 2 As shown, the virtual space path planning method includes:

[0056] Step S101, obtaining first grid data of multiple grids.

[0057] Wherein, a plurality of grids are used to cover the surface of the three-dimensional terrain, and each first grid data includes the position of the grid corresponding to the first grid data and the height of the position.

[0058] In the embodiment of the present application, the electronic device generates multiple grids along the surface of the terrain according to the three-dimensional terrain in the virtual space. The multiple grids cover the surface of the ground, and the undulations presented by the grids represent the undulations of the surface of the three-dimensional terrain.

[0059] In the embodiment of the present application, in order to obtain the height of each grid location, in a possible implementation, the electronic device initiates spherical collision detection vertically downward from a preset height to obtain the height of the grid location. It should be understood that collision detection is often used to detect obstacles in a virtual three-dimensional space.

[0060] The shape and size of the grid can be adaptively adjusted by those skilled in the art according to actual needs.

[0061] In addition, in an embodiment of the present application, it is necessary to exclude areas whose height does not exceed sea level (for example, deep valley areas, water areas, etc.). Therefore, the electronic device determines abnormal data from the first grid data, wherein the height of the abnormal data is lower than the reference height; and removes the abnormal data from the first grid data.

[0062] Step S102, increasing the height of the first grid data to obtain second grid data.

[0063] That is, in the embodiment of the present application, when planning a path along the surface of the three-dimensional terrain, it is necessary to consider areas that are not suitable as paths. Therefore, in the embodiment of the present application, the height in the first grid data is increased so that the grid originally covered on the surface of the three-dimensional terrain is at a certain height from the surface. As an implementation method provided in the embodiment of the present application, the electronic device can increase the height in all the first grid data by a preset height value (for example, increase by 20m).

[0064] Step S103: planning a two-dimensional path from the starting point to the end point based on the second grid data.

[0065] In the embodiment of the present application, the electronic device plans a path from the starting point to the end point based on the grid after the height is raised. Since the height of the first grid is obtained from the spherical collision detection initiated vertically downward based on the preset height, it is ensured that after the grid corresponding to the first grid data is raised to a certain height, the grid corresponding to the second grid data must be an area suitable for planning the path.

[0066] It can be seen that through the virtual space path planning method, the electronic device increases the height in the first grid data, and the grid originally covering the surface moves as a whole to a certain height from the surface. Therefore, when planning the path, there is no need to consider how to avoid areas that are not suitable for planning the path. In addition, the path planning problem in three-dimensional space is converted into a path planning problem in two-dimensional space through the grid, which further reduces the amount of calculation during path planning, thereby improving the efficiency of path planning.

[0067] In the embodiment of the present application, considering the need to provide a smoother path as much as possible, the second grid data of the grid needs to be preprocessed before planning the path. Therefore, the above step S103 includes:

[0068] Step S103 - 1 , determining target grid data from the second grid data.

[0069] The height of the target grid data is lower than the height of the neighboring grid data, and the grid corresponding to the target grid data is adjacent to the grid corresponding to the neighboring grid data.

[0070] In the embodiment of the present application, the height in the target grid data is lower than the height in the neighboring grid data, indicating that the target grid corresponding to the target grid data is located in a low-lying position. Figure 3 As shown, in a possible implementation, the above grid is a quadrilateral grid. For each grid, the electronic device uses the grids located in the eight directions of the east, south, west, north, northeast, southeast, northwest, and southwest of the grid as neighboring grids.

[0071] The electronic device binds the neighboring grids in the east and west directions, and calculates the average height of the neighboring grids in the east and west directions; binds the neighboring grids in the south and north directions, and calculates the average height of the neighboring grids in the south and north directions; binds the neighboring grids in the southeast and northwest directions, and calculates the average height of the neighboring grids in the southeast and northwest directions; binds the neighboring grids in the northeast and southwest directions, and calculates the average height of the neighboring grids in the northeast and southwest directions.

[0072] Furthermore, the electronic device removes the maximum value and the minimum value of the above four means, calculates the average value of the remaining two means; determines whether the height of the grid is less than the average value of the above two remaining means; if so, takes the grid as the target grid.

[0073] Step S103-2, reducing the height difference between the target grid data and the neighboring grid data to obtain third grid data.

[0074] In the embodiment of the present application, since the target grid is located in a low-lying position, if the number of target grids located in the low-lying position reaches a certain level, the planned path will be caused to fluctuate up and down.

[0075] In view of this, the electronic device reduces the height difference between the target grid data and the neighboring grid data to achieve the purpose of reducing the height difference between the target grid and the neighboring grid. Since the height difference between the target grid and the neighboring grid is reduced, the undulation of the grid plane composed of all grids is smoother.

[0076] As a possible implementation provided in the present application, the electronic device selects the maximum value from the remaining two means as the height in the target grid data.

[0077] In addition, in the embodiment of the present application, it is considered that multiple rounds of adjustment are required to make the undulation of the grid plane composed of all grids smoother. In one implementation provided in the embodiment of the present application, when the number of target grid data does not change (i.e., after two consecutive rounds of height adjustment, the number of target grids does not change), the electronic device stops adjusting the height in the second grid data and obtains the third grid data.

[0078] like Figure 4 As shown, a grid schematic diagram generated based on the third grid data is provided for the embodiment of the present application. Figure 4 As shown, compared with the high drop of the three-dimensional terrain, the grid plane formed by the grid appears smoother.

[0079] Step S103 - 3 , planning a two-dimensional path from the starting point to the end point based on the third grid data.

[0080] Since the grid plane formed by the grids corresponding to the third grid data is smoother, the path generated by the electronic device based on the third grid data also appears smoother.

[0081] In addition, considering that the planned end point in the virtual space may be located at a highly discontinuous edge position, in order to plan a more reasonable path, it is necessary to mark the edge position of the three-dimensional terrain and perform preprocessing and other operations.

[0082] Therefore, in a possible implementation method provided in an embodiment of the present application, the electronic device determines edge mesh data from the third mesh data, wherein the number of neighborhood mesh data corresponding to the edge mesh data is less than a quantity threshold; increases the height in the edge mesh data to obtain fourth mesh data; and plans a two-dimensional path from the starting point to the end point based on the fourth mesh data.

[0083] Combine the following Figure 5, which illustrates how to use edge grid data. Figure 5 As shown, the first grid 201 is located in the inner area of ​​the terrain, and the second grid 202 is located in the edge area of ​​the terrain. The number of neighboring grids of the first grid 201 is 8, while the number of neighboring grids of the second grid 202 is less than 8. Therefore, in the embodiment of the present application, the electronic device determines the edge grid data corresponding to the edge grid from the third grid data based on the number of neighboring grids.

[0084] Furthermore, since the edge position usually corresponds to a cliff in the three-dimensional terrain, there is a large drop. In a possible implementation, the electronic device increases the height in the edge grid data to be the same as the maximum height in the neighborhood grid data.

[0085] It is worth noting that the path planned based on the above grid is a path on a two-dimensional plane, which cannot truly reflect the actual path in the real three-dimensional terrain.

[0086] Therefore, in an embodiment of the present application, the electronic device plans a three-dimensional path from a starting point to an end point in a three-dimensional terrain along a two-dimensional path.

[0087] It can be understood that in the implementation of the present application, the electronic device determines the position of the virtual object in the three-dimensional scene based on the position of the virtual object in the two-dimensional path, and based on the position in the three-dimensional scene, plans a three-dimensional path within a preset range in the three-dimensional scene for the virtual object through a path planning method in the three-dimensional scene.

[0088] That is, in the embodiment of the present application, the two-dimensional path is used to indicate the approximate path, and then, when the virtual object moves along the two-dimensional path, the actual three-dimensional path is planned for the virtual object. Therefore, in the embodiment of the present application, the two-dimensional path is used as a reference, so that the electronic device can plan a three-dimensional path without traversing the entire three-dimensional scene, thereby improving the efficiency of path planning. Among them, as a possible implementation method, the electronic device can plan a three-dimensional path by a three-dimensional A* algorithm based on SVO (Sparse VoxelOctree, sparse voxel octree) voxelization.

[0089] Based on the same inventive concept, the embodiment of the present application also provides a virtual space path planning device. The virtual space path planning device 110 includes at least one functional module that can be stored in the memory 120 in the form of software. Figure 6 From the functional point of view, the virtual space path planning device 110 may include:

[0090] The data acquisition module 1101 is used to acquire first grid data of a plurality of grids, wherein the plurality of grids are used to cover the surface of a three-dimensional terrain, and each first grid data includes a position of the grid corresponding to the first grid data and a height of the position.

[0091] In the embodiment of the present application, when the computer executable instructions corresponding to the data acquisition module 1101 are executed by the processor, Figure 2 For a detailed description of the data acquisition module 1101, please refer to the detailed description of step S101.

[0092] The data adjustment module 1102 is used to increase the height of the first grid data to obtain the second grid data.

[0093] In the embodiment of the present application, when the computer executable instructions corresponding to the data adjustment module 1102 are executed by the processor, Figure 2 For a detailed description of the data adjustment module 1102, please refer to the detailed description of step S102.

[0094] The path planning module 1103 is used to plan a two-dimensional path from the starting point to the end point based on the second grid data.

[0095] In the embodiment of the present application, when the computer executable instructions corresponding to the path planning module 1103 are executed by the processor, Figure 2 For a detailed description of the path planning module 1103 , please refer to the detailed description of step S103 .

[0096] Optionally, the path planning module 1103 is specifically used for:

[0097] Determine target grid data from the second grid data, wherein a height in the target grid data is lower than a height in the neighboring grid data, and a grid corresponding to the target grid data is adjacent to a grid corresponding to the neighboring grid data;

[0098] Reduce the height difference between the target grid data and the neighboring grid data to obtain the third grid data;

[0099] Based on the third grid data, a two-dimensional path from the starting point to the end point is planned.

[0100] Optionally, the path planning module 1103 is further used for:

[0101] Plan a 3D path from a start point to an end point in a 3D terrain along a 2D path.

[0102] An embodiment of the present application also provides an electronic device, which includes a processor and a memory, wherein the memory stores a computer program, and the computer program includes computer-trusted instructions. When the processor runs the computer-executable instructions, the above-mentioned virtual space path planning method is implemented.

[0103] An embodiment of the present application also provides a storage medium, which stores a computer program. The computer program includes computer executable instructions. When the computer executable instructions are executed by a processor, the above-mentioned virtual space path planning method is implemented.

[0104] In summary, the present application implements the provided virtual space path planning method, device, electronic device and storage medium. The electronic device increases the height in the first grid data so that the grid originally covering the surface moves as a whole to a certain height from the surface, so that when planning the path, there is no need to consider how to avoid areas that are not suitable for planning the path. In addition, the path planning problem in three-dimensional space is converted into a path planning problem in two-dimensional space through the grid, further reducing the amount of calculation during path planning, thereby improving the efficiency of path planning.

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

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

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

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

[0109] The above are only various implementations of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A virtual space path planning method, It is characterized in that Applied to electronic equipment, the method comprises: Acquire first grid data of a plurality of grids, wherein the plurality of grids are used to cover a surface of a three-dimensional terrain, and each of the first grid data includes a position of a grid corresponding to the first grid data and a height of the position; Increasing the height of the first grid data to obtain second grid data; Determine target grid data from the second grid data, wherein the height in the target grid data is lower than the height in the neighboring grid data, and the grid corresponding to the target grid data is adjacent to the grid corresponding to the neighboring grid data; Reducing the height difference between the target grid data and the neighborhood grid data to obtain third grid data; Determine edge mesh data from the third mesh data, wherein the number of neighborhood mesh data corresponding to the edge mesh data is less than a number threshold; Increasing the height of the edge grid data to obtain fourth grid data; Based on the fourth grid data, a two-dimensional path from a starting point to an end point is planned.

2. The virtual space path planning method according to claim 1, It is characterized in that Before increasing the height of the first grid data and obtaining the second grid data, the method further includes: Determining abnormal data from the first grid data, wherein a height of the abnormal data is lower than a reference height; The abnormal data is removed from the first grid data.

3. The virtual space path planning method according to claim 1, It is characterized in that The method further comprises: A three-dimensional path from the starting point to the end point in the three-dimensional terrain is planned along the two-dimensional path.

4. A virtual space path planning device, It is characterized in that The virtual space path planning device comprises: A data acquisition module, used to acquire first grid data of a plurality of grids, wherein the plurality of grids are used to cover a surface of a three-dimensional terrain, and each of the first grid data includes a position of a grid corresponding to the first grid data and a height of the position; A data adjustment module, used for increasing the height of the first grid data to obtain second grid data; a path planning module, configured to determine target grid data from the second grid data, wherein a height in the target grid data is lower than a height in the neighboring grid data, and a grid corresponding to the target grid data is adjacent to a grid corresponding to the neighboring grid data; Reducing the height difference between the target grid data and the neighborhood grid data to obtain third grid data; Determine edge mesh data from the third mesh data, wherein the number of neighborhood mesh data corresponding to the edge mesh data is less than a number threshold; Increasing the height of the edge grid data to obtain fourth grid data; Based on the fourth grid data, a two-dimensional path from a starting point to an end point is planned.

5. The virtual space path planning device according to claim 4, It is characterized in that The path planning module is also used for: A three-dimensional path from the starting point to the end point in the three-dimensional terrain is planned along the two-dimensional path.

6. An electronic device, It is characterized in that The electronic device includes a processor and a memory, the memory stores a computer program, the computer program includes computer-trusted instructions, and when the processor runs the computer-executable instructions, the virtual space path planning method described in any one of claims 1-3 is implemented.

7. A storage medium, It is characterized in that The storage medium stores a computer program, which includes computer executable instructions. When the computer executable instructions are executed by a processor, the virtual space path planning method described in any one of claims 1 to 3 is implemented.