CN116943201A - Generating method of path-finding data, path-finding method and computer equipment - Google Patents

Generating method of path-finding data, path-finding method and computer equipment Download PDF

Info

Publication number
CN116943201A
CN116943201A CN202210405389.2A CN202210405389A CN116943201A CN 116943201 A CN116943201 A CN 116943201A CN 202210405389 A CN202210405389 A CN 202210405389A CN 116943201 A CN116943201 A CN 116943201A
Authority
CN
China
Prior art keywords
dynamic
layer
data
area
region
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210405389.2A
Other languages
Chinese (zh)
Inventor
欧阳卓能
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Tencent Domain Computer Network Co Ltd
Original Assignee
Shenzhen Tencent Domain Computer Network Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Tencent Domain Computer Network Co Ltd filed Critical Shenzhen Tencent Domain Computer Network Co Ltd
Priority to CN202210405389.2A priority Critical patent/CN116943201A/en
Priority to PCT/CN2023/074974 priority patent/WO2023202188A1/en
Publication of CN116943201A publication Critical patent/CN116943201A/en
Pending legal-status Critical Current

Links

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/50Controlling the output signals based on the game progress
    • A63F13/53Controlling the output signals based on the game progress involving additional visual information provided to the game scene, e.g. by overlay to simulate a head-up display [HUD] or displaying a laser sight in a shooting game
    • A63F13/537Controlling the output signals based on the game progress involving additional visual information provided to the game scene, e.g. by overlay to simulate a head-up display [HUD] or displaying a laser sight in a shooting game using indicators, e.g. showing the condition of a game character on screen
    • A63F13/5372Controlling the output signals based on the game progress involving additional visual information provided to the game scene, e.g. by overlay to simulate a head-up display [HUD] or displaying a laser sight in a shooting game using indicators, e.g. showing the condition of a game character on screen for tagging characters, objects or locations in the game scene, e.g. displaying a circle under the character controlled by the player
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/50Controlling the output signals based on the game progress
    • A63F13/53Controlling the output signals based on the game progress involving additional visual information provided to the game scene, e.g. by overlay to simulate a head-up display [HUD] or displaying a laser sight in a shooting game
    • A63F13/537Controlling the output signals based on the game progress involving additional visual information provided to the game scene, e.g. by overlay to simulate a head-up display [HUD] or displaying a laser sight in a shooting game using indicators, e.g. showing the condition of a game character on screen
    • A63F13/5378Controlling the output signals based on the game progress involving additional visual information provided to the game scene, e.g. by overlay to simulate a head-up display [HUD] or displaying a laser sight in a shooting game using indicators, e.g. showing the condition of a game character on screen for displaying an additional top view, e.g. radar screens or maps
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/55Controlling game characters or game objects based on the game progress
    • A63F13/56Computing the motion of game characters with respect to other game characters, game objects or elements of the game scene, e.g. for simulating the behaviour of a group of virtual soldiers or for path finding
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/30Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game characterized by output arrangements for receiving control signals generated by the game device
    • A63F2300/303Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game characterized by output arrangements for receiving control signals generated by the game device for displaying additional data, e.g. simulating a Head Up Display
    • A63F2300/306Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game characterized by output arrangements for receiving control signals generated by the game device for displaying additional data, e.g. simulating a Head Up Display for displaying a marker associated to an object or location in the game field

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Physics & Mathematics (AREA)
  • Optics & Photonics (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The present application relates to a method and apparatus for generating route-finding data, a computer device, a storage medium, and a computer program product, and can be applied to the field of maps. The method of one embodiment comprises: determining a dynamic region layer in the target scene, wherein the dynamic region layer comprises at least one dynamic region; loading basic scene data of a basic area layer of a target scene, and generating basic area route finding data of the basic area layer based on the basic scene data; loading a dynamic region layer and generating dynamic region path finding data in a dynamic region of the dynamic region layer; establishing splicing information of a dynamic region layer and a basic region layer; and generating the path-finding data of the target scene based on the base area path-finding data, the dynamic area path-finding data and the splicing information. The method can reduce the consumption of resources.

Description

Generating method of path-finding data, path-finding method and computer equipment
Technical Field
The present application relates to the field of computer technology, and in particular, to a method for generating route-finding data, a device for generating route-finding data, a route-finding method, a route-finding device, a computer device, a storage medium, and a computer program product.
Background
With the development of computer technology, various applications that need to perform a route-finding are presented, for example, in a game scene, a Player of a game or an NPC (Non-Player Character, a Character that is not controlled by the Player in the game) in the game will generally need to perform a route-finding. In order to support the processing of the way finding, the way finding data needs to be provided, and the way finding data is the data needed to be used in the way finding process, namely the way finding is performed based on the way finding data. The routing data may be provided in different data dimensions, such as grids, waypoints, voxels, navigation grids, and the like. Taking the navigation grid as an example, there may be dynamically added buildings, scene objects, buildings, etc. on the map as there are various dynamic objects that change dynamically during the game, for example, as the progress of the game changes, the operation of the game player, or the update of the game content by the game server.
The traditional way of generating the path-finding data is to generate new path-finding data in real time by combining the added dynamic object when the dynamic object is determined to be added in the game process, so as to be used for path-finding. However, this way of generating the route-seeking data needs to occupy more resources such as memory and CPU, and affects the real-time performance of the game route-seeking process.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a method of generating route-finding data, a device for generating route-finding data, a route-finding method, a route-finding device, a computer apparatus, a storage medium, and a computer program product, which can reduce resource occupation.
In a first aspect, the present application provides a method for generating path-finding data. The method comprises the following steps:
determining a dynamic region layer in the target scene, wherein the dynamic region layer comprises at least one dynamic region;
loading basic scene data of a basic area layer of a target scene, and generating basic area route finding data of the basic area layer based on the basic scene data;
loading a dynamic region layer and generating dynamic region path finding data in a dynamic region of the dynamic region layer;
establishing splicing information of a dynamic region layer and a basic region layer;
and generating the path-finding data of the target scene based on the base area path-finding data, the dynamic area path-finding data and the splicing information.
In one embodiment, determining a dynamic region layer in a target scene includes:
determining a dynamic region in the target scene;
and determining a dynamic region layer to which each dynamic region belongs according to the overlapping relation of each dynamic region.
In one embodiment, after determining the dynamic region in the target scene, the method further includes: a dynamic region marker is added to the dynamic region.
In one embodiment, adding dynamic region markers for dynamic regions includes:
and adding a corresponding shape mark for the dynamic region according to the shape of the dynamic region, and distributing a corresponding shape mark identifier for the shape mark.
Loading base scene data of a base region layer of a target scene, generating base region route data of the base region layer based on the base scene data, comprising:
loading a basic map scene of the target scene;
if the basic map scene is required to be segmented, after the basic map scene is divided into map segments, corresponding segmented area route searching data are generated for the map segments, segmented area connection relations among the segmented area route searching data corresponding to the map segments are determined, and the basic area route searching data comprise the segmented area route searching data and the segmented area connection relations;
otherwise, directly generating corresponding basic area route searching data for the map scene.
In one embodiment, after generating the base area seek data of the base area layer based on the base scene data, the method further includes: recording first boundary information of the boundary between the basic area layer and the dynamic area;
After generating the dynamic area route searching data in the dynamic area of the dynamic area layer, the method further comprises the following steps: recording second boundary information of the dynamic region and basic region boundary of the dynamic region layer;
traversing a dynamic layer boundary of dynamic region routing data of a dynamic region layer, comprising: traversing the dynamic layer boundary of the dynamic area routing data of the dynamic area layer in the second boundary information;
searching a target basic layer boundary line segment matched with a dynamic layer boundary line segment in basic region route searching data, comprising: and searching a target basic layer boundary line segment matched with the dynamic layer boundary line segment in the first boundary information.
In one embodiment, if the included angle between the dynamic layer boundary line segment and the base layer boundary line segment is smaller than the included angle threshold, it is determined that the projection condition is satisfied, otherwise, the projection condition is not satisfied.
In one embodiment, if the dynamic layer boundary segment and the base layer boundary segment are both parallel to the first coordinate axis, the first coordinate axis is determined to be the target coordinate axis.
In one embodiment, if the dynamic layer boundary segment and the base layer boundary segment are both parallel to the second coordinate axis, the second coordinate axis is the target coordinate axis.
In one embodiment, if the dynamic layer boundary line segment is not parallel to the base layer boundary line segment and each coordinate axis, the included angle between the dynamic layer boundary line segment and the base layer boundary line segment is smaller than the included angle threshold, and the slope of the dynamic layer boundary line segment is within the predetermined slope range, and the first coordinate axis is determined as the target coordinate axis.
In one embodiment, if the dynamic layer boundary line segment is not parallel to the base layer boundary line segment and each coordinate axis, the included angle between the dynamic layer boundary line segment and the base layer boundary line segment is smaller than the included angle threshold, and the slope of the dynamic layer boundary line segment is outside the predetermined slope range, the second coordinate axis is determined as the target coordinate axis.
In a second aspect, the application further provides a path finding method. The method comprises the following steps:
loading path-finding data, wherein the path-finding data comprises target path-finding data, and the target path-finding data comprises: base area routing data of the base area layer, namely dynamic area routing data of the dynamic area layer which is opened;
obtaining starting point information and end point information;
and carrying out path finding in the target path finding data based on the starting point information and the end point information to obtain a path finding path.
In one embodiment, the target way-finding data further comprises: splicing information of the base area layer and the dynamic area layer.
In one embodiment, the dynamic area routing data of the dynamic area layer is dynamic area routing data of the dynamic area layer marked as open, and the dynamic area routing data includes: in each dynamic region of the dynamic region layer, the path-finding data of the dynamic region is marked as open.
In one embodiment, based on the start point information and the end point information, a route is found in the target route finding data, and a route finding path is obtained, including:
determining a starting point polygon to which the starting point information belongs and an ending point polygon to which the ending point information belongs;
and starting to search a path from the starting point polygon, searching the path in the target path searching data, and sequentially searching the expanded adjacent polygons until the ending point polygon is found, so as to obtain a path searching path.
In a third aspect, the present application further provides a device for generating the path-finding data. The device comprises:
the dynamic layer determining module is used for determining a dynamic region layer in the target scene, wherein the dynamic region layer comprises at least one dynamic region;
the basic data generation module is used for loading basic scene data of a basic area layer of the target scene and generating basic area route finding data of the basic area layer based on the basic scene data;
the dynamic data generation module is used for loading the dynamic region layer and generating dynamic region path finding data in a dynamic region of the dynamic region layer;
the splicing module is used for establishing splicing information of the dynamic region layer and the basic region layer;
the data determining module is used for generating the path finding data of the target scene based on the base area path finding data, the dynamic area path finding data and the splicing information.
In a fourth aspect, the present application further provides a path-finding device. The device comprises:
the loading module is used for loading the path searching data, the path searching data comprises target path searching data, and the target path searching data comprises: base area routing data of the base area layer, namely dynamic area routing data of the dynamic area layer which is opened;
the starting point acquisition module is used for acquiring starting point information and end point information;
and the path searching module is used for searching paths in the target path searching data based on the starting point information and the end point information to obtain path searching paths.
In a fifth aspect, the present application also provides a computer device. The computer device comprises a memory in which a computer program is stored, and a processor which, when executing the computer program, implements the steps of the method of generating the way finding data of the above embodiment or the steps of the way finding method as above.
In a sixth aspect, the present application also provides a computer readable storage medium. A computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the method of generating road-finding data of the above embodiment or the steps of the method of road-finding as above.
In a seventh aspect, the present application also provides a computer program product. Computer program product comprising a computer program which, when executed by a processor, implements the steps of the method of generating road finding data of the above embodiment or the steps of the road finding method as above.
According to the generation method of the road-finding data, the generation device of the road-finding data, the road-finding method, the road-finding device, the computer equipment, the storage medium and the computer program product, the basic area layer and the dynamic scene layer are divided for the target scene, the dynamic scene layer comprises at least one dynamic area, the basic area road-finding data corresponding to the basic area layer and the dynamic area road-finding data corresponding to the dynamic area layer are respectively generated, and the splicing information of the dynamic area layer and the basic area layer is established, so that the generated road-finding data respectively correspond to the basic area layer, the dynamic area layer and the splicing information between the basic area layer and the dynamic area layer, when the change of the dynamic area is involved in the game process, the road-finding data of the corresponding dynamic area layer and the splicing information between the dynamic area layer and the basic area layer can be additionally provided, new road-finding data do not need to be generated each time aiming at all the scene data, the consumption of resources such as a memory and the like is reduced, and the efficiency of the game road-finding process is improved.
Drawings
FIG. 1 is an application environment diagram of a method of generating and a method of locating route data in one embodiment;
FIG. 2 is a flow chart of a method for generating path-finding data in one embodiment;
FIG. 3 is a flow diagram of determining a dynamic region layer in a target scene in one embodiment;
FIG. 4 is a flow diagram of generating dynamic zone routing data in one embodiment;
FIG. 5 is a flow diagram of establishing splicing information of a dynamic zone layer and a base zone layer in one embodiment;
FIG. 6 is a flow diagram of a process for finding a target base layer boundary segment that matches a dynamic layer boundary segment in one embodiment;
FIG. 7 is some examples of segment relationships between dynamic layer boundary segments and base layer boundary segments;
FIG. 8 is a flow chart of a method for generating path-finding data in one embodiment;
FIG. 9 is a flow chart of generating and recording boundary information of zone routing data of a zone layer of a dynamic multi-layer in an application example;
FIG. 10 is a flow chart of generating and recording the boundary information of the routing data of a dynamic region of the dynamic region layer of the dynamic multi-layer in an application example;
FIG. 11 is a flow chart of generating way-finding data in an application example;
FIG. 12 is a diagram of routing data for a base zone layer generated in one embodiment;
FIG. 13 is a diagram of routing data for a dynamic zone layer generated in one embodiment;
FIG. 14 is a diagram of the road-finding data of the base layer in FIG. 12 and the dynamic layer in FIG. 13 after being spliced;
FIG. 15 is a flow diagram of a way finding method in one embodiment;
FIG. 16 is a flow chart of a method of routing in one specific example;
FIG. 17 is a schematic diagram of a routing path at the base zone layer in one specific example;
FIG. 18 is a schematic diagram of a seek path when the dynamic zone layer is turned on in one specific example;
fig. 19 is an internal structural view of the computer device in one embodiment.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
The method for generating the path-finding data and the path-finding method provided by the embodiment of the application can be applied to an application environment shown in fig. 1. Wherein the terminal 102 communicates with the server 104 via a network. The data storage system may store data that the server 104 needs to process. The data storage system may be integrated on the server 104 or may be located on the cloud or other servers. In one specific example, the server 104 may be a game server and the terminal 102 is a user terminal participating in a game. Embodiments of the present application may be applied to a variety of scenarios including, but not limited to, cloud technology, artificial intelligence, and the like.
In one of the application scenarios, the server 104 provides scene data, taking the server 104 as a game server for example, the server 104 provides a game scene, specifically including basic map scene data, dynamic objects existing in the map scene, and the like, and the server 104 generates route-finding data based on these scene data. The seek data is a region where the user can walk in the scene, and is data that needs to be used when the user needs to seek a path. In the case of providing route-seeking data for dimensions from a navigation grid, the route-seeking data is composed of a plurality of convex polygons. In the process that the terminal 102 accesses the server 104 to play the game, the server 104 realizes the processing of game service logic and provides the pictures of the game scene for the terminal 102 to display, meanwhile, the server 104 generates route searching data, when the terminal 102 needs to search a route in the process of participating in the game, the server 104 searches a route based on the generated route searching data and responds to the game operation processing based on the route searching route obtained by searching the route, or provides the training route obtained by searching the route to the terminal 102 to display. The server 104 may generate the route-seeking data in real time during the game process, or may generate the route-seeking data before the game is released, and perform the route-seeking based on the route-seeking data when the route-seeking is required by importing the generated route-seeking data during the game process.
In another application scenario, the terminal 102 may also obtain the game-related data directly from the server 104, or obtain the game-related data from the server 104 through a third party device, so as to implement the offline game. In the process of running the game offline, the terminal 102 realizes the processing of the game service logic based on the stored game scene and the game logic, and displays the picture of the game scene, meanwhile, the terminal 102 can generate the route searching data, and when the route searching is needed in the process of the game, the route searching is performed based on the generated route searching data. If the generated route-seeking data is included in the game-related data obtained from the server 104, the terminal 102 may directly seek a route based on the route-seeking data without generating the route-seeking data by itself.
The terminal 102 may be, but not limited to, various desktop computers, notebook computers, smart phones, tablet computers, internet of things devices, and portable wearable devices, where the internet of things devices may be smart televisions, smart air conditioners, smart vehicle devices, and the like. The portable wearable device may be a smart watch, smart bracelet, headset, or the like. The server 104 may be implemented as a stand-alone server or as a server cluster of multiple servers.
In one embodiment, as shown in fig. 2, a method for generating path-finding data is provided, and the method is applied to the terminal 102 or the server 104 in fig. 1 for illustration, and includes the following steps S202 to S210.
Step S202: and determining a dynamic region layer in the target scene, wherein the dynamic region layer comprises at least one dynamic region.
The target scene refers to a scene in which corresponding path-finding data needs to be generated, and, for example, a game application, the target scene may be a specific game scene. The dynamic region layer refers to a region layer where a dynamic object in the target scene is located, where the dynamic object refers to an object whose state changes in the game scene, and some possible objects whose state changes may be, for example: the object newly added to the scene changes with the change of the game progress or the difference of the game operation, and the shape, position, etc. of the object changes with the change of the game progress or the difference of the game operation, and the object newly added to the scene is required due to the update of the game content.
The dynamic region is the region where the dynamic object is located, and one dynamic region layer comprises at least one dynamic region. In some embodiments, each dynamic region may be considered a dynamic region layer, i.e., a region layer includes only one dynamic region. In some embodiments, a dynamic region layer may also include more than two dynamic regions.
In a specific example, as shown in fig. 3, determining a dynamic region layer in the target scene may specifically include the following steps S2022 to S2024.
Step S2022: a dynamic region in the target scene is determined.
As above, the dynamic region refers to the region where the dynamic object is located. In some embodiments, the developer may identify the dynamic object and determine the dynamic area in which the dynamic object is located. At this time, when determining the dynamic region, there may be a manner of manually selecting a frame by a developer, or the like. The embodiment of the application can determine the dynamic region in the target scene based on the user operation. In some embodiments, the attribute may be added to an object entering the target scene, so as to automatically identify whether the object is a dynamic object based on the attribute, and when the object is determined to be the dynamic object according to the attribute, the dynamic area where the dynamic object is located is automatically determined based on the shape of the dynamic object and the position where the dynamic object is located. For example, by setting a dynamic region marker, dynamic regions are automatically marked by the dynamic region marker based on the dynamic building or dynamic checkpoint region.
In one embodiment, after determining the dynamic region in the target scene, the method may further include: a dynamic region marker is added to the dynamic region. Therefore, after the dynamic region mark is added to the dynamic region, the dynamic region can be identified through the dynamic region mark in a subsequent process, for example, when the splicing information of the dynamic region layer and the base region layer is required to be determined, or when a road is found.
In some embodiments, adding a dynamic region tag to a dynamic region specifically includes:
and adding a corresponding shape mark for the dynamic region according to the shape of the dynamic region, and distributing a corresponding shape mark identifier for the shape mark. The shape mark is used to mark the shape type of the dynamic area, such as rectangle, circle, cone, trapezoid, or other polygons, and in the case that the developer manually determines the dynamic area, the shape mark may be other polygons which are customized. The shape mark can be used for identifying the shape of the dynamic region, so that the generation process of the path finding data can be completed or the path finding process can be completed by combining the shape of the dynamic region in the process of generating the path finding data or in the process of carrying out the path finding. The assigned shape marker identifier may be used to uniquely identify the dynamic region, i.e., the shape marker identifier may be used to uniquely identify a dynamic region. Thus, a dynamic region can be uniquely identified by the shape marker identification, and the shape of the dynamic region can be determined by the shape marker. In some embodiments, a shape marker may be included in the shape marker identification, i.e., a dynamic region may be uniquely identified by the shape marker identification, while the shape of the dynamic region may be determined by the shape marker identification.
Step S2024: and determining a dynamic region layer to which each dynamic region belongs according to the overlapping relation of each dynamic region.
The overlapping relationship may specifically refer to a relationship that whether each dynamic region appears at the same time, or a relationship that each dynamic region appears in sequence, for example, a position region between each dynamic region, a sequence of sequential appearance of each dynamic region, and the like, all affect whether the dynamic regions can appear at the same time. For example, in a game scene, the dynamic object "house" needs to be changed into the dynamic object "house ruins" after a certain game operation, so that the dynamic object "house" and the dynamic object "house ruins" cannot necessarily occur at the same time, and the dynamic object "house" and the dynamic object "house ruins" have a sequence. Thus, the dynamic area of the dynamic object "house" needs to be at a different dynamic area level than the dynamic area of the dynamic object "house ruins".
In one dynamic region layer, at least one dynamic region may exist. In the case where there are a plurality of dynamic areas in one dynamic area layer, the plurality of dynamic areas may occur at the same time. In some embodiments, whether each dynamic region in the dynamic region layer is opened or not may also be determined by setting rules, and only the opened dynamic region will enter the subsequent process of generating the route-seeking data and carrying out the route-seeking.
Step S204: and loading the basic scene data of the basic area layer of the target scene, and generating the basic area route finding data of the basic area layer based on the basic scene data.
The base scene data of the base area layer refers to scene data belonging to the base area layer in the target scene, and is scene data in which the state of the target scene does not change, such as a map, a building, a object, and the like, which do not change in the target scene.
The loading of the base scene data of the base region layer of the target scene, and the generation of the base region seek data of the base region layer based on the base scene data may be performed by using an existing method of generating the seek data. For example, in some embodiments, loading base scene data of a base region layer of a target scene, generating base region seek data of the base region layer based on the base scene data may include:
loading a basic map scene of the target scene;
if the basic map scene is required to be segmented, after the basic map scene is divided into map segments, corresponding segmented area route searching data are generated for the map segments, segmented area connection relations among the segmented area route searching data corresponding to the map segments are determined, and the basic area route searching data comprise the segmented area route searching data and the segmented area connection relations;
Otherwise, directly generating corresponding basic area route searching data for the map scene.
Specifically, in one embodiment, generating corresponding block area routing data for map blocks may include: 3D scene voxelization is carried out on the segmented map scenes corresponding to the map segments, and segmented map voxel data are obtained; filtering the non-walkable region in the block map voxel data to obtain block map walkable region voxel data; simplifying contour lines in the movable region voxel data of the block map to obtain movable region data of the dynamic map after simplifying the contour lines; generating a polygon based on the block map walkable region data; and generating a detail network based on each polygon, and obtaining block area route searching data based on the detail network.
Step S206: and loading the dynamic region layer and generating dynamic region path finding data in a dynamic region of the dynamic region layer.
In one embodiment, loading a dynamic region layer to generate dynamic region routing data in a dynamic region of the dynamic region layer, specifically including:
and executing the dynamic area route searching data generation process, and filtering the data which are not in the dynamic area of the dynamic area layer in the process of executing the dynamic area route searching data generation process.
Therefore, in the process of generating the dynamic area route searching data, the data which are not in the dynamic area of the dynamic area layer are filtered, so that the generated dynamic area route searching data are ensured to be limited in the dynamic area only, the accuracy of the generated route searching data is improved, and the accuracy of a route searching path obtained by carrying out route searching according to the route searching data is ensured.
The dynamic region route searching data generation process specifically comprises the following steps:
loading a dynamic map scene of a dynamic region layer;
3D scene voxelization is carried out on the dynamic map scene to obtain dynamic map voxel data;
filtering the non-walkable region in the dynamic map voxel data to obtain dynamic map walkable region voxel data;
simplifying contour lines in voxel data of a movable region of the dynamic map to obtain the movable region data of the dynamic map after simplifying the contour lines;
generating a polygon based on the dynamic map walkable region data;
and generating a detail network based on each polygon, and acquiring dynamic area route searching data based on the detail network.
The process of filtering the data not in the dynamic region of the dynamic region layer may be performed at different time points in the process of generating the dynamic region route searching data.
For example, in one embodiment, triangles that are not within the dynamic region of the dynamic region layer may be filtered to filter data that is not within the dynamic region of the dynamic region layer prior to 3D scene voxelization of the dynamic map scene.
In another embodiment, voxels that are not within the dynamic region of the dynamic region layer may be filtered after the dynamic map voxel data is obtained before filtering the non-walkable region in the dynamic map voxel data to filter data that is not within the dynamic region of the dynamic region layer.
In another embodiment, the generating a polygon based on the dynamic map walkable region data includes: based on the dynamic map walkable region data, polygons that are located only within the dynamic region of the dynamic region layer are generated. Thus, data that is not within the dynamic region of the dynamic region layer may be filtered by generating polygons that are located only within the dynamic region of the dynamic region layer.
In another embodiment, polygons that are not within the dynamic region of the dynamic region layer may be filtered after generating the polygons based on the dynamic map walkable region data, prior to generating the detail network based on the polygons, to filter data that is not within the dynamic region of the dynamic region layer.
In some embodiments, among the above four ways of filtering data that is not in the dynamic region of the dynamic region layer, only one way may be adopted, or two or more ways may be adopted simultaneously.
As shown in fig. 4, taking the loading of the dynamic area layer in step S206 in a specific example, which includes the above four ways at the same time, the process of generating the dynamic area routing data in the dynamic area of the dynamic area layer may specifically include the following steps S2061 to S2069.
Step S2061: and loading the dynamic map scene of the dynamic region layer.
Step S2062: triangles that are not within the dynamic region of the dynamic region layer are filtered.
Step S2063: and 3D scene voxelization is carried out on the dynamic map scene with the triangle filtered, so as to obtain dynamic map voxel data.
Step S2064: voxels that are not within the dynamic region of the dynamic region layer are filtered.
Step S2065: filtering non-walkable regions in the dynamic map voxel data (i.e., the dynamic map voxel data after filtering voxels that are not within the dynamic region of the dynamic region layer) to obtain dynamic map walkable region voxel data.
Step S2066: and simplifying the contour lines in the movable region voxel data of the dynamic map to obtain the movable region data of the dynamic map after simplifying the contour lines.
Step S2067: generating a polygon based on the dynamic map walkable region data; wherein, in this step, a polygon only located in the dynamic area of the dynamic area layer may be generated based on the dynamic map walkable area data.
Step S2068: polygons that are not within the dynamic region of the dynamic region layer are filtered out.
Step S2069: and generating a detail network based on each polygon, and acquiring dynamic area route searching data based on the detail network.
Therefore, by executing at least one of the above filtering modes, it is ensured that the dynamic area route searching data is finally generated, and only the route searching data in the dynamic area is generated.
Step S208: and establishing splicing information of the dynamic region layer and the basic region layer.
The splicing information is information of adjacent boundaries between the dynamic region layer and the base region layer, and specifically indicates which sides of which polygon of which dynamic region of the dynamic region layer and which sides of which polygon of the base region layer can be spliced. For example, the kth side of the first polygon of the first dynamic region of the dynamic region layer is connected to the qth side of the second polygon of the base region layer. The recorded splice information identifies that the line segment approximately coincides with other regions. For example, the kth side of the first polygon of the first dynamic region layer, which records the dynamic region, is connected to the qth side of the second polygon of the base region layer, i.e., the kth side of the first polygon representing the first dynamic region, approximately coincides with the qth side of the second polygon of the base region layer, while the overlapping regions thereof on the corresponding reference axes can be recorded.
In one embodiment, as shown in fig. 5, the step S208 of creating the splicing information of the dynamic area layer and the base area layer may include the following steps S2018 to S2038.
Step S2018, traversing dynamic layer boundaries of dynamic area routing data of the dynamic area layer, wherein the dynamic layer boundaries comprise dynamic layer boundary line segments.
The traversing of the dynamic layer boundary of the dynamic region routing data of the dynamic region layer refers to traversing all boundaries of polygons of the dynamic region layer adjacent to the base region layer. For example, if the H-th side of the first polygon and the J-th side of the second polygon in the dynamic region layer are at the boundary of the dynamic region layer, traversing the obtained dynamic layer boundary line segment, including the H-th side of the first polygon and the J-th side of the second polygon.
Step S2028: and searching a target basic layer boundary line segment matched with the dynamic layer boundary line segment in the basic region route searching data.
The target base layer boundary line segment matched with the dynamic layer boundary line segment refers to a base layer boundary line segment which is similar to the dynamic layer boundary line segment and can reach the region where the target base layer boundary line segment is located from the dynamic layer boundary line segment.
Step S2038: if the target basic layer boundary line segment matched with the dynamic layer boundary line segment is found, establishing a line segment connection relation between the dynamic layer boundary line segment and the target basic layer boundary line segment.
If a target basic layer boundary line segment matched with the dynamic layer boundary line segment is found, a line segment connection relation between the dynamic layer boundary line segment and the target basic layer boundary line segment can be established so as to indicate that the dynamic layer boundary line segment and the target basic layer boundary line segment can be spliced. The established line segment connection relationships may be stored via a list or in various other possible ways.
The splicing information of the dynamic region layer and the basic region layer comprises the established line segment connection relation.
In one embodiment, in the step S2028, the searching for the target base layer boundary line segment in the base area route data, which matches the dynamic layer boundary line segment, may specifically include:
traversing to obtain a base layer boundary of the base area route searching data, wherein the base layer boundary comprises each base layer boundary line segment;
if the projection condition is met, determining a first projection overlapping area for projecting the dynamic layer boundary line segment and the basic layer boundary line segment to the target coordinate axis;
If the first projection overlapping area and the second projection overlapping area are not overlapped, the basic layer boundary line segment is determined to be a matched target basic layer boundary line segment, and the second projection overlapping area is an overlapping area for projecting the found existing target basic layer boundary line segment and dynamic layer boundary line segment to a target coordinate axis.
In one embodiment, when the included angle between the dynamic layer boundary line segment and the basic layer boundary line segment is smaller than the included angle threshold, it may be determined that the projection condition is satisfied, or the projection condition is not satisfied.
The determining of the target coordinate axis can be determined by combining the position relations between the dynamic layer boundary line segment and the basic layer boundary line segment and the coordinate axes.
In one embodiment, the first coordinate axis may be determined to be the target coordinate axis when the dynamic layer boundary line segment and the base layer boundary line segment are both parallel to the first coordinate axis.
In another embodiment, the second coordinate axis may be determined to be the target coordinate axis when the dynamic layer boundary line segment and the base layer boundary line segment are both parallel to the second coordinate axis.
In another embodiment, when the dynamic layer boundary line segment and the base layer boundary line segment are not parallel to each coordinate axis, the included angle between the dynamic layer boundary line segment and the base layer boundary line segment is smaller than the included angle threshold, and the slope of the dynamic layer boundary line segment is within the predetermined slope range, the first coordinate axis is determined as the target coordinate axis.
In another embodiment, the second coordinate axis may be determined as the target coordinate axis when the dynamic layer boundary line segment and the base layer boundary line segment are not parallel to each coordinate axis, the angle between the dynamic layer boundary line segment and the base layer boundary line segment is less than the angle threshold, and the slope of the dynamic layer boundary line segment is outside the predetermined slope range.
In the above embodiments, the dynamic layer boundary line segment and the base layer boundary line segment are not parallel to the coordinate axes, which may mean that the dynamic layer boundary line segment is neither parallel to the first coordinate axis nor parallel to the second coordinate axis, and the base layer boundary line segment is neither parallel to the first coordinate axis nor parallel to the second coordinate axis.
In some embodiments, the searching for the target base layer boundary line segment matching the dynamic layer boundary line segment in the base region route data may further include:
if the first projection overlapping area is overlapped with the second projection overlapping area, determining whether the boundary line segment of the base layer is better than the boundary line segment of the existing target base layer;
if the base layer boundary line segment is better than the existing target base layer boundary line segment, deleting the existing target base layer boundary line segment from the searched target base layer boundary line segment, and determining the base layer boundary line segment as a matched target base layer boundary line segment;
Otherwise, it is determined that the base layer boundary line segment is not a matching target base layer boundary line segment.
Wherein the determination of whether the base layer boundary line segment is better than the existing target base layer boundary line segment may be performed in any possible manner. For example, in one embodiment, if the distance between the dynamic layer boundary line segment and the base layer boundary line segment is smaller than the distance between the dynamic layer boundary line segment and the existing target base layer boundary line segment, or the included angle between the dynamic layer boundary line segment and the base layer boundary line segment is smaller than the included angle between the dynamic layer boundary line segment and the existing target base layer boundary line segment, it is determined that the base layer boundary line segment is better than the existing target base layer boundary line segment.
The distance between the dynamic layer boundary line segment and the basic layer boundary line segment can be calculated by any way of calculating the distance between the line segments, for example, by calculating the distance between the points and the line segments. The method for calculating the included angle between the dynamic layer boundary line segment and the existing target basic layer boundary line segment can also be carried out in any mode for calculating the included angle between the dynamic layer boundary line segment and the existing target basic layer boundary line segment, for example, the included angle is obtained by calculating the dot product of the line segment vector of the dynamic layer boundary line segment and the line segment vector of the existing target basic layer boundary line segment.
Accordingly, referring to fig. 6, in a specific example, the searching for a target base layer boundary line segment in the base area route data, where the target base layer boundary line segment matches the dynamic layer boundary line segment, may specifically include:
step S601: a base layer boundary line segment is determined. The boundary line segment of the base layer refers to one of the boundary line segments of the base region layer to be matched.
Step S602: whether the projection condition is satisfied is determined, and if the projection condition is satisfied, the process proceeds to step S603, and if the projection condition is not satisfied, the process proceeds directly to step S607. The manner of determining whether the projection condition is satisfied may be the same as in the above-described embodiment.
Step S603: a first projected overlap region is determined that projects the dynamic layer boundary line segment and the base layer boundary line segment onto the target coordinate axis.
The projection of the dynamic layer boundary line segment and the base layer boundary line segment to the first projection overlapping area of the target coordinate axis refers to the line segment area where the first projection line segment is obtained by projecting the dynamic layer boundary line segment to the target coordinate axis and the second projection line segment is obtained by projecting the base layer boundary line segment to the target coordinate axis, and the first projection line segment and the second projection line segment overlap each other.
Step S604: whether the first projection overlapping area and the second projection overlapping area overlap is judged, if so, the step S605 is carried out, otherwise, the step S606 is carried out.
The second projection overlapping area is an overlapping area where the found existing target basic layer boundary line segment and the found dynamic layer boundary line segment are projected to the target coordinate axis. An existing target base layer boundary line segment refers to a previously found base layer boundary line segment that can be matched, for example, assuming that the base layer boundary line segment contains line segments L1, L2, L3 … …. If in the previous matching process, it is assumed that L1 is not matched with the dynamic layer boundary line segment and line segment L2 is matched with the dynamic layer boundary line segment, after L2 is added to the found target base layer boundary line segment list or recorded in other manners, the L2 may be used as the existing target base layer boundary line segment.
The second projection overlapping area refers to a line segment area where the first projection line segment and the third projection line segment overlap each other after the dynamic layer boundary line segment is projected to the target coordinate axis to obtain the first projection line segment and the existing target base layer boundary line segment is projected to the target coordinate axis to obtain the third projection line segment.
Step S605: judging whether the basic layer boundary line segment is better than the existing target basic layer boundary line segment, if so, proceeding to step S606, otherwise, proceeding to step S607.
If the first projection overlapping area and the second projection overlapping area are overlapped, the current basic layer boundary line segment and the existing target basic layer boundary line segment can be used as target basic layer boundary line segments to realize the splicing of the basic area layer and the dynamic area layer. However, a preferred line segment needs to be selected as a target base layer boundary line segment finally used for splicing, so that analysis needs to be performed on whether the base layer boundary line segment is better than the existing target base layer boundary line segment. The specific manner may be the same as in the above-described embodiment.
Step S606: and determining the boundary line segment of the base layer as a matched target boundary line segment of the base layer.
After determining that the base layer boundary line segment is a matched target base layer boundary line segment, if step S604 is performed to directly enter S606, that is, the first projection overlapping region and the second projection overlapping region do not overlap, the base layer boundary line segment may be directly determined as the matched target base layer boundary line segment, and added to the found target base layer boundary line segment list. If step S606 is entered from step S605, that is, when the base layer boundary line segment is better than the existing target base layer boundary line segment, the existing target base layer boundary line segment may be deleted from the searched target base layer boundary line segment list, and then the base layer boundary line segment may be added to the searched target base layer boundary line segment list.
Step S607: it is determined that the base layer boundary line segment is not a matching target base layer boundary line segment.
It should be appreciated that in other embodiments, if it is determined that the first projection overlap region overlaps the second projection overlap region, it is also possible to not analyze whether the base layer boundary line segment is better than the existing target base layer boundary line segment, for example, directly reserve the existing target base layer boundary line segment, rather than add the base layer boundary line segment to the list of found target base layer boundary line segments, for example, directly delete the base layer boundary line segment from the list of found target base layer boundary line segments, and then add the base layer boundary line segment to the list of found target base layer boundary line segments. In other embodiments, it is also possible to analyze whether the base layer boundary line segment is better than the existing target base layer boundary line segment in other ways.
Some examples of segment relationships between dynamic layer boundary segments and base layer boundary segments are shown in fig. 7.
As shown in fig. 7, the dashed line segment in fig. 7 is assumed to be a dynamic layer boundary segment, and the solid line segment is assumed to be a base layer boundary segment. Of course, the line segment may be a base layer boundary line segment, and the solid line may be a dynamic layer line segment. As shown in fig. 7, in the case of 701, the dynamic layer boundary line segment intersects the base layer boundary line segment (for example, four points of two line segments are approximately on a straight line, two line segments intersect in an X-shape, two line segments intersect in a T-shape, two line segments intersect in a Λ -shape, where two points overlap), and the included angle is smaller than the included angle threshold (for example, 35 degrees), then the base layer boundary line segment is necessarily the target base layer boundary line segment of the dynamic layer boundary line segment. In the case shown at 702, if the dynamic layer boundary line segment is too large in angle with the base layer boundary line segment, or if there is no coverage area after the projection of both the dynamic layer boundary line segment and the base layer boundary line segment, then the base layer boundary line segment is necessarily not the target base layer boundary line segment for the dynamic layer boundary line segment. In the case shown in 703, the included angle between the dynamic layer boundary line segment and the base layer boundary line segment is smaller than the included angle threshold, and the coverage area exists after the projection of the dynamic layer boundary line segment and the base layer boundary line segment, then further analysis needs to be further performed by combining the distance between the two line segments, etc., to determine whether the base layer boundary line segment is the target base layer boundary line segment of the dynamic layer boundary line segment.
Based on the above description of the embodiments, it may be determined that, in the embodiment of the present application, the matching target base layer boundary line segment and the dynamic layer boundary line segment should satisfy the following conditions: the line segment distance between the target base layer boundary line segment and the dynamic layer boundary line segment is small enough (less than a preset distance threshold), the line segment angle between the target base layer boundary line segment and the dynamic layer boundary line segment is small enough (less than a preset angle threshold), the target base layer boundary line segment and the dynamic layer boundary line segment have an overlapping portion (i.e. the first overlapping area is not empty) on the main axis (the first coordinate axis or the second coordinate axis) of the horizontal plane, and the line segment height between the target base layer boundary line segment and the dynamic layer boundary line segment is smaller than the step height (which can be preset), wherein the line segment height specifically means that the projection line segment is obtained by projecting the target base layer boundary line segment onto the third coordinate axis, and the projection line segment is obtained by projecting the dynamic layer boundary line segment onto the third coordinate axis.
Step S210: and generating the path-finding data of the target scene based on the base area path-finding data, the dynamic area path-finding data and the splicing information.
In one embodiment, the base area route-finding data, the dynamic area route-finding data and the splicing information may be summarized to generate route-finding data of the target scene. The generated path-finding data of the target scene comprises basic area path-finding data, dynamic area path-finding data and splicing information.
In some embodiments, the generated path-finding data of the target scene may further include a dynamic region layer identifier, a dynamic region mark, or a region shape identifier, which are used to identify each dynamic region layer, each dynamic region, and each dynamic region shape, respectively. It should be appreciated that in some specific examples, these dynamic region layer identifications, dynamic region tags, or region shape identifications may also be directly included in the dynamic region routing data described above.
Referring to fig. 8, in the generating process of the way-finding data in another embodiment, after generating the base area way-finding data in the step S204, the generating process may further include:
step S205: first boundary information of boundaries of the base area layer and the dynamic area is recorded.
Therefore, after the base area road-finding data is generated, the first boundary information of the boundary of the base area layer and the dynamic area can be directly recorded, so that when the splicing information of the dynamic area layer and the base area layer is established later, the recorded first boundary information of the base area road-finding data can be directly established based on the base area road-finding data without searching again, and the efficiency of establishing the splicing information is improved. The first boundary information of the boundary between the recorded base area layer and the dynamic area may be included in the base area route searching data or extracted from the base area route searching data.
The first boundary information recorded may specifically be which polygon of the base area layer and which side of the polygon is located at a boundary adjacent to the dynamic area layer, that is, the first boundary information recorded may specifically include a polygon identifier and an identifier of a side of the polygon, where the polygon identifier and the identifier of the side of the polygon may be simultaneously included in the same information or may be represented by different information.
Referring to fig. 8, in the generation process of the way-finding data in another embodiment, after the generation of the dynamic area way-finding data in step S206, the method may further include:
step S207: and recording second boundary information of the dynamic region and basic region boundary of the dynamic region layer.
Therefore, after the dynamic area route searching data are generated, the second boundary information of the dynamic area and the basic area boundary of the dynamic area layer can be directly recorded, so that when the splicing information of the dynamic area layer and the basic area layer is built later, the splicing information can be built directly based on the recorded second boundary information without searching the dynamic area route searching data again, and the efficiency of building the splicing information is improved. The recorded second boundary information may be included in the dynamic area route searching data or extracted from the dynamic area route searching data.
The second boundary information recorded may specifically be which polygon of the dynamic area layer and which side of the polygon is located at a boundary adjacent to the base area layer, that is, the second boundary information recorded may specifically include a polygon identifier and an identifier of a side of the polygon, where the polygon identifier and the identifier of the side of the polygon may be simultaneously included in the same information or may be represented by different information.
At this time, the step S208 of creating the splicing information of the dynamic area layer and the base area layer may specifically include step S2081 shown in fig. 8.
Step S2081: and establishing splicing information of the dynamic region layer and the basic region layer according to the first boundary information and the second boundary information.
At this time, the step S2018 may specifically include: and traversing the dynamic layer boundary of the dynamic area routing data of the dynamic area layer in the second boundary information.
Accordingly, in this case, the target base layer boundary line segment matching the dynamic layer boundary line segment in the search base region route data in the above step S2028 may specifically include: and searching a target basic layer boundary line segment matched with the dynamic layer boundary line segment in the first boundary information.
Therefore, by recording the first boundary information of the base area road-finding data after the base area road-finding data is generated and recording the second boundary information of the dynamic area road-finding data after the dynamic area road-finding data is generated, when the splicing information of the dynamic area layer and the base area layer is required to be established, the recorded first boundary information and second boundary information can be directly searched for and established without searching the respective boundaries of the base area road-finding data and the dynamic area road-finding data again for all the base area road-finding data and the dynamic area road-finding data, the efficiency of establishing the splicing information of the dynamic area layer and the base area layer is improved, and the generation efficiency of the generated road-finding data is improved.
It should be appreciated that in some embodiments, the first boundary information of the base area seek data may be recorded only after the base area seek data is generated in step S204 described above. The second boundary information of the dynamic area seek data may be recorded only after the generation of the dynamic area seek data in step S206. In a specific example of the present application, the process of recording the first boundary information of the base area seek data after the base area seek data is generated and the process of recording the second boundary information of the dynamic area seek data after the dynamic area seek data is generated may be performed. I.e. both the first boundary information and the second boundary information are recorded.
Based on the embodiments described above, referring to fig. 9, the manner of generating and recording the area routing data of one area layer of the dynamic multi-layer in one embodiment may include the following steps S901 to S911. The region layer may be a static region layer or a dynamic region layer.
Step S901: inputting scene data of an area layer, the scene data of the area layer including: map scene.
Step S902: and judging whether the blocking processing is needed or not. If not, the process proceeds to step S903, and if yes, the process proceeds to step S905.
Whether or not the blocking process is required may be determined according to various possible rules, for example, whether or not the blocking process is required is determined according to a set blocking size, which may be configured in advance in a configuration file, and a size of a map scene. If the map size of the map scene is larger than the set block size, the block processing is judged to be needed, otherwise, the block processing is judged not to be needed.
Step S903: the whole map scene is taken as a map block.
Step S904: regional route data is generated for map tiles, and the process proceeds to step S909. The manner in which the area route data is generated for map tiles may be the same as that mentioned in the above embodiment.
Step S905: the map scene is divided into a plurality of map tiles.
The method of dividing the map scene into blocks can be performed in any possible way. For example, a map scene is divided into a plurality of map tiles, i.e., the map scene is divided into map tiles each having a pre-configured tile size.
Step S906: and generating block area path finding data for map blocks. The way of generating the block area route data for map blocks may be the same as mentioned in the above-described embodiment.
Step S907: and judging whether unprocessed map segments exist, if so, returning to the step S906 aiming at the next unprocessed map segment. If not, the process proceeds to step S908.
Step S908: and establishing a connection relation of the path finding data of each block area corresponding to each map block, and proceeding to step S909. The specific connection establishment method can be any available connection establishment method, for example, the splicing relationship of each map block provided by an open-source navmesh (a path-finding data generated by an open-source path-finding database) database can be adopted.
Step S909: and obtaining the regional path-finding data of the regional layer.
It can be understood that if the map scene is not segmented, that is, the entire map scene is taken as one map segment, the obtained area route searching data includes the area route searching data directly generated for the map segment. If the map scene is segmented, the obtained area route searching data comprises the following steps: and the map blocks correspond to the block area path searching data and the connection relation of the block area path searching data.
Furthermore, it should be noted that the region layer may be a base region layer or a dynamic region layer. If the area layer is a base area layer, the obtained area routing data is base area routing data. If the area layer is a dynamic area layer, the obtained area routing data is the dynamic area routing data of the dynamic area layer.
Step S910: whether the target area layer exists or not is determined, if yes, the process proceeds to step S911, and if no, the generation process of the route search data for the area layer is ended.
The target area layer refers to a dynamic area layer with dynamic change of an object. Such as the presence of dynamic zone layers C1, C2, C3, C4. Then the navmesh of the layer may be generated to consider the target zone layer to be present.
The determination mode of the target area layer can be set in combination with the actual technical requirement.
For example, in some embodiments, when the method for generating the path-finding data according to the embodiments of the present application is applied to a scenario of generating the path-finding data offline, whether a dynamic area layer exists or not may be directly determined, that is, whether a target area layer exists or not may be specifically determined, if the dynamic area layer exists, whether the target area layer exists or not may be directly determined, and if the dynamic area layer exists, whether the dynamic area layer exists or not is determined to be open without concern that the area layer is the dynamic area layer. Therefore, the regional path finding data are generated in advance for all regional layers, and corresponding boundary information is recorded, so that the generated data can be directly used in offline operation.
In other embodiments, if the method for generating the routing data according to the embodiments of the present application is applied to a scene of online generation of the routing data in real-time online game, it may be determined whether a dynamic area layer exists and whether a dynamic area of the dynamic area layer is opened, that is, whether a dynamic area layer of a dynamic area is opened may be determined, if a dynamic area layer of a dynamic area layer is opened, the existence of the target area layer is determined, and the opened dynamic area layer is determined as the target area layer. The dynamic area layer being opened means that the dynamic area layer is in an enabled state. The method can be specifically set by a developer, taking a game scene as an example, or can be based on the change of the game scene and the change of the game progress, and the opening of the corresponding dynamic region layer is automatically triggered.
Step S911: and recording boundary information of the regional path-finding data of the regional layer, and ending the generation process of the path-finding data of the regional layer, and simultaneously entering the generation process of the path-finding data of the next regional layer. It should be understood that if the area layer is a base area layer, the recorded boundary information is the first boundary information as described above, and if the area layer is a dynamic area layer, the recorded boundary information is the second boundary information as described above. The manner of specifically recording the boundary information is the same as that mentioned in the above embodiment.
When the area layer is a dynamic area layer, the generation process of the path-finding data can be respectively executed for each dynamic area layer. Specifically, based on the above-described embodiments, referring to fig. 10, in the manner of generating dynamic region route-finding data and recording boundary information for one dynamic region of the dynamic region layer of the dynamic multi-layer in one embodiment, it may be determined whether the map region needs to be blocked in the above manner for the map scene of the dynamic region layer, and if the blocking is not needed, the entire map scene of the dynamic region layer is regarded as one map block. And if the partitioning processing is needed, partitioning the whole map scene of the dynamic region layer to obtain each map partitioning. Then, the following steps S1001 to S1014 are performed.
Step S1001: and loading a dynamic map scene of one map partition of the dynamic region layer. It is to be understood that, in the case where the above-described blocking processing is not performed, the loaded dynamic map scene of the map blocking is the entire map scene of the dynamic area layer, and in the case where the blocking processing is performed, the loaded dynamic map scene of the map blocking is the map scene of one of the map blocking.
Step S1002: triangles that are not within the dynamic region are filtered. The specific filtering mode can be implemented by adopting the existing mode of filtering triangles in the dynamic area.
Step S1003: and 3D scene voxelization is carried out on the dynamic map scene with the triangle filtered, so as to obtain dynamic map voxel data. The specific voxelization can be performed by an existing voxelization method.
Step S1004: voxels that are not within the dynamic region are filtered. The specific filtering mode can be performed by adopting the existing mode of filtering voxels.
Step S1005: filtering non-walkable regions in the dynamic map voxel data (i.e., map voxel data of a dynamic layer that is not behind voxels within the dynamic region) to obtain dynamic map walkable region voxel data. The filtering of the non-walkable region may be performed in any manner.
Step S1006: and simplifying the contour lines in the movable region voxel data of the dynamic map to obtain the movable region data of the dynamic map after simplifying the contour lines. The method for simplifying the contour line can be performed by adopting the existing method for simplifying the contour line.
Step S1007: generating a polygon based on the dynamic map walkable region data; in this step, if the above step S1002 or S1004 is performed, or if step S1008 is performed later, then the polygon may be generated directly for the moving map walkable region data, or the polygon located only in the moving region of the moving region layer may be generated based on the moving map walkable region data. If none of the steps S1002, S1004, and S1008 is performed, it is necessary to generate a polygon located only in the dynamic area of the dynamic area layer based on the dynamic map walkable area data. That is, only the polygons within the dynamic region of the dynamic region layer and at least one of S1002, S1004, S1008 need to be generated.
Step S1008: polygons that are not within the dynamic region of the dynamic region layer are filtered out.
Step S1009: and generating a detail network based on each polygon, and obtaining the block area route searching data of the map block based on the detail network. The method for generating the detail network based on the polygon may be performed in an existing manner, and the embodiment of the present application is not particularly limited.
Step S1010: and judging whether unprocessed map segments exist, if so, returning to the step S1001 for the next unprocessed map segment. If not, the process advances to step S1011.
Step S1011: and establishing a connection relation of the path finding data of each block area corresponding to each map block, and proceeding to step S1012.
Step S1012: dynamic region way-finding data are obtained.
It can be understood that if the map scene of the dynamic area is not segmented, the obtained dynamic area route searching data includes route searching data directly generated for the map scene of the dynamic area. If the map scene of the dynamic area is segmented, the obtained dynamic area road searching data comprises the following steps: and the map blocks correspond to the block area path searching data and the connection relation of the block area path searching data.
Step S1013: and recording boundary information of the dynamic area route searching data.
Wherein the way of recording the boundary information is the same as mentioned in the above embodiments.
Step S1014: and establishing splicing information of the dynamic region layer and the basic region layer, and ending the generation process of the path finding data aiming at the dynamic region layer.
The manner in which the splicing information of the dynamic area layer and the base area layer is established is the same as that mentioned in the above embodiment.
Based on the above embodiments, the following is a detailed explanation in connection with an application example of a process of generating the route-finding data.
Referring to fig. 11, the process of generating the seek data in one specific application example includes the following steps S1101 to S1108.
Step S1101: and determining dynamic areas in the target scene, adding dynamic area marks for the dynamic areas, and determining dynamic area layers to which the dynamic areas belong.
Step S1102: and loading the basic scene data of the basic area layer of the target scene, and generating the basic area route finding data of the basic area layer based on the basic scene data.
Step S1103: first boundary information of the base area route data is recorded.
Step S1104: it is determined whether there are other dynamic region layers, if so, the process proceeds to step S905, otherwise, the process proceeds to step S1108.
Step S1105: and loading data of the next dynamic region layer, and generating dynamic region path-finding data in a dynamic region of the dynamic region layer.
Step S1106: and recording second boundary information of the dynamic area route searching data.
Step S1107: and establishing splicing information of the dynamic region layer and the basic region layer according to the first boundary information and the second boundary information, and returning to the step S1104.
Step S1108, deriving the base area route searching data, the dynamic area route searching data and the splicing information to obtain the route searching data of the target scene. The dynamic area routing data comprise dynamic area routing data of dynamic areas of all dynamic area layers, and the splicing information also comprises splicing information for splicing all dynamic area layers with the base area layer respectively.
Based on the above-described embodiment, a schematic diagram of generating the way-finding data of the base area layer in a specific example is shown in fig. 12, the generated way-finding data of one dynamic area layer is shown in fig. 13, and the way-finding data obtained by splicing and fusing the way-finding data of the base area layer and the way-finding data of the dynamic area layer is shown in fig. 14. In the illustrations of fig. 12, 13, 14, the black line segments represent region boundaries, and the broken line segments represent line segments of polygons generated in the generated route-finding data, it being understood that the sides of the polygons in each polygon of the route-finding data that is finally obtained may be line segments other than boundary line segments of each region (object, static region, and dynamic region) or line segments determined during the course of the pollen polygon. The area surrounded by the dot-dash line segment in fig. 12 is a dynamic area of the dynamic area layer, and it can be seen in conjunction with fig. 12 and 13 that when generating the route-seeking data of the static area layer, the dynamic area of the dynamic area layer is not processed, and the boundary of the dynamic area is used to assist in determining the boundary segment of the static area layer. When generating the path-finding data of the dynamic region layer, each polygon is obtained only for the walkable region in the dynamic region in the manner described above. The double-headed arrow in fig. 14 indicates that the polygon of the corresponding static area layer abuts the polygon of the dynamic area.
In one embodiment, as shown in fig. 15, a path-finding method is provided, and the method is applied to the terminal 102 or the server 104 in fig. 1, for example, and includes the following steps S1501 to S1503.
Step S1501: loading path-finding data, wherein the path-finding data comprises target path-finding data, and the target path-finding data comprises: base zone way-finding data of the base zone layer and dynamic zone way-finding data of the dynamic zone layer marked as on.
The target route searching data is route searching data which is needed to be used in the route searching process, and is a resource for supporting the route searching process. The generation of the routing data may be in the manner as mentioned in the embodiments above.
In the embodiment of the present application, the route-seeking data needed in the route-seeking process is referred to as target route-seeking data. The target routing data necessarily includes base area routing data of a base area layer, and also includes dynamic area routing data of a dynamic area layer marked as on.
For example, if there are two dynamic zone layers A, B, if there is a dynamic object a in the target scene to be routed currently, the dynamic zone layer a where the dynamic object a is located is marked as on, so that the dynamic zone routing data of the dynamic zone layer a is in an available state. Similarly, if the dynamic object a is changed into the dynamic object B through the state change, or the dynamic object a disappears, and the dynamic object B appears, the dynamic area layer a where the dynamic object a is located is marked as not being turned on, and the dynamic area layer B where the dynamic object B is located is marked as being turned on, so that the dynamic area route searching data of the dynamic area layer a is in an unavailable state, and the dynamic area route searching data of the dynamic area layer B is in an available state.
In some embodiments, the dynamic area routing data of the dynamic area layer is dynamic area routing data of the dynamic area layer marked as open, the dynamic area routing data including: in each dynamic region of the dynamic region layer, the path-finding data of the dynamic region is marked as open.
Thus, in the case that one or more dynamic areas are included in the dynamic area layer, the dynamic area route-seeking data in the target route-seeking data includes route-seeking data of a dynamic area marked as on in each dynamic area of the dynamic area layer. That is, the dynamic area routing data of the dynamic area layer marked as not open is not included in the target routing data, and the dynamic area routing data of the dynamic area marked as not open is not included in the target routing data in the dynamic area layer marked as open, so as to save memory resources.
For example, assume that there are two dynamic region layers C, D, two dynamic regions are included in dynamic region layer C: if the mark of the dynamic area layer C is on, the mark of the dynamic area layer C1 is on, the mark of the dynamic area layer C2 is not on, and the mark of the dynamic area layer D is not on, the target routing data includes the dynamic area routing data of the dynamic area C1 of the dynamic area layer C, and does not include the dynamic area routing data of the dynamic area C2 of the dynamic area layer C which is not on and the dynamic area routing data of the dynamic area layer D.
Accordingly, in one embodiment, before loading the target seek data, the method further includes:
acquiring an opened dynamic region layer and an opened dynamic region;
and generating dynamic area route searching data of the opened dynamic area layer aiming at the opened dynamic area in the opened dynamic area layer, and generating splicing information of the base area layer and the dynamic area layer.
In some embodiments, the target way-finding data further comprises: splicing information of the base area layer and the dynamic area layer. Therefore, in the subsequent path searching process, no extra resources and time are required to search the boundary of the dynamic region layer and the boundary of the basic region layer, thereby being beneficial to saving resources and improving the path searching efficiency.
In some embodiments, the loaded way-finding data may further include: non-target way-finding data, wherein the non-target way-finding data comprises dynamic area way-finding data marked as an unopened dynamic area layer.
The non-target route-seeking data is route-seeking data which is not needed in the route-seeking process, and the route-seeking data generating process can be in the manner mentioned in the above embodiments. Therefore, when the route searching data is loaded, the route searching data of the base area layer and the route searching data of the dynamic area layer (including the route searching data of the dynamic area layer marked as open and the route searching data of the dynamic area layer marked as unopened) are loaded, so that after the subsequent non-target route searching data is started (namely the mark of the corresponding dynamic area layer is changed to be open), the route searching of the corresponding route searching data can be directly carried out according to whether the mark is opened or not without reloading, and the route searching efficiency is improved.
For example, if there are two dynamic zone layers E, F, if there is a dynamic object E in the target scene to be routed, the dynamic zone layer E where the dynamic object E is located is marked as on, and the dynamic zone layer F is marked as not on. And the dynamic object E is changed into a dynamic object F through state change, or the dynamic object E disappears, and the dynamic object F appears, so that the dynamic area layer E where the dynamic object E is located is marked as unopened, and the dynamic area layer F where the dynamic object F is located is marked as opened. In this case, the dynamic area way-finding data of the dynamic area layer E, F can be loaded when the way-finding data is loaded. When the target route searching data is combined in the follow-up process, the route searching is carried out by combining the base area route searching data and the dynamic area route searching data of the dynamic area layer marked as open.
Step S1502: starting point information and end point information are obtained.
The start point information is a start point at which a route is to be found, and generally is a start point at which a route is to be found, and indicates a start position at which a route is to be found. The destination information is the destination at which the route is to be found, and generally the destination at which the route is to be found, and indicates the end position at which the route is to be found.
The start point information and the end point information may be determined in various possible ways. For example, in some embodiments, taking a game scenario as an example, the start point information and the end point information may be specified by a game user. For another example, taking a game scene as an example, the position of a game character (game player or NPC character) may be set as the start point information, and a target position (for example, a clicked target position) indicated by the game user or a position to be reached by the NPC character may be set as the target position. It should be appreciated that in other embodiments, other ways of determining the start point information and the end point information may be employed.
Step S1503: and carrying out path finding in the target path finding data based on the starting point information and the end point information to obtain a path finding path.
In one embodiment, the route searching is performed in the target route searching data based on the starting point information and the end point information, and the route searching route is obtained in any possible manner. Dividing the route-seeking data into examples based on a navigation grid, and carrying out route-seeking in the target route-seeking data based on the starting point information and the end point information in a specific example to obtain a route-seeking path, wherein the method specifically comprises the following steps of:
Determining a starting point polygon to which the starting point information belongs and an ending point polygon to which the ending point information belongs;
and starting to search a path from the starting point polygon, searching the path in the target path searching data, and sequentially searching the expanded adjacent polygons until the ending point polygon is found, so as to obtain a path searching path.
In the course of seeking, when seeking an extended adjacent polygon, if there is an open dynamic area layer, the method specifically may include:
determining an adjacent polygon adjacent to the current expanded polygon;
determining the area to which the adjacent polygon belongs;
if the area to which the adjacent polygon belongs is an area in the basic area layer, determining the adjacent polygon as an expanded adjacent polygon;
if the area to which the adjacent polygon belongs is a dynamic area, the dynamic area is opened, and a dynamic area layer to which the dynamic area belongs is opened, and the adjacent polygon corresponding to the dynamic area layer is determined to be an expanded adjacent polygon;
if the dynamic region is not opened or the dynamic region layer is not opened, searching for the next adjacent polygon, and returning to the step of determining the region to which the adjacent polygon belongs, wherein the next adjacent polygon is located in the region layer where the current expanded polygon is located, or the next adjacent polygon is located in the region layer above the region layer where the current expanded polygon is located, or the next adjacent polygon is located in the base region layer.
As shown in fig. 16, a flowchart of finding an extended neighboring polygon in a specific example is shown, which may specifically include the following steps S1601 to S1608.
Step S1601: an adjacent polygon adjacent to the current expanded polygon is determined.
Wherein the current extended polygon refers to a polygon that has been currently found and has been added to the way-finding path. Taking the path-finding process just started as an example, the current extended polygon may refer to the polygon where the starting point information is located. If the current extended polygon is in the course of a seek, the current extended polygon may be a polygon that has already been added to the seek, such as a polygon that has just been added to the seek, or a polygon that has been added to the seek at some other point.
Step S1602: and determining the area to which the adjacent polygon belongs. If the neighboring polygon belongs to the dynamic region, the process proceeds to step S1603. If the neighboring polygon belongs to the base area layer, the process proceeds to step S1605.
Step S1603: whether the dynamic region to which the adjacent polygon belongs is on or not is determined, if so, the process proceeds to step S1604, and if not, the process proceeds to step S1607.
In step S1604, it is determined whether the dynamic area layer to which the dynamic area belongs is on. If the operation is started, the process proceeds to step S1605, and if the operation is not started, the process proceeds to step S1607.
Step S1605: adjacent polygons are determined as expanded adjacent polygons.
Step S1606: and judging whether the road searching is completed or not. If the route searching is completed, the process proceeds to S1608, and if the route searching is not completed, the process proceeds to S1607. Wherein the determination of whether a seek is completed may be analyzed in various possible ways. For example, if the found neighboring polygon is a polygon with end point information, it can be directly determined that the route searching is completed, and if the found neighboring polygon is not a polygon with end point information, it is determined that the route searching is not completed. In some embodiments, other ways may be used to determine whether the seek is completed, for example, after the neighboring polygon is found, whether the neighboring polygon is better than the found seek path after being accessed to the seek path, if not, then the seek is determined to be completed, and if so, then the seek is determined to be incomplete. Thus, it is possible to find a plurality of paths between the start point information and the end point information and determine an optimum path therefrom as a final path-finding path. It will be appreciated that other ways of analyzing to determine whether a seek has been completed may be employed in other ways.
It should be understood that, in other embodiments, if it is only required to determine whether the route searching is completed based on whether the neighboring polygon is the polygon with the end point information, after the step S1601, it may be determined whether the route searching is completed, that is, whether the neighboring polygon neighboring the current expanded polygon is the polygon with the end point information, if so, it may be directly determined that the route searching is completed, and if not, the step S1602 is performed to determine the area to which the neighboring polygon belongs. And after determining the neighboring polygon as an expanded neighboring polygon in step S1305, directly returns to step S1301 to determine the next neighboring polygon.
Step S1607: and (3) expanding to a next adjacent polygon, and returning to the step S1301 to determine the region to which the adjacent polygon belongs, where the next adjacent polygon is located in the region layer where the current expanded polygon is located, or where the next adjacent polygon is located in the region layer above the region layer where the current expanded polygon is located, or in the base region layer.
Wherein there may be different situations for the current expanded polygon, and different situations for the next adjacent polygon to be expanded.
Taking the current extended polygon as the polygon located in the base area layer as an example, whether the polygon adjacent to the current extended polygon belongs to the opened dynamic area or not can be checked first, and if so, the polygon in the dynamic area layer with the highest opened priority in the dynamic area is extended. Otherwise, neighboring polygons in the base region layer are expanded. The specific extension rule may be set in different manners, for example, in combination with a region where the polygon where the endpoint information is located is set. For example, if the polygon in which the endpoint information is located in the dynamic region layer, the polygon in the dynamic region layer may be taken as the next adjacent polygon. It should be appreciated that in other embodiments, other ways of selecting whether the polygon of the base region layer or the polygon of the dynamic region layer is the next adjacent polygon may be used.
Taking the current extended polygon as a polygon located in the dynamic area layer as an example, assuming that the dynamic area layer is the dynamic area layer F1, the next adjacent neighboring polygon can be first found in the dynamic area layer F1, and if the neighboring polygon in the dynamic area layer F1 belongs to the dynamic area layer F2 with higher priority, and the dynamic area layer F2 is an already opened layer, the neighboring polygon in the dynamic area layer F2 is extended. If the next adjacent polygon cannot be found in the dynamic zone layer F1, it can be found in the dynamic zone layer F0 that has been opened with a lower priority. If the lower priority dynamic region layer F0 or no neighboring polygon is found, the next neighboring polygon can be further found in the base region layer. In other embodiments, the next adjacent polygon may be found in the base area layer, the dynamic area layer where the current extended polygon is located, and other dynamic area layers at the same time, and if there are adjacent polygons in the base area layer, the dynamic area layer where the current extended polygon is located, and other dynamic area layers, then one polygon may be determined as the next adjacent polygon according to a certain priority or analysis rule. The specific priority setting method or analysis rule setting method may be the same as the above.
Step S1608: and returning a path searching result and ending the path searching process.
The path finding result refers to the path finding path which is finally found.
In order to verify the reduction of resource occupation and time consumption in the route searching process of the scheme of the embodiment of the application, when the route searching method based on the embodiment of the application is compared with the traditional route searching scheme, the time consumption for preparing the route searching data is compared based on the same test case, when the map block size is 16 x 16 and the polygon number is 1, the time consumption for preparing the route searching data of the traditional route searching scheme is 12-15 milliseconds, and the scheme of the embodiment of the application is far less than 1 millisecond and can be ignored. When the map block size is 16×16 and the polygon number is 92, the time for preparing the road searching data in the conventional road searching scheme is up to 17-21 ms, but the scheme of the embodiment of the application is still far less than 1 ms and can be ignored. When the map block size is 48×48 and the number of polygons is 1, the time for preparing the road searching data in the conventional road searching scheme is up to 48-50 ms, but the scheme of the embodiment of the application is still far less than 1 ms and can be ignored. When the map block size is 48×48 and the number of polygons is 122, the time for preparing the road searching data in the conventional road searching scheme is 57-68 ms, but the scheme of the embodiment of the application is still much smaller than 1 ms and can be ignored. When the map size is 8k by 8k and the number of polygons is 1134923, the memory occupied by the conventional path searching scheme reaches 1262MB, but the memory occupied by the scheme of the embodiment of the application is only 318MB, which is far smaller than the memory occupied by the conventional path searching scheme. When the server is taken as an example, if the game instance borne by the server is 200 and the total map number is 17, the memory occupied by the conventional path searching scheme reaches 252400MB, but the memory occupied by the scheme of the embodiment of the application is only 5406MB, which is far smaller than the memory occupied by the conventional path searching scheme. According to the embodiment of the application, the time consumption for seeking a path is greatly reduced, and the occupation of memory resources is reduced.
In combination with the way-finding method in the embodiment described above, based on the generated way-finding data shown in fig. 12 to 14, in a specific example, when the way-finding is performed, only the way-finding path obtained by way-finding the base area layer is shown in fig. 17, and in the case that the dynamic area layer is on, the way-finding paths obtained by way-finding the base area layer and the dynamic area layer are shown in fig. 18. Similar to fig. 12 to 14, black line segments represent region boundaries in fig. 17 and 18, and broken line segments represent line segments of polygons generated in the generated route-finding data. In fig. 17 and 18, it is assumed that the start point S point of the route is required, the destination position of the route is P point, and the S point and the P point are each within one polygon. In the example shown in fig. 17, in the case where only the base area layer is routed, the area of the dynamic area layer is regarded as a whole to provide the travel path. In the example shown in fig. 18, since the dynamic area layer is turned on, when the dynamic area layer boundary is approached during the course of the route searching, it is possible to select the area of the relevant polygon in the route searching data of the dynamic area layer, that is, the route searching data of the dynamic area layer is also the target of the route searching. The resulting seek path is shown in fig. 17 and 18 as a black line segment between point S and point P.
It should be understood that, although the steps in the flowcharts related to the above embodiments are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiment of the application also provides a generation device of the path finding data for realizing the generation method of the path finding data. The implementation of the solution provided by the device is similar to the implementation described in the above method, so the specific limitation in the embodiments of the generating device of one or more path-finding data provided below may refer to the limitation of the generating method of the path-finding data hereinabove, and will not be repeated herein.
In one embodiment, there is provided a generation apparatus of path-finding data, including: the system comprises a dynamic layer determining module, a basic data generating module, a dynamic data generating module, a splicing module and a data determining module, wherein:
the dynamic layer determining module is used for determining a dynamic region layer in the target scene, wherein the dynamic region layer comprises at least one dynamic region;
the basic data generation module is used for loading basic scene data of a basic area layer of the target scene and generating basic area route finding data of the basic area layer based on the basic scene data;
the dynamic data generation module is used for loading the dynamic region layer and generating dynamic region path finding data in a dynamic region of the dynamic region layer;
the splicing module is used for establishing splicing information of the dynamic region layer and the basic region layer;
the data determining module is used for generating the path finding data of the target scene based on the base area path finding data, the dynamic area path finding data and the splicing information.
In one embodiment, the apparatus further comprises: the first boundary recording module and the second boundary recording module;
the first boundary recording module is used for recording first boundary information of the boundary between the basic area layer and the dynamic area;
The second boundary recording module is used for recording second boundary information of the dynamic region and basic region boundary of the dynamic region layer;
and the splicing module is used for establishing splicing information of the dynamic region layer and the basic region layer according to the first boundary information and the second boundary information.
In one embodiment, the dynamic data generation module is configured to determine a dynamic region in a target scene; and determining a dynamic region layer to which each dynamic region belongs according to the overlapping relation of each dynamic region.
In one embodiment, the dynamic data generating module is configured to perform a dynamic area route searching data generating process, and filter data that is not in a dynamic area of the dynamic area layer during the process of performing the dynamic area route searching data generating process; the dynamic region seek data generation process includes: loading a dynamic map scene of a dynamic region layer; 3D scene voxelization is carried out on the dynamic map scene to obtain dynamic map voxel data; filtering the non-walkable region in the dynamic map voxel data to obtain dynamic map walkable region voxel data; simplifying contour lines in voxel data of a movable region of the dynamic map to obtain the movable region data of the dynamic map after simplifying the contour lines; generating a polygon based on the dynamic map walkable region data; and generating a detail network based on each polygon, and acquiring dynamic area route searching data based on the detail network.
In one embodiment, the dynamic data generation module is configured to filter triangles that are not within the dynamic region of the dynamic region layer prior to 3D scene voxelization of the dynamic map scene.
In one embodiment, the dynamic data generation module is configured to filter voxels that are not within a dynamic region of the dynamic region layer after obtaining the dynamic map voxel data and before filtering the non-walkable region in the dynamic map voxel data.
In one embodiment, the dynamic data generating module is configured to generate, when generating the polygon based on the dynamic map walkable region data, a polygon located only in the dynamic region of the dynamic region layer based on the dynamic map walkable region data.
In one embodiment, the dynamic data generation module is configured to filter out polygons that are not within a dynamic region of the dynamic region layer after generating polygons based on the dynamic map walkable region data and before generating a detail network based on each polygon.
In one embodiment, the splicing module is configured to traverse a dynamic layer boundary of dynamic region path-finding data of a dynamic region layer, where the dynamic layer boundary includes each dynamic layer boundary line segment; searching a target basic layer boundary line segment matched with the dynamic layer boundary line segment in the basic region route searching data; if a target basic layer boundary line segment matched with the dynamic layer boundary line segment is found, establishing a line segment connection relation between the dynamic layer boundary line segment and the target basic layer boundary line segment; and the splicing information of the dynamic region layer and the basic region layer comprises a line segment connection relation.
In one embodiment, the splicing module is used for traversing a base layer boundary for obtaining the path-finding data of the base area, and the base layer boundary comprises each base layer boundary line segment; if the projection condition is met, determining a first projection overlapping area for projecting the dynamic layer boundary line segment and the basic layer boundary line segment to the target coordinate axis; if the first projection overlapping area and the second projection overlapping area are not overlapped, the basic layer boundary line segment is determined to be a matched target basic layer boundary line segment, and the second projection overlapping area is an overlapping area for projecting the found existing target basic layer boundary line segment and dynamic layer boundary line segment to a target coordinate axis.
In one embodiment, the stitching module is configured to determine whether the base layer boundary line segment is better than an existing target base layer boundary line segment when the first projection overlap region overlaps the second projection overlap region; when the basic layer boundary line segment is better than the existing target basic layer boundary line segment, deleting the existing target basic layer boundary line segment from the searched target basic layer boundary line segment list, and determining the basic layer boundary line segment as a matched target basic layer boundary line segment to be added into the searched target basic layer boundary line segment list; and when the base layer boundary line segment is not better than the existing target base layer boundary line segment, determining that the base layer boundary line segment is not a matched target base layer boundary line segment.
In one embodiment, the splicing module is configured to determine that the base layer boundary line segment is better than the existing target base layer boundary line segment when the distance between the dynamic layer boundary line segment and the base layer boundary line segment is smaller than the distance between the dynamic layer boundary line segment and the existing target base layer boundary line segment, or when the included angle between the dynamic layer boundary line segment and the base layer boundary line segment is smaller than the included angle between the dynamic layer boundary line segment and the existing target base layer boundary line segment.
In one embodiment, a way-finding device is provided, the way-finding device comprising: the device comprises a loading module, a starting point obtaining module and a path finding module. Wherein:
the loading module is used for loading the path searching data, the path searching data comprises target path searching data, and the target path searching data comprises: base area routing data of the base area layer, namely dynamic area routing data of the dynamic area layer which is opened;
the starting point acquisition module is used for acquiring starting point information and end point information;
and the path searching module is used for searching paths in the target path searching data based on the starting point information and the end point information to obtain path searching paths.
In one embodiment, the way-finding data loaded by the loading module further includes non-target way-finding data, where the non-target way-finding data includes dynamic region way-finding data marked as an unopened dynamic region layer.
In one embodiment, the path-finding module is configured to determine a starting polygon to which the starting information belongs and an ending polygon to which the ending information belongs; starting to search a path from a starting point polygon, searching the path in target path searching data, and sequentially searching extended adjacent polygons until an ending point polygon is found, so as to obtain a path searching path; wherein finding the expanded contiguous polygon comprises: determining an adjacent polygon adjacent to the current expanded polygon; determining the area to which the adjacent polygon belongs; if the area to which the adjacent polygon belongs is an area in the basic area layer, determining the adjacent polygon as an expanded adjacent polygon; if the area to which the adjacent polygon belongs is a dynamic area, the dynamic area is opened, and a dynamic area layer to which the dynamic area belongs is opened, the adjacent polygon is preferentially determined to be an expanded adjacent polygon; if the dynamic region is not opened or the dynamic region layer is not opened, searching for the next adjacent polygon, and returning to the step of determining the region to which the adjacent polygon belongs, wherein the next adjacent polygon is located in the region layer where the current expanded polygon is located, or the next adjacent polygon is located in the region layer above the region layer where the current expanded polygon is located, or the next adjacent polygon is located in the base region layer.
In one embodiment, the routing device further comprises: the data generation module is configured to generate a data stream,
the data generation module is used for acquiring the opened dynamic region layer and the opened dynamic region; and generating dynamic area route searching data of the opened dynamic area layer aiming at the opened dynamic area in the opened dynamic area layer, and generating splicing information of the base area layer and the dynamic area layer.
The generation device of the path-finding data and each module in the path-finding device can be realized by all or part of software, hardware and the combination thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a server, and the internal structure of which may be as shown in fig. 19. The computer device includes a processor, a memory, an Input/Output interface (I/O) and a communication interface. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface is connected to the system bus through the input/output interface. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is used for storing data of the target scene and the generated path finding data. The input/output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used for communicating with an external terminal through a network connection. The computer program, when executed by a processor, implements a method of generating or a method of routing data.
In one embodiment, a computer device is provided, which may be a terminal. The computer device includes a processor, a memory, an input/output interface, a communication interface, a display unit, and an input means. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input/output interface. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The input/output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless mode can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. The computer program, when executed by a processor, implements a method of generating or a method of routing data. The display unit of the computer equipment is used for forming a visual picture, and can be a display screen, a projection device or a virtual reality imaging device, wherein the display screen can be a liquid crystal display screen or an electronic ink display screen, the input device of the computer equipment can be a touch layer covered on the display screen, can also be a key, a track ball or a touch pad arranged on a shell of the computer equipment, and can also be an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by those skilled in the art that the structure shown in FIG. 19 is merely a block diagram of some of the structures associated with the present inventive arrangements and is not limiting of the computer device to which the present inventive arrangements may be applied, and that a particular computer device may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having stored therein a computer program, the processor implementing the steps of the method embodiments described above when the computer program is executed.
In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored which, when executed by a processor, implements the steps of the method embodiments described above.
In an embodiment, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the steps of the method embodiments described above.
It should be noted that, the user information (including but not limited to user equipment information, user personal information, etc.) and the data (including but not limited to data for analysis, stored data, presented data, etc.) related to the present application are information and data authorized by the user or sufficiently authorized by each party, and the collection, use and processing of the related data need to comply with the related laws and regulations and standards of the related country and region.
Those skilled in the art will appreciate that implementing all or part of the above-described methods in accordance with the embodiments may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magnetic random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (Phase Change Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in various forms such as basic random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), etc. The databases referred to in the embodiments provided herein may include at least one of a relational database and a non-relational database. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processor referred to in the embodiments provided in the present application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, or the like, but is not limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The foregoing examples illustrate only a few embodiments of the application, which are described in detail and are not to be construed as limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of the application should be assessed as that of the appended claims.

Claims (15)

1. A method of generating way-finding data, the method comprising:
determining a dynamic region layer in a target scene, wherein the dynamic region layer comprises at least one dynamic region;
loading basic scene data of a basic area layer of the target scene, and generating basic area route finding data of the basic area layer based on the basic scene data;
loading the dynamic region layer and generating dynamic region path finding data in a dynamic region of the dynamic region layer;
Establishing splicing information of the dynamic region layer and the basic region layer;
and generating the path finding data of the target scene based on the base area path finding data, the dynamic area path finding data and the splicing information.
2. The method according to claim 1, characterized in that:
after the generating the base area route data of the base area layer based on the base scene data, the method further comprises: recording first boundary information of the base area route searching data;
after the dynamic area route searching data in the dynamic area of the dynamic area layer is generated, the method further comprises the following steps: recording second boundary information of the dynamic area route searching data;
the establishing the splicing information of the dynamic region layer and the basic region layer comprises the following steps: and establishing splicing information of the dynamic region layer and the base region layer according to the first boundary information and the second boundary information.
3. The method of claim 1, wherein the determining a dynamic region layer in the target scene comprises:
determining a dynamic region in the target scene;
and determining a dynamic region layer to which each dynamic region belongs according to the overlapping relation of the dynamic regions.
4. The method of claim 1, wherein loading the dynamic region layer to generate dynamic region routing data within a dynamic region of the dynamic region layer comprises:
executing a dynamic area route searching data generating process, and filtering data which are not in a dynamic area of the dynamic area layer in the process of executing the dynamic area route searching data generating process;
the dynamic region route searching data generating process comprises the following steps:
loading a dynamic map scene of the dynamic region layer;
3D scene voxelization is carried out on the dynamic map scene to obtain dynamic map voxel data;
filtering the non-walkable region in the dynamic map voxel data to obtain dynamic map walkable region voxel data;
simplifying contour lines in the movable region voxel data of the dynamic map to obtain movable region data of the dynamic map after simplifying the contour lines;
generating a polygon based on the dynamic map walkable region data;
and generating a detail network based on each polygon, and obtaining dynamic area route searching data based on the detail network.
5. The method according to claim 4, wherein: the filtering data not in the dynamic area of the dynamic area layer in the process of executing the dynamic area route searching data generating process comprises at least one of the following steps:
A first item:
filtering triangles not in the dynamic region of the dynamic region layer before 3D scene voxelization of the dynamic map scene;
the second item:
filtering voxels not within a dynamic region of the dynamic region layer after the obtaining dynamic map voxel data, prior to the filtering of non-walkable regions in the dynamic map voxel data;
third item:
the generating a polygon based on the dynamic map walkable region data includes:
generating polygons only in the dynamic areas of the dynamic area layers based on the dynamic map walkable area data;
fourth item:
after generating the polygon based on the dynamic map walkable region data, before generating the detail network based on each polygon, the method further includes:
polygons that are not within the dynamic region of the dynamic region layer are filtered out.
6. The method according to claim 1 or 2, wherein said establishing splice information of said dynamic region layer and said base region layer comprises:
traversing a dynamic layer boundary of the dynamic area routing data of the dynamic area layer, wherein the dynamic layer boundary comprises each dynamic layer boundary line segment;
Searching a target basic layer boundary line segment matched with the dynamic layer boundary line segment in the basic region route searching data;
if a target basic layer boundary line segment matched with the dynamic layer boundary line segment is found, establishing a line segment connection relation between the dynamic layer boundary line segment and the target basic layer boundary line segment;
and the splicing information of the dynamic region layer and the basic region layer comprises the line segment connection relation.
7. The method according to claim 6, wherein: the searching the target basic layer boundary line segment matched with the dynamic layer boundary line segment in the basic region route searching data comprises the following steps:
traversing to obtain a base layer boundary of the base area route searching data, wherein the base layer boundary comprises base layer boundary line segments;
if the projection condition is met, determining a first projection overlapping area for projecting the dynamic layer boundary line segment and the basic layer boundary line segment to a target coordinate axis;
and if the first projection overlapping area and the second projection overlapping area are not overlapped, determining the basic layer boundary line segment as a matched target basic layer boundary line segment, and the second projection overlapping area is an overlapping area for projecting the searched existing target basic layer boundary line segment and the dynamic layer boundary line segment to the target coordinate axis.
8. The method according to claim 7, wherein: the method further comprises the steps of:
if the first projection overlapping region overlaps the second projection overlapping region, determining whether the base layer boundary line segment is better than the existing target base layer boundary line segment;
if the base layer boundary line segment is better than the existing target base layer boundary line segment, deleting the existing target base layer boundary line segment from the searched target base layer boundary line segment list, and determining the base layer boundary line segment as a matched target base layer boundary line segment;
otherwise, determining that the base layer boundary line segment is not a matched target base layer boundary line segment.
9. The method according to claim 8, wherein: and if the distance between the dynamic layer boundary line segment and the base layer boundary line segment is smaller than the distance between the dynamic layer boundary line segment and the existing target base layer boundary line segment, or the included angle between the dynamic layer boundary line segment and the base layer boundary line segment is smaller than the included angle between the dynamic layer boundary line segment and the existing target base layer boundary line segment, determining that the base layer boundary line segment is better than the existing target base layer boundary line segment.
10. A method of routing, the method comprising:
loading path-finding data, wherein the path-finding data comprises target path-finding data, and the target path-finding data comprises: base area routing data of the base area layer, namely dynamic area routing data of the dynamic area layer which is opened;
obtaining starting point information and end point information;
and carrying out path finding in the target path finding data based on the starting point information and the end point information to obtain a path finding path.
11. The method according to claim 10, wherein: the loaded seek data further comprises non-target seek data, wherein the non-target seek data comprises dynamic region seek data marked as an unopened dynamic region layer.
12. The method according to claim 10 or 11, characterized in that: based on the starting point information and the end point information, carrying out path searching in the target path searching data to obtain a path searching path, wherein the path searching method comprises the following steps of:
determining a starting point polygon to which the starting point information belongs, and determining an ending point polygon to which the ending point information belongs;
starting to find a path from the starting point polygon, carrying out path finding in the target path finding data, and sequentially searching for extended adjacent polygons until the destination polygon is found, so as to obtain the path finding path;
Wherein said finding an expanded contiguous polygon comprises:
determining a polygon adjacent to the current expanded polygon;
determining the area to which the adjacent polygon belongs;
if the area to which the adjacent polygon belongs is an area in the base area layer, determining the adjacent polygon as an expanded adjacent polygon;
if the area to which the adjacent polygon belongs is a dynamic area, the dynamic area is opened, a dynamic area layer to which the dynamic area belongs is opened, and the adjacent polygon corresponding to the dynamic area layer is determined to be an expanded adjacent polygon;
and if the dynamic region is not opened or the dynamic region layer is not opened, searching for a next adjacent polygon, and returning to the step of determining the region to which the adjacent polygon belongs, wherein the next adjacent polygon is positioned on the region layer where the current expanded polygon is positioned, or the next adjacent polygon is positioned on the region layer above the region layer where the current expanded polygon is positioned, or the next adjacent polygon is positioned on the base region layer.
13. The method according to claim 10 or 11, characterized in that: before loading the target way-finding data, the method further comprises:
Acquiring an opened dynamic region layer and an opened dynamic region;
and generating dynamic area route finding data of the opened dynamic area layer aiming at the opened dynamic area in the opened dynamic area layer, and generating splicing information of the base area layer and the dynamic area layer.
14. A generation apparatus of path-finding data, the apparatus comprising:
the dynamic layer determining module is used for determining a dynamic region layer in the target scene, wherein the dynamic region layer comprises at least one dynamic region;
the basic data generation module is used for loading basic scene data of a basic area layer of the target scene and generating basic area route finding data of the basic area layer based on the basic scene data;
the dynamic data generation module is used for loading the dynamic region layer and generating dynamic region path finding data in a dynamic region of the dynamic region layer;
the splicing module is used for establishing splicing information of the dynamic region layer and the basic region layer;
and the data determining module is used for generating the path finding data of the target scene based on the base area path finding data, the dynamic area path finding data and the splicing information.
15. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any one of claims 1 to 13 when the computer program is executed.
CN202210405389.2A 2022-04-18 2022-04-18 Generating method of path-finding data, path-finding method and computer equipment Pending CN116943201A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202210405389.2A CN116943201A (en) 2022-04-18 2022-04-18 Generating method of path-finding data, path-finding method and computer equipment
PCT/CN2023/074974 WO2023202188A1 (en) 2022-04-18 2023-02-08 Method for generating pathfinding data, pathfinding method, and computer device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210405389.2A CN116943201A (en) 2022-04-18 2022-04-18 Generating method of path-finding data, path-finding method and computer equipment

Publications (1)

Publication Number Publication Date
CN116943201A true CN116943201A (en) 2023-10-27

Family

ID=88419091

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210405389.2A Pending CN116943201A (en) 2022-04-18 2022-04-18 Generating method of path-finding data, path-finding method and computer equipment

Country Status (2)

Country Link
CN (1) CN116943201A (en)
WO (1) WO2023202188A1 (en)

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060161337A1 (en) * 2005-01-19 2006-07-20 Ping-Chung Ng Route planning process
JP5652165B2 (en) * 2010-11-30 2015-01-14 アイシン・エィ・ダブリュ株式会社 Map data used for route search of route search device and route search device
CN106964156B (en) * 2017-03-24 2020-10-27 腾讯科技(深圳)有限公司 Path finding method and device
CN111111187B (en) * 2019-11-28 2023-07-14 玩心(北京)网络科技有限公司 Online game path finding method and device based on grid
CN111737810A (en) * 2020-08-27 2020-10-02 科大讯飞(苏州)科技有限公司 Path finding method, device, equipment and storage medium
CN112221144B (en) * 2020-11-03 2024-03-15 网易(杭州)网络有限公司 Three-dimensional scene path finding method and device and three-dimensional scene map processing method and device
CN114159777A (en) * 2021-12-06 2022-03-11 网易(杭州)网络有限公司 Hierarchical way finding method and device, electronic equipment and readable medium

Also Published As

Publication number Publication date
WO2023202188A1 (en) 2023-10-26

Similar Documents

Publication Publication Date Title
CN103208227B (en) A kind of electronic map interest point display packing, system and electronic equipment
CN107644273B (en) Navigation path planning method and equipment
RU2440616C2 (en) Filtering multi-layer data on mapping applications
JP2019512668A (en) Root deviation recognition method, terminal, and storage medium
CN113505306B (en) Interest point recommendation method, system and medium based on heterogeneous graph neural network
CN111475593B (en) Mapping method and device of electronic map, storage medium and terminal
CN108731692A (en) Device and method and its system for providing map datum
CN108362298A (en) Air navigation aid and device in area map
JP2018528415A (en) Navigation reference point identification and navigation method, apparatus, and storage medium
US9622039B2 (en) Method for retrieving tourist information based on user location
US8639023B2 (en) Method and system for hierarchically matching images of buildings, and computer-readable recording medium
CN109459048A (en) Map loading method and equipment for robot
KR20090018402A (en) Method for providing three dimensional map service and geographic information system
JP7313450B2 (en) Image processing method and its device, electronic equipment and computer program
CN107735648A (en) Traffic notifications during navigation
CN110472158A (en) A kind of sort method and device of search entry
CN116943201A (en) Generating method of path-finding data, path-finding method and computer equipment
JPH11259673A (en) Space stroll video display method, in-space object retrieving method, and in-space object extracting method, device therefor, and recording medium where the methods are recorded
Wang et al. AR precision navigation system based on Baidu map API
CN114820960B (en) Method, device, equipment and medium for constructing map
CN115779424A (en) Navigation grid path finding method, device, equipment and medium
WO2015070711A1 (en) Navigation method and navigation device
CN115501596A (en) Path finding method and device in game, electronic equipment and readable storage medium
Pop et al. Improving the Tourists Experiences: Application of Firebase and Flutter Technologies in Mobile Applications Development Process
CN115248629A (en) Data visualization interface management method, system and equipment

Legal Events

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