A method and system for optimizing vehicle routes

By iterating the split operation and mileage saving algorithms, vehicle routes and stations are optimized, and the problem of ignoring passenger subjective factors and site in the existing technology is solved, riding satisfaction and resource allocation efficiency are improved, and cost saving is achieved.

CN113326989BActive Publication Date: 2024-12-03BEIJING WODONG TIANJUN INFORMATION TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110663108.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-06-15
Publication Date
2024-12-03
Estimated Expiration
2041-06-15

AI Technical Summary

Technical Problem

The prior art ignores the subjective factors and site optimization problems of passengers in vehicle route optimization, resulting in low ride willingness and satisfaction, wasted costs, and the possibility of optimal allocation of resources.

Method used

By obtaining the passenger sample set, iteratively performing split operations to determine a reasonable site, considering the passenger's address and ride records, a mileage saving algorithm is used to generate the optimal shuttle route, ensuring the smallest total passenger mileage, meeting passenger needs and reducing costs.

Benefits of technology

It improves employees' recognition and satisfaction with corporate culture, shortens the distance between passengers and the station, and achieves efficient allocation of resources and cost savings.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113326989B_ABST
    Figure CN113326989B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and system for optimizing vehicle routes, and relates to the field of transportation technology. A specific implementation of the method includes: obtaining a passenger sample set whose sample quantity is greater than the preset vehicle capacity, and using the passenger sample set as the sample set to be analyzed; iteratively performing a split operation to obtain multiple target sample sets, and determining the station corresponding to each target sample set; generating a vehicle route according to the preset route starting point and the station corresponding to each target sample set. The present invention shortens the distance from the employee's residence to the station as a whole, and fully considers the subjective factors of the passengers, and determines the optimal shuttle route with the minimum total passenger mileage as the goal, thereby enhancing the practicality of the system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of traffic technology, and in particular to a method and system for optimizing vehicle routes. Background Art

[0002] In recent years, due to the expansion of urban scale, the separation of work and residence has become increasingly prominent, and the demand for employees of enterprises and institutions to choose commuter buses to go to get off work has increased significantly. As an intensive auxiliary public transportation system, the station and route design of commuter buses is particularly important. It is not only closely related to the public image, operating costs, and employee satisfaction of the enterprise, but also has a huge impact on urban transportation from the side.

[0003] Existing technologies usually regard shuttle route optimization as a vehicle routing problem (VRP), and mainly use the following two types of methods: (1) Exact algorithms, such as dynamic programming and branch-and-bound methods. These algorithms are mainly used for smaller-scale vehicle routing problems, and their advantage is high solution accuracy. (2) Heuristic algorithms, such as parsimonious algorithms, genetic algorithms, ant colony algorithms, simulated annealing algorithms, taboo search algorithms, nearest neighbor algorithms, insertion methods, and extensions or organic combinations of the above algorithms. The accuracy of these algorithms is not as good as that of exact algorithms, but for large-scale vehicle scheduling problems, they can quickly converge to a more ideal solution.

[0004] However, directly transplanting the solution of freight (VRP) or traveling salesman problem (TSP) to the route optimization problem of passenger vehicles (shuttle buses) without considering the subjective factors of people (passengers) will affect the willingness and satisfaction of enterprise employees for the ride. In addition, the existing technology usually only focuses on route optimization and ignores the station optimization problem, which increases the waste of costs and fails to optimize resource allocation management. Summary of the invention

[0005] In view of this, the embodiment of the present invention provides a method and system for optimizing vehicle routes, which first optimizes the stops of commuter buses, determines reasonable stops, and fully considers the subjective factors and riding satisfaction of passengers to determine the optimal bus route. It not only takes into account the minimum total mileage of the route to reduce corporate costs, but also takes into account the subjective factors of passengers, thereby enhancing employees' recognition of corporate culture and improving their satisfaction.

[0006] To achieve the above objective, according to a first aspect of an embodiment of the present invention, a method for optimizing a vehicle route is provided.

[0007] The vehicle route optimization method of the embodiment of the present invention includes:

[0008] A passenger sample set with a sample number greater than a preset vehicle capacity is obtained, and the passenger sample set is used as a sample set to be analyzed; a split operation is iteratively performed to obtain multiple target sample sets, and a station corresponding to each target sample set is determined; the split operation includes: splitting the sample set to be analyzed into two candidate sample sets; judging whether the split result obtained by the current split operation meets the preset split condition; if so, the candidate sample set with a sample number greater than the preset vehicle capacity is used as a new sample set to be analyzed, and the candidate sample set with a sample number less than or equal to the preset vehicle capacity is used as a target sample set; otherwise, the sample set to be analyzed is used as a target sample set; and a vehicle route is generated according to a preset route starting point and the stations corresponding to each target sample set.

[0009] Optionally, obtaining a passenger sample set whose sample number is greater than a preset vehicle capacity includes: obtaining the ride records of all passengers within a target range within a preset historical period, and determining the number of rides of each passenger within the preset historical period based on the ride record of the passenger; and screening passengers whose number of rides is greater than or equal to a preset number threshold from all passengers within the target range to obtain the passenger sample set.

[0010] Optionally, splitting the sample set to be analyzed into two candidate sample sets includes: selecting two samples from the sample set to be analyzed, and taking the sample position of each selected sample as the cluster center of a candidate sample set;

[0011] Traverse each other sample in the sample set to be analyzed: determine the distance between the other sample and each cluster center, classify the other sample into the candidate sample set where the cluster center with a smaller distance is located, and then update the cluster center of the corresponding candidate sample set.

