Dynamic car sharing system and method under cloud computing environment
Technical Field
The invention relates to the field of cloud computing, in particular to a dynamic car sharing system and method under a cloud computing environment.
Background
The car sharing refers to that several people on the same route take the same car to go to and go from work, go to and go from school, go long distance, travel and the like, and the car fee is shared by passengers in an average trip mode, namely the car sharing. The car fee is shared when the car is shared, the passengers can save money, and the car sharing trip can reduce the tail gas of the car, alleviate traffic jam and be more environment-friendly. In the prior art, the path contact ratio of the car sharing people is not high enough, and the car sharing utilization is not efficient enough.
Disclosure of Invention
The invention aims to provide a dynamic car pooling system and a dynamic car pooling method in a cloud computing environment, and aims to solve the problems in the prior art.
In order to achieve the purpose, the invention provides the following technical scheme:
the utility model provides a dynamic car pooling system under cloud computing environment, dynamic car pooling system includes first passenger obtains module, preferred passenger and confirms module and best passenger and confirms the module, first passenger obtains the relevant information that the module is used for the first passenger starting point and the terminal that obtain, preferred passenger confirms the module and is used for tentatively choosing the passenger with first passenger's car pooling, best passenger confirms the module and is used for confirming the passenger who finally shares car with first passenger.
Preferably, the preferred passenger determining module comprises a first area dividing module, a passenger obtaining module for car pooling, a candidate second passenger selecting module and a preferred passenger selecting module, wherein the first area dividing module divides a first area according to the obtained start point and end point information of the first passenger, the passenger obtaining module for car pooling is used for obtaining all passengers to be car pooled in the first area and the start points and end points of the passengers to be car pooled, the candidate second passenger selecting module is used for screening candidate second passengers according to the start point information of the first passenger and the start point and end point information of the passengers to be car pooled, the preferred passenger selecting module comprises a selectable first path selecting module, a selectable second path selecting module, a driving overlap ratio determining module and a driving overlap ratio comparing module, the selectable first path selecting module is used for screening selectable first paths from all first paths from the first start point to the first end point, the selectable second path selection module is used for screening selectable second paths from all second paths from the starting point of the candidate second passenger to the destination of the candidate second passenger, the first driving overlap ratio determination module is used for determining the driving overlap ratio of each candidate second passenger by comparing the overlap ratio of each selectable first path with each selectable second path, and the first driving overlap ratio comparison module is used for comparing the driving overlap ratios of all candidate second passengers and taking the candidate second passenger with the highest driving overlap ratio as the preferred second passenger.
Preferably, the optimal passenger determining module comprises a third passenger obtaining module, a selectable third path selecting module, a second driving contact ratio determining module, a preferred reference amount calculating module, a preferred reference amount comparing module, a preferred second passenger historical driving information obtaining module, a car sharing parameter calculating module, a car sharing parameter reference amount calculating module, a second region dividing module, a people reference amount calculating module, a vehicle number reference amount calculating module, a path length parameter calculating module, a path length reference amount calculating module, a comprehensive reference factor calculating module and a comprehensive reference factor comparing module, wherein the third passenger obtaining module is used for obtaining destination information of a third passenger whose starting point is located on a first destination and sent to a path connected with the preferred second passenger, and the selectable third path selecting module is used for screening out a selectable third path from all third paths from the starting point of the third passenger to the destination of the third passenger, the second driving contact ratio determining module determines driving contact ratio of a third passenger by comparing contact ratios of each selectable first path and each selectable third path, the calculating module according to the preferred reference amount calculates the preferred reference amount according to the driving contact ratio of the preferred second passenger and the driving contact ratio of the third passenger, the comparing module according to the preferred reference amount compares the preferred reference amount with a preferred reference threshold value and judges whether the optimal second passenger can be determined according to the preferred reference amount, the historical driving information obtaining module according to the preferred second passenger is used for obtaining the driving times of the preferred second passenger in the next month and the times of selecting the car sharing when the optimal second passenger is driven in the next month under the condition that the comparing module according to the preferred reference amount cannot determine the optimal second passenger, the calculating module according to the driving times and the times of the car sharing calculates car sharing parameters and judges whether the optimal second passenger can be determined according to the relationship between the car sharing parameters and the car sharing parameter threshold value, the car pooling parameter reference amount calculating module is used for calculating car pooling parameter reference amounts according to car pooling parameters and car pooling parameter threshold values under the condition that the car pooling parameter calculating module cannot determine the optimal second passenger, the second area dividing module determines a second area according to starting point information of the optimal second passenger, the people reference amount calculating module calculates the people reference amounts according to average consumption times per day and average consumption times per day threshold values of two minutes before and after the current time point of a merchant in the second area in the last week, the vehicle reference amount calculating module calculates the vehicle number reference amounts according to the number of car pooling vehicles passing through the second area per day and the car pooling vehicle number threshold values in two minutes before and after the current time point of the last week, the path length parameter calculates the path length parameter according to the total length of a path from the first starting point to the optimal passenger and the length of a path from the current time point to the optimal passenger starting point, the path reference quantity calculating module calculates a path length reference quantity according to the path length parameters and the path length parameter threshold value, the comprehensive reference factor calculating module calculates a comprehensive reference factor according to the carpooling parameter reference quantity, the people reference quantity, the vehicle number reference quantity and the path length reference quantity, and the comprehensive reference factor comparing module compares the comprehensive reference factor with the comprehensive reference threshold value and determines the optimal second passenger according to the comprehensive reference factor and the comprehensive reference threshold value.
A dynamic carpooling method in a cloud computing environment comprises the following steps:
step S1: acquiring a first starting point and a first end point of a first passenger, dividing a first area by taking the end point of a two-point connecting line l1 between the first starting point and the first end point as the center of a circle and the length r1 of the two-point connecting line l1 as the diameter, and searching for a preferred second passenger in the first area in a first time period;
step S2: and determining the optimal second passenger on the path of the preferred second passenger.
Preferably, the step S1 of finding the preferred second passenger located in the first area includes the following steps:
all passengers to be car-shared in the first area are obtained, the starting point and the terminal point of each passenger to be car-shared are obtained, the first terminal point, the terminal point of the passenger to be car-shared and the starting point of the passenger to be car-shared are respectively connected to obtain a first included angle a between line segments l2 and l3, and the passenger to be car-shared, of which the first included angle a is less than or equal to 40 degrees, is screened out as a candidate second passenger;
obtaining all first paths of a first passenger from a first starting point to a first terminal point, obtaining the length ld of the shortest first path, and screening out the first paths with the path length less than or equal to 1.2 ld as selectable first paths;
all second paths of the candidate second passengers from the starting point to the end point are obtained, the length le of the shortest second path is obtained, and the paths with the path length less than or equal to 1.2 × le are screened out as selectable second paths;
and respectively obtaining the coincidence degree of each selectable first path and each selectable second path, taking the maximum coincidence degree of the selectable first path and the selectable second path as the driving coincidence degree of the candidate second passenger, comparing the driving coincidence degrees of all the candidate second passengers, and taking the candidate second passenger with the highest driving coincidence degree as the preferred second passenger.
Preferably, the step S2 further includes:
in the process of the first starting point going to the second starting point path, acquiring a third passenger with the starting point located on the first starting point going to the second starting point path, and acquiring the destination of the third passenger, wherein the starting point of the preferred second passenger is the second starting point, the starting point of the third passenger is the third starting point, and the destination of the third passenger is the third destination,
all third paths from the third starting point to the third end point are obtained, the length lf of the shortest third path is obtained, and the third paths with the path lengths smaller than 1.2 x lf are screened out as selectable third paths;
respectively obtaining the coincidence degree of each optional first path and each optional third path, taking the maximum coincidence degree of the optional first path and the optional third path as the driving coincidence degree of a third passenger, comparing the driving coincidence degree x1 of a preferred second passenger with the driving coincidence degree x2 of the third passenger, calculating a preferred reference amount xc = (x2-x1)/x1, if the preferred reference amount xc is smaller than a preferred reference threshold value, the preferred second passenger is the optimal second passenger, if the preferred reference amount xc is larger than or equal to the preferred reference threshold value, obtaining a comprehensive reference factor, and determining the optimal second passenger according to the comprehensive reference factor.
More optimally, the determining the optimal secondary passenger includes the following:
acquiring the number of times nd of taxi taking of the second passenger in the last month and the number np of taxi taking times of taxi taking in the last month, calculating the taxi sharing parameter pc = np/nd,
if the ride share parameter pc is less than or equal to the ride share parameter threshold py, then the secondary passenger is preferably the optimal secondary passenger,
if the ride share parameter pc is greater than the ride share parameter threshold py, the integrated reference factor Zm is obtained and an optimal second passenger is determined therefrom. The waiting time of the frequently carpooled people is relatively long, and the time of the infrequently carpooled people is relatively short, so that the infrequently carpooled people can have good initial carpooling experience, the situation that the frequently used carpooled people are frequently used later is promoted, in the initial situation, a third passenger is not searched, and the infrequently carpooled people are directly used as the optimal second passenger.
More optimally, said obtaining the integrated reference factors Zm and determining therefrom the optimal secondary passenger comprises the following:
calculating a reference quantity pm of the carpooling parameters (pc-py)/py;
dividing a second area by taking a second starting point as a circle center and 1km as a radius, and acquiring average daily consumption times rx of merchants located in the second area in a week before and after the current time point for two minutes, wherein rm = (rx-ry)/ry is a daily average consumption time threshold;
obtaining the number cx of the carpooled vehicles passing through the second area every day within two minutes before and after the current time point of the last week, wherein cy is the threshold value of the number of carpooled vehicles, and the reference quantity cm = (cx-cy)/cy of the number of vehicles;
obtaining the total length d1 of the path from the first starting point to the second starting point, obtaining the length d2 of the path from the current time point to the second starting point, calculating the path length parameter dr = d2/d1, then the path length reference dm = (dr-d0)/d0, where d0 is the threshold of the path length parameter,
the overall reference factor Zm =0.28 pm +0.11 rm +0.39 cm +0.22 dm, and when Zm is greater than or equal to the overall reference threshold, the third passenger is the optimal second passenger, otherwise, the second passenger is preferably the optimal second passenger.
Compared with the prior art, the invention has the beneficial effects that: the invention firstly preliminarily determines the person sharing the car with the first passenger within a certain time, ensures that the preferable second passenger sharing the car with the first passenger exists, then judges whether a third passenger with higher path coincidence degree exists on the path from the first starting point to the preferable second passenger, and determines the third passenger as the person sharing the car with the first passenger under the condition that the preferable second passenger is quickly spliced again by considering the reference quantity of the car sharing parameters, the reference quantity of the number of people, the reference quantity of the number of vehicles and the reference quantity of the path length when the path coincidence degree of the third passenger with the first passenger is higher, thereby further improving the utilization rate of the car sharing.
Drawings
FIG. 1 is a schematic block diagram of a dynamic ride share system in a cloud computing environment according to the present invention;
fig. 2 is a schematic flow chart of a dynamic car pooling method in a cloud computing environment according to the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1-2, in an embodiment of the present invention, a dynamic car pooling system in a cloud computing environment includes a first passenger obtaining module, a preferred passenger determining module and an optimal passenger determining module, where the first passenger obtaining module is configured to obtain information about a starting point and an ending point of a first passenger, the preferred passenger determining module is configured to preliminarily select a passenger for pooling with the first passenger, and the optimal passenger determining module is configured to determine a passenger for finally pooling with the first passenger.
The optimal passenger determining module comprises a first area dividing module, a passenger obtaining module for sharing cars, a candidate second passenger selecting module and an optimal passenger selecting module, wherein the first area dividing module divides a first area according to the obtained starting point and end point information of a first passenger, the passenger obtaining module for sharing cars is used for obtaining all passengers to be shared in the first area and the starting points and the end points of the passengers to be shared, the candidate second passenger selecting module is used for screening candidate second passengers according to the starting point information of the first passenger, the starting point information and the end point information of the passengers to be shared, the optimal passenger selecting module comprises a selectable first path selecting module, a selectable second path selecting module, a driving coincidence degree determining module and a driving coincidence degree comparing module, the selectable first path selecting module is used for screening out selectable first paths from all first paths from the first starting point to the first end point, the selectable second path selection module is used for screening selectable second paths from all second paths from the starting point of the candidate second passenger to the destination of the candidate second passenger, the first driving overlap ratio determination module is used for determining the driving overlap ratio of each candidate second passenger by comparing the overlap ratio of each selectable first path with each selectable second path, and the first driving overlap ratio comparison module is used for comparing the driving overlap ratios of all candidate second passengers and taking the candidate second passenger with the highest driving overlap ratio as the preferred second passenger.
The optimal passenger determining module comprises a third passenger obtaining module, an optional third path selecting module, a second driving contact ratio determining module, an optimal reference quantity calculating module, an optimal reference quantity comparing module, an optimal second passenger historical taxi taking information obtaining module, a taxi sharing parameter calculating module, a second area dividing module, a people reference quantity calculating module, a vehicle number reference quantity calculating module, a path length parameter calculating module, a path length reference quantity calculating module, a comprehensive reference factor calculating module and a comprehensive reference factor comparing module, wherein the third passenger obtaining module is used for obtaining destination point information of a third passenger with a starting point positioned on a first destination to be connected with the optimal second passenger, the optional third path selecting module is used for screening an optional third path from all third paths from the starting point of the third passenger to the destination of the third passenger, the second driving contact ratio determining module determines driving contact ratio of a third passenger by comparing contact ratios of each selectable first path and each selectable third path, the calculating module according to the preferred reference amount calculates the preferred reference amount according to the driving contact ratio of the preferred second passenger and the driving contact ratio of the third passenger, the comparing module according to the preferred reference amount compares the preferred reference amount with a preferred reference threshold value and judges whether the optimal second passenger can be determined according to the preferred reference amount, the historical driving information obtaining module according to the preferred second passenger is used for obtaining the driving times of the preferred second passenger in the next month and the times of selecting the car sharing when the optimal second passenger is driven in the next month under the condition that the comparing module according to the preferred reference amount cannot determine the optimal second passenger, the calculating module according to the driving times and the times of the car sharing calculates car sharing parameters and judges whether the optimal second passenger can be determined according to the relationship between the car sharing parameters and the car sharing parameter threshold value, the car pooling parameter reference amount calculating module is used for calculating car pooling parameter reference amounts according to car pooling parameters and car pooling parameter threshold values under the condition that the car pooling parameter calculating module cannot determine the optimal second passenger, the second area dividing module determines a second area according to starting point information of the optimal second passenger, the people reference amount calculating module calculates the people reference amounts according to average consumption times per day and average consumption times per day threshold values of two minutes before and after the current time point of a merchant in the second area in the last week, the vehicle reference amount calculating module calculates the vehicle number reference amounts according to the number of car pooling vehicles passing through the second area per day and the car pooling vehicle number threshold values in two minutes before and after the current time point of the last week, the path length parameter calculates the path length parameter according to the total length of a path from the first starting point to the optimal passenger and the length of a path from the current time point to the optimal passenger starting point, the path reference quantity calculating module calculates a path length reference quantity according to the path length parameters and the path length parameter threshold value, the comprehensive reference factor calculating module calculates a comprehensive reference factor according to the carpooling parameter reference quantity, the people reference quantity, the vehicle number reference quantity and the path length reference quantity, and the comprehensive reference factor comparing module compares the comprehensive reference factor with the comprehensive reference threshold value and determines the optimal second passenger according to the comprehensive reference factor and the comprehensive reference threshold value.
A dynamic carpooling method in a cloud computing environment comprises the following steps:
step S1: acquiring a first starting point and a first end point of a first passenger, dividing a first area by taking the end point of a two-point connecting line l1 between the first starting point and the first end point as the center of a circle and the length r1 of the two-point connecting line l1 as the diameter, and searching for a preferred second passenger in the first area in a first time period;
finding a preferred second passenger located in the first zone comprises the steps of:
all passengers to be car-shared in the first area are obtained, the starting point and the terminal point of each passenger to be car-shared are obtained, the first terminal point, the terminal point of the passenger to be car-shared and the starting point of the passenger to be car-shared are respectively connected to obtain a first included angle a between line segments l2 and l3, and the passenger to be car-shared, of which the first included angle a is less than or equal to 40 degrees, is screened out as a candidate second passenger;
obtaining all first paths of a first passenger from a first starting point to a first terminal point, obtaining the length ld of the shortest first path, and screening out the first paths with the path length less than or equal to 1.2 ld as selectable first paths;
all second paths of the candidate second passengers from the starting point to the end point are obtained, the length le of the shortest second path is obtained, and the paths with the path length less than or equal to 1.2 × le are screened out as selectable second paths;
and respectively obtaining the coincidence degree of each selectable first path and each selectable second path, taking the maximum coincidence degree of the selectable first path and the selectable second path as the driving coincidence degree of the candidate second passenger, comparing the driving coincidence degrees of all the candidate second passengers, and taking the candidate second passenger with the highest driving coincidence degree as the preferred second passenger.
Step S2: determining the optimal second passenger on the route of the preferred second passenger:
in the process of the first starting point going to the second starting point path, acquiring a third passenger with the starting point located on the first starting point going to the second starting point path, and acquiring the destination of the third passenger, wherein the starting point of the preferred second passenger is the second starting point, the starting point of the third passenger is the third starting point, and the destination of the third passenger is the third destination,
all third paths from the third starting point to the third end point are obtained, the length lf of the shortest third path is obtained, and the third paths with the path lengths smaller than 1.2 x lf are screened out as selectable third paths;
respectively obtaining the coincidence degree of each optional first path and each optional third path, taking the maximum coincidence degree of the optional first path and the optional third path as the driving coincidence degree of the third passenger, comparing the driving coincidence degree x1 of the preferred second passenger with the driving coincidence degree x2 of the third passenger, and calculating the preferred reference amount xc = (x2-x1)/x1,
if the preferred reference amount xc is less than the preferred reference threshold, then the preferred secondary passenger is the optimal secondary passenger,
if the preferred reference amount xc is greater than or equal to the preferred reference threshold,
acquiring the number of times nd of taxi taking of the second passenger in the last month and the number np of taxi taking times of taxi taking in the last month, calculating the taxi sharing parameter pc = np/nd,
if the ride share parameter pc is less than or equal to the ride share parameter threshold py, then the secondary passenger is preferably the optimal secondary passenger,
if the car sharing parameter pc is larger than the car sharing parameter threshold py, calculating the reference quantity pm of the car sharing parameter pm = (pc-py)/py;
dividing a second area by taking a second starting point as a circle center and 1km as a radius, and acquiring average daily consumption times rx of merchants located in the second area in a week before and after the current time point for two minutes, wherein rm = (rx-ry)/ry is a daily average consumption time threshold;
obtaining the number cx of the carpooled vehicles passing through the second area every day within two minutes before and after the current time point of the last week, wherein cy is the threshold value of the number of carpooled vehicles, and the reference quantity cm = (cx-cy)/cy of the number of vehicles;
obtaining the total length d1 of the path from the first starting point to the second starting point, obtaining the length d2 of the path from the current time point to the second starting point, calculating the path length parameter dr = d2/d1, then the path length reference dm = (dr-d0)/d0, where d0 is the threshold of the path length parameter,
the overall reference factor Zm =0.28 pm +0.11 rm +0.39 cm +0.22 dm, and when Zm is greater than or equal to the overall reference threshold, the third passenger is the optimal second passenger, otherwise, the second passenger is preferably the optimal second passenger.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof. The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein.