CN110553659B - Route determining method and device - Google Patents

Route determining method and device Download PDF

Info

Publication number
CN110553659B
CN110553659B CN201910798614.1A CN201910798614A CN110553659B CN 110553659 B CN110553659 B CN 110553659B CN 201910798614 A CN201910798614 A CN 201910798614A CN 110553659 B CN110553659 B CN 110553659B
Authority
CN
China
Prior art keywords
route
driver
passenger
included angle
routes
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910798614.1A
Other languages
Chinese (zh)
Other versions
CN110553659A (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.)
Euler Information Services Co ltd
Original Assignee
Euler Information Services 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 Euler Information Services Co ltd filed Critical Euler Information Services Co ltd
Priority to CN201910798614.1A priority Critical patent/CN110553659B/en
Publication of CN110553659A publication Critical patent/CN110553659A/en
Application granted granted Critical
Publication of CN110553659B publication Critical patent/CN110553659B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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/3407Route searching; Route guidance specially adapted for specific applications
    • G01C21/3438Rendez-vous, i.e. searching a destination where several users can meet, and the routes to this destination for these users; Ride sharing, i.e. searching a route such that at least two users can share a vehicle for at least part of the route

Abstract

The invention provides a route determining method and a route determining device, which comprise the following steps: acquiring coordinates of a starting point and an ending point of a passenger and coordinates of a starting point and an ending point of a driver; determining a passenger route according to the coordinates of the starting point and the ending point of the passenger, and determining a driver route according to the coordinates of the starting point and the ending point of the driver; determining a first passenger route and a first driver route according to an included angle value between the passenger route and the driver route; determining a second passenger route and a second driver route based on an overlapping portion between the first passenger route and the first driver route; a third passenger route and a third driver route are determined based on the additional distance between the second passenger route and the second driver route. According to the invention, the driving routes of the driver and the passengers are simplified into directed line segments, and the driving routes of the driver and the passengers meeting the matching conditions are quickly selected, so that the processing flow of the man-vehicle matching process is simplified, the calculated amount is reduced, and the matching efficiency of the driver and the passengers is improved.

Description

Route determining method and device
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method and an apparatus for determining a route.
Background
With the continuous emergence of emerging travel services such as internet car booking, more and more people replace private cars to travel in a mode of internet car booking travel, and a very critical part in internet car booking is to perform driving path matching, for example, regarding the windward driving service, how to efficiently and accurately match passengers to proper windward driving vehicles is always a key problem that various large-network car booking service providers want to solve.
In the prior art, when a driver issues a journey, a network car booking service provider calls a related map interface to plan and generate a driver path for the driver; when the passenger releases the journey, the network car appointment service provider calls the relevant map interface to generate a passenger path for the passenger planning. After determining the driver path and the passenger path, the driver path and the passenger path may be segmented, and similarity values between the segments of the driver path and the segments of the passenger path are calculated, and it is determined that the passenger is matched to a suitable driver in a case that a total similarity obtained by adding up all the similarity values is greater than or equal to a preset threshold; and determining that the passenger is matched with an improper driver under the condition that the total similarity obtained by adding all the similarity values is smaller than a preset threshold value.
However, the matching scheme of the segment calculation needs to perform similarity calculation for all users for multiple times, and a large number of similarity calculations lead to the problems that the user matching process is complicated and the calculation amount of the server is too large in the windward business.
Disclosure of Invention
In view of the above, the present invention provides a route determining method and apparatus, so as to solve the problems in the prior art that the overall process is complicated and the calculation amount of a server is large in the network taxi appointment business due to the adoption of the driving route matching method of the sectional calculation.
In a first aspect, an embodiment of the present invention provides a route determining method, where the method includes:
obtaining a passenger starting point coordinate, a passenger terminal point coordinate, a driver starting point coordinate and a driver terminal point coordinate;
determining a directed line segment pointing from the passenger start coordinate to the passenger end coordinate as a passenger route and a directed line segment pointing from the driver start coordinate to the driver end coordinate as a driver route;
selecting a first passenger route from the passenger routes and selecting a first driver route from the driver routes, wherein an included angle value between the first passenger route and the first driver route is smaller than a preset included angle value;
selecting a second passenger route from the first passenger route and a second driver route from the first driver route, the projection of the second passenger route and the projection of the second driver route at least partially overlapping;
selecting a third passenger route from the second passenger routes and a third driver route from the second driver routes, the additional distance between the third passenger route and the third driver route being less than the length of the third driver route.
Further, the method further comprises:
if a plurality of third passenger routes exist and/or a plurality of third driver routes exist, calculating a direct road coefficient between the third passenger route and the third driver route according to a starting point distance between the third passenger route and the third driver route, a destination point distance between the third passenger route and the third driver route, a first included angle cosine value between the third driver route, the third driver route and the third driver route, a second included angle cosine value between the starting point distance and the third driver route and a third included angle cosine value between the destination point distance and the third driver route;
and determining a third passenger route and a third driver route corresponding to the road following coefficient with the maximum value as a target passenger route and a target driver route.
Further, an included angle value between the first passenger route and the first driver route is smaller than a preset included angle value, and the method comprises the following steps:
and the cosine value of a fourth included angle between the first passenger route and the first driver route is greater than or equal to the cosine value of a preset included angle.
Further, at least a partial overlap between the second passenger route and the second driver route includes:
in case the second passenger route and the second driver route are in the same coordinate system, at least a partial overlap between the abscissa projection of the second passenger route and the abscissa projection of the second driver route and/or at least a partial overlap between the ordinate projection of the second passenger route and the ordinate projection of the second driver route.
Further, an additional distance between the third passenger route and the third driver route is less than a length of the third driver route, including:
and calculating the extra distance according to a starting point distance between the third passenger route and the third driver route, an ending point distance between the third passenger route and the third driver route, a second included angle cosine value between the starting point distance and the third driver route and a third included angle cosine value between the ending point distance and the third driver route, wherein the extra distance is smaller than the length of the third driver route.
In a second aspect, an embodiment of the present invention provides a route determining apparatus, where the apparatus includes:
a first obtaining module: the system comprises a passenger acquisition module, a driver acquisition module and a driver acquisition module, wherein the passenger acquisition module is used for acquiring a passenger starting point coordinate, a passenger destination coordinate, a driver starting point coordinate and a driver destination coordinate;
a first confirmation module: for determining a directed line segment pointing from the passenger start coordinate to the passenger end coordinate as a passenger route and a directed line segment pointing from the driver start coordinate to the driver end coordinate as a driver route;
a first selection module: the passenger route selection device is used for selecting a first passenger route from the passenger routes and a first driver route from the driver routes, and an included angle value between the first passenger route and the first driver route is smaller than a preset included angle value;
a second selecting module: for selecting a second passenger route from the first passenger route and a second driver route from the first driver route, the projection of the second passenger route and the projection of the second driver route at least partially overlapping;
a third selecting module: for selecting a third passenger route from said second passenger routes and a third driver route from said second driver routes, the additional distance between said third passenger route and said third driver route being less than the length of said third driver route.
Further, the apparatus further comprises:
a first calculation module: if a plurality of third passenger routes exist and/or a plurality of third driver routes exist, calculating a direct road coefficient between the third passenger route and the third driver route according to a starting point distance between the third passenger route and the third driver route, a destination point distance between the third passenger route and the third driver route, a first included angle cosine value between the third driver route, the third passenger route and the third driver route, a second included angle cosine value between the starting point distance and the third driver route, and a third included angle cosine value between the destination point distance and the third driver route;
and the fourth selection module is used for determining a third passenger route and a third driver route corresponding to the road following coefficient with the maximum value as a target passenger route and a target driver route.
Further, an included angle value between the first passenger route and the first driver route is smaller than a preset included angle value, and the method comprises the following steps:
and the cosine value of a fourth included angle between the first passenger route and the first driver route is greater than or equal to the cosine value of a preset included angle.
Further, at least a partial overlap between the second passenger route and the second driver route includes:
in case the second passenger route and the second driver route are in the same coordinate system, at least a partial overlap between the abscissa projection of the second passenger route and the abscissa projection of the second driver route and/or at least a partial overlap between the ordinate projection of the second passenger route and the ordinate projection of the second driver route.
Further, an additional distance between the third passenger route and the third driver route is less than a length of the third driver route, including:
and calculating the extra distance according to a starting point distance between the third passenger route and the third driver route, an ending point distance between the third passenger route and the third driver route, a second included angle cosine value between the starting point distance and the third driver route and a third included angle cosine value between the ending point distance and the third driver route, wherein the extra distance is smaller than the length of the third driver route.
The route determining method and device provided by the embodiment of the invention comprise the following steps: obtaining a passenger starting point coordinate, a passenger terminal point coordinate, a driver starting point coordinate and a driver terminal point coordinate; determining a directed line segment pointing from the passenger starting point coordinate to the passenger destination coordinate as a passenger route, and determining a directed line segment pointing from the driver starting point coordinate to the driver destination coordinate as a driver route; selecting a first passenger route from the passenger routes and selecting a first driver route from the driver routes, wherein an included angle value between the first passenger route and the first driver route is smaller than a preset included angle value; selecting a second passenger route from the first passenger route and a second driver route from the first driver route, the projection of the second passenger route and the projection of the second driver route at least partially overlapping; a third passenger route is selected from the second passenger routes and a third driver route is selected from the second driver routes, the additional distance between the third passenger route and the third driver route being less than the length of the third driver route. In the invention, the driving routes of the driver and the passengers are simplified into directed line segments, and the included angle value, the overlapping degree and the extra distance between the driving routes of the passengers and the driver are respectively compared and calculated, so that the driving routes of the driver and the passenger meeting the matching conditions are quickly selected, the processing flow of the man-vehicle matching process is simplified, the calculated amount is reduced, and the matching efficiency of the driver and the passenger is improved.
Drawings
FIG. 1 is a flow chart illustrating steps of a route determination method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of an included angle between paths according to an embodiment of the present invention;
FIG. 3 is a flow chart illustrating steps of another route determination method according to an embodiment of the present invention;
FIG. 4 is a schematic projection of a route according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of relative positions between routes according to an embodiment of the present invention;
fig. 6 is a block diagram of a route confirmation apparatus according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention can be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
Referring to fig. 1, a flow chart illustrating steps of a route determination method according to an embodiment of the present invention is shown.
Step 101, obtaining a passenger starting point coordinate, a passenger terminal point coordinate, a driver starting point coordinate and a driver terminal point coordinate.
In the embodiment of the invention, when a passenger has a business demand of using the windward vehicle, the passenger can input the travel information through the passenger client, and when the passenger confirms to release the travel information of the passenger, the passenger client uploads the travel information of the passenger to the server through the network; when the driver has the business requirement of using the tailwind wheel, the driver inputs the journey information at the driver client, and when the driver confirms to release the journey information of the driver, the driver client uploads the journey information of the driver to the server through the network. The server receives the driver trip information transmitted from the driver client, and the server receives the passenger trip information transmitted from the passenger client.
In one implementation, the trip information may include: departure place longitude and latitude, destination longitude and latitude and departure time. The server respectively obtains the departure place longitude and latitude, the destination longitude and latitude of the passenger and the departure place longitude and latitude and the destination longitude and latitude of the driver from the passenger travel information and the driver travel information. Determining the longitude and latitude of the departure place of the passenger as the coordinates of the starting point of the passenger, and determining the longitude and latitude of the destination of the passenger as the coordinates of the destination of the passenger; and determining the longitude and latitude of the departure place of the driver as the coordinates of the start point of the driver and determining the longitude and latitude of the destination of the driver as the coordinates of the destination of the driver.
Preferably, the passenger trip information may further include: the number of people going out, vehicle requirements and travel requirements; the driver trip information may further include: may carry the number of people, passenger requirements, and travel requirements. Before the step of acquiring the departure place longitude and latitude, the destination longitude and latitude of the passenger, the departure place longitude and latitude of the driver and the destination longitude and latitude of the driver from the passenger trip information and the driver trip information respectively, the server can match the departure time, the number of people going out, the vehicle requirement and the trip requirement of the passenger with the acquired driver trip information, and can match the departure time, the number of people carrying the passenger, the requirement of the passenger and the trip requirement with the acquired passenger trip information. The server can mark the passenger meeting all the matching conditions as a potential passenger, mark the driver meeting all the matching conditions as a potential driver, acquire the departure place longitude and latitude of the passenger and the destination longitude and latitude of the passenger from the travel information of the potential passenger, and acquire the departure place longitude and latitude of the driver and the destination longitude and latitude of the passenger from the travel information of the potential driver.
The potential passenger and the potential driver are selected by the server in priority, the range of the passenger and the driver which need to be calculated by the server can be preliminarily reduced, and the problem that the passenger and the driver are not matched because of other reasons when the passenger journey and the driver journey are consistent is avoided.
Specifically, for example, the trip information issued by the passenger a is: the departure time is 2020, 4, 16, 11 points, the departure place (108.893698: 34.253024), the destination (109.265004: 34.384962), the trip 2, the middle-grade vehicle and the full-range high speed. The travel information issued by the driver A is as follows: the departure time is 2020, 4, 16, 10 o' clock, 01 minutes, the departure place (108.844776: 34.215486), the destination (110.066759: 34.50996), 4 people can be carried, the middle-grade vehicle can be carried, and the whole journey is high-speed. The journey information issued by the driver B is as follows: the departure time is 2020, 4, 16, 06, 18 minutes, the departure place (108.928822: 34.226292), the destination (109.235988: 34.659878), 2 people can be carried, the vehicle is in a low-grade state, and no high speed exists in the whole process.
When the potential passenger and the potential driver are selected by the server, the departure time, the passenger requirement and the travel requirement of the driver B do not meet the travel information of the passenger A, so that the passenger A and the driver A are marked as the potential passenger and the potential driver by the server, and the start point coordinate and the end point coordinate of the passenger A and the start point coordinate and the end point coordinate of the driver A are respectively obtained.
Further, the passenger trip information and the driver trip information may also include other information, and the embodiment is not further limited.
In an embodiment of the invention, one passenger route and one driver route may be referred to as a combination, since in real life passengers belong to customers relative to drivers. Therefore, for the convenience of understanding, in the embodiment of the present invention, passengers may be taken as matching subjects, that is, when the server determines all combinations, a certain passenger trip information is preferentially selected, the passenger trip information is combined with each driver trip information, and then the combination of each passenger trip information and all driver trip information is sequentially obtained. In addition, in the embodiment of the invention, the matching subject is not considered, and only through the service requirement, the combination comprising the passenger route and the driver route can be established.
Step 102, determining a directional line segment pointing from the passenger start coordinate to the passenger end coordinate as a passenger route, and determining a directional line segment pointing from the driver start coordinate to the driver end coordinate as a driver route.
In the embodiment of the present invention, the latitude and longitude information of the departure place and the destination may be regarded as a binary (longitude; latitude; lattude), for example, the departure place of the driver is a1, and the latitude and longitude information of a1 is (a 1)long:A1lat) It can be regarded as the point A1 in a certain coordinate system, and the abscissa of the point A1 is A1longThe ordinate of the point A1 is A1lat(ii) a The driver destination is B1, and the longitude and latitude information of B1 is (B1)long:B1lat) It can be regarded as a point B1 in a certain coordinate system, and the abscissa of the point B1 is B1longThe ordinate of the point B1 is B1lat. The server determines the directional line segment from the driver starting point coordinate to the driver end point coordinate as the driver route, and then determines the driver route as
Figure GDA0002962589330000081
Optionally, driver routes
Figure GDA0002962589330000082
Can also be understood as a vector
Figure GDA0002962589330000083
Further, for example, if the passenger starts from a place a2, the latitude and longitude information of a2 is (a 2)long:A2lat) It can be regarded as the point A2 in a certain coordinate system, and the abscissa of the point A2 is A2longThe ordinate of the point A2 is A2lat(ii) a The passenger destination is B2, and the longitude and latitude information of B2 is (B2)long:B2lat) It can be regarded as a point B2 in a certain coordinate system, and the abscissa of the point B2 is B2longThe ordinate of the point B2 is B2lat. The server will start coordinates from the passengerDetermining the passenger route as the directional line segment pointing to the passenger terminal coordinate
Figure GDA0002962589330000084
Optionally, passenger routes
Figure GDA0002962589330000085
Can also be understood as a vector
Figure GDA0002962589330000086
In the step, the actual travel routes of passengers and drivers are converted into directed line segments, so that the driving path planned by a map service provider is prevented from being used as a calculation object, the data volume of the calculation object is greatly reduced, interference factors caused by variable real environments are directly omitted, and the effects of simplifying the whole process and reducing the calculation amount can be achieved.
Step 103, selecting a first passenger route from the passenger routes and selecting a first driver route from the driver routes, wherein an included angle value between the first passenger route and the first driver route is smaller than a preset included angle value.
In the embodiment of the invention, when the passenger route and the driver route are understood as directed line segments, the Included angle between the passenger route and the driver route can be the Included angle from the passenger route to the driver route, the Included angle is generally marked as { |0 ≦ θ ≦ π }.
Alternatively, when the passenger route and the driver route are understood as vectors, for example, the first vector is the passenger route, the second vector is the driver route, and when a line segment of the first vector rotates clockwise to coincide with a line segment of the second vector, the angle covered is referred to as an included angle from the first vector to the second vector. The Included angle is generally marked as Included angle, and the interval range of the Included angle is { |0 ≦ θ ≦ π }. The angle between the passenger route and the driver route is the angle between the passenger route and the driver route when the line segment of the passenger route rotates clockwise to coincide with the line segment of the driver route.
In this step, reference is made to fig. 2, wherein,
Figure GDA0002962589330000087
in order to be the route of the driver,
Figure GDA0002962589330000088
for passenger routes, passenger routes
Figure GDA0002962589330000091
And driver route
Figure GDA0002962589330000092
All are directed line segments, therefore, the passenger route can be recorded
Figure GDA0002962589330000093
And driver route
Figure GDA0002962589330000094
The angle formed by the intersection of the extension lines between the two is theta.
Alternatively, referring to fig. 2, wherein,
Figure GDA0002962589330000095
in order to be the route of the driver,
Figure GDA0002962589330000096
for passenger routes, passenger routes
Figure GDA0002962589330000097
And driver route
Figure GDA0002962589330000098
Are all vectors, and therefore, can route passengers
Figure GDA0002962589330000099
And driver route
Figure GDA00029625893300000910
The included angle formed by the intersection of the extension lines is recorded as the driver route
Figure GDA00029625893300000911
To the passenger route
Figure GDA00029625893300000912
Angle theta.
Specifically, the similarity degree of the two routes can be expressed by the "road following degree", and the higher the similarity degree is, the more convenient the driver is to pick up the passenger, and the lower the cost is. The smaller the included angle between the passenger route and the driver route is, the more consistent the directions of the directed line segments of the passenger route and the driver route are, the more consistent the directions of the passenger journey and the driver journey in real life are, and the higher the following road degree is; the larger the included angle between the passenger route and the driver route is, the more inconsistent the directions of the directed line segments of the passenger route and the driver route are, and the more opposite the directions of the passenger travel and the driver travel in real life are, the lower the degree of following the road is. Therefore, the passengers and drivers which meet the road conditions can be further selected from a large amount of data of the passengers and the drivers by judging the included angles between the passenger routes and the driver routes.
In the embodiment of the invention, an included angle value between the first passenger route and the first driver route is smaller than a preset included angle value, wherein the preset included angle value is alpha, and an interval range of the preset included angle value alpha is { alpha |0 ≦ alpha ≦ pi }. The server can determine the specific angle value of the included angle theta between each passenger route and the driver route combination by calculating the coordinates of the end points of the passenger route and the driver route, and compares the included angle theta of each combination with a preset included angle value alpha to determine the included angle theta smaller than the preset included angle value alpha. And determining a passenger route corresponding to the included angle theta smaller than the preset included angle value alpha as a first passenger route, and determining a driver route corresponding to the included angle theta smaller than the preset included angle value alpha as a first driver route.
Specifically, for example, the combination 1 includes a passenger a route and a driver a route, the combination 2 includes a passenger a route and a driver b route, and the server takes a ride according to the ridingCalculating the included angle theta between the first line of the passenger bus and the first line of the driver bus1The server calculates an included angle theta according to the first passenger route and the second driver route2Wherein the angle theta1Is 30 DEG, and the included angle theta2Is 95 deg., and the preset included angle value alpha is 90 deg.. Due to the included angle theta1Less than a predetermined included angle value alpha and an included angle theta2Greater than the preset pinch angle value α, and thus, the passenger first course is determined as the first passenger first course, and the driver first course is determined as the first driver first course.
Further, for example, the combination 3 includes a first passenger route and a first driver route, the combination 4 includes a second passenger route and a second driver route, and the server calculates the included angle θ according to the first passenger route and the first driver route3The server calculates an included angle theta according to the passenger second route and the driver second route4Wherein the angle theta3Is 30 DEG, and the included angle theta4Is 95 deg., and the preset included angle value alpha is 90 deg.. Due to the included angle theta3Less than a predetermined included angle value alpha and an included angle theta4Greater than the preset pinch angle value α, and thus, the passenger first course is determined as the first passenger first course, and the driver first course is determined as the first driver first course.
Further, the selection of the preset included angle value may be set according to a specific region, a specific time period, and a specific service requirement, which is not limited in the embodiment of the present invention.
In the step, the server can obtain the included angle value of the driver route and the passenger route in the combination through calculation and compare the included angle value with the preset included angle value, so that the combination with higher forward road degree can be selected quickly. Even if a large number of combinations needing to be calculated exist in the server, the combinations which do not accord with the included angle condition can be quickly screened through included angle matching, and the effects of simplifying the whole process and reducing the calculated amount are achieved.
And 104, selecting a second passenger route from the first passenger route, and selecting a second driver route from the first driver route, wherein the projection of the second passenger route and the projection of the second driver route are at least partially overlapped.
After the filtering of step 103, there is also a case where the relative positional distance between the routes is too large even if the directions of the first passenger route and the first driver route are similar. For example, the first passenger first route is from three northern rings to three northern rings, and the first driver first route is from two southern rings to three southern rings, and although the first passenger first route and the first driver first route are in the same direction, and the included angle between the routes is smaller than the preset included angle value, the relative position distance between the routes is too large.
Specifically, the smaller the relative position distance between the first passenger route and the first driver route, the higher the degree of following the road therebetween, and therefore, the degree of following the road between the first passenger route and the first driver route can be determined by whether or not there is an overlapping portion between the first passenger route and the first driver route.
In this step, the server may establish a cartesian rectangular coordinate system, determine the midpoint position of the first passenger route as the center position, determine the length value of the first passenger route as the radius value, make a circle, determine the range included in the circle as the range of the first passenger route, and similarly determine the range of the first driver route. The server determines whether there is an overlap between the first passenger route range and the first driver route range. If the overlapping range exists, the server may determine the first passenger route corresponding to the first passenger route range as the second passenger route, and may determine the first driver route corresponding to the first driver route range as the second driver route.
Further, the first passenger route range and the first driver route range may also be set according to specific regions, time periods and business requirements, which is not limited by the embodiment of the present invention.
In this step, the server can quickly select a combination with a higher degree of following the road by judging whether there is an overlapping portion of the first driver route and the first passenger route in the combination. Even if a large number of combinations needing to be calculated exist in the server, the combinations which do not accord with the overlapping conditions among the routes can be quickly screened through the conditions of overlapping judgment, and the effects of simplifying the whole process and reducing the calculated amount are achieved.
And 105, selecting a third passenger route from the second passenger routes and selecting a third driver route from the second driver routes, wherein the additional distance between the third passenger route and the third driver route is less than the length of the third driver route.
Specifically, a tailwind operation is completed once, and the complete distance that the driver actually needs to travel is that the driver starts from the driver departure place, travels to the passenger departure place in advance, receives the passenger, travels to the passenger destination, and then travels to the driver destination after the passenger is delivered. In the complete journey, the driver will travel a part of the distance in addition in order to pick up the passenger, and the distance that should travel in addition is not in the passenger's trip plan, and the passenger will not pay for the distance that should travel in addition, so, for the driver, the shorter this distance is, the more easily the driver will accept the passenger's trip information.
After filtering in step 104, the second passenger route and the second driver route in the combination both belong to a range where the relative position distance can satisfy the business requirement. Further, the server may calculate an additional distance between the second passenger route and the second driver route to pick out passenger trip information that is more acceptable to the driver.
In this step, the server may calculate an additional distance between the second passenger route and the second driver route, compare the additional distance with the length of the second driver route, determine the second passenger route corresponding to the additional distance less than the length of the second passenger route as a third passenger route, and determine the second driver route corresponding to the additional distance less than the length of the second driver route as a third driver route.
Further, the additional distance between the second passenger route and the second driver route may be compared with a preset additional distance, and the preset additional distance may be set according to a specific region, a specific time period, and a specific business requirement, which is not limited in the embodiment of the present invention.
In this step, the server may quickly pick out passenger trip information that is more acceptable to the driver by calculating an additional distance between the second passenger route and the second driver route and comparing the additional distance to the length of the second driver route. Even if a large number of combinations needing to be calculated exist in the server, the combinations with larger extra distances can be quickly screened through the condition of the extra distances, and finally the combinations meeting the actual business requirements are selected, so that the effects of simplifying the whole process and reducing the calculated amount are achieved.
After step 105, the server may send the third passenger route to the corresponding driver client, sending the third driver route to the corresponding passenger client. If no passenger route meets the selection condition of the third passenger route, the server sends a message that no suitable matching object exists currently to the corresponding driver client; and if no driver route meets the selection condition of the third driver route, the server sends a message of 'no suitable matching object currently' to the corresponding passenger client.
To sum up, a route determining method provided by the embodiment of the present invention includes: obtaining a passenger starting point coordinate, a passenger terminal point coordinate, a driver starting point coordinate and a driver terminal point coordinate; determining a directed line segment pointing from the passenger starting point coordinate to the passenger destination coordinate as a passenger route, and determining a directed line segment pointing from the driver starting point coordinate to the driver destination coordinate as a driver route; selecting a first passenger route from the passenger routes and selecting a first driver route from the driver routes, wherein an included angle value between the first passenger route and the first driver route is smaller than a preset included angle value; selecting a second passenger route from the first passenger route and a second driver route from the first driver route, the projection of the second passenger route and the projection of the second driver route at least partially overlapping; a third passenger route is selected from the second passenger routes and a third driver route is selected from the second driver routes, the additional distance between the third passenger route and the third driver route being less than the length of the third driver route. In the invention, the driving routes of the driver and the passengers are simplified into directed line segments, the included angle value, the overlapping degree and the extra distance between the passenger route and the driver route are respectively compared and calculated, and the passenger route and the driver route which meet the matching condition are quickly selected.
In addition, because the server only calculates for two directed line segments in each step, the calculation amount is very small, and even when a large number of combinations to be calculated exist in the server, all the combination selection work can be completed in a short time. Therefore, the processing flow of the man-vehicle matching process is simplified, the calculated amount is reduced, meanwhile, the calculation time of the server is shortened due to the reduction of the calculated amount, the problem that the difference between the time for generating the driver path for planning by the network car booking service provider and the time for generating the passenger path for planning by the network car booking service provider is large is further solved, and the matching efficiency of the driver and the passenger is improved.
Referring to fig. 3, a flow chart illustrating steps of another route determination method according to an embodiment of the present invention is shown.
Step 201, obtaining a passenger starting point coordinate, a passenger end point coordinate, a driver starting point coordinate and a driver end point coordinate.
This step may specifically refer to step 101, which is not described herein again.
Step 202, determining a directional line segment pointing from the passenger start coordinate to the passenger end coordinate as a passenger route, and determining a directional line segment pointing from the driver start coordinate to the driver end coordinate as a driver route.
This step may specifically refer to step 102, which is not described herein again.
Step 203, a first passenger route is selected from the passenger routes, and a first driver route is selected from the driver routes.
And the cosine value of a fourth included angle between the first passenger route and the first driver route is greater than or equal to the cosine value of a preset included angle.
In the field of mathematics, the angle value can be calculated through a trigonometric function to obtain a unique numerical value, and when the range of the included angle is { theta |0 is more than or equal to theta and less than or equal to pi }, the cosine function (cos) value is monotonically decreased along with the increase of theta. Therefore, the server can compare the trigonometric function values of the included angles, determine the magnitude of the trigonometric function values and indirectly determine the magnitude of the angle values.
In this step, the server may calculate the cosine value of the angle between the passenger route and the driver route by using the end point coordinates of the passenger route and the driver route, and the calculation formula is as follows:
Figure GDA0002962589330000131
wherein: cos θ — cosine of the angle between the passenger and driver routes;
A1long-an abscissa value of the driver's origin;
A1lat-an ordinate value of the driver's place of departure;
B1long-an abscissa value of the driver destination;
B1lat-an ordinate value of the driver destination;
A2long-an abscissa value of the passenger's origin;
A2lat-a longitudinal coordinate value of the passenger's place of departure;
B2long-the abscissa value of the passenger destination;
B2lat-an ordinate value of the passenger destination;
specifically, the preset included angle value is α, that is, the cosine value of the preset included angle is cos α. The server may compare an included angle cosine value cos θ between the passenger route and the driver route with a preset included angle cosine value cos α, and if the included angle cosine value cos θ is greater than or equal to the preset included angle cosine value cos α, the server may determine the passenger route corresponding to the included angle cosine value cos θ greater than or equal to the preset included angle cosine value cos α as the first passenger route, and determine the driver route corresponding to the included angle cosine value cos θ greater than or equal to the preset included angle cosine value cos α as the first driver route.
Specifically, for example, the combination 1 includes a passenger first route and a driver first route, wherein the longitude and latitude of the departure place of the passenger first route is (108; 34), the longitude and latitude of the destination of the passenger first route is (109; 35), the longitude and latitude of the departure place of the driver first route is (108; 33), the longitude and latitude of the destination of the driver first route is (110; 34), and the cosine value cos of the preset included angle is set to be 0. And the server substitutes the data of the passenger first route and the driver first route into the formula for calculation to obtain an included angle cosine value cos theta between the passenger first route and the driver first route of 0.447. Since 0.447 is greater than 0, the server may determine the passenger first route as the first passenger first route and the driver first route as the first driver first route.
In the embodiment of the invention, in order to meet certain calculation accuracy, three digits after the decimal point can be taken as an effective digit in all calculation results.
In the step, the server can obtain the cosine value of the included angle between the driver route and the passenger route in the combination through calculation and compare the cosine value with the preset cosine value of the included angle, so that the combination with higher forward road degree can be selected quickly. Even if a large number of combinations needing to be calculated exist in the server, the combinations which do not accord with the conditions of the cosine values of the included angles can be removed by carrying out quick screening through the matching of the cosine values of the included angles, so that the effects of simplifying the whole process and reducing the calculated amount are achieved.
Step 204, selecting a second passenger route from the first passenger routes, and selecting a second driver route from the first driver routes.
Wherein, in case the second passenger route and the second driver route are in the same coordinate system, there is at least a partial overlap between the abscissa projection of the second passenger route and the abscissa projection of the second driver route, and/or there is at least a partial overlap between the ordinate projection of the second passenger route and the ordinate projection of the second driver route.
Specifically, the smaller the relative position distance between the first passenger route and the first driver route, the higher the degree of the two-way following. Therefore, the server can further select the first passenger route and the first driver route with high degree of following the road by establishing a Cartesian rectangular coordinate system and projecting the routes on the coordinate axes.
Specifically, the latitude and longitude information of the departure place and the destination can be regarded as a binary (longitude: latitude). Therefore, in the embodiment of the present invention, the server may construct a cartesian rectangular coordinate system including the first passenger route and the first driver route, and the abscissa of the coordinate system is longitude and the ordinate of the coordinate system is latitude.
In this step, referring to fig. 4, first, the server routes the first passengers respectively
Figure GDA0002962589330000151
And a first driver route
Figure GDA0002962589330000152
Projecting the projection on the abscissa long, and respectively routing the first passenger
Figure GDA0002962589330000153
And a first driver route
Figure GDA0002962589330000154
Projected on the ordinate lat. Wherein the first passenger route
Figure GDA0002962589330000155
The projection onto the abscissa long is A2longB2longFirst passenger route
Figure GDA0002962589330000156
The projection onto the ordinate lat is A2lat B2lat(ii) a First driver route
Figure GDA0002962589330000157
The projection onto the abscissa long is A1long B1longFirst driver route
Figure GDA0002962589330000158
The projection onto the ordinate lat is A1latB1lat. The server then judges the route of the first passenger on the horizontal coordinate long
Figure GDA0002962589330000159
Projection A2 oflong B2longWhether to travel with the first driver
Figure GDA00029625893300001510
Projection A1 oflongB1longOverlapping, first passenger route on ordinate lat
Figure GDA00029625893300001511
Projection A2 oflatB2latWhether to travel with the first driver
Figure GDA00029625893300001512
Projection A1 oflatB1latAnd (4) overlapping.
If the projected portion of the first passenger route and the projected portion of the first driver route partially overlap on an arbitrary coordinate axis, the server may determine the first passenger route as the second passenger route and the first driver route as the second driver route.
Preferably, the server may determine whether there is a projection overlap area between the two paths by an endpoint value of the first passenger route and the first driver route. And if the coordinate values of the two end points of the first passenger route are both more than or equal to or less than the coordinate values of the two end points of the first driver route, the first passenger route and the first driver route have no projection overlapping area.
The judgment formula is as follows:
((Min(A2long,B2long)≥Max(A1long,B1long))or(Max(A2long,B2long)≤Min(A1long,B1long)))and((Min(A2lat,B2lat)≥Max(A1lat,B1lat))or(Max(A2lat,B2lat)≤Min(A1lat,B1lat)))
wherein: max is a maximum function, and the larger parameter value of the two parameters is returned;
min is a minimum function, and the smaller parameter value of the two parameters is returned;
or-logical or operator, one of the two conditions is true;
and-logical and operator, two conditions must be satisfied simultaneously;
A1long-an abscissa value of the origin of the first driver;
A1lat-a longitudinal coordinate value of the origin of the first driver;
B1long-an abscissa value of the first driver destination;
B1lat-an ordinate value of the first driver destination;
A2long-an abscissa value of the origin of the first passenger;
A2lat-a longitudinal coordinate value of the origin of the first passenger;
B2long-an abscissa value of the first passenger destination;
B2lat-an ordinate value of the first passenger destination;
specifically, the server may bring the endpoint values of the first passenger route and the first driver route into a judgment formula for calculation, and if the judgment formula is established, the first passenger route and the first driver route do not have a projection overlapping area; if the determination formula is not satisfied, the first passenger route and the first driver route have a projection overlap region, and the server may determine the first passenger route as the second passenger route and the first driver route as the second driver route.
Specifically, for example, the combination 1 includes a first passenger first route and a first driver first route, wherein the longitude and latitude of the departure place of the first passenger first route is (108; 34), the longitude and latitude of the destination of the first passenger first route is (109; 35), the longitude and latitude of the departure place of the first driver first route is (108; 33), and the longitude and latitude of the destination of the first driver first route is (110; 34). And the server substitutes the data of the first passenger first route and the first driver first route into the formula for calculation to obtain the judgment formula which is not true. Since the determination formula does not hold, the server may determine the first passenger first route as the second passenger first route and the first driver first route as the second driver first route.
In this step, the server can quickly select a combination with a higher degree of following the road by judging whether there is an overlapping portion of the first driver route and the first passenger route on the coordinate axis in the combination. Even if a large number of combinations needing to be calculated exist in the server, the combinations which do not accord with the overlapping conditions among the routes can be quickly screened through the conditions of overlapping judgment, and the effects of simplifying the whole process and reducing the calculated amount are achieved.
Step 205, selecting a third passenger route from the second passenger routes and selecting a third driver route from the second driver routes.
Wherein the extra distance calculated according to a starting point distance between the third passenger route and the third driver route, an ending point distance between the third passenger route and the third driver route, a second included angle cosine value between the starting point distance and the third driver route, and a third included angle cosine value between the ending point distance and the third driver route is smaller than the length of the third driver route.
In particular, reference may be made to fig. 5. The complete journey that the driver actually needs to travel after completing the one-trip operation is that the driver starts from a driver departure place A1, firstly travels to a passenger departure place A2, then travels to a passenger destination B2 after receiving the passenger, and then travels to a driver destination B1 after delivering the passenger. During this complete journey, the driver will travel an additional distance to pick up the passenger, which is: "| A1A2| - | A1A2 '| + | B2B1| - | B2' B1 |".
The judgment formula for judging whether the extra distance is smaller than the second driver route is as follows:
(1-cosθ1)×|A1A2|+(1-cosθ2)×|B2B1|≥|A1B1|
wherein: cos θ1-cosine of the angle between the starting point spacing and the second driver route;
cosθ2-a cosine of the angle between the end point separation and the second driver route;
| A1A2| -distance of starting point spacing;
| B2B1| -distance of end-point spacing;
| A1B1| -distance of the second driver's route;
as shown in fig. 5, θ1Is between the starting pointsThe value of the angle between the distance and the second driver's route, theta2For the value of the angle between the terminal separation and the second driver's route, A1B1 is the second driver's route, A2B2 is the second passenger's route, and A2 ' and B2 ' are the assistance points, where A2A2 ' is perpendicular to A1B1 and B2B2 ' is perpendicular to A1B 1.
Specifically, the server may substitute the starting point distance, the ending point distance, the cosine value of the included angle between the starting point distance and the second driver route, and the cosine value of the included angle between the ending point distance and the second driver route into the determination formula, and calculate and determine whether the additional distance between the second passenger route and the second driver route is less than the length of the second driver route. If the determination formula is established, the server may determine the second passenger route as a third passenger route and the second driver route as a third driver route.
Specifically, for example, the combination 1 includes a second passenger first route and a second driver first route, wherein the longitude and latitude of the departure place of the second passenger first route is (108; 34), the longitude and latitude of the destination of the second passenger first route is (109; 35), the longitude and latitude of the departure place of the second driver first route is (108; 33), and the longitude and latitude of the destination of the second driver first route is (110; 34). And the server substitutes the data of the first passenger route and the first driver route into the formula for calculation to obtain the establishment of a judgment formula. Since the determination formula is established, the server may determine the second passenger first route as the third passenger first route and the second driver first route as the third driver first route.
In this step, the server may quickly pick out passenger trip information that is more acceptable to the driver by calculating an additional distance between the second passenger route and the second driver route and comparing the additional distance to the length of the second driver route. Even if a large number of combinations needing to be calculated exist in the server, the combinations with larger extra distances can be quickly screened through the condition of the extra distances, and finally the combinations meeting the actual business requirements are selected, so that the effects of simplifying the whole process and reducing the calculated amount are achieved.
Optionally, if there are a plurality of the third passenger routes and/or a plurality of the third driver routes, step 205 may further include:
step 206, calculating a road coefficient between the third passenger route and the third driver route according to a starting point distance between the third passenger route and the third driver route, an ending point distance between the third passenger route and the third driver route, a first included angle cosine value between the third passenger route and the third driver route, a second included angle cosine value between the starting point distance and the third driver route, and a third included angle cosine value between the ending point distance and the third driver route.
After step 205, the existing third passenger routes and the third driver routes all have higher forward route degrees, and in order to more accurately select the optimal combination from the multiple combinations, the present invention introduces a forward route coefficient, wherein the forward route coefficient is a functional relationship including a cosine value of an included angle between the third passenger route and the third driver route and an extra distance between the third passenger route and the third driver route, and two constants are added for flexibly adjusting the forward route coefficient according to specific region, time period and service requirements, so that the calculation result is more accurate and more conforms to the application scene of the actual life.
The formula for calculating the forward coefficient is as follows:
Figure GDA0002962589330000191
wherein: s is the forward coefficient;
a is a proportionality coefficient, which is used for adjusting the weight values of the sub-items under different service scenes, and is usually 0.5;
c is a precision coefficient used for adjusting the accuracy of the subitem under different service scenes, and is usually 0.5;
cos θ — cosine value of the included angle between the third passenger route and the third driver route;
cosθ1-cosine of the angle between the starting point spacing and the third driver's route;
cosθ2-cosine of the angle between the end point distance and the third driver route;
| A1A2| -distance of starting point spacing;
| B2B1| -distance of end-point spacing;
| A1B1| -distance of the third driver's route;
specifically, the server may calculate the cosine value of the included angle between the third passenger route and the third driver route, the cosine value of the included angle between the starting point distance and the third driver route, the cosine value of the included angle between the destination point distance and the third driver route, the distance between the starting point distance, the distance between the destination point distance, and the distance between the third driver route by substituting the above formulas, and obtain the forward road coefficient. The specific calculation method for obtaining each parameter through the coordinate value is not described herein again.
Specifically, for example, the combination 1 includes a third passenger route and a third driver route, where the distance between the starting points is 65, the distance between the ending points is 70, the distance between the third driver route is 140, the cosine value of the included angle between the third passenger route and the third driver route is 0.86, the cosine value of the included angle between the starting points and the third driver route is 0.5, the cosine value of the included angle between the ending points and the third driver route is 0.34, the proportionality coefficient is 0.5, and the precision coefficient is 0.45. The server substitutes the data into the formula to calculate, and the forward coefficient is 0.541.
In this step, the degree of the forward path is digitized, and a formula of a forward path coefficient is introduced. The server can substitute the data of the third passenger route and the third driver route into a formula for calculation, obtain the forward road coefficient, further refine the route determination conditions, and accurately select the combination with the highest forward road degree.
And step 207, determining a third passenger route and a third driver route corresponding to the road following coefficient with the maximum value as a target passenger route and a target driver route.
After step 206, the server obtains multiple sets of forward coefficients, specifically, the server compares all the forward coefficient values and determines the forward coefficient with the largest value. The server may determine the third passenger route corresponding to the highest-value road following coefficient as the target passenger, and determine the third driver route corresponding to the highest-value road following coefficient as the target driver.
Further, the server can send the target passenger to the corresponding driver client, and the driver client receives the information of the target passenger sent by the server and displays the information corresponding to the target passenger to the user; and sending the target driver to the corresponding passenger client, receiving the target driver information sent by the server by the passenger client, and displaying the information corresponding to the target driver to the user.
To sum up, a method and an apparatus for determining a route provided by the embodiments of the present invention include: obtaining a passenger starting point coordinate, a passenger terminal point coordinate, a driver starting point coordinate and a driver terminal point coordinate; determining a directed line segment pointing from the passenger starting point coordinate to the passenger destination coordinate as a passenger route, and determining a directed line segment pointing from the driver starting point coordinate to the driver destination coordinate as a driver route; selecting a first passenger route from the passenger routes and selecting a first driver route from the driver routes, wherein a cosine value of a fourth included angle between the first passenger route and the first driver route is greater than or equal to a preset included angle cosine value; selecting a second passenger route from the first passenger route and selecting a second driver route from the first driver route, wherein when the second passenger route and the second driver route are in the same coordinate system, the abscissa projection of the second passenger route and the abscissa projection of the second driver route are at least partially overlapped, and/or the ordinate projection of the second passenger route and the ordinate projection of the second driver route are at least partially overlapped; selecting a third passenger route from the second passenger routes and a third driver route from the second driver routes, wherein the additional distance between the third passenger route and the third driver route is less than the length of the third driver route; if a plurality of third passenger routes and/or a plurality of third driver routes exist, calculating a road coefficient between the third passenger routes and the third driver routes; and determining a third passenger route and a third driver route corresponding to the road following coefficient with the maximum value as a target passenger route and a target driver route. In the invention, the driving routes of the driver and the passenger are simplified into directed line segments, and the cosine value of the included angle of the driving routes, the overlapping degree of coordinate axis projection, the extra distance and the forward road coefficient are respectively compared and calculated, so that the passenger route and the driver route which meet the matching condition are quickly selected.
In addition, because the server only calculates for two directed line segments in each step, the calculation amount is very small, and even when a large number of combinations to be calculated exist in the server, all the combination selection work can be completed in a short time. Therefore, the processing flow of the man-vehicle matching process is simplified, the calculated amount is reduced, meanwhile, the calculation time of the server is shortened due to the reduction of the calculated amount, the problem that the difference between the time for generating the driver path for planning by the network car booking service provider and the time for generating the passenger path for planning by the network car booking service provider is large is further solved, and the matching efficiency of the driver and the passenger is improved.
On the basis of the above embodiment, the embodiment of the invention also provides a net appointment device.
Referring to fig. 6, a block diagram of a route confirmation device 30 according to an embodiment of the present invention is shown, and specifically includes the following modules:
the first obtaining module 301: the system comprises a passenger acquisition module, a driver acquisition module and a driver acquisition module, wherein the passenger acquisition module is used for acquiring a passenger starting point coordinate, a passenger destination coordinate, a driver starting point coordinate and a driver destination coordinate;
the first validation module 302: for determining a directed line segment pointing from the passenger start coordinate to the passenger end coordinate as a passenger route and a directed line segment pointing from the driver start coordinate to the driver end coordinate as a driver route;
the first selecting module 303: the passenger route selection device is used for selecting a first passenger route from the passenger routes and a first driver route from the driver routes, and an included angle value between the first passenger route and the first driver route is smaller than a preset included angle value;
the second selecting module 304: for selecting a second passenger route from the first passenger route and a second driver route from the first driver route, the projection of the second passenger route and the projection of the second driver route at least partially overlapping;
third selection module 305: for selecting a third passenger route from said second passenger routes and a third driver route from said second driver routes, the additional distance between said third passenger route and said third driver route being less than the length of said third driver route.
Optionally, the route confirmation apparatus of the present invention further includes:
the first calculation module 306: if a plurality of third passenger routes exist and/or a plurality of third driver routes exist, calculating a direct road coefficient between the third passenger route and the third driver route according to a starting point distance between the third passenger route and the third driver route, a destination point distance between the third passenger route and the third driver route, a first included angle cosine value between the third driver route, the third passenger route and the third driver route, a second included angle cosine value between the starting point distance and the third driver route, and a third included angle cosine value between the destination point distance and the third driver route;
and a fourth selecting module 307, configured to determine a third passenger route and a third driver route corresponding to the maximum road factor as a target passenger route and a target driver route.
Further, an included angle value between the first passenger route and the first driver route is smaller than a preset included angle value, and the method comprises the following steps: and the cosine value of a fourth included angle between the first passenger route and the first driver route is greater than or equal to the cosine value of a preset included angle.
Further, at least a partial overlap between the second passenger route and the second driver route includes: in case the second passenger route and the second driver route are in the same coordinate system, at least a partial overlap between the abscissa projection of the second passenger route and the abscissa projection of the second driver route and/or at least a partial overlap between the ordinate projection of the second passenger route and the ordinate projection of the second driver route.
Further, an additional distance between the third passenger route and the third driver route is less than a length of the third driver route, including: and calculating the extra distance according to a starting point distance between the third passenger route and the third driver route, an ending point distance between the third passenger route and the third driver route, a second included angle cosine value between the starting point distance and the third driver route and a third included angle cosine value between the ending point distance and the third driver route, wherein the extra distance is smaller than the length of the third driver route.
To sum up, a method and an apparatus for determining a route provided by the embodiments of the present invention include: obtaining a passenger starting point coordinate, a passenger terminal point coordinate, a driver starting point coordinate and a driver terminal point coordinate; determining a directed line segment pointing from the passenger starting point coordinate to the passenger destination coordinate as a passenger route, and determining a directed line segment pointing from the driver starting point coordinate to the driver destination coordinate as a driver route; selecting a first passenger route from the passenger routes and selecting a first driver route from the driver routes, wherein an included angle value between the first passenger route and the first driver route is smaller than a preset included angle value; selecting a second passenger route from the first passenger route and a second driver route from the first driver route, the projection of the second passenger route at least partially overlapping the projection of the second driver route; a third passenger route is selected from the second passenger routes and a third driver route is selected from the second driver routes, the additional distance between the third passenger route and the third driver route being less than the length of the third driver route. In the invention, the driving routes of the driver and the passengers are simplified into directed line segments, the included angle value, the overlapping degree and the extra distance between the passenger route and the driver route are respectively compared and calculated, and the passenger route and the driver route which meet the matching condition are quickly selected. Because the server only calculates two directed line segments in each step, the calculation amount is very small, and all combination selection work can be finished in a short time even when a large number of combinations to be calculated exist in the server. Therefore, the problems of complex overall flow and large calculated amount in the network car booking service caused by adopting a path matching method of sectional calculation are solved, meanwhile, the calculated amount is reduced, and the calculation time of the server is shortened, so that the problem that the difference between the time for generating the driver path for planning the driver by the network car booking service provider and the time for generating the passenger path for planning the passenger by the network car booking service provider is large is further solved, and the matching efficiency of the driver and the passenger is improved.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the method, the apparatus and the unit described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents and improvements made within the spirit and principle of the present invention are intended to be included within the scope of the present invention.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (8)