[0012] Optionally, the sample position includes: sample longitude and sample latitude; updating the cluster center of the corresponding candidate sample set includes: using the average longitude of all samples in the corresponding candidate sample set as the updated longitude of the cluster center of the corresponding candidate sample set, and using the average latitude of all samples in the corresponding candidate sample set as the updated latitude of the cluster center of the corresponding candidate sample set.

[0013] Optionally, the preset splitting condition includes at least one of the following:

[0014] The sum of the divergences of the two candidate sample sets obtained by the current splitting operation is less than the divergence of the current sample set to be analyzed; and the distance between the two candidate sample sets obtained by the current splitting operation is greater than a preset distance threshold.

[0015] Optionally, the standard deviation of the sample positions is used as a measure of the divergence; and the distance between the cluster centers of two candidate sample sets is used as the distance between the two candidate sample sets.

[0016] Optionally, the method further includes: iteratively performing a splitting operation to obtain a plurality of target sample sets, and before determining the site corresponding to each of the target sample sets, standardizing the sample position of each sample by converting the longitude and latitude scales.

[0017] A vehicle route is generated according to a preset route starting point and a station corresponding to each target sample set, including: determining a plurality of station sets by using a mileage saving algorithm according to the preset route starting point and a station corresponding to each target sample set; and generating a vehicle route corresponding to each station set with the goal of minimizing the total passenger mileage.

[0018] Before generating a vehicle route corresponding to each of the site sets with the goal of minimizing the total passenger mileage, the method further includes: confirming that the total number of passengers in the site sets is less than or equal to a preset vehicle capacity, otherwise, deleting the site set from the site sets.

[0019] To achieve the above objective, according to a second aspect of an embodiment of the present invention, a vehicle route optimization system is provided.

[0020] The vehicle route optimization system of the embodiment of the present invention includes: an acquisition module, which is used to acquire a passenger sample set whose sample number is greater than a preset vehicle capacity, and use the passenger sample set as a sample set to be analyzed; a site configuration module, which is used to iteratively perform a split operation to obtain multiple target sample sets, and determine the site corresponding to each of the target sample sets; the split operation includes: splitting the sample set to be analyzed into two candidate sample sets; judging whether the split result obtained by the current split operation meets the preset split condition; if so, using the candidate sample set whose sample number is greater than the preset vehicle capacity as a new sample set to be analyzed, and using the candidate sample set whose sample number is less than or equal to the preset vehicle capacity as a target sample set; otherwise, using the sample set to be analyzed as a target sample set; a route configuration module, which is used to generate a vehicle route according to a preset route starting point and the site corresponding to each of the target sample sets.

[0021] Optionally, obtaining a passenger sample set whose sample number is greater than a preset vehicle capacity includes: obtaining the ride records of all passengers within a target range within a preset historical period, and determining the number of rides of each passenger within the preset historical period based on the ride record of the passenger; and screening passengers whose number of rides is greater than or equal to a preset number threshold from all passengers within the target range to obtain the passenger sample set.

[0022] Optionally, splitting the sample set to be analyzed into two candidate sample sets includes: selecting two samples from the sample set to be analyzed, and taking the sample position of each selected sample as the cluster center of a candidate sample set;

[0023] Traverse each other sample in the sample set to be analyzed: determine the distance between the other sample and each cluster center, classify the other sample into the candidate sample set where the cluster center with a smaller distance is located, and then update the cluster center of the corresponding candidate sample set.

[0024] Optionally, the sample position includes: sample longitude and sample latitude; updating the cluster center of the corresponding candidate sample set includes: using the average longitude of all samples in the corresponding candidate sample set as the updated longitude of the cluster center of the corresponding candidate sample set, and using the average latitude of all samples in the corresponding candidate sample set as the updated latitude of the cluster center of the corresponding candidate sample set.

[0025] Optionally, the preset splitting condition includes at least one of the following: the sum of the divergences of the two candidate sample sets obtained by the current splitting operation is less than the divergence of the current sample set to be analyzed; the distance between the two candidate sample sets obtained by the current splitting operation is greater than a preset distance threshold.

[0026] Optionally, the standard deviation of the sample positions is used as a measure of the divergence; and the distance between the cluster centers of two candidate sample sets is used as the distance between the two candidate sample sets.

[0027] Optionally, the site configuration module is further used to iteratively perform a splitting operation to obtain multiple target sample sets, and before determining the site corresponding to each target sample set, perform standardization processing on the sample position of each sample by converting the longitude and latitude scale.

[0028] Optionally, a vehicle route is generated according to a preset route starting point and the stations corresponding to each of the target sample sets, including: determining a number of station sets using a mileage saving algorithm according to the preset route starting point and the stations corresponding to each of the target sample sets; and generating a vehicle route corresponding to each of the station sets with the goal of minimizing the total passenger mileage.

[0029] Optionally, before generating a vehicle route corresponding to each of the site sets with the goal of minimizing the total passenger mileage, the method further includes: confirming that the total number of passengers in the several site sets is less than or equal to a preset vehicle capacity, otherwise, deleting the site set from the several site sets.

[0030] To achieve the above objective, according to a third aspect of an embodiment of the present invention, a vehicle route optimization device is provided.

[0031] The vehicle route optimization device of the embodiment of the present invention includes: one or more processors; a storage system for storing one or more programs; when the one or more programs are executed by the one or more processors, the one or more processors implement the vehicle route optimization method of the embodiment of the present invention.

[0032] To achieve the above objective, according to a fourth aspect of an embodiment of the present invention, a computer-readable medium is provided.

[0033] A computer program is stored on a computer-readable medium in the embodiment of the present invention. When the program is executed by a processor, the method for optimizing a vehicle route in the embodiment of the present invention is implemented.

[0034] One embodiment of the above invention has the following advantages or beneficial effects: In the embodiment of the present invention, the bus stops are optimized based on subjective factors such as the passenger's address and the passenger's wishes, which shortens the distance from the passenger's residence to the stop as a whole. On the basis of determining reasonable stops, the passenger's riding satisfaction is fully considered, and the optimal shuttle route is determined with the minimum total passenger mileage as the goal.

[0035] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.

[0037] Figure 1 is a schematic diagram of the main process of a vehicle route optimization method according to an embodiment of the present invention;

[0038] Figure 2 is a schematic diagram of the main process of the split operation of an embodiment of the present invention;

[0039] Figure 3 It is a schematic diagram of the main process of obtaining a passenger sample set whose sample number is greater than a preset vehicle capacity according to an embodiment of the present invention;

[0040] Figure 4 is a schematic diagram of the main process of splitting the sample set to be analyzed into two candidate sample sets according to an embodiment of the present invention;

[0041] Figure 5 is a schematic diagram of the preset splitting conditions in an embodiment of the present invention;

[0042] Figure 6 is a schematic diagram of the Manhattan distance method according to an embodiment of the present invention;

[0043] Figure 7 It is a schematic diagram of the main process of generating a vehicle route according to a preset route starting point and a station corresponding to each target sample set in an embodiment of the present invention;

[0044] Figure 8 is a schematic diagram of the principle of the saving algorithm of an embodiment of the present invention;

[0045] Fig. 9It is a schematic diagram of the principle of minimizing the total passenger mileage in an embodiment of the present invention;

[0046] Fig.10 is a schematic diagram of main modules of a vehicle route optimization system according to an embodiment of the present invention;

[0047] Fig.11 is an exemplary system architecture diagram to which embodiments of the present invention may be applied;

[0048] Fig.12 It is a schematic diagram of the structure of a computer system of a terminal device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION

[0049] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0050] According to a first aspect of an embodiment of the present invention, a user access management method applied to a server is provided.

[0051] Figure 1 FIG. 1 is a schematic diagram of the main process of a vehicle route optimization method according to an embodiment of the present invention. Figure 1 As shown, the method mainly includes:

[0052] Step S101: Obtain a passenger sample set whose sample number is greater than the preset vehicle capacity, and use the passenger sample set as the sample set to be analyzed; Step S102: Iterate the splitting operation to obtain multiple target sample sets, and determine the station corresponding to each target sample set; Step S103: Generate a vehicle route based on the preset route starting point and the station corresponding to each target sample set.

[0053] In an optional embodiment, when the sample size is greater than the passenger sample set of the preset vehicle capacity, it is considered that there is a need to set up shuttle buses and stations. Too few people will cause unnecessary occupation of social resources and waste of costs for the company to set up shuttle buses. Therefore, the situation where the sample size is less than the passenger sample set of the preset vehicle capacity is not considered.

[0054] Through multiple iterations of the split operation, multiple target sample sets can be obtained. When the number of target sample sets no longer changes, the iteration is considered complete.

[0055] The station corresponding to each target sample set can be determined in a variety of ways. In an optional embodiment, the cluster center of each target sample set is used as the station corresponding to each target sample set. Since the sum of the distances from the cluster center to all sample points in the target sample set is the smallest, using the cluster center as the station corresponding to each target sample set can ensure that the sum of the distances from the passengers' residences to the stations is minimized, which is the optimal station setting location overall.

[0056] In an optional embodiment, the cluster center position can be determined by the following formula (1):

[0057]

[0058] Among them, P i represents the sample data of a single passenger, i∈{1,2,3...N}, C i Represents the cluster center of the current target sample set.

[0059] In an optional embodiment, the steps of the split operation are as follows: Figure 2 As shown, the splitting operation mainly includes: step S201: splitting the sample set to be analyzed into two candidate sample sets; step S202: judging whether the splitting result obtained by the current splitting operation meets the preset splitting condition; if so, executing S203: taking the candidate sample set with a sample number greater than the preset vehicle capacity as a new sample set to be analyzed, and taking the candidate sample set with a sample number less than or equal to the preset vehicle capacity as a target sample set; otherwise, executing step S204: taking the sample set to be analyzed as a target sample set.

[0060] By iterating the above splitting steps, the original data set can be split into multiple target sample sets, each of which represents a set of passengers with relatively high aggregation and close distance, who can take the bus at the same station.

[0061] The preset splitting condition can be set according to actual needs. In an optional embodiment, the preset splitting condition includes at least one of the following: the sum of the divergences of the two candidate sample sets obtained by the current splitting operation is less than the divergence of the current sample set to be analyzed; the distance between the two candidate sample sets obtained by the current splitting operation is greater than a preset distance threshold.

