CN115049105A - Taxi track big data driven passenger carrying route recommendation method, device and medium - Google Patents
Taxi track big data driven passenger carrying route recommendation method, device and medium Download PDFInfo
- Publication number
- CN115049105A CN115049105A CN202210531460.1A CN202210531460A CN115049105A CN 115049105 A CN115049105 A CN 115049105A CN 202210531460 A CN202210531460 A CN 202210531460A CN 115049105 A CN115049105 A CN 115049105A
- Authority
- CN
- China
- Prior art keywords
- road network
- network node
- route recommendation
- point
- generating
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 48
- 238000005457 optimization Methods 0.000 claims abstract description 21
- 239000011159 matrix material Substances 0.000 claims description 15
- 230000015654 memory Effects 0.000 claims description 12
- 230000008859 change Effects 0.000 description 21
- 230000006870 function Effects 0.000 description 9
- 230000008569 process Effects 0.000 description 8
- 230000009286 beneficial effect Effects 0.000 description 7
- 238000013075 data extraction Methods 0.000 description 7
- 238000004364 calculation method Methods 0.000 description 6
- 239000000284 extract Substances 0.000 description 4
- 238000012545 processing Methods 0.000 description 4
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000010586 diagram Methods 0.000 description 3
- 238000000605 extraction Methods 0.000 description 3
- 238000004891 communication Methods 0.000 description 2
- 238000011161 development Methods 0.000 description 1
- 238000006073 displacement reaction Methods 0.000 description 1
- 230000008030 elimination Effects 0.000 description 1
- 238000003379 elimination reaction Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000011156 evaluation Methods 0.000 description 1
- 239000000446 fuel Substances 0.000 description 1
- 230000002068 genetic effect Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 239000002699 waste material Substances 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q10/00—Administration; Management
- G06Q10/04—Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
- G06Q10/047—Optimisation of routes or paths, e.g. travelling salesman problem
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/29—Geographical information databases
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q50/00—Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
- G06Q50/40—Business processes related to the transportation industry
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02T—CLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
- Y02T10/00—Road transport of goods or passengers
- Y02T10/10—Internal combustion engine [ICE] based vehicles
- Y02T10/40—Engine management systems
Landscapes
- Engineering & Computer Science (AREA)
- Business, Economics & Management (AREA)
- Human Resources & Organizations (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Economics (AREA)
- Strategic Management (AREA)
- General Physics & Mathematics (AREA)
- Databases & Information Systems (AREA)
- Marketing (AREA)
- General Business, Economics & Management (AREA)
- Tourism & Hospitality (AREA)
- Development Economics (AREA)
- Quality & Reliability (AREA)
- Operations Research (AREA)
- Game Theory and Decision Science (AREA)
- Entrepreneurship & Innovation (AREA)
- Remote Sensing (AREA)
- Data Mining & Analysis (AREA)
- General Engineering & Computer Science (AREA)
- Health & Medical Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Primary Health Care (AREA)
- Traffic Control Systems (AREA)
- Navigation (AREA)
Abstract
Description
技术领域technical field
本申请实施例涉及数据处理技术领域,尤其涉及出租车轨迹大数据驱动的载客路线推荐方法、装置及介质。The embodiments of the present application relate to the technical field of data processing, and in particular, to a method, device, and medium for recommending passenger routes driven by taxi trajectory big data.
背景技术Background technique
在大数据时代,随着数字技术的迅猛发展,生活节奏变得越来越快,随之而来的是,人们对出行需求也变得越来越高。为了满足人们高效出行的需求,出租车轨迹大数据驱动的载客路线推荐方法应运而生。In the era of big data, with the rapid development of digital technology, the pace of life has become faster and faster, and with it, people's demand for travel has become higher and higher. In order to meet people's needs for efficient travel, a passenger route recommendation method driven by big data of taxi trajectories emerges as the times require.
在现有技术中,传统的出租车轨迹大数据驱动的载客路线推荐方法通常基于贪心算法或者遗传算法,均需访问大量节点以计算得出最短路线。由于需要访问大量节点,极易造成“I/O开销大、内存消耗高”等问题。同时,在计算量庞大且算力受限的情况下,需要大量的计算时间才能得出最短路线,从而导致“运行时间长、计算效率低”等问题。In the prior art, the traditional method for recommending passenger routes driven by big data of taxi trajectories is usually based on greedy algorithm or genetic algorithm, which needs to visit a large number of nodes to calculate the shortest route. Due to the need to access a large number of nodes, it is easy to cause problems such as "high I/O overhead and high memory consumption". At the same time, in the case of a huge amount of calculation and limited computing power, it takes a lot of computing time to get the shortest route, which leads to problems such as "long running time and low computing efficiency".
此外,在城市交通中盲目巡航容易导致“燃油消耗高、交通拥堵严重”等问题。本申请提出一种集成角度和A*算法的Gurobi优化算法,应用于复杂城市路网中面向出租车轨迹大数据推荐最优载客路线。首先,提出一种基于出租车GPS方向的路网节点提取方法,解决难以从出租车GPS轨迹数据中提取路网节点问题。其次,构造一种基于角度的尖锐点消除方法(ASPE),优化Gurobi算法的搜索能力,以寻求最短路线。再次,设计一种基于A*算法的Gurobi优化算法(A-Gurobi),利用A*算法的启发式函数,增强出发地到目的地的快速引导能力,提高Gurobi算法的执行效率。In addition, blind cruising in urban traffic can easily lead to problems such as "high fuel consumption and serious traffic congestion". This application proposes a Gurobi optimization algorithm integrating angle and A * algorithm, which is applied to recommend optimal passenger routes for taxi trajectory big data in complex urban road networks. First, a method for extracting road network nodes based on taxi GPS directions is proposed to solve the problem of difficulty in extracting road network nodes from taxi GPS trajectory data. Secondly, an angle-based sharp point elimination method (ASPE) is constructed to optimize the search ability of the Gurobi algorithm to find the shortest route. Thirdly, a Gurobi optimization algorithm (A-Gurobi) based on the A * algorithm is designed, which uses the heuristic function of the A * algorithm to enhance the fast guidance ability from the starting point to the destination and improve the execution efficiency of the Gurobi algorithm.
发明内容SUMMARY OF THE INVENTION
本申请实施例提供了出租车轨迹大数据驱动的载客路线推荐方法、装置及介质,可以快速地为车辆规划起点到终点的最短路线。The embodiments of the present application provide a method, device, and medium for recommending a passenger-carrying route driven by taxi trajectory big data, which can quickly plan the shortest route from the starting point to the ending point for the vehicle.
本申请实施例第一方面提供了一种出租车轨迹大数据驱动的载客路线推荐方法,包括:A first aspect of the embodiments of the present application provides a taxi trajectory big data-driven passenger route recommendation method, including:
获取目标区域的车辆运动轨迹数据集;Obtain the vehicle motion trajectory dataset of the target area;
根据所述车辆运动轨迹数据集生成路网节点数据;generating road network node data according to the vehicle motion trajectory data set;
根据所述路网节点数据生成路线推荐模型,所述路线推荐模型融合有启发式算法和最优化算法;Generate a route recommendation model according to the road network node data, and the route recommendation model integrates a heuristic algorithm and an optimization algorithm;
获取用户的起点和终点,所述起点和所述终点位于所述目标区域;Obtain the starting point and the ending point of the user, and the starting point and the ending point are located in the target area;
根据所述路线推荐模型生成所述起点到所述终点的推荐路线。A recommended route from the start point to the end point is generated according to the route recommendation model.
可选的,所述根据所述路网节点数据生成路线推荐模型包括:Optionally, the generating a route recommendation model according to the road network node data includes:
将A*算法的启发式融入Gurobi算法,生成A-Gurobi算法;The heuristic of the A * algorithm is integrated into the Gurobi algorithm to generate the A-Gurobi algorithm;
根据所述路网节点数据和所述A-Gurobi算法生成路线推荐模型,其中,所述路网节点数据作为所述路线推荐模型的参数。A route recommendation model is generated according to the road network node data and the A-Gurobi algorithm, wherein the road network node data is used as a parameter of the route recommendation model.
可选的,所述根据所述路线推荐模型生成所述起点到所述终点的推荐路线包括:Optionally, the generating the recommended route from the start point to the end point according to the route recommendation model includes:
将所述起点分别与所述路线推荐模型的路网节点数据中的每个路网节点以及所述终点相连,得到多条线段,其中,每个路网节点对应一条线段,所述起点与所述终点形成的线段为目标线段;Connect the starting point with each road network node and the end point in the road network node data of the route recommendation model, respectively, to obtain a plurality of line segments, wherein each road network node corresponds to a line segment, and the starting point is connected to all the line segments. The line segment formed by the end point is the target line segment;
计算所述目标线段分别与其他线段形成的夹角的度数;Calculate the degrees of the included angles formed by the target line segment and other line segments respectively;
将与所述目标线段形成的夹角的度数大于或等于第一预设角度的线段对应的路网节点删除,得到推荐路网节点;Delete the road network node corresponding to the line segment whose angle formed by the target line segment is greater than or equal to the first preset angle to obtain the recommended road network node;
根据所述推荐路网节点、所述起点和所述终点生成推荐路线。A recommended route is generated according to the recommended road network node, the starting point and the ending point.
可选的,所述根据所述车辆运动轨迹数据集生成路网节点数据包括:Optionally, the generating the road network node data according to the vehicle motion trajectory data set includes:
从所述车辆运动轨迹数据集中提取目标运动轨迹数据集,所述目标运动轨迹数据集的运营状态连续为空车-载客-载客,所述运营状态包括空车和载客;Extracting a target movement trajectory data set from the vehicle movement trajectory data set, the operation status of the target movement trajectory data set is continuously empty vehicle-passenger-passenger, and the operation status includes empty vehicle and passenger;
根据所述目标运动轨迹数据集生成路网节点数据。Generate road network node data according to the target motion trajectory data set.
可选的,所述根据所述目标运动轨迹数据集生成路网节点数据包括:Optionally, the generating the road network node data according to the target motion trajectory data set includes:
从所述目标运动轨迹数据集中提取每个点的时间、坐标和方向;Extract the time, coordinates and direction of each point from the target motion trajectory data set;
根据每个点的坐标和方向确定路网节点;Determine the road network node according to the coordinates and direction of each point;
根据路网节点生成路网节点数据,所述路网节点数据包括带权无向图和邻接矩阵。Generate road network node data according to road network nodes, and the road network node data includes a weighted undirected graph and an adjacency matrix.
可选的,所述根据每个点的坐标和方向确定路网节点包括:Optionally, the determining the road network node according to the coordinates and direction of each point includes:
对于任意一个目标运动轨迹数据,根据每个点的时间确定点之间的邻接关系;For any target motion trajectory data, determine the adjacency relationship between points according to the time of each point;
根据点之间的邻接关系和每个点的坐标计算方向变化量,所述方向变化量为一个点与两个邻接点分别形成的两条线段的角度;Calculate the direction change amount according to the adjacency relationship between the points and the coordinates of each point, and the direction change amount is the angle of two line segments formed by one point and two adjacent points respectively;
当出现方向变化量大于或等于第二预设角度时,确定对应的三个点中与其他两个点均邻接的点为路网节点。When the amount of change in the appearance direction is greater than or equal to the second preset angle, a point adjacent to the other two points among the corresponding three points is determined as a road network node.
可选的,所述根据路网节点生成路网节点数据包括:Optionally, the generating the road network node data according to the road network node includes:
确定路网节点之间的邻接关系;Determine the adjacency relationship between road network nodes;
根据每个路网节点的坐标计算相邻路网节点之间的距离;Calculate the distance between adjacent road network nodes according to the coordinates of each road network node;
根据路网节点之间的邻接关系和相邻路网节点之间的距离生成邻接矩阵和带权无向图;Generate an adjacency matrix and a weighted undirected graph according to the adjacency relationship between road network nodes and the distance between adjacent road network nodes;
根据所述带权无向图和所述邻接矩阵生成路网节点数据。Generate road network node data according to the weighted undirected graph and the adjacency matrix.
可选的,所述从所述车辆运动轨迹数据集中提取目标运动轨迹数据集之前,所述方法还包括:Optionally, before extracting the target motion trajectory data set from the vehicle motion trajectory data set, the method further includes:
将所述车辆运动轨迹数据集中的孤立点进行删除。Delete the isolated points in the vehicle motion trajectory data set.
本申请实施例第二方面提供了一种出租车轨迹大数据驱动的载客路线推荐装置,包括:A second aspect of the embodiments of the present application provides a taxi trajectory big data-driven passenger route recommendation device, including:
第一获取单元,用于获取目标区域的车辆运动轨迹数据集;a first acquiring unit, used for acquiring the vehicle motion trajectory data set of the target area;
第一生成单元,用于根据所述车辆运动轨迹数据集生成路网节点数据;a first generating unit, configured to generate road network node data according to the vehicle motion trajectory data set;
第二生成单元,用于根据所述路网节点数据生成路线推荐模型,所述路线推荐模型融合有启发式算法和最优化算法;a second generating unit, configured to generate a route recommendation model according to the road network node data, where the route recommendation model incorporates a heuristic algorithm and an optimization algorithm;
第二获取单元,用于获取用户的起点和终点,所述起点和所述终点位于所述目标区域;a second acquiring unit, configured to acquire the user's starting point and end point, where the starting point and the end point are located in the target area;
第三生成单元,用于根据所述路线推荐模型生成所述起点到所述终点的推荐路线。A third generating unit, configured to generate a recommended route from the start point to the end point according to the route recommendation model.
本申请实施例第三方面提供了一种出租车轨迹大数据驱动的载客路线推荐装置,包括:A third aspect of the embodiments of the present application provides a taxi trajectory big data-driven passenger route recommendation device, including:
处理器、存储器、输入输出单元以及总线;processors, memories, input and output units, and buses;
所述处理器与所述存储器、所述输入输出单元以及所述总线相连;the processor is connected to the memory, the input-output unit and the bus;
所述存储器中保存有程序,所述处理器调用所述程序执行第一方面及第一方面任意一种可能的实施方式中的出租车轨迹大数据驱动的载客路线推荐方法。A program is stored in the memory, and the processor invokes the program to execute the taxi trajectory big data-driven passenger route recommendation method in the first aspect and any possible implementation manner of the first aspect.
本申请实施例第四方面提供了一种计算机可读存储介质,所述计算机可读存储介质中保存有程序,所述程序在计算机上执行时使得所述计算机执行第一方面及第一方面任意一种可能的实施方式中的出租车轨迹大数据驱动的载客路线推荐方法。A fourth aspect of the embodiments of the present application provides a computer-readable storage medium, where a program is stored in the computer-readable storage medium, and when the program is executed on a computer, the computer causes the computer to execute any one of the first aspect and the first aspect. A taxi trajectory big data-driven passenger route recommendation method in a possible implementation.
从以上技术方案可以看出,本申请实施例具有以下优点:As can be seen from the above technical solutions, the embodiments of the present application have the following advantages:
本申请实施例提供的出租车轨迹大数据驱动的载客路线推荐方法,首先获取目标区域的车辆运动轨迹数据集,接着再根据车辆轨迹数据集生成路网节点数据,然后根据路网节点数据生成融合有启发式算法和最优化算法的路线推荐模型,最后根据路线推荐模型为用户生成从起点到终点的推荐路线。由于本申请实施例中的路线推荐模型融合有启发式算法和最优化算法,因此能够在生成推荐路线的过程中访问更少节点,相比于基于贪心算法的出租车轨迹大数据驱动的载客路线推荐方法,减小了计算量,以及在算力相同的情况下,能够更快地生成推荐路线,有利于提高计算效率。同时,降低了用户出行的花费时间,有利于提升用户体验。The taxi trajectory big data-driven passenger route recommendation method provided by the embodiment of the present application first obtains the vehicle motion trajectory data set of the target area, then generates road network node data according to the vehicle trajectory data set, and then generates the road network node data according to the road network node data. A route recommendation model that integrates heuristic algorithms and optimization algorithms, and finally generates a recommended route from the starting point to the end point for the user according to the route recommendation model. Since the route recommendation model in the embodiment of the present application integrates heuristic algorithms and optimization algorithms, it is possible to visit fewer nodes in the process of generating the recommended route, compared with the big data-driven taxi trajectory based on the greedy algorithm for passenger-carrying. The route recommendation method reduces the amount of calculation, and can generate recommended routes faster under the same computing power, which is beneficial to improve computing efficiency. At the same time, the travel time of the user is reduced, which is beneficial to improve the user experience.
附图说明Description of drawings
图1为本申请实施例中出租车轨迹大数据驱动的载客路线推荐方法一个实施例的流程示意图;1 is a schematic flowchart of an embodiment of a method for recommending passenger routes driven by taxi trajectory big data in an embodiment of the present application;
图2为本申请实施例中出租车轨迹大数据驱动的载客路线推荐方法另一个实施例的流程示意图;FIG. 2 is a schematic flowchart of another embodiment of a method for recommending a passenger-carrying route driven by taxi trajectory big data in an embodiment of the present application;
图3为本申请实施例中出租车轨迹大数据驱动的载客路线推荐装置一个实施例的结构示意图;FIG. 3 is a schematic structural diagram of an embodiment of a taxi trajectory big data-driven passenger route recommendation device according to an embodiment of the application;
图4为本申请实施例中出租车轨迹大数据驱动的载客路线推荐装置另一个实施例的结构示意图;FIG. 4 is a schematic structural diagram of another embodiment of a taxi trajectory big data-driven passenger route recommendation device according to an embodiment of the application;
图5为本申请实施例中出租车轨迹大数据驱动的载客路线推荐装置另一个实施例的结构示意图。FIG. 5 is a schematic structural diagram of another embodiment of a taxi trajectory big data-driven passenger route recommendation device according to an embodiment of the present application.
具体实施方式Detailed ways
本申请实施例提供了出租车轨迹大数据驱动的载客路线推荐方法、装置及介质,用于快速地为车辆规划起点到终点的最短路线。The embodiments of the present application provide a method, device, and medium for recommending a passenger-carrying route driven by taxi trajectory big data, which are used to quickly plan the shortest route from the start point to the end point for the vehicle.
本申请的方法可以应用于服务器、终端或者其它具备逻辑处理能力的设备,对此,本申请不作限定。为了方便描述,下面以执行主体为服务器为例进行描述。The method of the present application can be applied to a server, a terminal, or other devices with logic processing capability, which is not limited in this application. For convenience of description, the following description takes the execution subject as the server as an example.
下面将结合附图,对本申请中的实施例进行描述。The embodiments of the present application will be described below with reference to the accompanying drawings.
请参阅图1,本申请实施例中出租车轨迹大数据驱动的载客路线推荐方法一个实施例包括:Referring to FIG. 1, an embodiment of the taxi trajectory big data-driven passenger route recommendation method in the embodiment of the present application includes:
101、服务器获取目标区域的车辆运动轨迹数据集;101. The server obtains a vehicle motion trajectory data set of the target area;
在实际应用中,生成推荐路线是基于移动轨迹大数据,需要从大量的数据中提取相关信息,因此,服务器首先需要获取目标区域的车辆运动轨迹数据集。需要说明的是,车辆运动轨迹数据集包括大规模的车辆运动轨迹数据,每一条车辆运动轨迹数据由多个点组成,每个点具有相应的属性信息,每一条车辆运动轨迹数据都与一辆车对应,而一辆车可以包括一条或者多条车辆运动轨迹数据,具体此处不作限定。In practical applications, the generation of recommended routes is based on the big data of moving trajectories, and relevant information needs to be extracted from a large amount of data. Therefore, the server first needs to obtain the data set of vehicle motion trajectories in the target area. It should be noted that the vehicle motion trajectory data set includes large-scale vehicle motion trajectory data. Each vehicle motion trajectory data consists of multiple points, each point has corresponding attribute information, and each vehicle motion trajectory data is associated with a vehicle. The vehicle corresponds to the vehicle, and a vehicle may include one or more pieces of vehicle motion trajectory data, which is not specifically limited here.
102、服务器根据车辆运动轨迹数据集生成路网节点数据;102. The server generates road network node data according to the vehicle motion trajectory data set;
服务器在得到车辆运动轨迹数据集后,可以对车辆轨迹数据集进行处理,从而生成路网节点数据,路网节点数据包括多个路网节点,以及相邻路网节点之间的距离。After obtaining the vehicle trajectory data set, the server can process the vehicle trajectory data set to generate road network node data, where the road network node data includes multiple road network nodes and distances between adjacent road network nodes.
103、服务器根据路网节点数据生成路线推荐模型;103. The server generates a route recommendation model according to the road network node data;
在生成路网节点数据后,服务器可以根据路网节点数据生成路线推荐模型,通过路线推荐模型为车辆提供路线推荐服务。需要说明的是,路线推荐模型融合有启发式算法和最优化算法,并具备启发式算法和最优化算法的属性。即,只要给出起点和终点,路线推荐模型就能在较短时间内,根据自身的路网节点数据生成最短路线。After generating the road network node data, the server can generate a route recommendation model according to the road network node data, and provide a route recommendation service for the vehicle through the route recommendation model. It should be noted that the route recommendation model incorporates a heuristic algorithm and an optimization algorithm, and has the attributes of a heuristic algorithm and an optimization algorithm. That is, as long as the start and end points are given, the route recommendation model can generate the shortest route according to its own road network node data in a relatively short period of time.
104、服务器获取用户的起点和终点;104. The server obtains the starting point and the ending point of the user;
若为用户生成推荐路线,则首先需要获取用户的起点和终点,起点和终点位于目标区域,因此,服务器获取用户的起点和终点。需要说明的是,起点和终点都位于目标区域,起点和终点均以坐标形式予以表示。To generate a recommended route for a user, the user's starting point and end point need to be obtained first, and the starting point and the end point are located in the target area. Therefore, the server obtains the user's starting point and end point. It should be noted that both the starting point and the ending point are located in the target area, and the starting point and the ending point are expressed in the form of coordinates.
105、服务器根据路线推荐模型生成起点到终点的推荐路线。105. The server generates a recommended route from the start point to the end point according to the route recommendation model.
服务器在获取用户的起点和终点后,则可以将起点和终点输入路线推荐模型,通过路线推荐模型生成从起点到终点的推荐路线。在生成推荐路线后,再将推荐路线反馈回给用户,这样用户就可以根据推荐路线从起点出发,行驶到终点,从而完成出行计划。After the server obtains the user's starting point and ending point, it can input the starting point and the ending point into the route recommendation model, and generate a recommended route from the starting point to the ending point through the route recommendation model. After the recommended route is generated, the recommended route is fed back to the user, so that the user can start from the starting point and drive to the end point according to the recommended route, thereby completing the travel plan.
需要说明的是,本实施例中的出租车轨迹大数据驱动的载客路线推荐方法,既可以在单机服务器执行,也可以在分布式服务器执行,具体此处不作限定。当在分布式服务器上执行时,由于任务拆分至多个服务器,则可以在多个服务器上并行执行,因此可以提高执行效率。It should be noted that, the method for recommending a passenger carrying route driven by the taxi trajectory big data in this embodiment may be executed on a single server or a distributed server, which is not specifically limited here. When executed on a distributed server, since the task is divided into multiple servers, it can be executed in parallel on multiple servers, so the execution efficiency can be improved.
本实施例中,服务器首先获取目标区域的车辆运动轨迹数据集,接着根据车辆轨迹数据集生成路网节点数据,然后根据路网节点数据生成融合有启发式算法和最优化算法的路线推荐模型,最后根据路线推荐模型为用户生成从起点到终点的推荐路线。由于本申请实施例中的路线推荐模型融合有启发式算法和最优化算法,因此能够在生成推荐路线的过程中访问更少节点,相比于基于贪心算法的出租车轨迹大数据驱动的载客路线推荐方法,减小了计算量,以及在算力相同的情况下,能够更快地生成推荐路线,有利于提高计算效率。同时,降低了用户出行花费时间,有利于提升用户体验。In this embodiment, the server first obtains the vehicle motion trajectory data set of the target area, then generates road network node data according to the vehicle trajectory data set, and then generates a route recommendation model that combines the heuristic algorithm and the optimization algorithm according to the road network node data, Finally, according to the route recommendation model, a recommended route from the starting point to the end point is generated for the user. Since the route recommendation model in the embodiment of the present application integrates heuristic algorithms and optimization algorithms, it is possible to visit fewer nodes in the process of generating the recommended route, compared with the big data-driven taxi trajectory based on the greedy algorithm for passenger-carrying. The route recommendation method reduces the amount of calculation, and can generate recommended routes faster under the same computing power, which is beneficial to improve computing efficiency. At the same time, the travel time of the user is reduced, which is beneficial to improve the user experience.
请参阅图2,本申请实施例中出租车轨迹大数据驱动的载客路线推荐方法另一个实施例包括:Referring to FIG. 2, another embodiment of the taxi trajectory big data-driven passenger route recommendation method in the embodiment of the present application includes:
201、服务器获取目标区域的车辆运动轨迹数据集;201. The server obtains a vehicle motion trajectory data set of the target area;
本实施中,步骤201与前述实施例中的步骤101类似,此处不再赘述。In this implementation, step 201 is similar to step 101 in the foregoing embodiment, and details are not repeated here.
202、服务器将车辆运动轨迹数据集中的孤立点进行删除;202. The server deletes the isolated points in the vehicle motion trajectory data set;
在服务器得到车辆运功轨迹数据集后,可以获取其中的任意一条未处理过的车辆运动轨迹数据,判断其中的点是否均是连续,如果发现其中有与其他点不连续的点,则可以判定为孤立点,即垃圾数据,然后执行删除处理,执行完之后标记该条车辆运动轨迹数据为已进行孤立点而进行删除。服务器重复执行获取车辆运动轨迹数据,判断是否存在孤立点,直至所有的车辆运动轨迹数据均被处理。After the server obtains the vehicle motion trajectory data set, it can obtain any unprocessed vehicle motion trajectory data, and judge whether the points are continuous. If it is found that there are points that are not continuous with other points, it can be determined is an isolated point, that is, garbage data, and then delete processing is performed, and after the execution is completed, the piece of vehicle motion trajectory data is marked as an isolated point and deleted. The server repeatedly executes the acquisition of vehicle motion trajectory data, and determines whether there are isolated points, until all vehicle motion trajectory data are processed.
203、服务器从车辆运动轨迹数据集中提取目标运动轨迹数据集;203. The server extracts the target motion trajectory data set from the vehicle motion trajectory data set;
服务器在删除车辆运动轨迹数据集中的孤立点中的孤立点之后,可以从车辆运动轨迹数据集中执行目标运动轨迹数据集的提取。具体的是,依次获取任意一条进行数据提取的车辆运动轨迹数据,然后将其中运营状态连续为空车-载客-载客的数据进行提取并作为目标运动轨迹数据,运营状态包括空车和载客两个状态,需要说明的是,在提取完一段空车-载客-载客之后,从下一个连续的点再次执行数据提取,因此每段被提取的空车-载客-载客均为不重复。在对一条车辆运动轨迹数据执行数据提取之后,将该车辆运动轨迹数据标记为已进行目标运动轨迹数据提取,然后再对下一条未被标记为已进行目标运动轨迹数据提取的车辆运动轨迹数据执行数据提取操作,直至所有车辆运动轨迹数据均被标记为已进行目标运动轨迹数据提取,这样便可得到目标运动轨迹数据集。需要说明的是,车辆运动轨迹数据由多个运营状态段组成,每个运营状态段由连续的多个点组成。After deleting the isolated points in the isolated points in the vehicle motion trajectory dataset, the server may perform extraction of the target motion trajectory dataset from the vehicle motion trajectory dataset. Specifically, any piece of vehicle motion trajectory data for data extraction is sequentially obtained, and then the data whose operating status is continuously empty-car-loaded-passenger is extracted and used as the target motion trajectory data, and the operating status includes empty and loaded. It should be noted that after extracting a segment of empty vehicle-passenger-passenger, data extraction is performed again from the next consecutive point, so each extracted segment of empty vehicle-passenger-passenger is to not repeat. After performing data extraction on a piece of vehicle motion track data, mark the vehicle motion track data as having undergone target motion track data extraction, and then execute the next piece of vehicle motion track data that is not marked as having undergone target motion track data extraction. The data extraction operation is performed until all vehicle motion trajectory data are marked as having been subjected to the target motion trajectory data extraction, so that the target motion trajectory data set can be obtained. It should be noted that the vehicle motion trajectory data is composed of multiple operating state segments, and each operating state segment is composed of multiple consecutive points.
204、服务器从目标运动轨迹数据集中提取每个点的时间和坐标;204. The server extracts the time and coordinates of each point from the target motion trajectory data set;
在提取目标运动轨迹数据集之后,服务器可以提取每个点的时间、坐标和方向的信息,从而利用这些信息生成路网节点数据。After extracting the target motion trajectory data set, the server can extract the time, coordinate and direction information of each point, so as to use this information to generate road network node data.
205、服务器对于任意一个目标运动轨迹数据,根据每个点的时间确定点之间的邻接关系;205. For any target motion trajectory data, the server determines the adjacency relationship between points according to the time of each point;
针对任意一个目标运动轨迹数据,服务器可以根据该目标运动轨迹数据中每个点的时间确定这些之间点的邻接关系。其中,对于任意一个点,在该点的时间之前的所有点中,与该点的时间最接近的时间所对应的点与该点相互邻接;在该点的时间之后的所有点中,与该点的时间最接近的时间所对应的点与该点相互邻接。For any piece of target motion trajectory data, the server may determine the adjacency relationship between the points according to the time of each point in the target motion trajectory data. Among them, for any point, among all the points before the time of the point, the point corresponding to the time closest to the time of the point is adjacent to the point; among all the points after the time of the point, it is adjacent to the point. The point whose time is closest to the point is adjacent to the point.
206、服务器根据点之间的邻接关系和每个点的坐标计算方向变化量;206. The server calculates the direction change amount according to the adjacency relationship between the points and the coordinates of each point;
在得到该目标运动轨迹数据的点之间的邻接关系后,服务器可以根据这些点之间的邻接关系和这些点的坐标,计算方向变化量。具体的是,服务器首先获取一个目标点,目标点即为有两个邻接点的点,接着再根据该目标点的坐标,以及该目标点的两个邻接点的坐标,分别计算该目标点分别与两个邻接点的直线函数,然后再计算两个直线函数的角度,该角度即为该目标点对应的方向变化量,该方向变化量表示车辆在该目标点转向的角度,该方向变化量对应3个点,分别为该目标点和该目标点的两个邻接点。服务器在计算一个目标点的方向变化量后,将该目标点标记为已计算方向变化量,然后再计算下一个未标记为已计算方向变化量的目标点的方向变化量,直至将所有目标点的方向变化量全部计算完毕。After obtaining the adjacency relationship between the points of the target motion trajectory data, the server may calculate the direction change amount according to the adjacency relationship between the points and the coordinates of the points. Specifically, the server first obtains a target point, which is a point with two adjacent points, and then calculates the target point according to the coordinates of the target point and the coordinates of the two adjacent points of the target point. The straight line function with two adjacent points, and then calculate the angle of the two straight line functions, the angle is the direction change amount corresponding to the target point, the direction change amount represents the steering angle of the vehicle at the target point, the direction change amount Corresponding to 3 points, which are the target point and the two adjacent points of the target point. After calculating the direction change amount of a target point, the server marks the target point as the calculated direction change amount, and then calculates the direction change amount of the next target point that is not marked as the calculated direction change amount, until all the target points are The direction changes of , are all calculated.
207、当出现方向变化量大于或等于第二预设角度时,服务器确定对应的三个点中与其他两个点均邻接的点为路网节点;207. When the amount of directional change is greater than or equal to the second preset angle, the server determines that a point adjacent to the other two points among the corresponding three points is a road network node;
在计算该目标运动轨迹数据中的方向变化量的过程中,每计算一个方向变化量,服务器则可以对该方向变化量进行判定,如果该方向变化量大于或等于第二预设角度,则判定该方向变化量对应的三个点中与其他两个点均邻接的点为路网节点。需要说明的是,第二预设角度一般设置为90°,但也可以设置为其他度数,具体此处不作限定。In the process of calculating the direction change amount in the target motion trajectory data, each time a direction change amount is calculated, the server may determine the direction change amount, and if the direction change amount is greater than or equal to the second preset angle, determine Among the three points corresponding to the direction change, the point adjacent to the other two points is the road network node. It should be noted that the second preset angle is generally set to 90°, but may also be set to other degrees, which is not specifically limited here.
需要说明的是,服务器不仅可以在计算该目标运动轨迹数据中的方向变化量的过程中执行路网节点的判定,也可以在计算该目标运动轨迹数据中的所有方向变化量后,再执行路网节点的判定,具体此处不作限定。It should be noted that the server can not only perform the determination of the road network node in the process of calculating the directional variation in the target motion trajectory data, but also perform the road network node determination after calculating all the directional variations in the target motion trajectory data. The determination of the network node is not specifically limited here.
服务器重复执行步骤205至207,从而确定所有目标运动轨迹数据的路网节点。The server repeatedly executes
208、服务器确定路网节点之间的邻接关系;208. The server determines an adjacency relationship between road network nodes;
由于获取到的目标区域的车辆运动轨迹数据集的数据量庞大,在大规模数据情况下,服务器得到的路网节点必然均是直接相连或者间接相连。由于每条目标运动轨迹数据中的路网节点之间的邻接关系是确定的,因此服务器在得到所有的目标运动轨迹数据的路网节点之后,可以确定所有路网节点之间的邻接关系。Due to the huge data volume of the obtained vehicle motion trajectory data set of the target area, in the case of large-scale data, the road network nodes obtained by the server must be directly or indirectly connected. Since the adjacency relationship between road network nodes in each piece of target motion trajectory data is determined, the server can determine the adjacency relationship between all road network nodes after obtaining all road network nodes of the target motion trajectory data.
209、服务器根据每个路网节点的坐标计算相邻路网节点之间的距离;209. The server calculates the distance between adjacent road network nodes according to the coordinates of each road network node;
服务器在确定所有路网节点之间的邻接关系后,可以根据路网节点的坐标,计算得出两两相邻的路网节点之间的距离。需要说明的是,此处计算的距离是欧氏距离,即两个相邻的路网节点之间的直线段距离。After determining the adjacency relationship between all road network nodes, the server can calculate the distance between two adjacent road network nodes according to the coordinates of the road network nodes. It should be noted that the distance calculated here is the Euclidean distance, that is, the distance of a straight line segment between two adjacent road network nodes.
210、服务器根据路网节点之间的邻接关系和相邻路网节点之间的距离生成邻接矩阵和带权无向图;210. The server generates an adjacency matrix and a weighted undirected graph according to the adjacency relationship between road network nodes and the distance between adjacent road network nodes;
服务器可以根据所有路网节点之间的邻接关系和相邻路网节点之间的距离生成关于所有路网节点的带权无向图。同时,服务器可以根据所有路网节点之间的邻接关系生成关于所有路网节点的邻接矩阵,邻接矩阵用于表示所有路网节点的邻接矩阵。图是由顶点集V和顶点间的边集E组成的一种数据结构,用二元组G(V,E)表示,带权无向图顶点集为V={V1,V2,V3,V4,},边集为E={e12,e13,e21,e23,e24,e31,e32,e34,e42,e43},权可以用一个顶点到另一个顶点的距离进行表示。在本实施例中,以所有的路网节点为顶点集,两个相邻路网节点之间的直线段作为边集,并以两个相邻路网节点之间的直线段的距离作为权重。The server can generate a weighted undirected graph about all road network nodes according to the adjacency relationship between all road network nodes and the distances between adjacent road network nodes. At the same time, the server may generate an adjacency matrix about all road network nodes according to the adjacency relationship between all road network nodes, and the adjacency matrix is used to represent the adjacency matrix of all road network nodes. A graph is a data structure composed of a vertex set V and an edge set E between vertices. It is represented by a two-tuple G(V, E). The vertex set of a weighted undirected graph is V={V 1 , V 2 , V 3 , V 4 , }, the edge set is E={e 12 , e 13 , e 21 , e 23 , e 24 , e 31 , e 32 , e 34 , e 42 , e 43 }, the weight can be reached by a vertex The distance to another vertex is represented. In this embodiment, all road network nodes are taken as the vertex set, the straight line segment between two adjacent road network nodes is taken as the edge set, and the distance of the straight line segment between the two adjacent road network nodes is taken as the weight .
211、服务器根据带权无向图和邻接矩阵生成路网节点数据;211. The server generates road network node data according to the weighted undirected graph and the adjacency matrix;
在生成带权无向图和邻接矩阵后,服务器也就生成了路网节点数据,路网节点数据即为带权无向图和邻接矩阵的组合。After generating the weighted undirected graph and the adjacency matrix, the server also generates the road network node data, and the road network node data is the combination of the weighted undirected graph and the adjacency matrix.
212、服务器将A*算法的启发式融入Gurobi算法,生成A-Gurobi算法;212. The server integrates the heuristic of the A * algorithm into the Gurobi algorithm to generate the A-Gurobi algorithm;
服务器可以将A*算法的启发式融入Gurobi算法,生成A-Gurobi算法。具体的是,将A*算法的启发式函数融入Gurobi算法,启发式函数如公式(1)所示。由于Gurobi算法属于最优化算法,将A*算法的启发式函数融入到Gurobi算法生成的A-Gurobi算法,在具备最优化算法特性的同时,也具备启发式算法的特性。The server can incorporate the heuristics of the A * algorithm into the Gurobi algorithm to generate the A-Gurobi algorithm. Specifically, the heuristic function of the A * algorithm is integrated into the Gurobi algorithm, and the heuristic function is shown in formula (1). Since the Gurobi algorithm is an optimization algorithm, the heuristic function of the A * algorithm is integrated into the A-Gurobi algorithm generated by the Gurobi algorithm, which not only has the characteristics of the optimization algorithm, but also has the characteristics of the heuristic algorithm.
f(n)=g(n)+h(n) (公式1)f(n)=g(n)+h(n) (Equation 1)
其中,f(n)表示通往目标点的代价,g(n)表示从初始结点到任意结点n的代价,h(n)表示从结点n到目标点的启发式评估代价。Among them, f(n) represents the cost of getting to the target point, g(n) represents the cost from the initial node to any node n, and h(n) represents the heuristic evaluation cost from node n to the target point.
213、服务器根据路网节点数据和A-Gurobi算法生成路线推荐模型;213. The server generates a route recommendation model according to the road network node data and the A-Gurobi algorithm;
在生成路网节点数据和A-Gurobi算法后,服务器可以根据路网节点数据和A-Gurobi算法生成路线推荐模型,通过路线推荐模型为用户提供路线推荐服务。需要说明的是,路线推荐模型融合有启发式算法和最优化算法,并具备启发式算法和最优化算法的属性。即,只要给出起点和终点,路线推荐模型就能在较短时间内,根据自身的路网节点数据生成最短路线。After generating the road network node data and the A-Gurobi algorithm, the server can generate a route recommendation model according to the road network node data and the A-Gurobi algorithm, and provide users with route recommendation services through the route recommendation model. It should be noted that the route recommendation model incorporates a heuristic algorithm and an optimization algorithm, and has the attributes of a heuristic algorithm and an optimization algorithm. That is, as long as the start and end points are given, the route recommendation model can generate the shortest route according to its own road network node data in a relatively short period of time.
214、服务器获取用户的起点和终点;214. The server obtains the starting point and the ending point of the user;
本实施例中,步骤214与前述实施例中的步骤104类似,此处不再赘述。In this embodiment,
215、服务器将起点分别与路线推荐模型的路网节点数据中的每个路网节点和终点相连,得到多条线段,其中,每个路网节点对应一条线段,起点与终点形成的线段为目标线段;215. The server connects the starting point with each road network node and the end point in the road network node data of the route recommendation model respectively, and obtains a plurality of line segments, wherein each road network node corresponds to a line segment, and the line segment formed by the start point and the end point is the target line segment;
在获取用户的起点和终点后,服务器可以用直线段将起点分别与终点以及路线推荐模型的路网节点数据中的每个路网节点相连,得到多条线段。每条线段对应一个路网节点或者终点,每个路网节点或者终点也对应一条线段。在所有的线段之中,服务器可以将终点对应的线段确定为目标线段,目标线段代表的是从起点到终点的位移。After acquiring the user's starting point and ending point, the server can connect the starting point with the ending point and each road network node in the road network node data of the route recommendation model with a straight line segment to obtain multiple line segments. Each line segment corresponds to a road network node or end point, and each road network node or end point also corresponds to a line segment. Among all the line segments, the server may determine the line segment corresponding to the end point as the target line segment, and the target line segment represents the displacement from the start point to the end point.
216、服务器计算目标线段分别与其他线段形成的夹角的度数;216. The server calculates the degrees of the included angles formed by the target line segment and other line segments respectively;
由于每条线段的端点均包括起点,因此所有线段均直接相连,那么这些线段之间便可形成夹角,服务器可以分别计算得出目标线段与其他每一条线段的夹角。为了方便计算,服务器可以以起点为坐标原点,东西方向为X轴,南北方向为Y轴,建立直角坐标系,分别计算得出目标线段与其他每一条线段的夹角。Since the endpoints of each line segment include the starting point, all the line segments are directly connected, so an included angle can be formed between these line segments, and the server can separately calculate the included angle between the target line segment and every other line segment. In order to facilitate the calculation, the server can use the starting point as the coordinate origin, the east-west direction as the X-axis, and the north-south direction as the Y-axis, establish a rectangular coordinate system, and calculate the angle between the target line segment and each other line segment separately.
217、服务器将与目标线段形成的夹角的度数大于或等于第一预设角度的线段对应的路网节点进行删除,得到推荐路网节点;217. The server deletes the road network node corresponding to the line segment whose angle formed by the target line segment is greater than or equal to the first preset angle, and obtains the recommended road network node;
在实际应用中,当一个路网节点对应的线段与目标线段的夹角超过一定的度数时,通常不会从这个路网节点而经过。因此,服务器可以将与目标线段形成的夹角的度数大于或等于第一预设角度的线段对应的路网节点进行删除,保留剩下的路网节点,剩下的路网节点即为推荐路网节点。In practical applications, when the included angle between the line segment corresponding to a road network node and the target line segment exceeds a certain degree, it usually does not pass through the road network node. Therefore, the server can delete the road network node corresponding to the line segment whose angle formed by the target line segment is greater than or equal to the first preset angle, and retain the remaining road network nodes, which are the recommended road network nodes. network node.
在本实施例中,服务器删除推荐路网节点之外的路网节点,可以减小路线推荐模型的计算量,有利于提高生成推荐路线的运行效率,同时能够节省资源开销,降低不必要的资源浪费。In this embodiment, the server deletes the road network nodes other than the recommended road network nodes, which can reduce the calculation amount of the route recommendation model, which is beneficial to improve the operation efficiency of generating the recommended route, and at the same time, it can save resource overhead and reduce unnecessary resources. waste.
218、服务器根据推荐路网节点、起点和终点生成推荐路线。218. The server generates a recommended route according to the recommended road network node, the starting point and the ending point.
在得到推荐路网节点后,服务器可以将推荐路网节点、起点和终点作为路线推荐模型的参数,利用路线推荐模型中的A-Gurobi算法生成推荐路线。After obtaining the recommended road network node, the server can use the recommended road network node, start point and end point as the parameters of the route recommendation model, and use the A-Gurobi algorithm in the route recommendation model to generate the recommended route.
请参阅图3,本申请实施例中出租车轨迹大数据驱动的载客路线推荐装置一个实施例包括:Referring to FIG. 3, an embodiment of the taxi trajectory big data-driven passenger route recommendation device in the embodiment of the present application includes:
第一获取单元301,用于获取目标区域的车辆运动轨迹数据集;The first obtaining
第一生成单元302,用于根据车辆运动轨迹数据集生成路网节点数据;a
第二生成单元303,用于根据路网节点数据生成路线推荐模型,路线推荐模型融合有启发式算法和最优化算法;The
第二获取单元304,用于获取用户的起点和终点,起点和终点位于目标区域;The second obtaining
第三生成单元305,用于根据路线推荐模型生成起点到终点的推荐路线。The
在本实施例中,第一获取单元301首先获取目标区域的车辆运动轨迹数据集,接着第一生成单元302根据车辆轨迹数据集生成路网节点数据,然后第二生成单元303根据路网节点数据生成融合有启发式算法和最优化算法的路线推荐模型,最后第三生成单元305根据路线推荐模型为用户生成从起点到终点的推荐路线。由于本申请实施例中的路线推荐模型融合有启发式算法和最优化算法,因此服务器能够在生成推荐路线过程中访问更少节点,相比于基于贪心算法的出租车轨迹大数据驱动的载客路线推荐方法,减小了计算量,以及在算力相同的情况下,能够更快地生成推荐路线,有利于提高运行效率。同时,降低了用户出行的花费时间,有利于提升用户体验。In this embodiment, the first obtaining
请参阅图4,本申请实施例中出租车轨迹大数据驱动的载客路线推荐装置另一个实施例包括:Referring to FIG. 4, another embodiment of the taxi trajectory big data-driven passenger route recommendation device in the embodiment of the present application includes:
第一获取单元401,用于获取目标区域的车辆运动轨迹数据集;The first obtaining
第一生成单元402,用于根据车辆运动轨迹数据集生成路网节点数据;a
第二生成单元403,用于根据路网节点数据生成路线推荐模型,路线推荐模型融合有启发式算法和最优化算法;The
第二获取单元404,用于获取用户的起点和终点,起点和终点位于目标区域;The second obtaining
第三生成单元405,用于根据路线推荐模型生成起点到终点的推荐路线。The
本实施例中,第二生成单元403具体用于:In this embodiment, the
将A*算法的启发式融入Gurobi算法,生成A-Gurobi算法;The heuristic of the A * algorithm is integrated into the Gurobi algorithm to generate the A-Gurobi algorithm;
根据路网节点数据和A-Gurobi算法生成路线推荐模型,其中,路网节点数据作为路线推荐模型的参数。The route recommendation model is generated according to the road network node data and the A-Gurobi algorithm, wherein the road network node data is used as the parameter of the route recommendation model.
第三生成单元405具体用于:The
将起点分别与路线推荐模型的路网节点数据中的每个路网节点和终点进行相连,得到多条线段,其中,每个路网节点对应一条线段,起点与终点形成的线段作为目标线段;Connect the starting point with each road network node and the end point in the road network node data of the route recommendation model respectively to obtain a plurality of line segments, wherein each road network node corresponds to a line segment, and the line segment formed by the starting point and the end point is used as the target line segment;
计算目标线段分别与其他线段形成的夹角的度数;Calculate the degrees of the included angles formed by the target line segment and other line segments;
将与目标线段形成的夹角的度数大于或等于第一预设角度的线段对应的路网节点进行删除,得到推荐路网节点;Delete the road network node corresponding to the line segment whose angle formed by the target line segment is greater than or equal to the first preset angle to obtain the recommended road network node;
根据推荐路网节点、起点和终点生成推荐路线。Generate recommended routes based on recommended road network nodes, starting points and ending points.
在本实施例中,第一生成单元402可以包括提取模块4021、生成模块4022以及删除模块4023。In this embodiment, the
提取模块4021,用于从车辆运动轨迹数据集中提取目标运动轨迹数据集,目标运动轨迹数据集的运营状态连续为空车-载客-载客,运营状态包括空车和载客。The
生成模块4022,可以包括提取子模块40221、确定子模块40222以及生成子模块40223。The
提取子模块40221,用于从目标运动轨迹数据集中提取每个点的时间、坐标和方向。The
确定子模块40222,用于:Determine sub-module 40222 for:
对于任意一个目标运动轨迹数据,根据每个点的时间确定点之间的邻接关系;For any target motion trajectory data, determine the adjacency relationship between points according to the time of each point;
根据点之间的邻接关系和每个点的坐标计算方向变化量,方向变化量为一个点与两个邻接点分别形成的两条线段的角度;Calculate the direction change amount according to the adjacency relationship between points and the coordinates of each point, and the direction change amount is the angle of two line segments formed by a point and two adjacent points respectively;
当出现方向变化量大于或等于第二预设角度时,确定对应的三个点中与其他两个点均邻接的点为路网节点。When the amount of change in the appearance direction is greater than or equal to the second preset angle, a point adjacent to the other two points among the corresponding three points is determined as a road network node.
生成子模块40223,用于:Generate
确定路网节点之间的邻接关系;Determine the adjacency relationship between road network nodes;
根据每个路网节点的坐标计算相邻路网节点之间的距离;Calculate the distance between adjacent road network nodes according to the coordinates of each road network node;
根据路网节点之间的邻接关系和相邻路网节点之间的距离生成邻接矩阵和带权无向图;Generate an adjacency matrix and a weighted undirected graph according to the adjacency relationship between road network nodes and the distance between adjacent road network nodes;
根据带权无向图和邻接矩阵生成路网节点数据。Generate road network node data according to weighted undirected graph and adjacency matrix.
在本实施中,各单元及模块的功能和前述图2所示实施例中的步骤对应,此处不再赘述。In this implementation, the functions of each unit and module correspond to the steps in the foregoing embodiment shown in FIG. 2 , which will not be repeated here.
请参阅图5,本申请实施例中出租车轨迹大数据驱动的载客路线推荐装置另一个实施例包括:Referring to FIG. 5, another embodiment of the taxi trajectory big data-driven passenger route recommendation device in the embodiment of the present application includes:
处理器501、存储器502、输入输出单元503以及总线504;
处理器501与存储器502、输入输出单元503以及总线504相连;The
存储器502保存有程序,处理器501调用程序以执行图1至图2所示实施例中的步骤。The
在本实施例中,处理器501的功能与前述图1至图2所示实施例中的步骤对应,此处不再赘述。In this embodiment, the functions of the
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described systems, devices and units can refer to the corresponding processes in the foregoing method embodiments, which will not be repeated here.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它方式予以实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,在实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。此外,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口、装置或单元的间接耦合或通信连接,也可以是电性、机械或其它形式。In the several embodiments provided in this application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods, for example, multiple units or components may be combined Either it can be integrated into another system, or some features can be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may also be electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元。可以根据实际的需要选择其中的部分或者全部单元以实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
此外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元。上述集成的单元既可以采用硬件形式实现,也可以采用软件功能单元形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware, or can be implemented in the form of software functional units.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质。基于这样的理解,本申请的技术方案本质上或者是可以理解对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品形式予以体现,该计算机软件产品存储在一个存储介质中,包括若干指令用于使得一台计算机设备(可以是个人计算机、服务器、或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,read-onlymemory)、随机存取存储器(RAM,random access memory)、磁碟或者光盘等各种可以存储程序代码的介质。If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it may be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or can be understood as a part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium , including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: U disk, removable hard disk, read-only memory (ROM, read-only memory), random access memory (RAM, random access memory), magnetic disk or optical disk and other media that can store program codes.
Claims (11)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210531460.1A CN115049105B (en) | 2022-05-16 | 2022-05-16 | Taxi track big data driven passenger carrying route recommendation method, device and medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210531460.1A CN115049105B (en) | 2022-05-16 | 2022-05-16 | Taxi track big data driven passenger carrying route recommendation method, device and medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN115049105A true CN115049105A (en) | 2022-09-13 |
CN115049105B CN115049105B (en) | 2024-08-23 |
Family
ID=83158068
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210531460.1A Active CN115049105B (en) | 2022-05-16 | 2022-05-16 | Taxi track big data driven passenger carrying route recommendation method, device and medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115049105B (en) |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130325319A1 (en) * | 2012-06-05 | 2013-12-05 | Apple Inc. | Integrated mapping and navigation application |
US20130326380A1 (en) * | 2012-06-05 | 2013-12-05 | Apple Inc. | Triage Tool for Problem Reporting in Maps |
CN110555640A (en) * | 2018-05-31 | 2019-12-10 | 北京京东振世信息技术有限公司 | Method and device for route planning |
CN111879329A (en) * | 2020-07-30 | 2020-11-03 | 郑州天迈科技股份有限公司 | Customized public transport passable shortest path calculation method based on A-x algorithm |
CN112183828A (en) * | 2020-09-15 | 2021-01-05 | 北京三快在线科技有限公司 | Path generation method and device, storage medium and electronic equipment |
US20210241625A1 (en) * | 2020-01-31 | 2021-08-05 | Here Global B.V. | Method and apparatus for providing large scale vehicle routing |
CN113409611A (en) * | 2021-06-09 | 2021-09-17 | 摩拜(北京)信息技术有限公司 | Parking area recommendation method and device |
CN113701778A (en) * | 2021-09-02 | 2021-11-26 | 广州宸祺出行科技有限公司 | Network appointment route planning method and device based on passenger route preference |
CN114065454A (en) * | 2021-11-19 | 2022-02-18 | 北京理工大学 | A timetable optimization method and system for night trains in urban rail transit |
CN114061604A (en) * | 2021-10-12 | 2022-02-18 | 贵州民族大学 | Passenger carrying route recommendation method, device and system based on movement track big data |
-
2022
- 2022-05-16 CN CN202210531460.1A patent/CN115049105B/en active Active
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130325319A1 (en) * | 2012-06-05 | 2013-12-05 | Apple Inc. | Integrated mapping and navigation application |
US20130326380A1 (en) * | 2012-06-05 | 2013-12-05 | Apple Inc. | Triage Tool for Problem Reporting in Maps |
CN110555640A (en) * | 2018-05-31 | 2019-12-10 | 北京京东振世信息技术有限公司 | Method and device for route planning |
US20210241625A1 (en) * | 2020-01-31 | 2021-08-05 | Here Global B.V. | Method and apparatus for providing large scale vehicle routing |
CN111879329A (en) * | 2020-07-30 | 2020-11-03 | 郑州天迈科技股份有限公司 | Customized public transport passable shortest path calculation method based on A-x algorithm |
CN112183828A (en) * | 2020-09-15 | 2021-01-05 | 北京三快在线科技有限公司 | Path generation method and device, storage medium and electronic equipment |
CN113409611A (en) * | 2021-06-09 | 2021-09-17 | 摩拜(北京)信息技术有限公司 | Parking area recommendation method and device |
CN113701778A (en) * | 2021-09-02 | 2021-11-26 | 广州宸祺出行科技有限公司 | Network appointment route planning method and device based on passenger route preference |
CN114061604A (en) * | 2021-10-12 | 2022-02-18 | 贵州民族大学 | Passenger carrying route recommendation method, device and system based on movement track big data |
CN114065454A (en) * | 2021-11-19 | 2022-02-18 | 北京理工大学 | A timetable optimization method and system for night trains in urban rail transit |
Non-Patent Citations (12)
Title |
---|
DAWEN XIA等: "An A2-Gurobi algorithm for route recommendation with big taxi trajectory data", 《MULTIMEDIA TOOLS AND APPLICATIONS》, vol. 82, 1 May 2023 (2023-05-01), pages 46547 * |
YAN LYU等: "T2CBS: Mining taxi trajectories for customized bus systems", 《2016 IEEE CONFERENCE ON COMPUTER COMMUNICATIONS WORKSHOPS (INFOCOM WKSHPS)》, 14 October 2016 (2016-10-14), pages 1 - 6 * |
乔翔宇;戴荣健;高剑;丁川;: "基于共享模式的网联自动驾驶车辆路径规划研究", 交通工程, no. 02, 15 April 2020 (2020-04-15), pages 73 - 78 * |
吕铮: "基于轨迹数据的出租车路线推荐和公交车调度算法研究", 《中国优秀硕士学位论文全文数据库 (信息科技辑)》, no. 2019, 15 July 2019 (2019-07-15), pages 138 - 1414 * |
周绍景;赵发宾;王敏;丁洪伟;: "动态路径推荐算法在城市智慧交通技术中的应用", 昆明冶金高等专科学校学报, no. 05, 15 October 2019 (2019-10-15), pages 71 - 77 * |
唐炉亮;常晓猛;李清泉;SHAW S L;: "基于蚁群优化算法与出租车GPS数据的公众出行路径优化", 中国公路学报, no. 02, 15 March 2011 (2011-03-15), pages 89 - 95 * |
张婷婷: "基于脉冲算法的带时间窗车辆路径规划研究", 《中国优秀硕士学位论文全文数据库 (工程科技Ⅱ辑)》, no. 2022, 15 February 2022 (2022-02-15), pages 034 - 631 * |
徐国勋;李妍峰;李军;: "基于客户需求的现金押运路线问题研究", 信息系统学报, no. 01, 30 September 2017 (2017-09-30), pages 72 - 83 * |
戚欣;梁伟涛;马勇;: "基于出租车轨迹数据的最优路径规划方法", 计算机应用, no. 07, 10 July 2017 (2017-07-10), pages 2106 - 2113 * |
曹永胜: "基于物联网的电动汽车充电调度与行车路径优化方法研究", 《中国博士学位论文全文数据库 (工程科技Ⅱ辑)》, no. 2022, 15 January 2022 (2022-01-15), pages 034 - 114 * |
赵越超: "基于两阶段蚁群算法的A公司路径优化问题研究", 《中国优秀硕士学位论文全文数据库 (信息科技辑)》, no. 2022, 15 January 2022 (2022-01-15), pages 140 - 463 * |
高文超;李国良;塔娜;: "路网匹配算法综述", 软件学报, no. 02, 17 October 2017 (2017-10-17), pages 225 - 250 * |
Also Published As
Publication number | Publication date |
---|---|
CN115049105B (en) | 2024-08-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2020098252A1 (en) | Route planning method, server, and computer storage medium | |
Arief et al. | Sane: Smart annotation and evaluation tools for point cloud data | |
CN111090712A (en) | Data processing method, device and equipment and computer storage medium | |
CN106408124A (en) | Moving path hybrid forecasting method oriented to data sparse environment | |
CN108629456A (en) | Read method, device, terminal device and the readable storage medium storing program for executing of public transport data | |
CN111861178A (en) | Service matching model training method, service matching method, device and medium | |
CN107677277A (en) | A kind of determining method of path based on dijkstra's algorithm | |
CN107480804B (en) | Maze solving method based on line-surface spatial relation | |
CN109724617A (en) | A kind of method for drafting and relevant device of navigation routine | |
CN111079058A (en) | A network node representation method and device based on node importance | |
CN115049105B (en) | Taxi track big data driven passenger carrying route recommendation method, device and medium | |
CN115547087B (en) | Urban road network shortest path acquisition method based on two-stage method and direction induction and application | |
CN108319727A (en) | A method of any two points shortest path in social networks is found based on community structure | |
CN117876996A (en) | Point cloud target detection method, terminal device and storage medium | |
CN118068834A (en) | Path planning method, path planning device, vehicle and storage medium | |
CN111680376B (en) | Method, device and system for constructing polygons from line elements | |
CN117195441A (en) | Method and related device for generating intersection surface | |
CN114228735A (en) | Visualization method, device and system for intelligent driving vehicle | |
CN112884614B (en) | Route recommendation method and device based on frequent sequences and electronic equipment | |
CN110146102B (en) | Path planning method, apparatus, device and storage medium | |
CN116108288B (en) | Method and system for searching optimal get-on and get-off points in taxi taking service | |
CN108399200B (en) | Construction Method of Space-Time Buffer for Constrained Trajectory of Road Network | |
CN117911974B (en) | Data processing method, device, equipment and storage medium | |
CN104801044A (en) | Method and device for generating trajectory vertex sequence | |
CN117351117B (en) | A method, device, storage medium and equipment for updating road structure |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |