CN117249843A - Path planning method, path planning device, electronic equipment and computer readable storage medium - Google Patents

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

Info

Publication number
CN117249843A
CN117249843A CN202311507924.6A CN202311507924A CN117249843A CN 117249843 A CN117249843 A CN 117249843A CN 202311507924 A CN202311507924 A CN 202311507924A CN 117249843 A CN117249843 A CN 117249843A
Authority
CN
China
Prior art keywords
longitude
latitude
range
character string
sub
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.)
Granted
Application number
CN202311507924.6A
Other languages
Chinese (zh)
Other versions
CN117249843B (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.)
Guangzhou Seeworld Technology Co ltd
Original Assignee
Guangzhou Seeworld 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 Guangzhou Seeworld Technology Co ltd filed Critical Guangzhou Seeworld Technology Co ltd
Priority to CN202311507924.6A priority Critical patent/CN117249843B/en
Publication of CN117249843A publication Critical patent/CN117249843A/en
Application granted granted Critical
Publication of CN117249843B publication Critical patent/CN117249843B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C21/00Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00
    • G01C21/26Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 specially adapted for navigation in a road network
    • G01C21/34Route searching; Route guidance
    • G01C21/3453Special cost functions, i.e. other than distance or default speed limit of road segments
    • G01C21/3492Special cost functions, i.e. other than distance or default speed limit of road segments employing speed data or traffic data, e.g. real-time or historical
    • 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
    • G06F16/90335Query processing
    • G06F16/90344Query processing by using string matching techniques

Abstract

The application provides a path planning method, a path planning device, electronic equipment and a computer readable storage medium, wherein the method comprises the following steps: determining first longitude and latitude information of a departure place and second longitude and latitude information of a destination according to the departure place and the destination; using a designated coding mode to code the first longitude and latitude information to obtain a second longitude and latitude coding character string, and coding the second longitude and latitude information to obtain a fourth longitude and latitude coding character string; according to the second longitude and latitude coding character string and the fourth longitude and latitude coding character string, an originating node corresponding to a departure place and a terminating node corresponding to a destination are searched from the directed authority diagram; after determining a plurality of travelable routes from the originating node to the terminating node, calculating the sum of weights on each link included on each travelable route to obtain travelable parameters; and selecting the runable route with the smallest runable parameter as the target runable route. By this method, a travel path with high transportation efficiency can be obtained.

Description