[0062] In actual application scenarios, when one of the preset splitting conditions is met, different station setting solutions can be obtained, but the optimization of the overall station setting cannot reach the most reasonable state. Only when the sum of the divergences of the two candidate sample sets obtained by the current splitting operation is less than the divergence of the current sample set to be analyzed, and the distance between the two candidate sample sets is greater than the preset distance threshold, can the number of stations obtained be guaranteed to be the least and can meet the passengers' riding needs. Figure 5As shown, there are three sample sets to be analyzed, A, B, and C. In the sample sets A and B to be analyzed, two candidate sample sets are generated by splitting. When the sum of the divergences of the two candidate sample sets is less than the divergence of the current sample set to be analyzed, it means that the sample positions in the two candidate sample sets are relatively concentrated, that is, the situation in the sample set B to be analyzed. Although theoretically two stations can be set at the cluster centers of the two candidate sample sets, it is found in actual road conditions that the two candidate sample sets are actually two adjacent communities, and the distance d2 between the two candidate sample sets is very small. Although the passengers in each community are relatively dense, there is only a road between the two communities. Therefore, there is no need to set two stations. It is entirely possible to set one station on the road, so that passengers in the communities on both sides of the road can conveniently take the bus. If two stations are set, the distance between the stations is too close, which will cause a waste of stop time and unnecessary waste of resources. Therefore, it is necessary to judge whether the distance between the two candidate sample sets is greater than the preset distance threshold on the basis that the sum of the divergences of the two candidate sample sets is less than the divergence of the current sample set to be analyzed. If the distance between the two candidate sample sets is large enough, that is, the case in sample set A to be analyzed, the two candidate sample sets are far apart, and the distance d1 between the two candidate sample sets is large, indicating that there will not be a situation where the two candidate sample sets are separated by only a road. Therefore, in this case, it is necessary to set up two stations in a dispersed manner.

[0063] The divergence measurement index can be selected from one or more of variance, standard deviation, vector, etc., and the distance between two candidate sample sets can also be determined according to multiple distances, such as straight-line distance (Euclidean distance), Manhattan distance, spatial distance, etc. In an optional embodiment, the standard deviation of the sample position is used as the divergence measurement index; the distance between the cluster centers of the two candidate sample sets is used as the distance between the two candidate sample sets.

[0064] In a further optional embodiment, the distance between the cluster centers of two candidate sample sets can be Manhattan distance, such as Figure 6 As shown in the figure, assume that there are four stations A, B, C, and D. In the figure, AC and BD are longitudes, AB and CD are latitudes (the difference in latitudes is exaggerated in the figure), E is the midpoint of AC, and F is the midpoint of BD. The Manhattan distance refers to the distance between two points in the north-south direction plus the distance in the east-west direction. Then the Manhattan distance between points A and D is the sum of the three segments AE, EF, and FD. In actual applications, streets and roads are usually not set in due south or due north. If the straight-line distance is directly used as the distance between two candidate sample sets, it is far different from the distance in the actual application process and lacks reference significance. Therefore, the Manhattan distance is selected to be closer to the path distance of the actual road.

[0065] For obtaining a passenger sample set whose sample quantity is greater than the preset vehicle capacity, in an optional embodiment, as Figure 3As shown, including:

[0066] Step S301: Obtain the travel records of all passengers within the target range within a preset historical period; Step S302: Determine the number of rides of the passenger within the preset historical period based on the travel records of each passenger, and select passengers whose number of rides is greater than or equal to a preset number threshold from all passengers within the target range to obtain the passenger sample set.

[0067] By obtaining the passenger's ride record within the preset historical period, it is possible to effectively select people with ride needs and change the station configuration according to time changes. For example, the preset historical period is 30 days, and according to the commuting needs, the preset number threshold is set to 30 times, that is, riding more than 15 days a month and riding 2 times a day. Then, passengers who have taken more than 30 times in the historical 30 days are considered to have fixed ride needs in a short period of time and are included in the passenger sample set. Passengers who occasionally have ride needs are not included in the passenger sample set in order to save social resources.

[0068] In an optional embodiment, the ride records within a preset historical period can be updated at a fixed period, such as once every 180 days. Since the location of the station should not be changed frequently, it is easy to waste resources and the notification process is cumbersome, so the update time should not be too short. Setting the update cycle to 180 days can ensure the dynamic setting of the station configuration without frequently changing the station location, and change the station location in time according to the ride needs of fixed passengers.

[0069] The sample set to be analyzed can be split into two candidate sample sets in a variety of ways. In a preferred embodiment, Figure 4 As shown, it includes: step S401: selecting two samples from the sample set to be analyzed, and taking the sample position of each selected sample as the cluster center of a candidate sample set; step S402: traversing each other sample in the sample set to be analyzed: determining the distance between other samples and each cluster center, classifying other samples into the candidate sample set where the cluster center with a smaller distance is located, and then updating the cluster center of the corresponding candidate sample set.

[0070] For example, the sample set A to be analyzed includes samples a, b, c, d, e, and f. First, two samples a and f are randomly selected from the sample set A to be analyzed, and the sample positions of a and f are used as the cluster centers of the two candidate sample sets S1 and S2. First, sample b is classified: the distance between sample b and cluster center a is determined to be 10, and the distance between sample b and cluster center f is determined to be 20, then sample b is classified into the candidate sample set S1 where cluster center a is located. At this time, the cluster center of sample S1 is updated by formula (1) to obtain cluster center a'. Next, sample c is classified. The classification process is the same as that of sample b. If it is also classified into candidate sample set S1, then the updated cluster center a' is obtained. If it is classified into candidate sample set S2, then the updated cluster center f' can be obtained. By analogy, all sample points in the sample set A to be analyzed can be classified into two candidate sample sets, and two updated cluster centers are obtained accordingly, completing the splitting of the sample set A to be analyzed.

