CN114417075B - Method, device, medium and equipment for establishing path-finding grid data index - Google Patents

Method, device, medium and equipment for establishing path-finding grid data index Download PDF

Info

Publication number
CN114417075B
CN114417075B CN202210329688.2A CN202210329688A CN114417075B CN 114417075 B CN114417075 B CN 114417075B CN 202210329688 A CN202210329688 A CN 202210329688A CN 114417075 B CN114417075 B CN 114417075B
Authority
CN
China
Prior art keywords
finding
path
triangle
point
way
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.)
Active
Application number
CN202210329688.2A
Other languages
Chinese (zh)
Other versions
CN114417075A (en
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.)
Beijing Youhao Technology Co ltd
Original Assignee
Beijing Younuo Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Younuo Technology Co ltd filed Critical Beijing Younuo Technology Co ltd
Priority to CN202210329688.2A priority Critical patent/CN114417075B/en
Publication of CN114417075A publication Critical patent/CN114417075A/en
Application granted granted Critical
Publication of CN114417075B publication Critical patent/CN114417075B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/901Indexing; Data structures therefor; Storage structures
    • G06F16/9017Indexing; Data structures therefor; Storage structures using directory or table look-up
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/907Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/909Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using geographical or spatial information, e.g. location

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Computational Linguistics (AREA)
  • Library & Information Science (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention relates to a method for establishing a way-finding grid data index, which comprises the steps of generating way-finding grid data and a quantity threshold value by utilizing an obtained path point sequence and a Delaunay triangulation algorithm; obtaining a way-finding grid index table according to the way-finding grid data and the quantity threshold; obtaining the path-finding path points of the points to be checked through the path-finding grid index table, thereby generating a query path point interface function; and replacing the original route searching grid data in the route searching algorithm by the route searching grid index table, and replacing the original query path point interface function in the route searching algorithm by the query path point interface function. The invention exponentially reduces the time cost for inquiring the routing grid data, supports the calculation for simultaneously processing more than thousands of routing requirements, keeps the running rate of more than 20 frames, can simultaneously process a large number of routing requests, realizes the unified routing calculation on the server, and supports the AI routing mode without a client. The invention also relates to a device, a medium and equipment for establishing the routing grid data index.

Description

Method, device, medium and equipment for establishing path-finding grid data index
Technical Field
The invention relates to the technical field of navigation, in particular to a method, a device, a medium and equipment for establishing a way-finding grid data index.
Background
In the calculation process of the current mainstream routing algorithm, route point information such as a current point, a near point, a start point and a stop point needs to be continuously inquired, and a large amount of inquiry time needs to be consumed for inquiring the route point information from the routing grid data, so that on one hand, the response time of routing calculation is multiplied along with the continuous increase of the road grid data, the user experience is greatly reduced, on the other hand, the computer computing power is limited, a server end cannot process a large amount of routing requests at the same time, so that the routing requests of the user can only be placed on a local client of the user for self-calculation, but the processing performance requirements on the client are higher, and some clients which do not meet the processing performance lose the routing function.
Disclosure of Invention
The technical problem to be solved by the present invention is to provide a method, an apparatus, a medium and a device for establishing a way-finding grid data index, aiming at the defects of the prior art.
The technical scheme for solving the technical problems is as follows:
a method of building a way-finding grid data index, the method comprising:
generating path-finding grid data and a quantity threshold value by using the obtained path point sequence and the Delou triangularization algorithm;
obtaining a way-finding grid index table according to the way-finding grid data and the quantity threshold;
obtaining the path-finding path points of the points to be checked through the path-finding grid index table so as to generate a query path point interface function;
and replacing the original path-searching grid data in the path-searching algorithm by using the path-searching grid index table, and replacing the original query path point interface function in the path-searching algorithm by using the query path point interface function.
On the basis of the technical scheme, the invention can be further improved as follows.
Further, the generating of the routing mesh data and the quantity threshold value by using the obtained path point sequence and the delaunay triangulation algorithm specifically includes:
inputting the path point sequence into a Delou triangulation algorithm to obtain the path-finding grid data, wherein the path-finding grid data comprise a triangular network sequence Mesh, the triangular network sequence Mesh comprises a plurality of triangular triangles, and three vertexes of the triangles respectively correspond to three path points;
and calculating the number of triangles in the triangulation network Mesh, and obtaining the number threshold according to the number of the triangles.
Further, the obtaining a way-finding grid index table according to the way-finding grid data and the quantity threshold specifically includes:
s1, taking the area range where the way-finding grid data is located as a divided area range R;
s2, dividing the divided region range R into a plurality of sub-region ranges, wherein each block object corresponds to one sub-region range;
s3, traversing all triangles in the routing grid data, determining the sub-area range in which the triangle is located according to the position information of each triangle, and adding the triangle into the block object corresponding to the sub-area range;
s4, judging whether the number of the triangles in the block object is larger than the number threshold value;
if so, taking the sub-region range corresponding to the tile object as the divided region range R, and performing the steps S2 to S4;
otherwise, adding the triangles in the block object to the way-finding grid index table until all the triangles in the way-finding grid data are added to the way-finding grid index table.
Further, obtaining the way-finding path point of the point to be checked through the way-finding grid index table specifically includes:
traversing the way-finding grid index table to obtain the block object to which the point to be checked belongs;
traversing triangles in the block objects, and determining the triangles to which the points to be checked belong;
and calculating the path distances between the point to be checked and three vertexes of the triangle, wherein the shortest path distance is a path-finding path point of the point to be checked.
Further, the traversing the triangle in the block object, and determining the triangle to which the point to be checked belongs specifically includes:
three vertices of the triangle are obtainedPoint coordinates
Figure 980032DEST_PATH_IMAGE001
And
Figure 857858DEST_PATH_IMAGE002
and taking difference values of every two of the three vertex coordinates according to a preset sequence to obtain vectors of the three sides of the triangle
Figure 4806DEST_PATH_IMAGE003
Vector of
Figure 501646DEST_PATH_IMAGE004
Sum vector
Figure 293016DEST_PATH_IMAGE005
Checking the point to be checked
Figure 217110DEST_PATH_IMAGE006
And the point
Figure 585774DEST_PATH_IMAGE007
Taking the difference to obtain a vector
Figure 479781DEST_PATH_IMAGE008
Using the right-hand screw rule to align the vectors
Figure 128586DEST_PATH_IMAGE008
And the vector
Figure 958002DEST_PATH_IMAGE009
Performing cross multiplication operation to obtain cross multiplication result m, i.e.
Figure 79542DEST_PATH_IMAGE010
If m is greater than 0, the point P to be checked is positioned on the right side of the straight line where the side AB of the triangle is positioned, and the point P to be checked is not positioned in the triangle;
if m =0, the point P to be checked is on the straight line where the side AB of the triangle is located, and the point P to be checked is not in the triangle;
if m is less than 0, the point P to be checked is on the left side of the straight line where the side AB of the triangle is located, and if the point P to be checked is on the left side of the straight line where the side BC of the triangle is located and the point P to be checked is on the left side of the straight line where the side CA of the triangle is located, the point P to be checked is in the triangle;
otherwise, the point P to be checked is not in the triangle.
The method has the beneficial effects that: a method for establishing a way-finding grid data index is provided, which comprises the steps of generating way-finding grid data and a quantity threshold value by using an obtained path point sequence and a Delaunay triangulation algorithm; obtaining a way-finding grid index table according to the way-finding grid data and the quantity threshold; obtaining the path-finding path points of the points to be checked through the path-finding grid index table, thereby generating a query path point interface function; and replacing the original route searching grid data in the route searching algorithm by using the route searching grid index table, and replacing the original query path point interface function in the route searching algorithm by using the query path point interface function. The invention exponentially reduces the time cost for inquiring the routing grid data, can support the calculation of processing more than thousands of routing requirements in the urban road grid, keeps the running speed of more than 20 frames, can simultaneously process a large number of routing requests, realizes the unified routing calculation on the server, and supports the AI routing mode without a client.
Another technical solution of the present invention for solving the above technical problems is as follows:
an apparatus for establishing a way-finding grid data index, the apparatus comprising:
the preprocessing module is used for generating routing grid data and a quantity threshold value by utilizing the obtained path point sequence and the Delou triangularization algorithm;
an index table generating module, configured to obtain a way-finding grid index table according to the way-finding grid data and the quantity threshold;
the query path module is used for obtaining the path-finding path points of the points to be searched through the path-finding grid index table so as to generate a query path point interface function;
and the replacing module is used for replacing the original route searching grid data in the route searching algorithm by using the route searching grid index table and replacing the original query path point interface function in the route searching algorithm by using the query path point interface function.
Furthermore, the present invention provides a computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements the steps of the method for establishing a routing grid data index according to any of the above-mentioned technical solutions.
The invention further provides an electronic device, which includes a memory, a processor and a computer program stored in the memory and capable of running on the processor, and when the processor executes the program, the steps of the method for establishing a routing grid data index according to any one of the above technical solutions are implemented.
Advantages of additional aspects of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments of the present invention or in the description of the prior art will be briefly described below, and it is obvious that the drawings described below are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic flowchart of a method for establishing a way-finding grid data index according to an embodiment of the present invention;
FIG. 2 is a block diagram of an apparatus for establishing a way-finding trellis data index according to another embodiment of the present invention;
fig. 3 is a flowchart illustrating a method for establishing a way-finding trellis data index according to another embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be obtained by a person skilled in the art without any inventive step based on the embodiments of the present invention, shall fall within the scope of protection of the present invention.
As shown in fig. 1, a method for establishing a routing table data index according to an embodiment of the present invention includes the following steps:
110. and generating the routing grid data and the quantity threshold by using the obtained path point sequence and the Delou triangularization algorithm.
120. And obtaining a way-finding grid index table according to the way-finding grid data and the quantity threshold.
130. And obtaining the path-finding path points of the points to be checked through the path-finding grid index table, thereby generating a query path point interface function.
140. And replacing the original path-searching grid data in the path-searching algorithm by using the path-searching grid index table, and replacing the original query path point interface function in the path-searching algorithm by using the query path point interface function.
Based on the foregoing embodiment, further, step 110 specifically includes:
inputting the path point sequence into a Delou triangulation algorithm to obtain the path-finding grid data, wherein the path-finding grid data comprise a triangular network sequence Mesh, the triangular network sequence Mesh comprises a plurality of triangular triangles, and three vertexes of the triangles respectively correspond to three path points.
And calculating the number of triangles in the triangulation network Mesh, and obtaining the number threshold according to the number of the triangles.
It will be appreciated that Delaunay triangulation algorithm (Delaunay triangulation) is a triangulation dt (P) such that no point in P lies strictly inside any one triangle circumscribed circle in dt (P). Delaunay triangulation maximizes the minimum angle of the triangle in this triangulation, in other words, this algorithm avoids as much as possible the appearance of "very thin" triangles, the nomenclature of which comes from boris Delaunay.
Further, as shown in fig. 3, step 120 specifically includes:
121. and taking the area range where the routing grid data is located as a divided area range R.
122. And dividing the divided region range R into a plurality of sub-region ranges, wherein each block object corresponds to one sub-region range.
123. Traversing all triangles in the routing grid data, determining the sub-area range in which the triangle is located according to the position information of each triangle, and adding the triangle into the block object corresponding to the sub-area range.
124. And judging whether the number of the triangles in the block object is larger than the number threshold value.
125. If yes, the sub-region range corresponding to the block object is taken as the divided region range R, and the operations 122 to 124 are performed.
126. Otherwise, adding the triangles in the block object to the way-finding grid index table until all the triangles in the way-finding grid data are added to the way-finding grid index table.
Further, step 130 specifically includes:
131. and traversing the way-finding grid index table to obtain the block object to which the point to be checked belongs.
132. And traversing the triangles in the block objects, and determining the triangles to which the points to be checked belong.
133. And calculating the path distances between the point to be checked and three vertexes of the triangle, wherein the shortest path distance is a path-finding path point of the point to be checked.
Further, step 132 specifically includes:
obtaining the coordinates of three vertexes of the triangle
Figure 42819DEST_PATH_IMAGE011
And
Figure 667835DEST_PATH_IMAGE012
and taking difference values of every two of the three vertex coordinates according to a preset sequence to obtain vectors of the three sides of the triangle
Figure 809098DEST_PATH_IMAGE013
Vector of
Figure 152354DEST_PATH_IMAGE014
Sum vector
Figure 60267DEST_PATH_IMAGE015
Checking the point to be checked
Figure 664424DEST_PATH_IMAGE016
And the point
Figure 366801DEST_PATH_IMAGE017
Taking the difference to obtain a vector
Figure 197354DEST_PATH_IMAGE018
Using the right-hand screw rule to align the vectors
Figure 643378DEST_PATH_IMAGE018
And the vector
Figure 852774DEST_PATH_IMAGE013
Performing cross multiplication operation to obtain cross multiplication result m, i.e.
Figure 726052DEST_PATH_IMAGE019
If m is greater than 0, the point P to be checked is positioned on the right side of the straight line where the side AB of the triangle is positioned, and the point P to be checked is not positioned in the triangle.
If m =0, the point P to be checked is on the straight line where the side AB of the triangle is located, and the point P to be checked is not inside the triangle.
If m is less than 0, the point to be checked P is on the left side of the straight line where the side AB of the triangle is located, and if the point to be checked P is on the left side of the straight line where the side BC of the triangle is located and the point to be checked P is on the left side of the straight line where the side CA of the triangle is located, the point to be checked P is in the triangle.
Otherwise, the point P to be checked is not within the triangle.
It should be understood that the following steps are included in the practical application:
1. preprocessing path finding data:
in the preprocessing routing data, routing grid data are generated through a Delo Triangle algorithm based on a path point sequence provided by a data source, namely, a Triangle network sequence Mesh generated at the top layer represents the whole routing grid, the Triangle network sequence holds a plurality of Triangle triangles, and the Triangle holds three path points RoutePoint related to the Triangle.
And acquiring the number N of triangles in the triangulation network sequence, and performing square opening operation on the N to obtain a preset number threshold M.
2. Creating a way-finding grid index table:
2.1 define the way-finding grid index table iTable includes a list in a plurality of block objects iBlock, where the block objects iBlock are a key value pair, where the key is block range information and the value is a list of triangles included in the current block object.
2.2 obtaining the range data R of the area where the way-finding grid is located, and then dividing the range data R into four sub-ranges of upper left, lower left, upper right and lower right along the X and Y directions.
2.3 respectively generating four block objects, wherein the key of each block object records the range information of the corresponding sub-area range, and the value is an empty triangle list.
2.4 traversing all triangles in the route-finding mesh, calculating to obtain the sub-region range in which the triangles are positioned according to the positions of the triangles, and then adding the triangles into the triangle list of the block objects with the corresponding sub-region range as key values, wherein x can pass throughmin<x<xmax ,ymin<y<ymaxDetermining the child in which the triangle is locatedA range of regions.
2.5 compare the size between the number of triangles in the triangle list held by the tile object and the number threshold M.
If the number of triangles in the triangle list held by the block object is greater than the number of triangles in the triangle list held by the block object
Figure 43901DEST_PATH_IMAGE020
And when the number threshold value M is reached, adding the triangle list held by the block object into the routing grid index table iTable.
Otherwise, the block object is discarded, and according to the sub-area range recorded by the block object as the range data R, the step 2.2-2.5 is executed again, and finally all the data is added into the routing grid index table iTable.
3. Look-up of path points in a way-finding grid index table
And 3.1 traversing the path-finding grid index table iTable, and calculating and obtaining the block object iBlock within the range of the position of the point to be checked.
3.2 traversing the triangle list in the block object iBlock object, and calculating to obtain the triangle object where the point to be checked is located.
Wherein, if three vertexes of a triangle are A, B, C respectively according to the counterclockwise winding order; it can be easily obtained that when a point P is on the left side of the side AB, the side BC, and the side CA, the point P is in the triangle, and the specific determination method is as follows:
three vertices of a triangle are obtained
Figure 152671DEST_PATH_IMAGE021
And taking difference values of every two of the three top points in sequence to obtain vectors of the three edges, namely:
Figure 606786DEST_PATH_IMAGE022
Figure 650966DEST_PATH_IMAGE023
obtaining the position information of a point P to be queried
Figure 331477DEST_PATH_IMAGE024
The difference with the point A is obtained as a vector
Figure 853725DEST_PATH_IMAGE018
I.e. by
Figure 427926DEST_PATH_IMAGE025
According to the right-handed screw rule, the vector
Figure 767640DEST_PATH_IMAGE018
And the vector
Figure 528923DEST_PATH_IMAGE013
Performing cross multiplication operation to obtain a value m,
Figure 120441DEST_PATH_IMAGE026
if m >0, indicating that point P is to the right of the line on which side AB lies, P is not within the triangle.
If m =0, it is stated that the point P is on the straight line of the side AB, then P is not inside the triangle.
If m is less than 0, the point P is indicated to be on the left side of the straight line where the side AB is located, and the judgment is needed to be continued.
And judging the relation between the point P and the straight line where the side BC and the side CA are positioned by utilizing the mode, if the point P is positioned on the left sides of the side BC and the side CA at the same time, indicating that the point P is positioned in the triangle, otherwise, indicating that the point P is not positioned in the triangle.
3.3 calculating the distances from the point to be checked to three vertexes of the triangle, namely the path points, returning the distances from the point to be checked and returning the path point with the shortest distance from the point to be checked.
4. Updating way-finding algorithm
4.1 the path-searching grid data table depended on by the original path-searching algorithm is replaced by a path-searching grid index table iTable.
4.2, replacing all the related operations of the query path points of the original routing algorithm with the query mode in the step 3.
The method for establishing the routing-searching grid data index comprises the steps of generating routing-searching grid data and a quantity threshold value by utilizing the obtained path point sequence and the Delaunay triangulation algorithm; obtaining a way-finding grid index table according to the way-finding grid data and the quantity threshold; obtaining the path-finding path points of the points to be checked through the path-finding grid index table, thereby generating a query path point interface function; and replacing the original route searching grid data in the route searching algorithm by using the route searching grid index table, and replacing the original query path point interface function in the route searching algorithm by using the query path point interface function. The invention exponentially reduces the time cost for inquiring the routing grid data, can support the calculation for simultaneously processing more than thousand routing requirements in the urban road grid, keeps the running speed of more than 20 frames, can simultaneously process a large number of routing requests, realizes unified routing calculation on the server, and supports the AI routing mode without a client.
As shown in fig. 2, an apparatus for establishing a way-finding trellis data index, the apparatus comprising:
and the preprocessing module is used for generating the routing grid data and the quantity threshold value by utilizing the obtained path point sequence and the Delaunay triangulation algorithm.
And the index table generation module is used for obtaining the route searching grid index table according to the route searching grid data and the quantity threshold value.
And the inquiry path module is used for obtaining the path-searching path points of the points to be inquired through the path-searching grid index table so as to generate an inquiry path point interface function.
And the replacing module is used for replacing the original route searching grid data in the route searching algorithm by using the route searching grid index table and replacing the original query path point interface function in the route searching algorithm by using the query path point interface function.
Further, the preprocessing module is specifically configured to input the sequence of path points into a delaunay triangulation algorithm to obtain the route-finding Mesh data, where the route-finding Mesh data includes a triangulation sequence Mesh that includes a plurality of triangles Triangle, and three vertices of each Triangle correspond to three path points respectively.
And calculating the number of triangles in the triangulation network Mesh, and obtaining the number threshold according to the number of the triangles.
Further, the index table generation module is specifically configured to:
and S1, taking the area range where the way-finding grid data is located as a divided area range R.
S2, dividing the divided region range R into a plurality of sub-region ranges, each tile object corresponding to one of the sub-region ranges.
S3, traversing all triangles in the routing grid data, determining the sub-area range in which the triangle is located according to the position information of each triangle, and adding the triangle to the block object corresponding to the sub-area range.
And S4, judging whether the number of the triangles in the block object is larger than the number threshold value.
If yes, the sub-region range corresponding to the tile object is taken as the partition region range R, and the steps S2 to S4 are performed.
Otherwise, adding the triangles in the block object into the way-finding grid index table until all the triangles in the way-finding grid data are added into the way-finding grid index table.
Furthermore, the present invention provides a computer readable storage medium, on which a computer program is stored, which when executed by a processor, implements the steps of a method for establishing a routing grid data index according to any of the above technical solutions.
The invention further provides an electronic device, which includes a memory, a processor and a computer program stored in the memory and capable of running on the processor, and when the processor executes the program, the processor implements the steps of the method for establishing the routing grid data index according to any one of the above technical solutions.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the technical solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus/terminal device and method may be implemented in other ways. For example, the above-described embodiments of the apparatus/terminal device are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated modules/units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium.
Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may also be implemented by a computer program, which may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method embodiments may be implemented. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain other components which may be suitably increased or decreased as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media which may not include electrical carrier signals and telecommunications signals in accordance with legislation and patent practice.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present invention, and are intended to be included within the scope of the present invention.
While the invention has been described with reference to specific embodiments, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (6)

1. A method of establishing a way-finding trellis data index, the method comprising:
generating path-finding grid data and a quantity threshold value by using the obtained path point sequence and the Delou triangularization algorithm;
obtaining a way-finding grid index table according to the way-finding grid data and the quantity threshold;
obtaining the path-finding path points of the points to be checked through the path-finding grid index table, thereby generating a query path point interface function;
replacing original route searching grid data in a route searching algorithm by the route searching grid index table, and replacing an original query path point interface function in the route searching algorithm by the query path point interface function;
the generating of the routing grid data and the quantity threshold by using the obtained path point sequence and the delaunay triangulation algorithm specifically includes:
inputting the path point sequence into a Delou triangulation algorithm to obtain the path-finding grid data, wherein the path-finding grid data comprise a triangular network sequence Mesh, the triangular network sequence Mesh comprises a plurality of triangular triangles, and three vertexes of the triangles respectively correspond to three path points;
calculating the number of triangles in the triangulation network Mesh, and obtaining the number threshold according to the number of triangles;
the obtaining a way-finding grid index table according to the way-finding grid data and the quantity threshold specifically includes:
s1, taking the area range where the routing grid data is as a divided area range R;
s2, dividing the divided region range R into a plurality of sub-region ranges, wherein each block object corresponds to one sub-region range;
s3, traversing all triangles in the routing grid data, determining the sub-area range in which the triangle is located according to the position information of each triangle, and adding the triangle into the block object corresponding to the sub-area range;
s4, judging whether the number of the triangles in the block object is larger than the number threshold value;
if so, taking the sub-region range corresponding to the tile object as the divided region range R, and performing the steps S2 to S4;
otherwise, adding the triangles in the block object to the way-finding grid index table until all the triangles in the way-finding grid data are added to the way-finding grid index table.
2. The method according to claim 1, wherein obtaining the way-finding waypoints of the points to be looked up through the way-finding grid index table specifically comprises:
traversing the way-finding grid index table to obtain the block object to which the point to be checked belongs;
traversing triangles in the block objects, and determining the triangles to which the points to be checked belong;
and calculating the path distances between the point to be checked and three vertexes of the triangle, wherein the shortest path distance is a routing path point of the point to be checked.
3. The method according to claim 2, wherein the traversing triangles in the block object and determining the triangle to which the point to be checked belongs specifically comprises:
obtaining the coordinates of three vertexes of the triangle
Figure 70466DEST_PATH_IMAGE001
And
Figure 797113DEST_PATH_IMAGE002
and taking difference values of every two of the three vertex coordinates according to a preset sequence to obtain vectors of the three sides of the triangle
Figure 758116DEST_PATH_IMAGE003
Vector of
Figure 406266DEST_PATH_IMAGE004
Sum vector
Figure 212548DEST_PATH_IMAGE005
Checking the point to be checked
Figure 761079DEST_PATH_IMAGE006
And the point
Figure 627404DEST_PATH_IMAGE007
Taking the difference to obtain a vector
Figure 762850DEST_PATH_IMAGE008
Using the right-hand screw rule to align the vectors
Figure 576085DEST_PATH_IMAGE008
And the vector
Figure 605221DEST_PATH_IMAGE003
Performing cross multiplication operation to obtain cross multiplication result m, i.e.
Figure 48972DEST_PATH_IMAGE009
If m is greater than 0, the point P to be checked is positioned on the right side of the straight line where the side AB of the triangle is positioned, and the point P to be checked is not positioned in the triangle;
if m =0, the point P to be checked is on the straight line where the side AB of the triangle is located, and the point P to be checked is not in the triangle;
if m is less than 0, the point P to be checked is on the left side of the straight line where the side AB of the triangle is located, and if the point P to be checked is on the left side of the straight line where the side BC of the triangle is located and the point P to be checked is on the left side of the straight line where the side CA of the triangle is located, the point P to be checked is in the triangle;
otherwise, the point P to be checked is not in the triangle.
4. An apparatus for establishing a way-finding trellis data index, the apparatus comprising:
the preprocessing module is used for generating routing grid data and a quantity threshold value by utilizing the obtained path point sequence and the Delou triangularization algorithm;
an index table generating module, configured to obtain a way-finding grid index table according to the way-finding grid data and the quantity threshold;
the query path module is used for obtaining the path-finding path points of the points to be searched through the path-finding grid index table so as to generate a query path point interface function;
the replacing module is used for replacing the original route searching grid data in the route searching algorithm by the route searching grid index table and replacing the original inquiry path point interface function in the route searching algorithm by the inquiry path point interface function;
the preprocessing module is specifically configured to input the sequence of path points into a delaunay triangulation algorithm to obtain the routing-searching Mesh data, where the routing-searching Mesh data includes a Mesh of a triangulation network, the Mesh of the triangulation network includes a plurality of triangles, and three vertices of each Triangle correspond to three path points respectively;
calculating the number of triangles in the triangulation network Mesh, and obtaining the number threshold according to the number of triangles;
the index table generation module is specifically configured to:
s1, taking the area range where the way-finding grid data is located as a divided area range R;
s2, dividing the divided region range R into a plurality of sub-region ranges, wherein each block object corresponds to one sub-region range;
s3, traversing all triangles in the routing grid data, determining the sub-area range in which the triangle is located according to the position information of each triangle, and adding the triangle into the block object corresponding to the sub-area range;
s4, judging whether the number of the triangles in the block object is larger than the number threshold value;
if yes, taking the sub-region range corresponding to the tile object as the partition region range R, and performing the steps S2 to S4;
otherwise, adding the triangles in the block object to the way-finding grid index table until all the triangles in the way-finding grid data are added to the way-finding grid index table.
5. A computer-readable storage medium, on which a computer program is stored, which program, when being executed by a processor, carries out the steps of the method of establishing a routing grid data index according to any one of claims 1 to 3.
6. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor when executing the program performs the steps of the method of establishing a routing grid data index according to any of claims 1 to 3.
CN202210329688.2A 2022-03-31 2022-03-31 Method, device, medium and equipment for establishing path-finding grid data index Active CN114417075B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210329688.2A CN114417075B (en) 2022-03-31 2022-03-31 Method, device, medium and equipment for establishing path-finding grid data index

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210329688.2A CN114417075B (en) 2022-03-31 2022-03-31 Method, device, medium and equipment for establishing path-finding grid data index

Publications (2)

Publication Number Publication Date
CN114417075A CN114417075A (en) 2022-04-29
CN114417075B true CN114417075B (en) 2022-07-08

Family

ID=81264462

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210329688.2A Active CN114417075B (en) 2022-03-31 2022-03-31 Method, device, medium and equipment for establishing path-finding grid data index

Country Status (1)

Country Link
CN (1) CN114417075B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116764225A (en) * 2023-06-09 2023-09-19 广州三七极梦网络技术有限公司 Efficient path-finding processing method, device, equipment and medium
CN118052106A (en) * 2023-08-30 2024-05-17 中国人民解放军63921部队 Pretreatment method and system for numerical simulation of object point method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104169941A (en) * 2011-12-01 2014-11-26 莱特克拉夫特科技有限责任公司 Automatic tracking matte system
CN108229734A (en) * 2017-12-26 2018-06-29 北京像素软件科技股份有限公司 Paths planning method and device
CN110309236A (en) * 2018-02-28 2019-10-08 深圳市萌蛋互动网络有限公司 The method, apparatus, computer equipment and storage medium of pathfinding in map
CN113326343A (en) * 2021-06-17 2021-08-31 北京连山科技股份有限公司 Road network data storage method and system based on multi-level grids and file indexes

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010176347A (en) * 2009-01-29 2010-08-12 Fujitsu Ltd Shortest path retrieval method and device
CN102779340B (en) * 2012-06-12 2014-12-10 华中科技大学 Automatic corresponding method of feature point coordinates based on Delaunay triangulation

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104169941A (en) * 2011-12-01 2014-11-26 莱特克拉夫特科技有限责任公司 Automatic tracking matte system
CN108229734A (en) * 2017-12-26 2018-06-29 北京像素软件科技股份有限公司 Paths planning method and device
CN110309236A (en) * 2018-02-28 2019-10-08 深圳市萌蛋互动网络有限公司 The method, apparatus, computer equipment and storage medium of pathfinding in map
CN113326343A (en) * 2021-06-17 2021-08-31 北京连山科技股份有限公司 Road network data storage method and system based on multi-level grids and file indexes

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于导向性分散伸展图的高效近似最近邻搜索;王昌旭;《中国优秀硕士学位论文全文数据库 信息科技辑(月刊)》;20190815(第8期);全文 *

Also Published As

Publication number Publication date
CN114417075A (en) 2022-04-29

Similar Documents

Publication Publication Date Title
CN114417075B (en) Method, device, medium and equipment for establishing path-finding grid data index
CN110378175B (en) Method and device for recognizing road edge
JP2019512668A (en) Root deviation recognition method, terminal, and storage medium
US10746562B2 (en) Method, apparatus and product for efficient solution of nearest object problems
US10380454B2 (en) Identifying a visual center of a polygon
CN110567459B (en) Path planning method and device
CN109377552B (en) Image occlusion calculating method, device, calculating equipment and storage medium
KR20230145197A (en) Methods, devices, computer devices and storage media for determining spatial relationships
CN112328880A (en) Geographical region clustering method and device, storage medium and electronic equipment
WO2020114273A1 (en) Business searching method and apparatus, electronic device, and storage medium
CN108112018B (en) Method and device for determining boundary of to-be-optimized area of mobile communication network
US20160125660A1 (en) Automated registration of three-dimensional vectors to three-dimensional linear features in remotely-sensed data
CN113050660A (en) Error compensation method, error compensation device, computer equipment and storage medium
Eltarjaman et al. Private retrieval of POI details in top-K queries
CN112464040A (en) Graph structure recognition method, electronic device, and computer-readable storage medium
CN110378904B (en) Method and device for segmenting point cloud data
CN110930101A (en) Method, device, electronic equipment and readable medium for determining delivery time of order
CN114996503A (en) Node positioning method and device
CN111080509B (en) Multithreading parallel computing method and system for three-dimensional cutting Voronoi diagram
CN114814802A (en) Positioning method and device
CN112802201B (en) Method and device for obtaining parallel nearest distance between entity models
CN113538558B (en) Volume measurement optimization method, system, equipment and storage medium based on IR diagram
CN116994122A (en) Building pickup method, device, equipment and storage medium
CN113723405A (en) Method and device for determining area outline and electronic equipment
CN110889902B (en) Three-dimensional modeling method and device

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
GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: Room 105, first floor, building 82, No. 10, Jiuxianqiao Road, Chaoyang District, Beijing 100015

Patentee after: Beijing Youhao Technology Co.,Ltd.

Country or region after: China

Address before: Room 105, first floor, building 82, No. 10, Jiuxianqiao Road, Chaoyang District, Beijing 100015

Patentee before: BEIJING YOUNUO TECHNOLOGY Co.,Ltd.

Country or region before: China