Path planning method, path planning device, electronic equipment and computer readable storage medium
Technical Field
The present disclosure relates to the field of path planning technologies, and in particular, to a path planning method, a path planning device, an electronic device, and a computer readable storage medium.
Background
Logistics transportation is an important transportation activity involving various aspects of transportation, storage, distribution, and delivery of goods. The efficiency of logistics transportation directly affects the competitiveness and profit level of the enterprise. For example, increasing the speed and efficiency of transportation may help businesses transport goods faster into customers, while increasing customer satisfaction and trust, and may reduce transportation costs. It can be seen that improving logistics transportation efficiency is a challenge that every business must face.
The route planning is an important factor affecting the transportation efficiency, and at present, when the route planning is performed, a plurality of drivable routes are usually planned, and the departure place and destination of each drivable route are fixed, so the total route length of each drivable route is generally not quite different. In the prior art, the most important point is the exercised route with the shortest total route length, and the exercised route with the shortest total route length is not necessarily the fastest in transportation speed. For example, in a feasible route with the shortest total route length, although the total route is the shortest, a plurality of red lights, a narrow road, etc. may occur in the whole route, which may easily affect the transportation efficiency.
Disclosure of Invention
In view of the foregoing, it is an object of the present application to provide a route planning method, apparatus, electronic device, and computer-readable storage medium for obtaining a travel route with high transportation efficiency.
In a first aspect, an embodiment of the present application provides a path planning method, including:
acquiring a departure place and a destination input by a user, and determining first longitude and latitude information of the departure place and second longitude and latitude information of the destination according to the departure place and the destination;
encoding the first longitude and latitude information by using a designated encoding mode to obtain a second longitude and latitude encoding character string of the departure place, and encoding the second longitude and latitude information by using a designated encoding mode to obtain a fourth longitude and latitude encoding character string of a destination;
according to the second longitude and latitude code character string and the fourth longitude and latitude code character string, searching an originating node corresponding to the departure place and a terminating node corresponding to the destination from a pre-generated directed permission graph; the directed permission graph comprises a plurality of nodes, each node corresponds to a respective position, and the position information on each node is longitude and latitude coding information obtained by coding the longitude and latitude information of the position in the appointed coding mode; in the directed permission graph, a connecting line between two nodes represents that the two positions corresponding to the two nodes are passable, and an arrow on the connecting line represents the passable direction between the two positions; each connecting line corresponds to a weight, and the weight is determined by the running speed between two positions corresponding to the two nodes and the positioning mode of the position corresponding to the node pointed by the arrow; the weight and the running speed form a negative correlation, and the weight and the positioning accuracy of the positioning mode form a negative correlation;
After a plurality of drivable routes from the originating node to the terminating node are determined from the directed authority graph, calculating the sum of weights on all the links contained on each drivable route for each drivable route to obtain drivable parameters of each drivable route;
and selecting a drivable route with the smallest drivable parameter from each drivable route, and taking the selected drivable route as a target drivable route.
With reference to the first aspect, the embodiments of the present application provide a first possible implementation manner of the first aspect, where the method further includes:
pushing route information of the target drivable route to a user side of the user; the route information comprises longitude and latitude information and running sequence of positions corresponding to all nodes on the target movable route.
With reference to the first aspect, an embodiment of the present application provides a second possible implementation manner of the first aspect, where the encoding, using a specified encoding manner, the first latitude and longitude information to obtain a second latitude and longitude encoding string of the departure place includes:
for a first longitude value in the first longitude and latitude information, dividing a first longitude range containing the first longitude value into a first sub-longitude range and a second sub-longitude range on average, taking a value of 0 as a first coding value corresponding to a current round when the first longitude value is positioned in the first sub-longitude range, taking the first sub-longitude range as a new first longitude range, and continuing to divide the first longitude range containing the first longitude value into the first sub-longitude range and the second sub-longitude range on average; when the first longitude value is in the second sub-longitude range, taking the value 1 as a first code value corresponding to the current round, taking the second sub-longitude range as a new first longitude range, and continuing to divide the first longitude range containing the first longitude value into a first sub-longitude range and a second sub-longitude range on average until a preset number of first code values are obtained;
Generating a first code character string corresponding to the first warp value according to the first code value corresponding to each round;
for a first latitude value in the first longitude and latitude information, dividing a first latitude range containing the first latitude value into a first sub-latitude range and a second sub-latitude range on average, taking a value 0 as a second coding value corresponding to the current round when the first latitude value is positioned in the first sub-latitude range, taking the first sub-latitude range as a new first latitude range, and continuing to divide the first latitude range containing the first latitude value into the first sub-latitude range and the second sub-latitude range on average; when the first latitude value is in the second sub-latitude range, taking the value 1 as a second code value corresponding to the current round, taking the second sub-latitude range as a new first latitude range, and continuously executing the average division of the first latitude range containing the first latitude value into the first sub-latitude range and the second sub-latitude range until a preset number of second code values are obtained;
generating a second code character string corresponding to the first latitude value according to the second code value corresponding to each round;
Combining the first coding character string and the second coding character string to obtain a first longitude and latitude coding character string after the first longitude and latitude information is coded;
taking every 5 characters connected in sequence in a binary first longitude and latitude coding character string as a first character string, and converting the first character string into a decimal second character string to obtain a plurality of second character strings corresponding to the first longitude and latitude coding character string;
and aiming at each second character string corresponding to the first longitude and latitude code character string, taking the second character string as a bit number, and inquiring a character corresponding to the bit number from a preset code table so as to generate the second longitude and latitude code character string of the departure place according to the character corresponding to each second character string corresponding to the first longitude and latitude code character string.
With reference to the second possible implementation manner of the first aspect, the embodiment of the present application provides a third possible implementation manner of the first aspect, where the merging the first encoding string and the second encoding string to obtain a first longitude and latitude encoding string after encoding the first longitude and latitude information includes:
And sequentially placing each character in the first coding character string to an odd number according to the sequence of each character in the first coding character string, and sequentially placing each character in the second coding character string to an even number according to the sequence of each character in the second coding character string to obtain a first longitude and latitude coding character string after coding the first longitude and latitude information.
With reference to the first aspect, an embodiment of the present application provides a fourth possible implementation manner of the first aspect, where the encoding, using a specified encoding manner, the second latitude and longitude information to obtain a fourth latitude and longitude encoding string of the destination includes:
for a second longitude value in the second longitude and latitude information, dividing a second longitude range containing the second longitude value into a third sub-longitude range and a fourth sub-longitude range on average, taking a value of 0 as a third code value corresponding to the current round when the second longitude value is positioned in the third sub-longitude range, taking the third sub-longitude range as a new second longitude range, and continuing to divide the second longitude range containing the second longitude value into the third sub-longitude range and the fourth sub-longitude range on average; when the second longitude value is in the fourth sub-longitude range, taking the value 1 as a third code value corresponding to the current round, taking the fourth sub-longitude range as a new second longitude range, and continuing to divide the second longitude range containing the second longitude value into a third sub-longitude range and a fourth sub-longitude range on average until a preset number of third code values are obtained;
Generating a third code character string corresponding to the second longitude value according to the third code value corresponding to each round;
for a second latitude value in the second latitude and longitude information, averagely dividing a second latitude range containing the second latitude value into a third sub-latitude range and a fourth sub-latitude range, taking a value 0 as a fourth coding value corresponding to the current round when the second latitude value is positioned in the third sub-latitude range, taking the third sub-latitude range as a new second latitude range, and continuing to divide the second latitude range containing the second latitude value into the third sub-latitude range and the fourth sub-latitude range; when the second latitude value is in the fourth sub-latitude range, taking the value 1 as a fourth code value corresponding to the current round, taking the fourth sub-latitude range as a new second latitude range, and continuously executing the average division of the second latitude range containing the second latitude value into a third sub-latitude range and a fourth sub-latitude range until a preset number of fourth code values are obtained;
generating a fourth code character string corresponding to the second latitude range according to the fourth code value corresponding to each round;
Combining the third coding character string and the fourth coding character string to obtain a third longitude and latitude coding character string after the second longitude and latitude information is coded;
taking every 5 characters connected in sequence in a binary third longitude and latitude coding character string as a third character string, and converting the third character string into a decimal fourth character string to obtain a plurality of fourth character strings corresponding to the third longitude and latitude coding character string;
and aiming at each fourth character string corresponding to the third longitude and latitude code character string, taking the fourth character string as a bit number, and inquiring a character corresponding to the bit number from a preset code table so as to generate a fourth longitude and latitude code character string of the destination according to the character corresponding to each fourth character string corresponding to the third longitude and latitude code character string.
With reference to the fourth possible implementation manner of the first aspect, the embodiment of the present application provides a fifth possible implementation manner of the first aspect, where the merging the third encoding string and the fourth encoding string to obtain a third longitude and latitude encoding string after encoding the second longitude and latitude information includes:
And sequentially placing each character in the third coding character string to an odd number according to the sequence of each character in the third coding character string, and sequentially placing each character in the fourth coding character string to an even number according to the sequence of each character in the fourth coding character string to obtain a third longitude and latitude coding character string after the second longitude and latitude information is coded.
In a second aspect, an embodiment of the present application further provides a path planning apparatus, including:
the acquisition module is used for acquiring a departure place and a destination input by a user so as to determine first longitude and latitude information of the departure place and second longitude and latitude information of the destination according to the departure place and the destination;
the encoding module is used for encoding the first longitude and latitude information by using a designated encoding mode to obtain a second longitude and latitude encoding character string of the departure place, and encoding the second longitude and latitude information by using a designated encoding mode to obtain a fourth longitude and latitude encoding character string of the destination;
the searching module is used for searching an originating node corresponding to the departure place and a terminating node corresponding to the destination from a pre-generated directed permission graph according to the second longitude and latitude code character string and the fourth longitude and latitude code character string; the directed permission graph comprises a plurality of nodes, each node corresponds to a respective position, and the position information on each node is longitude and latitude coding information obtained by coding the longitude and latitude information of the position in the appointed coding mode; in the directed permission graph, a connecting line between two nodes represents that the two positions corresponding to the two nodes are passable, and an arrow on the connecting line represents the passable direction between the two positions; each connecting line corresponds to a weight, and the weight is determined by the running speed between two positions corresponding to the two nodes and the positioning mode of the position corresponding to the node pointed by the arrow; the weight and the running speed form a negative correlation, and the weight and the positioning accuracy of the positioning mode form a negative correlation;
The calculation module is used for calculating the sum of weights on each connecting line contained on each movable route for each movable route after a plurality of movable routes from the originating node to the terminating node are determined from the directed authority graph, so as to obtain the movable parameter of each movable route;
and the selecting module is used for selecting a drivable route with the minimum drivable parameter from the drivable routes and taking the selected drivable route as a target drivable route.
With reference to the second aspect, embodiments of the present application provide a first possible implementation manner of the second aspect, where the apparatus further includes:
the pushing module is used for pushing the route information of the target drivable route to the user side of the user; the route information comprises longitude and latitude information and running sequence of positions corresponding to all nodes on the target movable route.
With reference to the second aspect, an embodiment of the present application provides a second possible implementation manner of the second aspect, where the encoding module is configured to encode the first latitude and longitude information by using a specified encoding manner to obtain a second latitude and longitude encoding string of the departure place, and is specifically configured to:
For a first longitude value in the first longitude and latitude information, dividing a first longitude range containing the first longitude value into a first sub-longitude range and a second sub-longitude range on average, taking a value of 0 as a first coding value corresponding to a current round when the first longitude value is positioned in the first sub-longitude range, taking the first sub-longitude range as a new first longitude range, and continuing to divide the first longitude range containing the first longitude value into the first sub-longitude range and the second sub-longitude range on average; when the first longitude value is in the second sub-longitude range, taking the value 1 as a first code value corresponding to the current round, taking the second sub-longitude range as a new first longitude range, and continuing to divide the first longitude range containing the first longitude value into a first sub-longitude range and a second sub-longitude range on average until a preset number of first code values are obtained;
generating a first code character string corresponding to the first warp value according to the first code value corresponding to each round;
for a first latitude value in the first longitude and latitude information, dividing a first latitude range containing the first latitude value into a first sub-latitude range and a second sub-latitude range on average, taking a value 0 as a second coding value corresponding to the current round when the first latitude value is positioned in the first sub-latitude range, taking the first sub-latitude range as a new first latitude range, and continuing to divide the first latitude range containing the first latitude value into the first sub-latitude range and the second sub-latitude range on average; when the first latitude value is in the second sub-latitude range, taking the value 1 as a second code value corresponding to the current round, taking the second sub-latitude range as a new first latitude range, and continuously executing the average division of the first latitude range containing the first latitude value into the first sub-latitude range and the second sub-latitude range until a preset number of second code values are obtained;
Generating a second code character string corresponding to the first latitude value according to the second code value corresponding to each round;
combining the first coding character string and the second coding character string to obtain a first longitude and latitude coding character string after the first longitude and latitude information is coded;
taking every 5 characters connected in sequence in a binary first longitude and latitude coding character string as a first character string, and converting the first character string into a decimal second character string to obtain a plurality of second character strings corresponding to the first longitude and latitude coding character string;
and aiming at each second character string corresponding to the first longitude and latitude code character string, taking the second character string as a bit number, and inquiring a character corresponding to the bit number from a preset code table so as to generate the second longitude and latitude code character string of the departure place according to the character corresponding to each second character string corresponding to the first longitude and latitude code character string.
With reference to the second possible implementation manner of the second aspect, the embodiment of the present application provides a third possible implementation manner of the second aspect, where the encoding module is configured to, when performing merging on the first encoding string and the second encoding string to obtain a first longitude and latitude encoding string after encoding the first longitude and latitude information, specifically is configured to:
And sequentially placing each character in the first coding character string to an odd number according to the sequence of each character in the first coding character string, and sequentially placing each character in the second coding character string to an even number according to the sequence of each character in the second coding character string to obtain a first longitude and latitude coding character string after coding the first longitude and latitude information.
With reference to the second aspect, an embodiment of the present application provides a fourth possible implementation manner of the second aspect, where the encoding module is configured to encode the second latitude and longitude information by using a specified encoding manner to obtain a fourth latitude and longitude encoding string of the destination, and is specifically configured to:
for a second longitude value in the second longitude and latitude information, dividing a second longitude range containing the second longitude value into a third sub-longitude range and a fourth sub-longitude range on average, taking a value of 0 as a third code value corresponding to the current round when the second longitude value is positioned in the third sub-longitude range, taking the third sub-longitude range as a new second longitude range, and continuing to divide the second longitude range containing the second longitude value into the third sub-longitude range and the fourth sub-longitude range on average; when the second longitude value is in the fourth sub-longitude range, taking the value 1 as a third code value corresponding to the current round, taking the fourth sub-longitude range as a new second longitude range, and continuing to divide the second longitude range containing the second longitude value into a third sub-longitude range and a fourth sub-longitude range on average until a preset number of third code values are obtained;
Generating a third code character string corresponding to the second longitude value according to the third code value corresponding to each round;
for a second latitude value in the second latitude and longitude information, averagely dividing a second latitude range containing the second latitude value into a third sub-latitude range and a fourth sub-latitude range, taking a value 0 as a fourth coding value corresponding to the current round when the second latitude value is positioned in the third sub-latitude range, taking the third sub-latitude range as a new second latitude range, and continuing to divide the second latitude range containing the second latitude value into the third sub-latitude range and the fourth sub-latitude range; when the second latitude value is in the fourth sub-latitude range, taking the value 1 as a fourth code value corresponding to the current round, taking the fourth sub-latitude range as a new second latitude range, and continuously executing the average division of the second latitude range containing the second latitude value into a third sub-latitude range and a fourth sub-latitude range until a preset number of fourth code values are obtained;
generating a fourth code character string corresponding to the second latitude range according to the fourth code value corresponding to each round;
Combining the third coding character string and the fourth coding character string to obtain a third longitude and latitude coding character string after the second longitude and latitude information is coded;
taking every 5 characters connected in sequence in a binary third longitude and latitude coding character string as a third character string, and converting the third character string into a decimal fourth character string to obtain a plurality of fourth character strings corresponding to the third longitude and latitude coding character string;
and aiming at each fourth character string corresponding to the third longitude and latitude code character string, taking the fourth character string as a bit number, and inquiring a character corresponding to the bit number from a preset code table so as to generate a fourth longitude and latitude code character string of the destination according to the character corresponding to each fourth character string corresponding to the third longitude and latitude code character string.
With reference to the fourth possible implementation manner of the second aspect, the embodiment of the present application provides a fifth possible implementation manner of the second aspect, where the encoding module is configured to, when performing merging on the third encoding string and the fourth encoding string, obtain a third longitude and latitude encoding string after encoding the second longitude and latitude information, specifically be configured to:
And sequentially placing each character in the third coding character string to an odd number according to the sequence of each character in the third coding character string, and sequentially placing each character in the fourth coding character string to an even number according to the sequence of each character in the fourth coding character string to obtain a third longitude and latitude coding character string after the second longitude and latitude information is coded.
In a third aspect, embodiments of the present application further provide an electronic device, including: a processor, a memory and a bus, the memory storing machine-readable instructions executable by the processor, the processor and the memory in communication via the bus when the electronic device is running, the machine-readable instructions when executed by the processor performing the steps of any one of the possible implementations of the first aspect.
In a fourth aspect, the present embodiments also provide a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of any of the possible implementations of the first aspect described above.
The embodiment of the application provides a path planning method, a path planning device, electronic equipment and a computer readable storage medium, wherein after a departure place and a destination input by a user are acquired, first longitude and latitude information of the departure place and second longitude and latitude information of the destination are determined according to the departure place and the destination; then, using a designated coding mode, coding the first longitude and latitude information to obtain a second longitude and latitude coding character string, and coding the second longitude and latitude information to obtain a fourth longitude and latitude coding character string; then according to the second longitude and latitude code character string and the fourth longitude and latitude code character string, an originating node corresponding to a departure place and a terminating node corresponding to a destination are searched from a pre-generated directed authority diagram; after a plurality of drivable routes from an originating node to a terminating node are determined from the directed authority graph, calculating the sum of weights on various links contained on each drivable route for each drivable route to obtain drivable parameters of each drivable route; and selecting a drivable path with the smallest drivable parameter from the drivable paths, and taking the selected drivable path as a target drivable path. In this embodiment, since the weight and the running speed are in a negative correlation, and the positioning accuracy of the positioning method is in a negative correlation, the smaller the drivable parameter of the drivable path is, the faster the running speed of the drivable path is, and the higher the efficiency of transportation using the drivable path is.
In order to make the above objects, features and advantages of the present application more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments will be briefly described below, it being understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered limiting the scope, and that other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 shows a flowchart of a path planning method according to an embodiment of the present application;
FIG. 2 illustrates a schematic diagram of a directed rights graph provided by an embodiment of the present application;
fig. 3 shows a schematic structural diagram of a path planning apparatus according to an embodiment of the present application;
fig. 4 shows a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present application more clear, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are only some embodiments of the present application, but not all embodiments. The components of the embodiments of the present application, which are generally described and illustrated in the figures herein, may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present application, as provided in the accompanying drawings, is not intended to limit the scope of the application, as claimed, but is merely representative of selected embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present application without making any inventive effort, are intended to be within the scope of the present application.
In order to improve the transportation efficiency in transportation (e.g., cargo transportation, personnel transportation), it is necessary to reasonably plan the route of the transportation vehicle. Therefore, there is a strong need in the art for a method of planning a travel path with high transport efficiency. Based on this, the embodiments of the present application provide a path planning method, apparatus, electronic device, and computer readable storage medium, so as to obtain a travel path with high transportation efficiency, which is described below by way of embodiments.
Embodiment one:
for the sake of understanding the present embodiment, a detailed description is first given of a path planning method disclosed in the embodiments of the present application. Fig. 1 shows a flowchart of a path planning method according to an embodiment of the present application, as shown in fig. 1, including the following steps S101 to S105:
s101: the method comprises the steps of acquiring a departure place and a destination input by a user, and determining first longitude and latitude information of the departure place and second longitude and latitude information of the destination according to the departure place and the destination.
In this embodiment, the execution subject may be a server or may be a processing device having processing computing power. The user can input the names of the departure place and the destination in the user terminal, and the server or the processing device acquires the names of the departure place and the destination input by the user from the user terminal and determines the first longitude and latitude information of the departure place and the second longitude and latitude information of the destination according to the names of the departure place and the destination.
Next, in this embodiment, a specified encoding mode is used to encode the first longitude and latitude information and the second longitude and latitude information, respectively, so as to obtain an encoded second longitude and latitude encoding string and a fourth longitude and latitude encoding string. Specifically, in this embodiment, the first longitude and latitude information is encoded through steps S102-S108 to obtain an encoded second longitude and latitude encoded character string, and the second longitude and latitude information is encoded through steps S109-S1015 to obtain an encoded fourth longitude and latitude encoded character string.
S102: and encoding the first longitude and latitude information by using a designated encoding mode to obtain a second longitude and latitude encoding character string of the departure place, and encoding the second longitude and latitude information by using the designated encoding mode to obtain a fourth longitude and latitude encoding character string of the destination.
In one possible implementation manner, when performing step S102 to encode the first latitude and longitude information using the specified encoding manner to obtain the second latitude and longitude encoded character string of the departure place, the following steps S1021-S1027 may be specifically performed:
s1021: for a first longitude value in the first longitude and latitude information, dividing the first longitude range containing the first longitude value into a first sub-longitude range and a second sub-longitude range on average, taking the value 0 as a first coding value corresponding to the current round when the first longitude value is located in the first sub-longitude range, taking the first sub-longitude range as a new first longitude range, and continuing to divide the first longitude range containing the first longitude value into the first sub-longitude range and the second sub-longitude range on average; when the first longitude value is in the second sub-longitude range, taking the value 1 as a first code value corresponding to the current round and taking the second sub-longitude range as a new first longitude range, and continuing to divide the first longitude range containing the first longitude value into the first sub-longitude range and the second sub-longitude range on average until a preset number of first code values are obtained.
For example, first latitude and longitude information (116.389550, 39.928167) is illustrated, wherein the first latitude and longitude value is 116.389550 and the first latitude and longitude value is 39.928167.
In the initial pass, the first warp range is from east warp 180 to west warp 180, and the west warp is set to be negative and the south weft is set to be negative, so the first warp range in the initial pass is (-180, 180). Table 1 shows a schematic table of a first range of degrees and a first code value corresponding to each round provided in the embodiment of the present application:
round of First warp range First sub-longitude range Second sub-longitude range First encoded value
1 (-180,180) (-180,0) (0,180) 1
2 (0,180) (0,90) (90,180) 1
3 (90,180) (90,135) (135,180) 0
4 (90,135) (90,112.5) (112.5,135) 1
5 (112.5,135) (112.5,123.75) (123.75,123) 0
6 (112.5,123.75) (112.5,118.125) (118.125,123.75) 0
7 (112.5,118.125) (112.5,115.3125) (115.3125,118.125) 1
TABLE 1
As shown in table 1, the first encoded values corresponding to the first round to the seventh round are sequentially: 1. 1, 0, 1, if the iteration is continued, if the preset number is 10, the first coding values corresponding to the eighth round to the tenth round are obtained continuously, and the first coding values are sequentially as follows: 0. 1, 1.
S1022: and generating a first code character string corresponding to the first longitude value according to the first code value corresponding to each round.
The above embodiment is received, and the first code values corresponding to the rounds are spliced to obtain the first code string 1101001011 corresponding to the first warp value. The first code character string comprises a preset number of first code values.
S1023: for a first latitude value in the first longitude and latitude information, dividing the first latitude range containing the first latitude value into a first sub-latitude range and a second sub-latitude range on average, taking the value 0 as a second coding value corresponding to the current round when the first latitude value is positioned in the first sub-latitude range, taking the first sub-latitude range as a new first latitude range, and continuously executing the division of the first latitude range containing the first latitude value into the first sub-latitude range and the second sub-latitude range on average; when the first latitude value is in the second sub-latitude range, taking the value 1 as a second code value corresponding to the current round, taking the second sub-latitude range as a new first latitude range, and continuously executing the average division of the first latitude range containing the first latitude value into the first sub-latitude range and the second sub-latitude range until the preset number of second code values are obtained.
The above embodiment is received, and the first latitude value is 39.928167. In the initial pass, the first latitude ranges from south latitude 90 to north latitude 90, so the first latitude ranges from (-90, 90) in the initial pass. Table 2 shows a schematic table of a first latitude range and a second code value corresponding to each round provided in the embodiment of the present application:
Round of First latitude range First sub-latitude range Second sub-latitude range Second encoded value
1 (-90,90) (-90,0) (0,90) 1
2 (0,90) (0,45) (45,90) 0
3 (0,45) (0,22.5) (22.5,45) 1
4 (22.5,45) (22.5,33.75) (33.75,45) 1
5 (33.75,45) (33.75,39.375) (39.375,45) 1
6 (39.375,45) (39.375,42.1875) (42.1875,45) 0
7 (39.375,42.1875) (39.375,40.78125) (40.78125,42.1875) 0
TABLE 2
As shown in table 2, the second encoded values corresponding to the first round to the seventh round are sequentially: 1. 0, 1, 0, if iteration is continued, if the preset number is 10, then the first coding values corresponding to the eighth round to the tenth round are obtained sequentially: 0. 1, 1.
S1024: and generating a second code character string corresponding to the first latitude value according to the second code value corresponding to each round.
The above embodiment is received, and the second code values corresponding to the respective rounds are spliced to obtain the second code string 1011100011 corresponding to the first latitude value. The second code character string contains a preset number of second code values.
S1025: and combining the first coding character string and the second coding character string to obtain a first longitude and latitude coding character string after the first longitude and latitude information is coded.
In one possible implementation manner, when performing step S1025, specifically: according to the sequence of each character in the first coding character string, each character in the first coding character string is placed in an odd number position in sequence, and according to the sequence of each character in the second coding character string, each character in the second coding character string is placed in an even number position in sequence, and the first longitude and latitude coding character string after coding the first longitude and latitude information is obtained.
For example, the first code string is 1101001011, the second code string is 1011100011, each character in the first code string is placed in an odd number, and each character in the second code string is placed in an even number, so as to obtain a first longitude and latitude code string 11100111010010001111.
The first longitude and latitude code character string comprises a first code character string and a second code character string, that is, the first longitude and latitude code character string comprises a preset number of first code values and a preset number of second code values.
S1026: and converting each 5 sequentially connected characters in the binary first longitude and latitude coding character strings into a decimal second character string to obtain a plurality of second character strings corresponding to the first longitude and latitude coding character strings.
In this embodiment, every 5 sequentially connected characters in the binary first longitude and latitude code character string 11100111010010001111 are used as a first character string, and the obtained first character strings are respectively: 11100. 11101, 00100, 01111. Converting each first character string into decimal second character strings respectively, wherein the obtained second character strings are respectively as follows: 28. 29, 4, 15.
S1027: and aiming at each second character string corresponding to the first longitude and latitude code character string, taking the second character string as a bit number, and inquiring the character corresponding to the bit number from a preset code table so as to generate a second longitude and latitude code character string of the departure place according to the character corresponding to each second character string corresponding to the first longitude and latitude code character string.
In one possible implementation manner, the preset encoding table includes 32 characters, and the characters from the 0 th bit to the 31 st bit are: 0. 1, 2, 3, 4, 5, 6, 7, 8, 9, b, c, d, e, f, g, h, j, k, m, n, p, q, r, s, t, u, v, w, x, y, z. Table 3 shows a preset encoding table provided in an embodiment of the present application:
number of bits 0 1 2 3 4 5 6 7 8 9 10
Character(s) 0 1 2 3 4 5 6 7 8 9 b
Number of bits 11 12 13 14 15 16 17 18 19 20 21
Character(s) c d e f g g j k m n p
Number of bits 22 23 24 25 26 27 28 29 30 31
Character(s) q r s t u v w x y z
TABLE 3 Table 3
In this embodiment, when the second string is 28, the character corresponding to the number of bits 28 is w; when the second character string is 29, the character corresponding to the bit number 29 is x; when the second character string is 4, the character corresponding to the bit number 4 is 4; when the second character string is 15, the character corresponding to the bit number 15 is g. And splicing the characters corresponding to the second character strings according to the sequence of the second character strings in the first longitude and latitude code character strings, wherein the second longitude and latitude code character string of the departure place is wx4g.
Next, the second latitude and longitude information is encoded.
In a possible implementation manner, when performing step S102 to encode the second latitude and longitude information by using a specified encoding manner to obtain the fourth latitude and longitude encoded character string of the destination, the following steps S1028-S10214 may be specifically performed:
s1028: for a second longitude value in the second longitude and latitude information, dividing the second longitude range containing the second longitude value into a third sub-longitude range and a fourth sub-longitude range on average, when the second longitude value is in the third sub-longitude range, taking the value 0 as a third code value corresponding to the current round, taking the third sub-longitude range as a new second longitude range, and continuing to divide the second longitude range containing the second longitude value into the third sub-longitude range and the fourth sub-longitude range on average; when the second longitude value is in the fourth sub-longitude range, taking the value 1 as a third code value corresponding to the current round and taking the fourth sub-longitude range as a new second longitude range, and continuing to divide the second longitude range containing the second longitude value into the third sub-longitude range and the fourth sub-longitude range on average until a preset number of third code values are obtained.
For example, a second latitude and longitude information (100.562860, 42.598756) is illustrated, wherein the second latitude and longitude value is 100.562860 and the second latitude and longitude value is 42.598756.
In the initial round, the second longitude range is from east longitude 180 to west longitude 180, and the west longitude is set to be negative and the south latitude is set to be negative, so the second longitude range in the initial round is (-180, 180). Table 4 shows a schematic table of second longitude ranges and third code values corresponding to respective rounds provided in the embodiments of the present application:
round of Second longitude range Third sub-longitude range Fourth sub-longitude range Third encoded value
1 (-180,180) (-180,0) (0,180) 1
2 (0,180) (0,90) (90,180) 1
3 (90,180) (90,135) (135,180) 0
4 (90,135) (90,112.5) (112.5,135) 0
5 (90,112.5) (90,101.25) (101.25,112.5) 0
6 (90,101.25) (90,95.625) (95.625,101.25) 1
7 (95.625,101.25) (95.625,98.4375) (98.4375,101.25) 1
TABLE 4 Table 4
As shown in table 4, the third encoded values corresponding to the first round to the seventh round are sequentially: 1. 1, 0, 1. If the iteration is continued, if the preset number of times is 10, the third coding values corresponding to the eighth round to the tenth round are obtained sequentially: 1. 1 and 0.
S1029: and generating a third code character string corresponding to the second longitude value according to the third code value corresponding to each round.
The above embodiment is received, and the third code values corresponding to the rounds are spliced to obtain the third code string 1100011110 corresponding to the second longitude value. The third code string contains a preset number of third code values.
S10210: for a second latitude value in the second longitude and latitude information, dividing the second latitude range containing the second latitude value into a third sub-latitude range and a fourth sub-latitude range on average, taking the value 0 as a fourth coding value corresponding to the current round when the second latitude value is positioned in the third sub-latitude range, taking the third sub-latitude range as a new second latitude range, and continuing to divide the second latitude range containing the second latitude value into the third sub-latitude range and the fourth sub-latitude range on average; when the second latitude value is in the fourth sub-latitude range, taking the value 1 as a fourth code value corresponding to the current round, taking the fourth sub-latitude range as a new second latitude range, and continuing to divide the second latitude range containing the second latitude value into a third sub-latitude range and a fourth sub-latitude range on average until a preset number of fourth code values are obtained.
The above embodiment is received, and the second latitude value is 42.598756. In the initial pass, the second latitude ranges from south latitude 90 to north latitude 90, so the second latitude ranges from (-90, 90) in the initial pass. Table 5 shows a schematic representation of the second latitude range and the fourth code value corresponding to each round provided in the embodiment of the present application:
Round of First latitude range First sub-latitude range Second sub-latitude range Second encoded value
1 (-90,90) (-90,0) (0,90) 1
2 (0,90) (0,45) (45,90) 0
3 (0,45) (0,22.5) (22.5,45) 1
4 (22.5,45) (22.5,33.75) (33.75,45) 1
5 (33.75,45) (33.75,39.375) (39.375,45) 1
6 (39.375,45) (39.375,42.1875) (42.1875,45) 1
7 (42.1875,45) (42.1875,43.59375) (43.59375,45) 0
TABLE 5
As shown in table 5, the fourth encoded values corresponding to the first round to the seventh round are sequentially: 1. 0, 1, 0. If iteration is continued, when the preset number is 10, then the fourth coding values corresponding to the eighth round to the tenth round are obtained sequentially: 0. 1 and 0.
S10211: and generating a fourth code character string corresponding to the second latitude range according to the fourth code value corresponding to each round.
And splicing the fourth code values corresponding to the rounds to obtain a fourth code character string 1011110010 corresponding to the second latitude value. The fourth code string contains a preset number of fourth code values.
S10212: and combining the third coding character string and the fourth coding character string to obtain a third longitude and latitude coding character string after the second longitude and latitude information is coded.
In one possible implementation, in executing S10212, specifically: and sequentially placing the characters in the third coding character string to odd numbers according to the sequence of the characters in the third coding character string, and sequentially placing the characters in the fourth coding character string to even numbers according to the sequence of the characters in the fourth coding character string to obtain a third longitude and latitude coding character string after the second longitude and latitude information is coded.
For example, the third code string is 1100011110, the fourth code string is 1011110010, each character in the third code string is placed in an odd number bit, each character in the fourth code string is placed in an even number bit, and the third longitude and latitude code string is obtained as follows: 11100101011110101100.
the third longitude and latitude code character string comprises a third code character string and a fourth code character string, that is, the third longitude and latitude code character string comprises a preset number of third code values and a preset number of fourth code values.
S10213: and taking every 5 characters connected in sequence in the binary third longitude and latitude coding character string as a third character string, and converting the third character string into a decimal fourth character string to obtain a plurality of fourth character strings corresponding to the third longitude and latitude coding character string.
In this embodiment, every 5 characters connected in sequence in the binary third longitude and latitude code character string 11100101011110101100 are used as a third character string, and the obtained third character strings are respectively: 11100. 10101, 11101, 01100. Converting each third character string into a decimal fourth character string, wherein the obtained fourth character strings are respectively as follows: 28. 21, 29, 12.
S10214: and aiming at each fourth character string corresponding to the third longitude and latitude code character string, taking the fourth character string as a bit number, and inquiring the character corresponding to the bit number from a preset code table so as to generate a fourth longitude and latitude code character string of the destination according to the character corresponding to each fourth character string corresponding to the third longitude and latitude code character string.
In this embodiment, when the fourth string is 28, the character corresponding to the number of bits 28 is w; when the fourth character string is 21, the character corresponding to the bit number 21 is p; when the fourth character string is 29, the character corresponding to the bit number 29 is x; when the fourth character string is 12, the character corresponding to the bit number 12 is d. And splicing the characters corresponding to the fourth character strings according to the sequence of the fourth character strings in the third longitude and latitude coding character strings, wherein the fourth longitude and latitude coding character string of the departure place is wpxd.
S103: according to the second longitude and latitude code character string and the fourth longitude and latitude code character string, an originating node corresponding to a departure place and a terminating node corresponding to a destination are searched from a pre-generated directed authority diagram; the directed authority graph comprises a plurality of nodes, each node corresponds to a respective position, and the position information on each node is longitude and latitude coding information obtained by coding the longitude and latitude information of the position in a specified coding mode; in the directed permission graph, a connecting line between two nodes represents that the two positions corresponding to the two nodes are passable, and an arrow on the connecting line represents the passable direction between the two positions; each connecting line corresponds to a weight, and the weight is determined by the running speed between two positions corresponding to the two nodes and the positioning mode of the position corresponding to the node pointed by the arrow; the weight and the running speed are in negative correlation, and the positioning accuracy of the positioning mode is in negative correlation.
In this embodiment, fig. 2 shows a schematic diagram of a directed permission graph provided in the embodiment of the present application, where, as shown in fig. 2, the directed permission graph includes a plurality of nodes, each node represents a location, and locations corresponding to different nodes are different. Each node comprises position information, the position information is longitude and latitude coding information obtained by coding longitude and latitude information of the position through a specified coding mode, and the specified coding mode is a mode for coding the first longitude and latitude information and the second longitude and latitude information.
In the directed authority graph, if a connection line exists between two nodes, the connection line represents that the two positions corresponding to the two nodes are passable; if no connection exists between the two nodes, the two positions corresponding to the two nodes are not accessible.
For the weight corresponding to each connecting line, the weight and the running speeds between two positions corresponding to two nodes on the connecting line form a negative correlation, the faster the running speed between the two positions is, the smaller the weight corresponding to the connecting line is, and the slower the running speed between the two positions is, the larger the weight corresponding to the connecting line is. The travel speed between the two locations is determined based on historical travel data.
In this embodiment, longitude and latitude information of a position on each node is collected by a positioning mode corresponding to the node, where the positioning mode includes any one or more of the following: GPS positioning, base station positioning, wiFi auxiliary positioning and Beidou positioning. Wherein, the location precision is from high to bottom in proper order: beidou positioning/GPS positioning > base station positioning > WiFi auxiliary positioning. The positioning modes corresponding to the longitude and latitude information of the positions on different nodes can be the same or different.
For the weight corresponding to each connection line, the weight and the positioning accuracy of the positioning mode of the position corresponding to the node pointed by the arrow on the connection line form a negative correlation, for example, the weight corresponding to the connection line between the node 1 and the node 2 and the positioning accuracy of the positioning mode of the position corresponding to the node 2 form a negative correlation. The higher the positioning accuracy, the smaller the weight, the lower the positioning accuracy and the larger the weight.
For ease of understanding, the following description will be given of the respective positioning modes:
GPS positioning: the GPS is mainly composed of three parts, namely a space satellite constellation, a ground monitoring station and user equipment. The GPS space satellite constellation consists of 21 working satellites and 3 in-orbit spare satellites. The orbiting satellites are regular, with at least 4 satellites overhead of the user, wherever the user is worldwide. The ground terminal, which is what we refer to as a GPS, can receive signals from satellites on top of the user's head and then calculate the current position of the user from the signals. Common terminals include a vehicle navigation GPS, a mobile phone built-in GPS, a hiking outdoor GPS, an automobile anti-theft GPS and the like, and the accuracy of the common civil level is about 10 meters. The GPS is characterized in that: no sim card is needed, no network connection is needed, and accurate positioning can be basically realized at any time and any place as long as the sim card is positioned in open outdoor places. However, the time required for searching for satellites after GPS start-up is relatively long, and generally takes about 2 minutes (commonly called cold start-up).
Positioning a base station: the base station positioning is to acquire the position information of the mobile terminal user through the network of the telecom mobile communication operator, and the terminal needs to search surrounding base station information (i.e. find signals) after the sim card is inserted and started. More than one base station can be searched, and then the connection registration with the best signal is automatically selected from the base stations, and the rest of the base stations still search for them. Once the user leaves the base station a for a distance, the signal of the base station a is not as good as that of the base station B, and the signal is automatically switched to the base station B. This is why the mobile phone is also on standby for one day, and the user consumes more power on the train than at home, and the mobile phone needs to search for and connect to the base station continuously. Because the signals are easily interfered when the base station is positioned, the positioning inaccuracy of the base station is determined, the precision is about 150 meters, and the driving navigation is basically impossible. The positioning condition is that the mobile phone is in sim card registration state (neither wifi is opened nor sim card is pulled out in flight mode) at the position with the base station signal, and the signals of 3 base stations are received, whether or not in the room. In addition, if there is no base station position data packet in the mobile phone of the user, networking is needed.
WiFi auxiliary positioning: the purpose is to solve the indoor accurate positioning, and the principle is similar to the positioning of a base station. The coverage range of a wifi hotspot is only tens of meters, most wifi hotspots in the world are fixed in position, and the wifi hotspots have unique MAC addresses, so that quite accurate position information can be obtained if the principle of base station positioning is applied.
Beidou positioning: the bucket navigation satellite continuously transmits navigation messages, the user machine receives satellite ephemeris data in the navigation messages, extracts satellite time and self clock for comparison, and the time difference between the satellite and the user can be known; then, the three-bit coordinate value of the satellite transmitting message is calculated by utilizing the satellite ephemeris data in the navigation message; according to the formula of the distance between two points in space, three formulas are listed to calculate the three-dimensional coordinate value of the user machine.
In this embodiment, the location information on each node is longitude and latitude encoded information obtained by encoding longitude and latitude information of the location, that is, each node includes respective longitude and latitude encoded information. And searching an originating node corresponding to the departure place from each node according to the second longitude and latitude coding character string, wherein the longitude and latitude coding character string contained in the originating node is the same as the second longitude and latitude coding character string. And searching a termination node corresponding to the destination from all nodes in the directed permission graph according to the fourth longitude and latitude coding character string, wherein the longitude and latitude coding character string contained in the termination node is the same as the fourth longitude and latitude coding character string.
S104: after a plurality of drivable routes from the originating node to the terminating node are determined from the directed authority graph, calculating the sum of weights on the various links included on each drivable route for each drivable route to obtain drivable parameters of each drivable route.
For example, if the originating node is node 1 and the terminating node is node 3, as shown in fig. 2, the drivable path determined from the directed graph includes: node 1-node 3, node 1-node 2-node 4-node 3. The drivable parameters of each drivable path are respectively as follows: 12. 10, 8.
S105: and selecting a drivable path with the smallest drivable parameter from the drivable paths, and taking the selected drivable path as a target drivable path.
With the above embodiment, the drivable route with the smallest drivable parameter is selected from the drivable routes, that is, the node 1-node 2-node 4-node 3, and is taken as the target drivable route.
In this embodiment, since the weight is inversely related to the traveling speed between two positions corresponding to two nodes on the line, and inversely related to the positioning accuracy of the positioning method of the position corresponding to the node pointed by the arrow on the line, the smaller the travelable parameter (sum of weights) of the travelable route is, the faster the traveling speed of the travelable route is illustrated, and the higher the positioning accuracy of each position on the travelable route is.
In one possible embodiment, after obtaining the target travelable route, it is also possible to: pushing route information of the target drivable route to a user side of a user; the route information includes latitude and longitude information of positions corresponding to the respective nodes on the target exercisable route, and a travel order.
Illustratively, taking the target travelable route node 1-node 2-node 4-node 3 as an example, the travel sequence refers to from node 1, to node 2, to node 4, and to node 3.
Embodiment two:
based on the same technical concept, the present application further provides a path planning device, and fig. 3 shows a schematic structural diagram of the path planning device provided by the embodiment of the present application, as shown in fig. 3, where the device includes:
an obtaining module 301, configured to obtain a departure place and a destination input by a user, so as to determine first latitude and longitude information of the departure place and second latitude and longitude information of the destination according to the departure place and the destination;
the encoding module 302 is configured to encode the first latitude and longitude information by using a specified encoding manner to obtain a second latitude and longitude encoding string of the departure place, and encode the second latitude and longitude information by using a specified encoding manner to obtain a fourth latitude and longitude encoding string of the destination;
The searching module 303 is configured to search, according to the second longitude and latitude code string and the fourth longitude and latitude code string, an originating node corresponding to the departure place and a terminating node corresponding to the destination from a directional rights graph that is generated in advance; the directed permission graph comprises a plurality of nodes, each node corresponds to a respective position, and the position information on each node is longitude and latitude coding information obtained by coding the longitude and latitude information of the position in the appointed coding mode; in the directed permission graph, a connecting line between two nodes represents that the two positions corresponding to the two nodes are passable, and an arrow on the connecting line represents the passable direction between the two positions; each connecting line corresponds to a weight, and the weight is determined by the running speed between two positions corresponding to the two nodes and the positioning mode of the position corresponding to the node pointed by the arrow; the weight and the running speed form a negative correlation, and the weight and the positioning accuracy of the positioning mode form a negative correlation;
the calculating module 304 is configured to calculate, for each drivable route, a sum of weights on respective links included on each drivable route after determining a plurality of drivable routes from the originating node to the terminating node from the directed rights graph, and obtain a drivable parameter of each drivable route;
And a selecting module 305, configured to select a drivable path with the smallest drivable parameter from the drivable paths, and take the selected drivable path as a target drivable path.
Optionally, the apparatus further includes:
the pushing module is used for pushing the route information of the target drivable route to the user side of the user; the route information comprises longitude and latitude information and running sequence of positions corresponding to all nodes on the target movable route.
Optionally, when the encoding module 302 is configured to encode the first latitude and longitude information by using a specified encoding manner to obtain the second latitude and longitude encoded string of the departure place, the encoding module is specifically configured to:
for a first longitude value in the first longitude and latitude information, dividing a first longitude range containing the first longitude value into a first sub-longitude range and a second sub-longitude range on average, taking a value of 0 as a first coding value corresponding to a current round when the first longitude value is positioned in the first sub-longitude range, taking the first sub-longitude range as a new first longitude range, and continuing to divide the first longitude range containing the first longitude value into the first sub-longitude range and the second sub-longitude range on average; when the first longitude value is in the second sub-longitude range, taking the value 1 as a first code value corresponding to the current round, taking the second sub-longitude range as a new first longitude range, and continuing to divide the first longitude range containing the first longitude value into a first sub-longitude range and a second sub-longitude range on average until a preset number of first code values are obtained;
Generating a first code character string corresponding to the first warp value according to the first code value corresponding to each round;
for a first latitude value in the first longitude and latitude information, dividing a first latitude range containing the first latitude value into a first sub-latitude range and a second sub-latitude range on average, taking a value 0 as a second coding value corresponding to the current round when the first latitude value is positioned in the first sub-latitude range, taking the first sub-latitude range as a new first latitude range, and continuing to divide the first latitude range containing the first latitude value into the first sub-latitude range and the second sub-latitude range on average; when the first latitude value is in the second sub-latitude range, taking the value 1 as a second code value corresponding to the current round, taking the second sub-latitude range as a new first latitude range, and continuously executing the average division of the first latitude range containing the first latitude value into the first sub-latitude range and the second sub-latitude range until a preset number of second code values are obtained;
generating a second code character string corresponding to the first latitude value according to the second code value corresponding to each round;
Combining the first coding character string and the second coding character string to obtain a first longitude and latitude coding character string after the first longitude and latitude information is coded;
taking every 5 characters connected in sequence in a binary first longitude and latitude coding character string as a first character string, and converting the first character string into a decimal second character string to obtain a plurality of second character strings corresponding to the first longitude and latitude coding character string;
and aiming at each second character string corresponding to the first longitude and latitude code character string, taking the second character string as a bit number, and inquiring a character corresponding to the bit number from a preset code table so as to generate the second longitude and latitude code character string of the departure place according to the character corresponding to each second character string corresponding to the first longitude and latitude code character string.
Optionally, when the encoding module 302 is configured to combine the first encoded string and the second encoded string to obtain a first encoded string after encoding the first latitude and longitude information, the encoding module is specifically configured to:
and sequentially placing each character in the first coding character string to an odd number according to the sequence of each character in the first coding character string, and sequentially placing each character in the second coding character string to an even number according to the sequence of each character in the second coding character string to obtain a first longitude and latitude coding character string after coding the first longitude and latitude information.
Optionally, when the encoding module 302 is configured to encode the second latitude and longitude information by using a specified encoding manner to obtain a fourth latitude and longitude encoding string of the destination, the encoding module is specifically configured to:
for a second longitude value in the second longitude and latitude information, dividing a second longitude range containing the second longitude value into a third sub-longitude range and a fourth sub-longitude range on average, taking a value of 0 as a third code value corresponding to the current round when the second longitude value is positioned in the third sub-longitude range, taking the third sub-longitude range as a new second longitude range, and continuing to divide the second longitude range containing the second longitude value into the third sub-longitude range and the fourth sub-longitude range on average; when the second longitude value is in the fourth sub-longitude range, taking the value 1 as a third code value corresponding to the current round, taking the fourth sub-longitude range as a new second longitude range, and continuing to divide the second longitude range containing the second longitude value into a third sub-longitude range and a fourth sub-longitude range on average until a preset number of third code values are obtained;
Generating a third code character string corresponding to the second longitude value according to the third code value corresponding to each round;
for a second latitude value in the second latitude and longitude information, averagely dividing a second latitude range containing the second latitude value into a third sub-latitude range and a fourth sub-latitude range, taking a value 0 as a fourth coding value corresponding to the current round when the second latitude value is positioned in the third sub-latitude range, taking the third sub-latitude range as a new second latitude range, and continuing to divide the second latitude range containing the second latitude value into the third sub-latitude range and the fourth sub-latitude range; when the second latitude value is in the fourth sub-latitude range, taking the value 1 as a fourth code value corresponding to the current round, taking the fourth sub-latitude range as a new second latitude range, and continuously executing the average division of the second latitude range containing the second latitude value into a third sub-latitude range and a fourth sub-latitude range until a preset number of fourth code values are obtained;
generating a fourth code character string corresponding to the second latitude range according to the fourth code value corresponding to each round;
Combining the third coding character string and the fourth coding character string to obtain a third longitude and latitude coding character string after the second longitude and latitude information is coded;
taking every 5 characters connected in sequence in a binary third longitude and latitude coding character string as a third character string, and converting the third character string into a decimal fourth character string to obtain a plurality of fourth character strings corresponding to the third longitude and latitude coding character string;
and aiming at each fourth character string corresponding to the third longitude and latitude code character string, taking the fourth character string as a bit number, and inquiring a character corresponding to the bit number from a preset code table so as to generate a fourth longitude and latitude code character string of the destination according to the character corresponding to each fourth character string corresponding to the third longitude and latitude code character string.
Optionally, when the encoding module 302 is configured to combine the third encoding string and the fourth encoding string to obtain the third longitude and latitude encoding string after encoding the second longitude and latitude information, the encoding module is specifically configured to:
and sequentially placing each character in the third coding character string to an odd number according to the sequence of each character in the third coding character string, and sequentially placing each character in the fourth coding character string to an even number according to the sequence of each character in the fourth coding character string to obtain a third longitude and latitude coding character string after the second longitude and latitude information is coded.
Embodiment III:
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application, including: the electronic device comprises a processor 401, a memory 402 and a bus 403, wherein the memory 402 stores machine readable instructions executable by the processor 401, and when the electronic device runs the information processing method, the processor 401 communicates with the memory 402 through the bus 403, and the processor 401 executes the machine readable instructions to execute the method steps described in the first embodiment.
Embodiment four:
the fourth embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, which when executed by a processor performs the method steps described in the first embodiment.
It will be clearly understood by those skilled in the art that, for convenience and brevity of description, specific working procedures of the apparatus, electronic device and computer readable storage medium described above may refer to corresponding procedures in the foregoing method embodiments, which are not repeated herein.
In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described apparatus embodiments are merely illustrative, and the division of the modules is merely a logical function division, and there may be additional divisions when actually implemented, and for example, multiple modules or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some communication interface, device or unit indirect coupling or communication connection, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown 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 may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer readable storage medium executable by a processor. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
Finally, it should be noted that: the foregoing examples are merely specific embodiments of the present application, and are not intended to limit the scope of the present application, but the present application is not limited thereto, and those skilled in the art will appreciate that while the foregoing examples are described in detail, the present application is not limited thereto. Any person skilled in the art may modify or easily conceive of the technical solution described in the foregoing embodiments, or make equivalent substitutions for some of the technical features within the technical scope of the disclosure of the present application; such modifications, changes or substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application, and are intended to be included in the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (9)