[0071] In an optional embodiment, the sample position includes: sample longitude and sample latitude; updating the cluster center of the corresponding candidate sample set includes: using the average longitude of all samples in the corresponding candidate sample set as the updated longitude of the cluster center of the corresponding candidate sample set, and using the average latitude of all samples in the corresponding candidate sample set as the updated latitude of the cluster center of the corresponding candidate sample set.

[0072] The splitting operation is iteratively performed to obtain multiple target sample sets. Before determining the site corresponding to each target sample set, in an optional embodiment, the sample position of each sample is standardized by converting the longitude and latitude scales.

[0073] The following example illustrates the standardization process. For example, suppose the longitude and latitude coordinates of point O are (g0, t0), where g represents longitude and t represents latitude; the longitude and latitude coordinates of the address i of an employee are (g i ,t i ), then the coordinate of i after standardization is P i =(x i ,y i ),in:

[0074]

[0075] The cosine function in the formula represents the conversion relationship between the longitude scale and the latitude scale. The east-west distance between two points is calculated at the midpoint of their latitude, where the circumference of the earth in the east-west direction and the north-south direction are considered equal (the error is less than 2‰). After the above standardization process, the actual distance represented by the two-dimensional coordinates is unified.

[0076] When the longitude and latitude coordinates are not used as the coordinate system for calculation, there is no need to perform the standardization process. For example, in a rectangular coordinate system, the scales of the x and y directions of the coordinate axes are the same, so there is no need to perform scale conversion.

[0077] In an optional embodiment, the method specifically includes:

[0078] Assume that the original passenger data set is P, where P i ∈P is the sample data of a single passenger, i∈{1,2,3...N}, N is the total number of passengers, P i =(x i ,y i ), x i ,y i The samples P i The longitude and latitude coordinates of the address, σ is the standard deviation of the current sample set, and V is the maximum capacity of the bus.

[0079] S1: Determine whether the number of passengers in the current sample set T to be analyzed is less than the maximum capacity V of the bus. If N>V, randomly select two sample points in the sample set to be analyzed as cluster centers, split the sample set T to be analyzed into candidate sample sets T1 and T2, and perform the following steps. If N≤V, do not split and directly return the sample set to be analyzed.

[0080] S2: For each sample P in the dataset i , calculate its Manhattan distance to the cluster centers of the two candidate sample sets T1 and T2, and classify it into the candidate sample set corresponding to the cluster center with the smallest distance.

[0081] S3: Recalculate the cluster centers of the two candidate sample sets for the two candidate sample sets

[0082] S4: Repeat steps S2 and S3 until the cluster center position does not change.

[0083] S5: According to the two candidate sample sets obtained, the standard deviation σ1 and σ1 of each candidate sample set are calculated respectively, and |T1| and |T2| in the two candidate sample sets are recorded at this time.

[0084] S6: Judgment The relationship between σ and Then the sample set to be analyzed is taken as a target sample set. And the distance between the two types of cluster centers T1 and T2 (D is determined according to actual needs), then the two candidate sample sets are used as target sample sets.

[0085] S7: Repeat the above operations S1 to S6 for T1 and T2 respectively until the number of target sample sets no longer changes.

[0086] By setting up the above steps, it is possible to ensure that the passengers' demands for stations are met while minimizing the company's cost of setting up vehicles, reducing the waste of social resources and increasing passengers' willingness to ride.

[0087] In an optional embodiment, a vehicle route is generated according to a preset route starting point and a station corresponding to each target sample set. Figure 7 As shown, it includes: step S701: according to the preset route starting point and the station corresponding to each target sample set, a mileage saving algorithm is used to determine a number of station sets; step S702: confirming that the total number of passengers in the number of station sets is less than or equal to the preset vehicle capacity, otherwise, deleting the station set from the number of station sets; step S703: with the minimum total passenger mileage as the goal, generating a vehicle route corresponding to each station set.

[0088] When the total number of passengers in several site sets is greater than the preset vehicle capacity, you can choose to increase the number of vehicles to solve the problem of too many passengers, but this situation is costly for the enterprise. Therefore, before generating the vehicle route corresponding to each site set with the minimum total passenger mileage as the goal, in an optional embodiment, it is necessary to confirm that the total number of passengers in several site sets is less than or equal to the preset vehicle capacity, otherwise, delete the site set from the several site sets.

[0089] Figure 8 FIG. 1 is a schematic diagram of the principle of generating a vehicle route according to a preset route starting point and a station corresponding to each target sample set according to an embodiment of the present invention, such as Figure 8 As shown, O is the starting point of the preset route, and three stations A1, A2 and B are set, where A1 and A2 are both on a circle with O as the center and a as the radius, and the distance between A and B is c. The present invention stipulates that the savings value after the two points A and B are combined cannot be less than the smaller value of a and b, that is, the following formula (II)

[0090] a+bc≥min(a,b) (2)

[0091] Here, let a≥b (from formula (2), we can see that the relative size of a and b has no effect on the result), then formula (2) can be simplified to

[0092] a≥c (three)

[0093] Assume that the angle between OA and OB is γ, and use the cosine theorem to get formula (IV):

[0094] c 2 =a 2 +b 2 -2ab cosγ (IV)

[0095] From formula (3) and formula (4), we can get

[0096]