1. A method of route determination, the method comprising:
obtaining a passenger starting point coordinate, a passenger terminal point coordinate, a driver starting point coordinate and a driver terminal point coordinate;
determining a directed line segment pointing from the passenger start coordinate to the passenger end coordinate as a passenger route and a directed line segment pointing from the driver start coordinate to the driver end coordinate as a driver route;
selecting a first passenger route from the passenger routes and selecting a first driver route from the driver routes, wherein an included angle value between the first passenger route and the first driver route is smaller than a preset included angle value;
selecting a second passenger route from the first passenger route and a second driver route from the first driver route, the projection of the second passenger route and the projection of the second driver route at least partially overlapping;
selecting a third passenger route from the second passenger routes and a third driver route from the second driver routes, the additional distance between the third passenger route and the third driver route being less than the length of the third driver route;
wherein an additional distance between the third passenger route and the third driver route is less than a length of the third driver route, comprising:
and calculating the extra distance according to a starting point distance between the third passenger route and the third driver route, an ending point distance between the third passenger route and the third driver route, a second included angle cosine value between the starting point distance and the third driver route and a third included angle cosine value between the ending point distance and the third driver route, wherein the extra distance is smaller than the length of the third driver route.
2. The method of claim 1, further comprising:
if a plurality of third passenger routes exist and/or a plurality of third driver routes exist, calculating a direct road coefficient between the third passenger route and the third driver route according to a starting point distance between the third passenger route and the third driver route, a destination point distance between the third passenger route and the third driver route, a first included angle cosine value between the third driver route, the third driver route and the third driver route, a second included angle cosine value between the starting point distance and the third driver route and a third included angle cosine value between the destination point distance and the third driver route;
and determining a third passenger route and a third driver route corresponding to the road following coefficient with the maximum value as a target passenger route and a target driver route.
3. The method of claim 1, wherein the value of the included angle between the first passenger route and the first driver route is less than a preset included angle value, comprising:
and the cosine value of a fourth included angle between the first passenger route and the first driver route is greater than or equal to the cosine value of a preset included angle.
4. The method of claim 1, wherein the at least partial overlap between the second passenger route and the second driver route comprises:
in case the second passenger route and the second driver route are in the same coordinate system, at least a partial overlap between the abscissa projection of the second passenger route and the abscissa projection of the second driver route and/or at least a partial overlap between the ordinate projection of the second passenger route and the ordinate projection of the second driver route.
5. A route determination device, characterized in that the device comprises:
the first acquisition module is used for acquiring a passenger starting point coordinate, a passenger terminal point coordinate, a driver starting point coordinate and a driver terminal point coordinate;
a first confirmation module for determining a directed line segment pointing from the passenger start point coordinate to the passenger end point coordinate as a passenger route and determining a directed line segment pointing from the driver start point coordinate to the driver end point coordinate as a driver route;
the first selection module is used for selecting a first passenger route from the passenger routes and selecting a first driver route from the driver routes, and an included angle value between the first passenger route and the first driver route is smaller than a preset included angle value;
a second selection module for selecting a second passenger route from the first passenger route and a second driver route from the first driver route, the projection of the second passenger route and the projection of the second driver route at least partially overlapping;
a third selection module for selecting a third passenger route from the second passenger routes and a third driver route from the second driver routes, wherein an additional distance between the third passenger route and the third driver route is less than the length of the third driver route;
wherein the third selecting module is further configured to:
and calculating the extra distance according to a starting point distance between the third passenger route and the third driver route, an ending point distance between the third passenger route and the third driver route, a second included angle cosine value between the starting point distance and the third driver route and a third included angle cosine value between the ending point distance and the third driver route, wherein the extra distance is smaller than the length of the third driver route.
6. The apparatus of claim 5, further comprising:
a first calculating module, configured to calculate a direct road coefficient between the third passenger route and the third driver route according to a starting point distance between the third passenger route and the third driver route, a destination point distance between the third passenger route and the third driver route, a first included angle cosine value between the third passenger route and the third driver route, a second included angle cosine value between the starting point distance and the third driver route, and a third included angle cosine value between the destination point distance and the third driver route if there are multiple third passenger routes and/or multiple third driver routes;
and the fourth selection module is used for determining a third passenger route and a third driver route corresponding to the road following coefficient with the maximum value as a target passenger route and a target driver route.
7. The apparatus of claim 5, wherein the value of the included angle between the first passenger route and the first driver route is less than a preset included angle value, comprising:
and the cosine value of a fourth included angle between the first passenger route and the first driver route is greater than or equal to the cosine value of a preset included angle.
8. The apparatus of claim 5, wherein at least a partial overlap between the second passenger route and the second driver route comprises:
in case the second passenger route and the second driver route are in the same coordinate system, at least a partial overlap between the abscissa projection of the second passenger route and the abscissa projection of the second driver route and/or at least a partial overlap between the ordinate projection of the second passenger route and the ordinate projection of the second driver route.
CN201910798614.1A 2019-08-27 2019-08-27 Route determining method and device Active CN110553659B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910798614.1A CN110553659B (en) 2019-08-27 2019-08-27 Route determining method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910798614.1A CN110553659B (en) 2019-08-27 2019-08-27 Route determining method and device