1. A method of path planning, comprising:
acquiring a departure place and a destination input by a user, and determining first longitude and latitude information of the departure place and second longitude and latitude information of the destination according to the departure place and the destination;
Encoding the first longitude and latitude information by using a designated encoding mode to obtain a second longitude and latitude encoding character string of the departure place, and encoding the second longitude and latitude information by using a designated encoding mode to obtain a fourth longitude and latitude encoding character string of a destination;
according to the second longitude and latitude code character string and the fourth longitude and latitude code character string, searching an originating node corresponding to the departure place and a terminating node corresponding to the destination from a pre-generated directed permission graph; the directed permission graph comprises a plurality of nodes, each node corresponds to a respective position, and the position information on each node is longitude and latitude coding information obtained by coding the longitude and latitude information of the position in the appointed coding mode; in the directed permission graph, a connecting line between two nodes represents that the two positions corresponding to the two nodes are passable, and an arrow on the connecting line represents the passable direction between the two positions; each connecting line corresponds to a weight, and the weight is determined by the running speed between two positions corresponding to the two nodes and the positioning mode of the position corresponding to the node pointed by the arrow; the weight and the running speed form a negative correlation, and the weight and the positioning accuracy of the positioning mode form a negative correlation;
After a plurality of drivable routes from the originating node to the terminating node are determined from the directed authority graph, calculating the sum of weights on all the links contained on each drivable route for each drivable route to obtain drivable parameters of each drivable route;
and selecting a drivable route with the smallest drivable parameter from each drivable route, and taking the selected drivable route as a target drivable route.
2. The method according to claim 1, wherein the method further comprises:
pushing route information of the target drivable route to a user side of the user; the route information comprises longitude and latitude information and running sequence of positions corresponding to all nodes on the target movable route.
3. The method of claim 1, wherein the encoding the first latitude and longitude information using the specified encoding scheme to obtain the second latitude and longitude encoded string of the departure location comprises:
for a first longitude value in the first longitude and latitude information, dividing a first longitude range containing the first longitude value into a first sub-longitude range and a second sub-longitude range on average, taking a value of 0 as a first coding value corresponding to a current round when the first longitude value is positioned in the first sub-longitude range, taking the first sub-longitude range as a new first longitude range, and continuing to divide the first longitude range containing the first longitude value into the first sub-longitude range and the second sub-longitude range on average; when the first longitude value is in the second sub-longitude range, taking the value 1 as a first code value corresponding to the current round, taking the second sub-longitude range as a new first longitude range, and continuing to divide the first longitude range containing the first longitude value into a first sub-longitude range and a second sub-longitude range on average until a preset number of first code values are obtained;
Generating a first code character string corresponding to the first warp value according to the first code value corresponding to each round;
for a first latitude value in the first longitude and latitude information, dividing a first latitude range containing the first latitude value into a first sub-latitude range and a second sub-latitude range on average, taking a value 0 as a second coding value corresponding to the current round when the first latitude value is positioned in the first sub-latitude range, taking the first sub-latitude range as a new first latitude range, and continuing to divide the first latitude range containing the first latitude value into the first sub-latitude range and the second sub-latitude range on average; when the first latitude value is in the second sub-latitude range, taking the value 1 as a second code value corresponding to the current round, taking the second sub-latitude range as a new first latitude range, and continuously executing the average division of the first latitude range containing the first latitude value into the first sub-latitude range and the second sub-latitude range until a preset number of second code values are obtained;
generating a second code character string corresponding to the first latitude value according to the second code value corresponding to each round;
Combining the first coding character string and the second coding character string to obtain a first longitude and latitude coding character string after the first longitude and latitude information is coded;
taking every 5 characters connected in sequence in a binary first longitude and latitude coding character string as a first character string, and converting the first character string into a decimal second character string to obtain a plurality of second character strings corresponding to the first longitude and latitude coding character string;
and aiming at each second character string corresponding to the first longitude and latitude code character string, taking the second character string as a bit number, and inquiring a character corresponding to the bit number from a preset code table so as to generate the second longitude and latitude code character string of the departure place according to the character corresponding to each second character string corresponding to the first longitude and latitude code character string.
4. The method of claim 3, wherein the merging the first encoded string and the second encoded string to obtain the first encoded string encoded with the first latitude and longitude information comprises:
and sequentially placing each character in the first coding character string to an odd number according to the sequence of each character in the first coding character string, and sequentially placing each character in the second coding character string to an even number according to the sequence of each character in the second coding character string to obtain a first longitude and latitude coding character string after coding the first longitude and latitude information.
5. The method of claim 1, wherein the encoding the second latitude and longitude information using the specified encoding scheme to obtain a fourth latitude and longitude encoded string of the destination comprises:
for a second longitude value in the second longitude and latitude information, dividing a second longitude range containing the second longitude value into a third sub-longitude range and a fourth sub-longitude range on average, taking a value of 0 as a third code value corresponding to the current round when the second longitude value is positioned in the third sub-longitude range, taking the third sub-longitude range as a new second longitude range, and continuing to divide the second longitude range containing the second longitude value into the third sub-longitude range and the fourth sub-longitude range on average; when the second longitude value is in the fourth sub-longitude range, taking the value 1 as a third code value corresponding to the current round, taking the fourth sub-longitude range as a new second longitude range, and continuing to divide the second longitude range containing the second longitude value into a third sub-longitude range and a fourth sub-longitude range on average until a preset number of third code values are obtained;
Generating a third code character string corresponding to the second longitude value according to the third code value corresponding to each round;
for a second latitude value in the second latitude and longitude information, averagely dividing a second latitude range containing the second latitude value into a third sub-latitude range and a fourth sub-latitude range, taking a value 0 as a fourth coding value corresponding to the current round when the second latitude value is positioned in the third sub-latitude range, taking the third sub-latitude range as a new second latitude range, and continuing to divide the second latitude range containing the second latitude value into the third sub-latitude range and the fourth sub-latitude range; when the second latitude value is in the fourth sub-latitude range, taking the value 1 as a fourth code value corresponding to the current round, taking the fourth sub-latitude range as a new second latitude range, and continuously executing the average division of the second latitude range containing the second latitude value into a third sub-latitude range and a fourth sub-latitude range until a preset number of fourth code values are obtained;
generating a fourth code character string corresponding to the second latitude range according to the fourth code value corresponding to each round;
Combining the third coding character string and the fourth coding character string to obtain a third longitude and latitude coding character string after the second longitude and latitude information is coded;
taking every 5 characters connected in sequence in a binary third longitude and latitude coding character string as a third character string, and converting the third character string into a decimal fourth character string to obtain a plurality of fourth character strings corresponding to the third longitude and latitude coding character string;
and aiming at each fourth character string corresponding to the third longitude and latitude code character string, taking the fourth character string as a bit number, and inquiring a character corresponding to the bit number from a preset code table so as to generate a fourth longitude and latitude code character string of the destination according to the character corresponding to each fourth character string corresponding to the third longitude and latitude code character string.
6. The method of claim 5, wherein the merging the third encoded string and the fourth encoded string to obtain the third encoded string encoded with the second latitude and longitude information comprises:
and sequentially placing each character in the third coding character string to an odd number according to the sequence of each character in the third coding character string, and sequentially placing each character in the fourth coding character string to an even number according to the sequence of each character in the fourth coding character string to obtain a third longitude and latitude coding character string after the second longitude and latitude information is coded.
7. A path planning apparatus, comprising:
the acquisition module is used for acquiring a departure place and a destination input by a user so as to determine first longitude and latitude information of the departure place and second longitude and latitude information of the destination according to the departure place and the destination;
the encoding module is used for encoding the first longitude and latitude information by using a designated encoding mode to obtain a second longitude and latitude encoding character string of the departure place, and encoding the second longitude and latitude information by using a designated encoding mode to obtain a fourth longitude and latitude encoding character string of the destination;
the searching module is used for searching an originating node corresponding to the departure place and a terminating node corresponding to the destination from a pre-generated directed permission graph according to the second longitude and latitude code character string and the fourth longitude and latitude code character string; the directed permission graph comprises a plurality of nodes, each node corresponds to a respective position, and the position information on each node is longitude and latitude coding information obtained by coding the longitude and latitude information of the position in the appointed coding mode; in the directed permission graph, a connecting line between two nodes represents that the two positions corresponding to the two nodes are passable, and an arrow on the connecting line represents the passable direction between the two positions; each connecting line corresponds to a weight, and the weight is determined by the running speed between two positions corresponding to the two nodes and the positioning mode of the position corresponding to the node pointed by the arrow; the weight and the running speed form a negative correlation, and the weight and the positioning accuracy of the positioning mode form a negative correlation;
The calculation module is used for calculating the sum of weights on each connecting line contained on each movable route for each movable route after a plurality of movable routes from the originating node to the terminating node are determined from the directed authority graph, so as to obtain the movable parameter of each movable route;
and the selecting module is used for selecting a drivable route with the minimum drivable parameter from the drivable routes and taking the selected drivable route as a target drivable route.
8. An electronic device, comprising: a processor, a memory and a bus, said memory storing machine-readable instructions executable by said processor, said processor and said memory communicating over the bus when the electronic device is running, said machine-readable instructions when executed by said processor performing the steps of the method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that it has stored thereon a computer program which, when executed by a processor, performs the steps of the method according to any of claims 1 to 6.
CN202311507924.6A 2023-11-14 2023-11-14 Path planning method, path planning device, electronic equipment and computer readable storage medium Active CN117249843B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311507924.6A CN117249843B (en) 2023-11-14 2023-11-14 Path planning method, path planning device, electronic equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311507924.6A CN117249843B (en) 2023-11-14 2023-11-14 Path planning method, path planning device, electronic equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN117249843A true CN117249843A (en) 2023-12-19
CN117249843B CN117249843B (en) 2024-03-15