[0097] That is, point A must be located at Fig.10 In the existing saving algorithm, even if A is on the dotted arc (such as point A2), A and B will be considered to be put into the same route, but for passengers at point A2, they have to go through point B to go to and from point O, which may affect their satisfaction.

[0098] Specifically, the mileage saving algorithm can be set as follows:

[0099] S1: Calculate the route difference saved by each station for vehicle mileage under the condition of merging routes, and obtain all route differences of various paths in the saving value table. Dynamic programming is used to determine fo, where d oh , d fo are the distances from H and F to point O respectively.

[0100] S2: Check the site corresponding to the maximum saving value in the saving value table (set as H and F). If one of the following conditions is met, execute S3; otherwise execute S6; the conditions are as follows: 1) H and F are not included in the existing line; 2) H or F is the first or last site on the line (excluding point O, the same below), and only one of them is on the formed line; 3) H and F are on different lines, and one is the first site of the line and the other is the last site of the line.

[0101] S3: Integrate into the same line in advance. If H and F are integrated into the same line, determine whether the saving value s(h, f) is not less than d oh and d fo If the smaller value is found, execute S4; otherwise, execute S6.

[0102] S4: If H and F are merged into the same line, determine whether the total passenger capacity of the line (i.e., the sum of the number of employees required at each station on the line) does not exceed N, and k(h, f) = h. If so, execute S5; execute S6.

[0103] S5: Connect stations H and F to form a new line.

[0104] S6: Eliminate s(h, f) from the savings value table, and then if the savings value table is not empty, execute S2.

[0105] S7: For sites that are not connected to any other lines and cannot be merged into other lines (such as site K), they are directly connected to point O to form a separate line. For example, site K forms the line O→K→O.

[0106] Among them, in step S4, k(h, f) = h is to meet the goal of minimizing the total passenger mileage, such as Fig. 9 As shown in the figure, point O is the starting point, points A and B are the shuttle bus stops, a, b, and c are the distances between OA, OB, and AB, respectively, and n(A) and n(B) are the number of people who need to take the shuttle bus at points A and B, respectively. After satisfying the basic conditions of equations (II) to (V), two routes can be obtained, O→A→B→O and O→B→A→O. Let route O→A→B→O be route 1, and O→B→A→O be route 2, then the passenger mileage K of each route is:

[0107] k1=(n(A)+(B))*a+n(B)*c (6)

[0108] k2=(n(A)+n(B))*b+n(A)*c (7)

[0109] When actually connecting sites, the one with the smallest total passenger mileage K is selected. In the algorithm process, k(h, f)=h means that the total passenger mileage of connecting to site h first and then to site f is the smallest, and k(h, f)=f means that the total passenger mileage of connecting to site f first and then to site h is the smallest.

[0110] The above algorithm can be used to optimize the company's commuter bus stops and routes. Since employees' addresses and travel habits may change, the optimization results will be updated in time with the data, and the stops and routes will be pushed to relevant employees after each update.

[0111] The vehicle route optimization method of the embodiment of the present invention optimizes the vehicle stops based on subjective factors such as the passenger's address and the passenger's wishes, thereby shortening the distance from the passenger's residence to the stop as a whole. On the basis of determining reasonable stops, the passenger's riding satisfaction is fully considered, and the optimal shuttle route is determined with the minimum total passenger mileage as the goal.

[0112] According to a second aspect of an embodiment of the present invention, a vehicle route optimization system applied to a server is provided.

[0113] Fig.10 Schematic diagram of the main modules of the vehicle route optimization system 1200 according to the second aspect of the embodiment of the present invention. Fig.12 As shown, including:

[0114] An acquisition module 1001 is used to acquire a passenger sample set whose sample quantity is greater than a preset vehicle capacity, and use the passenger sample set as a sample set to be analyzed;

[0115] The site configuration module 1002 is used to iteratively perform a splitting operation to obtain multiple target sample sets and determine the site corresponding to each target sample set; the splitting operation includes: splitting the sample set to be analyzed into two candidate sample sets; judging whether the splitting result obtained by the current splitting operation meets the preset splitting condition; if so, taking the candidate sample set with a sample number greater than the preset vehicle capacity as a new sample set to be analyzed, and taking the candidate sample set with a sample number less than or equal to the preset vehicle capacity as a target sample set; otherwise, taking the sample set to be analyzed as a target sample set;

[0116] The route configuration module 1003 is used to generate a vehicle route according to a preset route starting point and a station corresponding to each target sample set.

[0117] In an optional embodiment, obtaining a passenger sample set whose sample number is greater than a preset vehicle capacity includes: obtaining the ride records of all passengers within a target range within a preset historical period, and determining the number of rides of the passenger within the preset historical period based on the ride records of each passenger; and screening passengers whose number of rides is greater than or equal to a preset number threshold from all passengers within the target range to obtain a passenger sample set.

[0118] Optionally, splitting the sample set to be analyzed into two candidate sample sets includes: selecting two samples from the sample set to be analyzed, and using the sample position of each selected sample as the cluster center of a candidate sample set;

[0119] Traverse each other sample in the sample set to be analyzed: determine the distance between other samples and each cluster center, classify other samples into the candidate sample set where the cluster center with a smaller distance is located, and then update the cluster center of the corresponding candidate sample set.

[0120] Optionally, the sample position includes: sample longitude and sample latitude; updating the cluster center of the corresponding candidate sample set includes: using the average longitude of all samples in the corresponding candidate sample set as the updated longitude of the cluster center of the corresponding candidate sample set, and using the average latitude of all samples in the corresponding candidate sample set as the updated latitude of the cluster center of the corresponding candidate sample set.