Publications (2)

Publication Number Publication Date
CN110553659A CN110553659A (en) 2019-12-10
CN110553659B true CN110553659B (en) 2021-08-13

Family

ID=68736714

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910798614.1A Active CN110553659B (en) 2019-08-27 2019-08-27 Route determining method and device

Country Status (1)

Country Link
CN (1) CN110553659B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111815047A (en) * 2020-07-06 2020-10-23 王伟 Path planning method based on user behavior analysis
CN113159882A (en) * 2021-03-23 2021-07-23 广州宸祺出行科技有限公司 Passenger transfer method and system based on congested road conditions

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103810843A (en) * 2014-02-23 2014-05-21 曾昭兴 Taxi sharing method, system and server
US9904900B2 (en) * 2015-06-11 2018-02-27 Bao Tran Systems and methods for on-demand transportation
CN104899317A (en) * 2015-06-18 2015-09-09 重庆优跑科技发展有限公司 Path similarity based service provider selection method and device
CN106556398B (en) * 2015-09-30 2019-09-20 百度在线网络技术(北京)有限公司 A kind of matched method and device of route
CN107798403A (en) * 2016-09-07 2018-03-13 北京嘀嘀无限科技发展有限公司 A kind of share-car order processing method, server, terminal device and system
CN107609035A (en) * 2017-08-09 2018-01-19 北京趣拿软件科技有限公司 The recommendation method and apparatus of information
CN108416480A (en) * 2018-03-23 2018-08-17 中山市博林树投资管理有限公司 A kind of intelligence share-car matching process