Family

ID=89131614

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311507924.6A Active CN117249843B (en) 2023-11-14 2023-11-14 Path planning method, path planning device, electronic equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN117249843B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102128629A (en) * 2010-01-13 2011-07-20 华为技术有限公司 Path planning method, navigation system and geographical information system
CN102589557A (en) * 2012-01-13 2012-07-18 吉林大学 Intersection map matching method based on driver behavior characteristics and logit model
CN108286981A (en) * 2017-12-29 2018-07-17 广州斯沃德科技有限公司 The vehicle path planning method, apparatus and computer equipment of car networking
CN113483729A (en) * 2021-07-07 2021-10-08 哈尔滨理工大学 Longitude and latitude distance measurement method based on privacy protection and machine load balance
CN114724377A (en) * 2022-06-01 2022-07-08 华砺智行(武汉)科技有限公司 Unmanned vehicle guiding method and system based on vehicle-road cooperation technology
CN115658836A (en) * 2022-11-07 2023-01-31 中国联合网络通信集团有限公司 Area searching method and device, electronic equipment and readable storage medium
CN116668407A (en) * 2023-05-23 2023-08-29 中国电信股份有限公司上海研究院 Terminal position display method, device, equipment and medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102128629A (en) * 2010-01-13 2011-07-20 华为技术有限公司 Path planning method, navigation system and geographical information system
CN102589557A (en) * 2012-01-13 2012-07-18 吉林大学 Intersection map matching method based on driver behavior characteristics and logit model
CN108286981A (en) * 2017-12-29 2018-07-17 广州斯沃德科技有限公司 The vehicle path planning method, apparatus and computer equipment of car networking
CN113483729A (en) * 2021-07-07 2021-10-08 哈尔滨理工大学 Longitude and latitude distance measurement method based on privacy protection and machine load balance
CN114724377A (en) * 2022-06-01 2022-07-08 华砺智行(武汉)科技有限公司 Unmanned vehicle guiding method and system based on vehicle-road cooperation technology
CN115658836A (en) * 2022-11-07 2023-01-31 中国联合网络通信集团有限公司 Area searching method and device, electronic equipment and readable storage medium
CN116668407A (en) * 2023-05-23 2023-08-29 中国电信股份有限公司上海研究院 Terminal position display method, device, equipment and medium