[0121] Optionally, the preset splitting condition includes at least one of the following: the sum of the divergences of the two candidate sample sets obtained by the current splitting operation is less than the divergence of the current sample set to be analyzed; the distance between the two candidate sample sets obtained by the current splitting operation is greater than a preset distance threshold.

[0122] Optionally, the standard deviation of the sample positions is used as a measure of the divergence; and the distance between the cluster centers of two candidate sample sets is used as the distance between the two candidate sample sets.

[0123] Optionally, the site configuration module 1002 is further used to, before iteratively performing the splitting operation to obtain multiple target sample sets and determining the site corresponding to each target sample set, perform standardization processing on the sample position of each sample by converting the longitude and latitude scale.

[0124] Optionally, a vehicle route is generated based on a preset route starting point and the stations corresponding to each target sample set, including: determining a number of station sets using a mileage saving algorithm based on the preset route starting point and the stations corresponding to each target sample set; and generating a vehicle route corresponding to each station set with the goal of minimizing the total passenger mileage.

[0125] Optionally, before generating a vehicle route corresponding to each site set with the goal of minimizing the total passenger mileage, the method further includes: confirming that the total number of passengers in the several site sets is less than or equal to a preset vehicle capacity, otherwise, deleting the site set from the several site sets.

[0126] The vehicle route optimization system of the embodiment of the present invention can realize dynamic station and route settings according to the changes in the passenger's address, solve the problem that the demand in the personnel concentration area exceeds the passenger capacity of a single vehicle, and shorten the distance from the employee's residence to the station as a whole. At the same time, the subjective factors of the passengers are taken into consideration, which enhances the practicality of the optimization system.

[0127] The above vehicle route optimization system can execute the method provided by the embodiment of the present invention, and has the functional modules and beneficial effects corresponding to the execution method. For technical details not fully described in this embodiment, please refer to the method provided by the embodiment of the present invention.

[0128] Fig.11 An exemplary system architecture 1100 is shown to which a vehicle route optimization method or a vehicle route optimization system according to an embodiment of the present invention may be applied.

[0129] like Fig.11 As shown, system architecture 1100 may include terminal devices 1101, 1102, 1103, a network 1104, and a server 1105. Network 1104 is used to provide a medium for communication links between terminal devices 1101, 1102, 1103 and server 1105. Network 1104 may include various connection types, such as wired, wireless communication links, or optical fiber cables, etc.

[0130] Users can use terminal devices 1101, 1102, 1103 to interact with server 1105 through network 1104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 1101, 1102, 1103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc.

[0131] The terminal devices 1101 , 1102 , and 1103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers, etc.

[0132] The server 1105 may be a server that provides various services, such as a backend management server that provides support for shopping websites browsed by users using the terminal devices 1101, 1102, and 1103. The backend management server may analyze and process the received data such as product information query requests, and feed back the processing results (such as target push information and product information) to the terminal device.

[0133] It should be noted that the vehicle route optimization method provided in the first aspect of the embodiment of the present invention is generally executed by the server 1105 , and correspondingly, the vehicle route optimization system provided in the second aspect of the embodiment of the present invention is generally set in the server 1105 .

[0134] It should be understood that Fig.11 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to the implementation requirements.

[0135] Reference below Fig.12 , which shows a schematic diagram of the structure of a computer system 1200 of a terminal device suitable for implementing an embodiment of the present invention. Fig.12 The terminal device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0136] like Fig.12 As shown, the computer system 1200 includes a central processing unit (CPU) 1201, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1202 or a program loaded from a storage part 1208 into a random access memory (RAM) 1203. In the RAM 1203, various programs and data required for the operation of the system 1200 are also stored. The CPU 701, the ROM 1202, and the RAM 1203 are connected to each other via a bus 1204. An input / output (I / O) interface 1205 is also connected to the bus 1204.

[0137] The following components are connected to the I / O interface 1205: an input section 1206 including a keyboard, a mouse, etc.; an output section 1205 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1208 including a hard disk, etc.; and a communication section 1209 including a network interface card such as a LAN card, a modem, etc. The communication section 1209 performs communication processing via a network such as the Internet. A drive 1210 is also connected to the I / O interface 1205 as needed. A removable medium 1211, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1210 as needed, so that a computer program read therefrom is installed into the storage section 1208 as needed.

[0138] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 1209, and / or installed from the removable medium 1211. When the computer program is executed by the central processing unit (CPU) 1201, the above-mentioned functions defined in the system of the present invention are executed.

[0139] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, system or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media that can send, propagate or transmit a program for use by or in conjunction with an instruction execution system, system or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0140] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0141] The modules involved in the embodiments of the present invention may be implemented by software or hardware. The modules described may also be set in a processor. For example, they may be described as: a processor includes a sending module, an acquisition module, a site configuration module, and a route configuration module. The names of these modules do not, in some cases, constitute limitations on the modules themselves. For example, the sending module may also be described as a "module for sending a picture acquisition request to the connected server."

[0142] As another aspect, the present invention further provides a computer-readable medium, which may be included in the device described in the above embodiment; or may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device includes:

[0143] A passenger sample set with a sample number greater than a preset vehicle capacity is obtained, and the passenger sample set is used as a sample set to be analyzed; a split operation is iteratively performed to obtain multiple target sample sets, and a station corresponding to each target sample set is determined; the split operation includes: splitting the sample set to be analyzed into two candidate sample sets; judging whether the split result obtained by the current split operation meets the preset split condition; if so, the candidate sample set with a sample number greater than the preset vehicle capacity is used as a new sample set to be analyzed, and the candidate sample set with a sample number less than or equal to the preset vehicle capacity is used as a target sample set; otherwise, the sample set to be analyzed is used as a target sample set; and a vehicle route is generated according to a preset route starting point and the stations corresponding to each target sample set.

[0144] The bus route optimization method of the embodiment of the present invention optimizes the bus stops based on subjective factors such as the passenger's address and the passenger's wishes, thereby shortening the distance from the passenger's residence to the stop. On the basis of determining reasonable stops, the passenger's riding satisfaction is fully considered, and the optimal bus route is determined with the minimum total passenger mileage as the goal.

[0145] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for optimizing vehicle routes, It is characterized in that The method comprises: Acquire a passenger sample set whose sample quantity is greater than a preset vehicle capacity, and use the passenger sample set as a sample set to be analyzed; Iteratively perform a split operation to obtain multiple target sample sets, and determine the site corresponding to each target sample set; the split operation includes: splitting the sample set to be analyzed into two candidate sample sets; judging whether the split result obtained by the current split operation meets the preset split condition; if so, taking the candidate sample set with a sample number greater than the preset vehicle capacity as a new sample set to be analyzed, and taking the candidate sample set with a sample number less than or equal to the preset vehicle capacity as a target sample set; otherwise, taking the sample set to be analyzed as a target sample set; the preset split condition includes: the sum of the divergences of the two candidate sample sets obtained by the current split operation is less than the divergence of the current sample set to be analyzed, and the distance between the two candidate sample sets obtained by the current split operation is greater than the preset distance threshold; A vehicle route is generated according to a preset route starting point and a station corresponding to each of the target sample sets.

2. The method according to claim 1, It is characterized in that Obtain a passenger sample set whose sample number is greater than the preset vehicle capacity, including: Obtain the riding records of all passengers within the target range within a preset historical period, and determine the number of rides of each passenger within the preset historical period based on the riding record of each passenger; and select passengers whose number of rides is greater than or equal to a preset number threshold from all passengers within the target range to obtain the passenger sample set.

3. The method according to claim 1, It is characterized in that The sample set to be analyzed is split into two candidate sample sets, including: Select two samples from the sample set to be analyzed, and use the sample position of each selected sample as the cluster center of a candidate sample set; Traverse each other sample in the sample set to be analyzed: determine the distance between the other sample and each cluster center, classify the other sample into the candidate sample set where the cluster center with a smaller distance is located, and then update the cluster center of the corresponding candidate sample set.

4. The method according to claim 3, It is characterized in that The sample location includes: sample longitude and sample latitude; Updating the cluster center of the corresponding candidate sample set includes: using the average longitude of all samples in the corresponding candidate sample set as the updated longitude of the cluster center of the corresponding candidate sample set, and using the average latitude of all samples in the corresponding candidate sample set as the updated latitude of the cluster center of the corresponding candidate sample set.

5. The method according to claim 1, It is characterized in that The standard deviation of the sample positions is used as a measure of the divergence; the distance between the cluster centers of two candidate sample sets is used as the distance between the two candidate sample sets.

6. The method according to claim 4, It is characterized in that The method further comprises: The splitting operation is iteratively performed to obtain a plurality of target sample sets. Before determining the site corresponding to each of the target sample sets, the sample position of each sample is standardized by converting the longitude and latitude scales.

7. The method according to claim 1, It is characterized in that Generating a vehicle route according to a preset route starting point and a station corresponding to each target sample set includes: According to the preset route starting point and the stations corresponding to each target sample set, a mileage saving algorithm is used to determine a plurality of station sets; With the goal of minimizing the total passenger mileage, a vehicle route corresponding to each of the station sets is generated.

8. The method according to claim 7, It is characterized in that Before generating a vehicle route corresponding to each of the station sets with the goal of minimizing the total passenger mileage, the method further includes: It is confirmed that the total number of passengers in the plurality of site sets is less than or equal to the preset vehicle capacity, otherwise, the site set is deleted from the plurality of site sets.

9. A vehicle route optimization system, It is characterized in that The system comprises: An acquisition module, used for acquiring a passenger sample set whose sample quantity is greater than a preset vehicle capacity, and using the passenger sample set as a sample set to be analyzed; A site configuration module is used to iteratively perform a split operation to obtain multiple target sample sets and determine the site corresponding to each target sample set; the split operation includes: splitting the sample set to be analyzed into two candidate sample sets; judging whether the split result obtained by the current split operation meets the preset split condition; if so, taking the candidate sample set with a sample number greater than the preset vehicle capacity as a new sample set to be analyzed, and taking the candidate sample set with a sample number less than or equal to the preset vehicle capacity as a target sample set; otherwise, taking the sample set to be analyzed as a target sample set; the preset split condition includes: the sum of the divergences of the two candidate sample sets obtained by the current split operation is less than the divergence of the current sample set to be analyzed, and the distance between the two candidate sample sets obtained by the current split operation is greater than the preset distance threshold; The route configuration module is used to generate a vehicle route according to a preset route starting point and a station corresponding to each target sample set.

10. A vehicle route optimization device, It is characterized in that include: one or more processors; a storage system for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 8.

11. A computer readable medium having a computer program stored thereon, It is characterized in that When the program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.