Also Published As

Publication number Publication date
CN110553659A (en) 2019-12-10

Similar Documents

Publication Publication Date Title
US6708110B2 (en) Method of providing vehicle instructions to a non-navigable point of interest
CN110553659B (en) Route determining method and device
CN101082501B (en) Real time map-matching method and system based on relative coordinates positioning
US20030050752A1 (en) Navigation system for vehicle
WO2016023433A1 (en) System and method for taxi fare estimation in online taxi hiring system
CN103426139A (en) System and method for matching and pairing co-passengers
CN110222786B (en) Dynamic car pooling method and system based on travel information
WO2021179621A1 (en) Riding service method, apparatus and device and storage medium
CN106157692A (en) Driver assistance system and method for collision free
CN102313556B (en) Method and device for matching paths on round island
JP2011502248A (en) How to process positioning data
CN110276020B (en) Method and device for identifying travel destination of user
JP2001256589A (en) Charging method in data communication network system and data communication network system
WO2021179620A1 (en) Vehicle information acquisition method and apparatus, and storage medium
JP2003279358A (en) Method for updating road map data
CN111323031B (en) Yaw identification method and device, electronic equipment and storage medium
CN109241138A (en) A kind of motion track construction method and device
CN107449436A (en) A kind of Motorcade navigation method and system
JP7093672B2 (en) Information display terminal, server device and bus route guidance display method
US11407430B2 (en) Information processing device and information processing method
CN110062040B (en) Rescue message pushing method and device
CN111626386A (en) Intelligent riding code generation method, equipment, storage medium and device
JP6914871B2 (en) Shared car use support system
JP4204319B2 (en) Method for delivery of route guidance elements, automotive navigation equipment and center
JP2003254772A (en) Navigation system and method, server, and program for 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