Also Published As

Publication number Publication date
CN117249843B (en) 2024-03-15

Similar Documents

Publication Publication Date Title
US7289931B2 (en) Electronic location code
US8237612B2 (en) Inferring beacon positions based on spatial relationships
US20020177945A1 (en) Automatic vehicle routing and recommendation system
CN107101645B (en) A kind of paths planning method and path planning apparatus
KR20190129906A (en) Method and system for measuring position of terminal in wireless communication system
CN106572444A (en) Longitude and latitude information updating method and device
CN104580350A (en) Server-based positioning system architecture
CN109344513B (en) Shortest route planning method, system and computer storage medium
CN110779524A (en) Path planning method, device, equipment and storage medium
Madleňák et al. Multiple approaches of solving allocation problems on postal transportation network in conditions of large countries
US20100277373A1 (en) Positioning Method and System
Wang et al. Reliability modeling in spatially distributed logistics systems
CN103760583A (en) Navigation terminal locating method
CN104994577A (en) System for integrating action positioning of heterogeneous network and application method thereof
CN104063831A (en) Method and device for providing railway route schemes
CN117249843B (en) Path planning method, path planning device, electronic equipment and computer readable storage medium
CN101661096A (en) Method and system for generating virtual reference station based on triangular approximation algorithm
CN105408761B (en) The method and apparatus for effectively reducing number of access point in radio map
CN115560767B (en) Robot path generation method and device, storage medium and electronic device
KR102052519B1 (en) Indoor Positioning Method and Apparatus Based on Bluetooth Low Energy
RU2018121140A (en) METHOD AND SYSTEM FOR CREATING INFORMATION ON THE ROUTE IN THE MAPPOINT APPLICATION ON THE ELECTRONIC DEVICE
CN113761397B (en) Recommendation method, system, equipment and storage medium for customizing passenger transport route
US20100222077A1 (en) Method fro computing the geographical location of a mobile terminal
CN102589563B (en) The method and apparatus of information processing
CN108933990A (en) A kind of method and system of navigation

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