A method and device for real-time aggregation and visualization of online car-hailing OD data flow
Patent Information
- Application Number
- CN202211442531.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-17
- Publication Date
- 2026-10-27
- Estimated Expiration
- 2042-11-17
AI Technical Summary
[0007]基于上述的现有技术可以看出,现有的网约车OD数据聚合分析与可视化一般是对批量数据进行聚合处理,未能支持实时OD数据流聚合与展示,不能及时反映网约车运营的实时变化情况
[0095]本发明创造性地结合OD数据预处理、流数据聚类方法、OD数据相似度模型及OD弧线图进行结合后,使得本发明能够生成OD聚合数据的空间分布态势与流向可视化且直观的OD地图,以支持实时OD数据流聚合与展示,能够及时反映网约车运营的实时变化情况。对网约车的实时调度与管理能够匹配当前状态,能及时调配资源从而不影响网约车的服务质量。特别是面向批量的OD数据分析时,能支持实时OD数据聚合与展示,以及时地反映网约车运营情况的实时变化。
Smart Images

Figure CN116126551B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the technical field of ride-hailing OD data processing and display, specifically to a method and apparatus for real-time aggregation and visualization of ride-hailing OD data streams. Background Technology
[0002] With the rapid development of location-based services (LBS) technology, ride-hailing applications that integrate supply and demand information to provide on-demand travel services are becoming increasingly widespread. The analysis and application of ride-hailing travel data are of great significance for continuously improving ride-hailing services.
[0003] Ride-hailing OD (Origin-Destination) traffic volume data is a type of data that sparsely describes movement trajectories by providing origin and destination locations, reflecting the basic characteristics of passenger travel. Through the aggregation and visualization of large-scale data, it is possible to intuitively display ride-hailing operation trends such as pick-up and drop-off hotspots and flow characteristics, which helps to uncover spatial anomalies and hidden relationships, providing effective support for ride-hailing dispatching and marketing strategy design, capacity deployment planning, and urban intelligent transportation applications.
[0004] Chinese invention patent CN105095481B discloses a method for large-scale visual analysis of taxi OD data. The main steps of this invention are: eliminating noise in the raw GPS data; matching GPS points of taxi trajectories to corresponding roads; extracting and storing passenger pick-up and drop-off information for taxis; generating heatmaps and cluster maps using bin clustering; selecting regions of interest; and displaying a spatiotemporal analysis view of the O / D pattern using a circular pixel map and a spatiotemporal stack map.
[0005] Chinese invention patent CN110232421A discloses a method for hierarchical merging of OD flow spatiotemporal aggregation clustering. The main steps of this invention are: constructing an OD flow set F; statistically analyzing the flow directions F. i Number of similar flow directions in the surrounding area (num) i The process involves: selecting initial clusters and constructing a flow direction family geometry Cset; setting a hierarchical merging level for OD flow direction clusters; merging OD flow direction clusters at each level and updating the cluster set Cset to complete the OD flow direction clustering process, achieving clustering results at different time and spatial scales.
[0006] Furthermore, Chinese invention patent CN112948651A discloses an efficient OD data visualization method and system, which improves the efficiency of OD line drawing by constructing an attribute dictionary that associates OD start and end points. CN111063035A discloses a three-dimensional visualization method and device for OD relationships in GIS, characterized by generating three-dimensional curves that can be recognized by the GIS system based on user input data and performing three-dimensional visualization. CN110716935A discloses a method and system for trajectory data analysis and visualization based on ride-hailing travel, which performs OD analysis, vehicle speed analysis, and traffic flow analysis on small and medium-sized trajectory data.
[0007] Based on the aforementioned existing technologies, it can be seen that current ride-hailing OD data aggregation, analysis, and visualization generally aggregate batch data, failing to support real-time OD data stream aggregation and display, and thus unable to reflect real-time changes in ride-hailing operations in a timely manner. This results in real-time dispatching and management of ride-hailing vehicles lagging behind the current state, failing to allocate resources promptly, and consequently affecting service quality. Therefore, it is evident that existing technologies primarily focus on batch OD data analysis, failing to support real-time OD data aggregation and display, and making it difficult to reflect real-time changes in ride-hailing operations. Summary of the Invention
[0008] In order to overcome the technical defects of the prior art that fail to support real-time OD data aggregation and display, the present invention provides a method and apparatus for real-time aggregation and visualization of ride-hailing OD data streams.
[0009] To solve the above problems, the present invention is implemented according to the following technical solution:
[0010] In a first aspect, the present invention discloses a method for real-time aggregation and visualization of ride-hailing OD data streams, comprising the following steps:
[0011] Step S1: Extract the OD data from the ride-hailing order data. The OD data includes the latitude and longitude of the origin and destination of the trip, the pick-up timestamp, and the drop-off timestamp. Upload the OD data to the message queue.
[0012] Step S2: Listen to the message queue to obtain OD data in real time and cluster it to generate OD data clusters. The center point of the OD data cluster represents the OD data of that cluster, and the OD statistics of that cluster are output.
[0013] Step S3: Perform data preprocessing on the OD statistics to output processed OD data, which includes the center point of the starting region, the center point of the ending region, and the OD statistics.
[0014] Step S4: Based on OD processing data and applying streaming data clustering methods, update the data aggregation cluster centers and OD statistics through the OD data similarity model to generate OD aggregated data;
[0015] Step S5: Read OD aggregated data through the data service interface according to the preset time period, draw a three-dimensional arc diagram based on the OD aggregated data, and display the aggregation flow direction and OD statistics on the three-dimensional arc diagram to obtain the OD arc diagram;
[0016] Step S6: Combine the OD aggregated data and OD arc map onto the map to obtain an OD map. The OD map displays the spatial distribution and flow of the OD aggregated data on the map in a hierarchical manner, based on city, district / county, town / street, grid, and clustering pattern.
[0017] As a preferred embodiment of the first aspect, the real-time acquisition of OD data and clustering to generate OD data clusters, with the center point of the OD data cluster representing the OD data of that cluster, and outputting the OD statistics of that cluster, specifically includes the following sub-steps:
[0018] Real-time acquisition of OD data; OD data is clustered to generate OD data clusters.
[0019] Obtain the center point of the OD data cluster, and use the center point of the OD data cluster to represent the OD data of that class;
[0020] Based on OD data, we traverse each area / a certain level of geographic grid within the ride-hailing operation range to obtain the boundary polygon coordinate string;
[0021] Determine whether the coordinates of the starting point in the OD data fall within the boundary polygon;
[0022] If the starting point is located within the boundary polygon, then the region / geographic grid is recorded as the starting region / grid in the OD data details table of the ride-hailing order;
[0023] Determine whether the coordinates of the endpoint in the OD data fall within the boundary polygon;
[0024] If the starting point is located within the boundary polygon, then the OD data details table of the ride-hailing order will record that region / geographic grid as the ending region / grid.
[0025] According to the preset time period and the dimension of regional / geographical grid, the starting area / grid and ending area / grid of ride-hailing orders are summarized to obtain OD statistics;
[0026] Output the OD statistics for this class.
[0027] As a preferred embodiment of the first aspect, the method of processing data based on OD and applying streaming data clustering specifically includes the following sub-steps:
[0028] Initialize the cluster generator and cluster stream instance set, and set the decay threshold, accuracy evaluation frequency and time window attributes;
[0029] Read the existing data from the OD data details table of ride-hailing orders to generate initial clusters;
[0030] Listen to the message queue, build cluster training instances, read the latitude and longitude of the origin, destination and the center point of the geographic grid from the processed OD data, combine with the OD data similarity model, set instance attributes and randomly generate the initial category number of the instance;
[0031] Add clustering training instances to the clustering stream instance set;
[0032] The cluster generator iterates through the clustering stream instance set, reading instances sequentially and performing clustering processing.
[0033] Output the clustering results, storing the category number, origin and destination latitude and longitude, OD statistics, and execution timestamp in the real-time order clustering table.
[0034] As a preferred embodiment of the first aspect, the OD data similarity model is:
[0035] Sim = αSim point +βSim center
[0036]
[0037]
[0038] To improve the consistency between OD point data clustering and geographic grid classification, the OD data similarity model comprehensively considers the differences in OD point coordinates and the differences in the coordinates of the center point of the geographic grid where the OD point is located. By setting similarity weight coefficients, the clustering degree of OD points belonging to the same geographic grid is higher.
[0039] Wherein, Sim is the OD data similarity evaluation coefficient, Simpoint is the OD data coordinate similarity, and Simcenter is the similarity of the center point of the geographical grid where the OD data is located; α and β are similarity weight coefficients, with values between [0,1], and α+β=1;
[0040] The x o1 and y o1 The x is the latitude and longitude of the starting point of OD data 1. o2 and y o2 The x is the latitude and longitude of the starting point of OD data 2. d1 and y d1 The latitude and longitude of the endpoint of OD data 1, wherein xd2 and y d2 These are the latitude and longitude coordinates of the endpoint of OD data 2;
[0041] The x oc1 and y oc1 It is the latitude and longitude of the center point of the geographic grid to which the starting point of OD data 1 belongs, the x oc2 and y oc2 The x represents the latitude and longitude of the center point of the geographic grid to which the starting point of OD data 2 belongs. dc1 and y dc1 The x is the latitude and longitude of the geographical grid center point where the termination point of OD data 1 is located. dc2 and y dc2 It is the latitude and longitude of the center point of the geographical grid where the termination point of OD data 2 is located.
[0042] As a preferred embodiment of the first aspect, the OD map includes at least 18 levels for displaying OD aggregated data;
[0043] Among them, levels 1-7 do not display 3D arc diagrams;
[0044] Levels 8 and 9 display the OD curve between cities;
[0045] Levels 10-11 display the OD arc diagram between districts / counties;
[0046] Levels 12-13 display the OD curve diagram between towns / streets;
[0047] Level 14 displays the OD arc map between geographic grids, with a hexagonal grid area of 5.161 km². 2 ;
[0048] Level 15 displays the OD arc map between geographic grids, with a hexagonal grid area of 0.73 km². 2 ;
[0049] Levels 16-17 display the OD curve between cluster points;
[0050] 3D arc graphs are not displayed for levels 18 and above.
[0051] The map display level, ground resolution, and display scale data comply with the relevant provisions of GB / T 35634-2017 Specification for Number of Tiles in Public Service Electronic Maps.
[0052] Secondly, the present invention also discloses an apparatus for real-time aggregation and visualization of ride-hailing OD data streams, comprising:
[0053] The acquisition and transmission module M1 is used to extract OD data from ride-hailing order data. The OD data includes the latitude and longitude of the trip start and end points, the boarding time stamp and the alighting time stamp, and uploads the OD data to the message queue.
[0054] The regional statistics module M2 is used to listen to the message queue to obtain OD data in real time and cluster it to generate OD data clusters. The center point of the OD data cluster represents the OD data of that cluster, and the OD statistics of that cluster are output.
[0055] The data processing module M3 is used to preprocess the OD statistics to output processed OD data, which includes the center point of the starting region, the center point of the ending region, and the OD statistics.
[0056] The spatial clustering module M4 is used to process data based on OD and apply streaming data clustering methods. Through the OD data similarity model, it updates the data aggregation cluster centers and OD statistics to generate OD aggregated data.
[0057] The M5 arc display module is used to read OD aggregation data through the data service interface according to a preset time period, draw a three-dimensional arc graph based on the OD aggregation data, and display the aggregation flow direction and OD statistics on the three-dimensional arc graph to obtain the OD arc graph.
[0058] The map display module M6 is used to combine OD aggregated data and OD arc map onto a map to obtain an OD map. The OD map displays the spatial distribution and flow of OD aggregated data on the map in a hierarchical manner, based on city, district / county, town / street, grid, and clustering pattern.
[0059] As a preferred implementation of the second aspect, the regional statistics module M2 performs the following steps during operation:
[0060] Real-time acquisition of OD data; OD data is clustered to generate OD data clusters.
[0061] Obtain the center point of the OD data cluster, and use the center point of the OD data cluster to represent the OD data of that class;
[0062] Based on OD data, we traverse each area / a certain level of geographic grid within the ride-hailing operation range to obtain the boundary polygon coordinate string;
[0063] Determine whether the coordinates of the starting point in the OD data fall within the boundary polygon;
[0064] If the starting point is located within the boundary polygon, then the region / geographic grid is recorded as the starting region / grid in the OD data details table of the ride-hailing order;
[0065] Determine whether the coordinates of the endpoint in the OD data fall within the boundary polygon;
[0066] If the starting point is located within the boundary polygon, then the OD data details table of the ride-hailing order will record that region / geographic grid as the ending region / grid.
[0067] According to the preset time period and the dimension of regional / geographical grid, the starting area / grid and ending area / grid of ride-hailing orders are summarized to obtain OD statistics;
[0068] Output the OD statistics for this class.
[0069] As a preferred implementation of the second aspect, when the spatial clustering module M4 is running, it specifically performs the following steps:
[0070] Initialize the cluster generator and cluster stream instance set, and set the decay threshold, accuracy evaluation frequency and time window attributes;
[0071] Read the existing data from the OD data details table of ride-hailing orders to generate initial clusters;
[0072] Listen to the message queue, build cluster training instances, read the latitude and longitude of the origin, destination and the center point of the geographic grid from the processed OD data, combine with the OD data similarity model, set instance attributes and randomly generate the initial category number of the instance;
[0073] Add clustering training instances to the clustering stream instance set;
[0074] The cluster generator iterates through the clustering stream instance set, reading instances sequentially and performing clustering processing.
[0075] Output the clustering results, storing the category number, origin and destination latitude and longitude, OD statistics, and execution timestamp in the real-time order clustering table.
[0076] As a preferred embodiment of the second aspect, the OD data similarity model is:
[0077] Sim = αSim point +βSim center
[0078]
[0079]
[0080] To improve the consistency between OD point data clustering and geographic grid classification, the OD data similarity model comprehensively considers the differences in OD point coordinates and the differences in the coordinates of the center point of the geographic grid where the OD point is located. By setting similarity weight coefficients, the clustering degree of OD points belonging to the same geographic grid is higher.
[0081] Wherein, Sim is the OD data similarity evaluation coefficient, Simpoint is the OD data coordinate similarity, and Simcenter is the similarity of the center point of the geographical grid where the OD data is located; α and β are similarity weight coefficients, with values between [0,1], and α+β=1;
[0082] The x o1 and y o1 The x is the latitude and longitude of the starting point of OD data 1. o2 and y o2 The x is the latitude and longitude of the starting point of OD data 2. d1 and y d1 The latitude and longitude of the endpoint of OD data 1, wherein x d2 and y d2 These are the latitude and longitude coordinates of the endpoint of OD data 2;
[0083] The x oc1 and y oc1 It is the latitude and longitude of the center point of the geographic grid to which the starting point of OD data 1 belongs, the x oc2 and y oc2 The x represents the latitude and longitude of the center point of the geographic grid to which the starting point of OD data 2 belongs. dc1 and y dc1 The x is the latitude and longitude of the geographical grid center point where the termination point of OD data 1 is located. dc2 and y dc2 It is the latitude and longitude of the center point of the geographical grid where the termination point of OD data 2 is located.
[0084] As a preferred embodiment of the second aspect, the OD map includes at least 18 levels for displaying OD aggregated data;
[0085] Among them, levels 1-7 do not display 3D arc diagrams;
[0086] Levels 8 and 9 display the OD curve between cities;
[0087] Levels 10-11 display the OD arc diagram between districts / counties;
[0088] Levels 12-13 display the OD curve diagram between towns / streets;
[0089] Level 14 displays the OD arc map between geographic grids, with a hexagonal grid area of 5.161 km². 2 ;
[0090] Level 15 displays the OD arc map between geographic grids, with a hexagonal grid area of 0.73 km². 2 ;
[0091] Levels 16-17 display the OD curve between cluster points;
[0092] 3D arc graphs are not displayed for levels 18 and above.
[0093] The map display level, ground resolution, and display scale data comply with the relevant provisions of GB / T 35634-2017 Specification for Number of Tiles in Public Service Electronic Maps.
[0094] Compared with the prior art, the beneficial effects of the present invention are:
[0095] This invention creatively combines OD data preprocessing, streaming data clustering methods, OD data similarity models, and OD arc diagrams to generate a visually intuitive OD map that visualizes the spatial distribution and flow direction of aggregated OD data. This supports real-time OD data stream aggregation and display, promptly reflecting real-time changes in ride-hailing operations. Real-time dispatching and management of ride-hailing vehicles can be matched to the current status, allowing for timely resource allocation without affecting service quality. Particularly noteworthy is its ability to support real-time OD data aggregation and display for batch OD data analysis, providing timely updates on ride-hailing operational status. Attached Figure Description
[0096] The specific embodiments of the present invention will be further described in detail below with reference to the accompanying drawings, wherein:
[0097] Figure 1 This is a flowchart illustrating the method for real-time aggregation and visualization of ride-hailing OD data streams according to the present invention.
[0098] Figure 2 This is a schematic diagram of the device for real-time aggregation and visualization of ride-hailing OD data streams according to the present invention. Detailed Implementation
[0099] Preferred embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While preferred embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that the present disclosure will be thorough and complete, and will fully convey the scope of the present disclosure to those skilled in the art.
[0100] The term "comprising" and its variations as used herein signify open inclusion, i.e., "including but not limited to". Unless otherwise stated, the term "or" means "and / or". The term "based on" means "at least partially based on". The terms "one example embodiment" and "one embodiment" mean "at least one example embodiment". The term "another embodiment" means "at least one additional embodiment". The terms "first", "second", etc., may refer to different or the same objects. Other explicit and implicit definitions may also be included below.
[0101] Access devices and servers can be connected directly or indirectly via wired or wireless communication. Access devices can be terminals or servers. The target application runs on the access device. The target application is an application capable of making data requests to the server, such as social applications, payment applications, and game applications. The server can be an application server providing services to the target application, or a proxy server distinct from the application server corresponding to the target application. The server identifies whether each access device is malicious and intercepts data packets from malicious devices. When the server acts as a proxy server, it forwards data packets not originating from malicious devices to the application server. Terminals can be desktop terminals or mobile terminals. Mobile terminals can include smartphones, tablets, laptops, desktop computers, smart speakers, smartwatches, etc., but are not limited to these. Servers can be independent physical servers, server clusters or distributed systems composed of multiple physical servers, or cloud servers providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms.
[0102] Example 1
[0103] like Figure 1 As shown, in a first aspect, the present invention discloses a method for real-time aggregation and visualization of ride-hailing OD data streams. The method comprises at least a passenger terminal, a data server, a message server, and an application server. Specifically, the embodiments of the present invention include the following steps:
[0104] Step S1: Extract the OD data from the ride-hailing order data. The OD data includes the latitude and longitude of the origin and destination of the trip, the pick-up timestamp, and the drop-off timestamp. Upload the OD data to the message queue.
[0105] Specifically, the data server obtains ride-hailing orders submitted by passengers and extracts OD data from the orders, including at least: origin longitude, origin latitude, origin timestamp, destination longitude, destination latitude, and destination timestamp. The message queue refers to a platform-independent data exchange mechanism that utilizes efficient and reliable message passing to integrate distributed systems based on data communication. Its components include at least a message server, message producers, and message consumers.
[0106] Preferably, the OD message producer listens for the order completion event, extracts OD data from the order information, converts it into a JSON string, and sends it to the message server.
[0107] Step S2: Listen to the message queue to obtain OD data in real time and cluster it to generate OD data clusters. The center point of the OD data cluster represents the OD data of that cluster, and the OD statistics of that cluster are output.
[0108] This step specifically includes the following sub-steps:
[0109] Real-time acquisition of OD data; OD data is clustered to generate OD data clusters.
[0110] Obtain the center point of the OD data cluster, and use the center point of the OD data cluster to represent the OD data of that class;
[0111] Based on OD data, we traverse each area / a certain level of geographic grid within the ride-hailing operation range to obtain the boundary polygon coordinate string;
[0112] Determine whether the coordinates of the starting point in the OD data fall within the boundary polygon;
[0113] If the starting point is located within the boundary polygon, then the region / geographic grid is recorded as the starting region / grid in the OD data details table of the ride-hailing order;
[0114] Determine whether the coordinates of the endpoint in the OD data fall within the boundary polygon;
[0115] If the starting point is located within the boundary polygon, then the OD data details table of the ride-hailing order will record that region / geographic grid as the ending region / grid.
[0116] According to the preset time period and the dimension of regional / geographical grid, the starting area / grid and ending area / grid of ride-hailing orders are summarized to obtain OD statistics;
[0117] Output the OD statistics for this class.
[0118] Specifically, the OD message consumer process in the data server listens to the message queue, obtains OD data messages, converts the JSON string into a JSON object, and then performs data preprocessing.
[0119] Preferably, the data preprocessing includes at least:
[0120] Abnormal data removal and data normalization.
[0121] The process of removing outlier data includes at least the following steps:
[0122] First, data with longitude values outside the range of [-180, 180] and latitude values outside the range of [-90, 90] are removed. Second, data with timestamps exceeding normal thresholds for year, month, day, hour, minute, and second are removed.
[0123] Data normalization processing includes at least the following:
[0124] The origin and destination coordinates and the base map use a unified geographic coordinate system, which can be selected from: National Geodetic Coordinate System 2000, GCJ-02 coordinate system, WGS84 coordinate system, etc. OD coordinate data is stored in double-precision format, retaining 5 decimal places, and timestamps are stored in date and time format.
[0125] Step S3: Perform data preprocessing on the OD statistics to output processed OD data, which includes the center point of the starting region, the center point of the ending region, and the OD statistics.
[0126] Specifically, the data server reads the latitude and longitude of the origin and destination from the preprocessed OD data and performs spatial statistics, that is, it performs spatial inclusion judgment operation on the origin and destination and the boundary of the region / geographic grid. If the origin and destination coordinates are inside the region / geographic grid, the code of the region / grid is recorded in the order OD data details table, and the data is summarized according to a specific time.
[0127] When performing spatial statistics on OD data, the following two processing methods are specifically included:
[0128] The first processing method involves performing spatial matching processing on cities, districts / counties, towns / streets, and geographic grids in sequence, and recording the region / geographic grid to which the OD belongs.
[0129] The second approach involves pre-constructing a relationship table between cities, districts / counties, towns / streets, and geographic grids. Spatial matching is performed only on the lowest-level geographic grids, and the region / geographic grid to which the OD belongs is found and recorded based on the region / geographic grid relationship table.
[0130] Preferably, in this example, the aggregated area for ride-hailing application scenarios includes: prefecture-level administrative divisions, county-level administrative divisions, and town / street-level administrative divisions. The geographic grid includes: rectangles, hexagons, Delaunay triangulation, and Voronoi diagrams. In this embodiment, an H3 hexagonal grid is used. The H3 geographic grid is a geospatial indexing system using hexagonal grids publicly available from Uber. Specifically, a level 7 grid (area: 5.1613 km²) is used. 2 (Side length: 1.2206km), Level 8 (Area: 0.7373km²) 2 H3 grid (side length: 0.4614km) summarizes OD data.
[0131] In this example, the order OD data details table includes at least the following: order number, origin longitude, origin latitude, destination longitude, destination latitude, origin grid number / township administrative division code / district / county administrative division code / city administrative division code, destination grid number / township administrative division code / district / county administrative division code / city administrative division code, and execution timestamp.
[0132] In this example, pgsql database is preferably used to store the order OD data details table. The OD count statistics of the region / geographic grid are summarized in the form of a physical view. The physical view is refreshed by executing a scheduled task with a scheduling time of 1 minute.
[0133] Step S4: Based on OD processing data and applying streaming data clustering methods, update the data aggregation cluster centers and OD statistics through the OD data similarity model to generate OD aggregated data.
[0134] Specifically, the data server reads the latitude and longitude of the origin and destination points from the preprocessed OD data and performs streaming data clustering. Streaming data clustering methods refer to classifying similar objects from a large amount of continuously generated data. Streaming data clustering algorithms include: STREAM algorithm, CluStream algorithm, DenStream algorithm, and D-Stream algorithm.
[0135] Preferably, this embodiment uses the ClusterGenerator method provided by the MOA (Machine Learning for Data Streams) data stream machine learning framework to implement OD data stream clustering.
[0136] Specifically, it includes the following sub-steps:
[0137] Initialize the cluster generator and cluster stream instance set, and set the decay threshold, accuracy evaluation frequency and time window attributes;
[0138] Read the existing data from the OD data details table of ride-hailing orders to generate initial clusters;
[0139] Listen to the message queue, build cluster training instances, read the latitude and longitude of the origin, destination and the center point of the geographic grid from the processed OD data, combine with the OD data similarity model, set instance attributes and randomly generate the initial category number of the instance;
[0140] Add clustering training instances to the clustering stream instance set;
[0141] The cluster generator iterates through the clustering stream instance set, reading instances sequentially and performing clustering processing.
[0142] Output the clustering results, storing the category number, origin and destination latitude and longitude, OD statistics, and execution timestamp in the real-time order clustering table.
[0143] In this example, the attributes of the clustering training instances are preferably set based on the OD data similarity evaluation model. The OD data similarity model is as follows:
[0144] Sim = αSim point +βSim center
[0145]
[0146]
[0147] To improve the consistency between OD point data clustering and geographic grid classification, the OD data similarity model comprehensively considers the differences in OD point coordinates and the differences in the coordinates of the center point of the geographic grid where the OD point is located. By setting similarity weight coefficients, the clustering degree of OD points belonging to the same geographic grid is higher.
[0148] Wherein, Sim is the OD data similarity evaluation coefficient, Simpoint is the OD data coordinate similarity, and Simcenter is the similarity of the center point of the geographical grid where the OD data is located; α and β are similarity weight coefficients, with values between [0,1], and α+β=1;
[0149] The x o1 and y o1 The x is the latitude and longitude of the starting point of OD data 1. o2 and y o2 The x is the latitude and longitude of the starting point of OD data 2. d1 and y d1 The latitude and longitude of the endpoint of OD data 1, wherein x d2 and y d2 These are the latitude and longitude coordinates of the endpoint of OD data 2;
[0150] The xoc1 and y oc1 It is the latitude and longitude of the center point of the geographic grid to which the starting point of OD data 1 belongs, the x oc2 and y oc2 The x represents the latitude and longitude of the center point of the geographic grid to which the starting point of OD data 2 belongs. dc1 and y dc1 The x is the latitude and longitude of the geographical grid center point where the termination point of OD data 1 is located. dc2 and y dc2 It is the latitude and longitude of the center point of the geographical grid where the termination point of OD data 2 is located.
[0151] In this example, a physical view is preferably created for the real-time order clustering table, and the physical view is refreshed by executing a scheduled task with a scheduling time of 1 minute.
[0152] This embodiment also includes: reading OD aggregated data through a data service interface at a certain time period.
[0153] Specifically, the data server accesses the aggregation results of regional / geographic grid / point clustered physical views, publishes a RESTful-style OD data aggregation service, and sets the access URL. The application server calls the service through the URL to retrieve the OD data aggregation results.
[0154] In this example, the OD aggregation data service preferably uses a RESTful style with a GET method, supporting cross-domain access. Input parameters include: aggregation type, query time filter conditions, and query spatial filter conditions. The aggregation type options are: city, district / county, town / street, level 7 H3 geographic grid, level 8 H3 geographic grid, and point clustering. The response results are returned as an array of aggregation types, which must include at least: OD aggregation type number, starting point longitude, starting point latitude, ending point longitude, ending point latitude, aggregation description, and OD statistics. The response results are returned in JSON format.
[0155] Step S5: Read OD aggregated data through the data service interface according to the preset time period, draw a three-dimensional arc graph based on the OD aggregated data, and display the aggregation flow direction and OD statistics on the three-dimensional arc graph to obtain the OD arc graph.
[0156] Specifically, the application server uses a timer to read the OD data aggregation service at regular intervals (e.g., 10 seconds) to obtain the latitude and longitude of the aggregation starting point center and configure display parameters. These parameters include: data binding, base map binding, arc curvature, arc style, animation duration, and animation execution count configuration. Finally, based on the current map display level, the aggregation flow direction and OD data statistics are displayed on the terminal. Terminals include: data dashboards, workstation browsers, and mobile terminals.
[0157] In this example, a 3D arc map is preferably drawn based on the OD aggregation data and the current map display level. The correspondence between the map display level and the arc map is shown in the table below. The map display level, ground resolution, and display scale data refer to the "GB / T35634-2017 Specification for the Number of Tiles in Public Service Electronic Maps". The specific display strategy can be adjusted according to the application area and data overview.
[0158] In this preferred embodiment, Tencent Location Services data visualization API is used to display aggregated OD data on an HTML5 page. The base map uses the basic base map service provided by Tencent Maps, and the map style is set to "Ink Abyss". The arc chart sets the arc segment color, line width, and animation color according to the aggregated OD statistics. It can also capture mouse selection events, highlight the currently selected arc segment, and pop up an arc segment details window to display the name of the area described by the arc segment and OD statistics information. To ensure the data display effect is aesthetically pleasing and clear, the maximum number of arc segments displayed at different map levels should also be set.
[0159] Step S6: Combine the OD aggregated data and OD arc map onto the map to obtain an OD map. The OD map displays the spatial distribution and flow of the OD aggregated data on the map in a hierarchical manner, based on city, district / county, town / street, grid, and clustering pattern.
[0160] Specifically, the application server listens for map level change events. Based on the changed level, and referring to the OD data arc plot display strategy at the same map display level in Table 1, it requests OD aggregated data services from the data server. Based on the returned data aggregation results, the application server refreshes and displays the dynamic arc plot. By combining the OD aggregated data and the OD arc plot in the OD map, the spatial distribution and flow of the corresponding OD aggregated data are displayed on the OD map, making the OD aggregated data more intuitive.
[0161]
[0162]
[0163] Table 1: OD data arc plot display strategies at different map display levels
[0164] The OD map includes at least 18 levels for displaying aggregated OD data;
[0165] Levels 1-7 do not display 3D arc maps; Levels 8-9 display OD arc maps between cities; Levels 10-11 display OD arc maps between districts / counties; Levels 12-13 display OD arc maps between towns / streets; Level 14 displays OD arc maps between geographic grids, with a hexagonal grid area of 5.161 km². 2 Level 15 displays the OD curves between geographic grids, with a hexagonal grid area of 0.73 km².2 Levels 16-17 display OD curves between cluster points; Levels 18 and above do not display 3D curves; OD map display levels, ground resolution, and display scale data comply with the relevant provisions of GB / T 35634-2017 Specification for Number of Tiles in Public Service Electronic Maps.
[0166] In summary, this invention creatively combines OD data preprocessing, streaming data clustering methods, OD data similarity models, and OD arc diagrams, enabling it to generate a visual and intuitive OD map that visualizes the spatial distribution and flow direction of aggregated OD data. This supports real-time OD data stream aggregation and display, and can promptly reflect the real-time changes in ride-hailing operations.
[0167] Based on the implementation of this invention, real-time dispatching and management of ride-hailing vehicles can be matched to the current status, and resources can be allocated in a timely manner so as not to affect the service quality of ride-hailing vehicles. In particular, when analyzing batch OD data, it can support real-time OD data aggregation and display, and reflect the real-time changes in ride-hailing operation status in a timely manner.
[0168] Other steps of the method for real-time aggregation and visualization of ride-hailing OD data streams described in this embodiment are found in existing technologies.
[0169] Example 2
[0170] like Figure 2 As shown, in a second aspect, the present invention also discloses an apparatus for real-time aggregation and visualization of ride-hailing OD data streams, comprising:
[0171] The acquisition and transmission module M1 is used to extract OD data from ride-hailing order data. The OD data includes the latitude and longitude of the trip start and end points, the boarding time stamp and the alighting time stamp, and uploads the OD data to the message queue.
[0172] The regional statistics module M2 is used to listen to the message queue to obtain OD data in real time and cluster it to generate OD data clusters. The center point of the OD data cluster represents the OD data of that cluster, and the OD statistics of that cluster are output.
[0173] The data processing module M3 is used to preprocess the OD statistics to output processed OD data, which includes the center point of the starting region, the center point of the ending region, and the OD statistics.
[0174] The spatial clustering module M4 is used to process data based on OD and apply streaming data clustering methods. Through the OD data similarity model, it updates the data aggregation cluster centers and OD statistics to generate OD aggregated data.
[0175] The M5 arc display module is used to read OD aggregation data through the data service interface according to a preset time period, draw a three-dimensional arc graph based on the OD aggregation data, and display the aggregation flow direction and OD statistics on the three-dimensional arc graph to obtain the OD arc graph.
[0176] The map display module M6 is used to combine OD aggregated data and OD arc map onto a map to obtain an OD map. The OD map displays the spatial distribution and flow of OD aggregated data on the map in a hierarchical manner, based on city, district / county, town / street, grid, and clustering pattern.
[0177] As a preferred implementation of the second aspect, the regional statistics module M2 performs the following steps during operation:
[0178] Real-time acquisition of OD data; OD data is clustered to generate OD data clusters.
[0179] Obtain the center point of the OD data cluster, and use the center point of the OD data cluster to represent the OD data of that class;
[0180] Based on OD data, we traverse each area / a certain level of geographic grid within the ride-hailing operation range to obtain the boundary polygon coordinate string;
[0181] Determine whether the coordinates of the starting point in the OD data fall within the boundary polygon;
[0182] If the starting point is located within the boundary polygon, then the region / geographic grid is recorded as the starting region / grid in the OD data details table of the ride-hailing order;
[0183] Determine whether the coordinates of the endpoint in the OD data fall within the boundary polygon;
[0184] If the starting point is located within the boundary polygon, then the OD data details table of the ride-hailing order will record that region / geographic grid as the ending region / grid.
[0185] According to the preset time period and the dimension of regional / geographical grid, the starting area / grid and ending area / grid of ride-hailing orders are summarized to obtain OD statistics;
[0186] Output the OD statistics for this class.
[0187] As a preferred implementation of the second aspect, when the spatial clustering module M4 is running, it specifically performs the following steps:
[0188] Initialize the cluster generator and cluster stream instance set, and set the decay threshold, accuracy evaluation frequency and time window attributes;
[0189] Read the existing data from the OD data details table of ride-hailing orders to generate initial clusters;
[0190] Listen to the message queue, build cluster training instances, read the latitude and longitude of the origin, destination and the center point of the geographic grid from the processed OD data, combine with the OD data similarity model, set instance attributes and randomly generate the initial category number of the instance;
[0191] Add clustering training instances to the clustering stream instance set;
[0192] The cluster generator iterates through the clustering stream instance set, reading instances sequentially and performing clustering processing.
[0193] Output the clustering results, storing the category number, origin and destination latitude and longitude, OD statistics, and execution timestamp in the real-time order clustering table.
[0194] As a preferred embodiment of the second aspect, the OD data similarity model is:
[0195] Sim = αSim point +βSim center
[0196]
[0197]
[0198] To improve the consistency between OD point data clustering and geographic grid classification, the OD data similarity model comprehensively considers the differences in OD point coordinates and the differences in the coordinates of the center point of the geographic grid where the OD point is located. By setting similarity weight coefficients, the clustering degree of OD points belonging to the same geographic grid is higher.
[0199] Wherein, Sim is the OD data similarity evaluation coefficient, Simpoint is the OD data coordinate similarity, and Simcenter is the similarity of the center point of the geographical grid where the OD data is located; α and β are similarity weight coefficients, with values between [0,1], and α+β=1;
[0200] The x o1 and y o1 The x is the latitude and longitude of the starting point of OD data 1. o2 and y o2 The x is the latitude and longitude of the starting point of OD data 2. d1 and y d1 The latitude and longitude of the endpoint of OD data 1, wherein x d2 and y d2 These are the latitude and longitude coordinates of the endpoint of OD data 2;
[0201] The x oc1 and y oc1It is the latitude and longitude of the center point of the geographic grid to which the starting point of OD data 1 belongs, the x oc2 and y oc2 The x represents the latitude and longitude of the center point of the geographic grid to which the starting point of OD data 2 belongs. dc1 and y dc1 The x is the latitude and longitude of the geographical grid center point where the termination point of OD data 1 is located. dc2 and y dc2 It is the latitude and longitude of the center point of the geographical grid where the termination point of OD data 2 is located.
[0202] As a preferred embodiment of the second aspect, the OD map includes at least 18 levels for displaying OD aggregated data;
[0203] Among them, levels 1-7 do not display 3D arc diagrams;
[0204] Levels 8 and 9 display the OD curve between cities;
[0205] Levels 10-11 display the OD arc diagram between districts / counties;
[0206] Levels 12-13 display the OD curve diagram between towns / streets;
[0207] Level 14 displays the OD arc map between geographic grids, with a hexagonal grid area of 5.161 km². 2 ;
[0208] Level 15 displays the OD arc map between geographic grids, with a hexagonal grid area of 0.73 km². 2 ;
[0209] Levels 16-17 display the OD curve between cluster points;
[0210] 3D arc graphs are not displayed for levels 18 and above.
[0211] The display level, ground resolution, and display scale data of the OD map comply with the relevant provisions of GB / T 35634-2017 Specification for Number of Tiles in Public Service Electronic Maps.
[0212] Other structures of the device for real-time aggregation and visualization of ride-hailing OD data streams described in this embodiment are found in the prior art.
[0213] Example 3
[0214] This invention also discloses an electronic device, including at least one processor and a memory communicatively connected to the at least one processor. The memory stores instructions executable by the at least one processor. When the at least one processor executes the instructions, it specifically implements the following steps: extracting OD data from ride-hailing order data, the OD data including the latitude and longitude of the origin and destination, pick-up timestamp, and drop-off timestamp; uploading the OD data to a message queue; monitoring the message queue to acquire OD data in real time and clustering it to generate OD data clusters, using the center point of each cluster to represent the OD data of that cluster, and outputting the OD statistics for that cluster; and preprocessing the OD statistics to... The system outputs processed OD data, including the center point of the starting region, the center point of the ending region, and OD statistics. Based on the processed OD data and applying a streaming data clustering method, the system updates the cluster centers and OD statistics using an OD data similarity model to generate aggregated OD data. The system reads the aggregated OD data through a data service interface according to a preset time period, draws a 3D arc graph based on the aggregated OD data, and displays the aggregation flow direction and OD statistics on the 3D arc graph to obtain an OD arc graph. Finally, the system combines the aggregated OD data and the OD arc graph onto a map to obtain an OD map. This OD map displays the spatial distribution and flow direction of the aggregated OD data hierarchically on the map, based on city, district / county, town / street, grid, and clustering pattern.
[0215] Example 4
[0216] This invention also discloses a storage medium storing a computer program. When the computer program is executed by a processor, it specifically implements the following steps: extracting OD data from ride-hailing order data, the OD data including the latitude and longitude of the trip's start and end points, pick-up timestamps, and drop-off timestamps; uploading the OD data to a message queue; monitoring the message queue to acquire OD data in real time and clustering it to generate OD data clusters, using the center point of each OD data cluster to represent the OD data of that cluster, and outputting the OD statistics for that cluster; preprocessing the OD statistics to output processed OD data, the processed OD data including the center point of the starting region and the center point of the ending region. The data is processed using OD data and flow data clustering methods. The data cluster centers and OD statistics are updated using an OD data similarity model to generate OD aggregated data. The OD aggregated data is read through a data service interface according to a preset time period. A three-dimensional arc graph is drawn based on the OD aggregated data, and the aggregation flow direction and OD statistics are displayed on the three-dimensional arc graph to obtain the OD arc graph. The OD aggregated data and OD arc graph are combined onto a map to obtain an OD map. The OD map displays the spatial distribution and flow direction of the OD aggregated data on the map hierarchically, according to city, district / county, town / street, grid, and clustering pattern.
[0217] This disclosure can be a method, apparatus, system, and / or computer program product. A computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for performing various aspects of this disclosure.
[0218] Computer-readable storage media can be tangible devices capable of holding and storing instructions for use by an instruction execution device. Computer-readable storage media can be, for example—but not limited to—electrical storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any suitable combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital multifunction disc (DVD), memory sticks, floppy disks, mechanical encoding devices, such as punch cards or recessed protrusions storing instructions thereon, and any suitable combination thereof. The computer-readable storage media used herein are not to be construed as transient signals themselves, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., light pulses through fiber optic cables), or electrical signals transmitted through wires.
[0219] The computer-readable program instructions described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to the computer-readable storage media in the respective computing / processing device.
[0220] Computer program instructions used to perform the operations of this disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, status setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages such as Smalltalk, C++, Java, etc., and conventional procedural programming languages such as the "C" language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuitry, such as programmable logic circuitry, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), is personalized by utilizing the status information of the computer-readable program instructions to implement various aspects of this disclosure.
[0221] Various aspects of this disclosure are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.
[0222] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processing unit of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner. Thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.
[0223] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.
[0224] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction, which includes one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than those shown in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0225] Various embodiments of this disclosure have been described above. These descriptions are exemplary and not exhaustive, nor are they limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical applications, or improvements to the technology in the market, or to enable others skilled in the art to understand the embodiments disclosed herein.
Claims
1. A method for real-time aggregation and visualization of ride-hailing OD data streams, characterized in that, Includes the following steps: Od data is extracted from ride-hailing order data. The Od data includes the latitude and longitude of the origin and destination of the trip, the pick-up timestamp, and the drop-off timestamp. The Od data is then uploaded to a message queue. Listen to the message queue to obtain OD data in real time and cluster it to generate OD data clusters. The center point of the OD data cluster represents the OD data of that cluster, and the OD statistics of that cluster are output. The OD statistics are preprocessed to output processed OD data, which includes the center point of the starting region, the center point of the ending region, and the OD statistics. Based on OD processing data and applying streaming data clustering methods, the cluster centers and OD statistics of aggregated data are updated using an OD data similarity model to generate OD aggregated data; the OD data similarity model is as follows: To improve the consistency between OD point data clustering and geographic grid classification, the OD data similarity model comprehensively considers the differences in OD point coordinates and the differences in the coordinates of the center point of the geographic grid where the OD point is located. By setting similarity weight coefficients, the clustering degree of OD points belonging to the same geographic grid is higher. Wherein, Sim is the OD data similarity evaluation coefficient, and the... It is the similarity of OD data coordinates, the It is the similarity of the geographical grid center points where the OD data is located; the and It is a similarity weight coefficient, and its value is within... Between, and ; The and The latitude and longitude of the starting point of OD data 1, the stated and The latitude and longitude of the starting point of OD data 2, the and It is the latitude and longitude of the termination point of OD data 1, the stated and These are the latitude and longitude coordinates of the endpoint of OD data 2; The and It is the latitude and longitude of the center point of the geographic grid to which the starting point of OD data 1 belongs. and The latitude and longitude of the center point of the geographic grid to which the starting point of OD data 2 belongs, the and It is the latitude and longitude of the geographical grid center point where the termination point of OD data 1 is located. and It is the latitude and longitude of the center point of the geographical grid where the termination point of OD data 2 is located; According to the preset time period, OD aggregated data is read through the data service interface, a three-dimensional arc diagram is drawn based on the OD aggregated data, and the aggregation flow direction and OD statistical value are displayed on the three-dimensional arc diagram to obtain the OD arc diagram; OD aggregated data and OD arc plots are combined onto a map to obtain an OD map. The OD map displays the spatial distribution and flow of OD aggregated data on the map in a hierarchical manner, based on city, district / county, town / street, grid, and clustering pattern.
2. The method for real-time aggregation and visualization of ride-hailing OD data streams according to claim 1, characterized in that... The real-time acquisition of OD data and clustering to generate OD data clusters, with the center point of each OD data cluster representing the OD data of that cluster, and outputting the OD statistics of that cluster, specifically includes the following sub-steps: Real-time acquisition of OD data; OD data is clustered to generate OD data clusters. Obtain the center point of the OD data cluster, and use the center point of the OD data cluster to represent the OD data of that class; Based on OD data, we traverse each area / a certain level of geographic grid within the ride-hailing operation range to obtain the boundary polygon coordinate string; Determine whether the coordinates of the starting point in the OD data fall within the boundary polygon; If the starting point is located within the boundary polygon, then the region / geographic grid is recorded as the starting region / grid in the OD data details table of the ride-hailing order; Determine whether the coordinates of the endpoint in the OD data fall within the boundary polygon; If the starting point is located within the boundary polygon, then the OD data details table of the ride-hailing order will record that region / geographic grid as the ending region / grid. According to the preset time period and the dimension of regional / geographical grid, the starting area / grid and ending area / grid of ride-hailing orders are summarized to obtain OD statistics; Output the OD statistics for this class.
3. The method for real-time aggregation and visualization of ride-hailing OD data streams according to claim 2, characterized in that, The method of processing data based on OD and applying streaming data clustering specifically includes the following sub-steps: Initialize the cluster generator and cluster stream instance set, and set the decay threshold, accuracy evaluation frequency and time window attributes; Read the existing data from the OD data details table of ride-hailing orders to generate initial clusters; Listen to the message queue, build cluster training instances, read the latitude and longitude of the origin, destination and the center point of the geographic grid from the processed OD data, combine with the OD data similarity model, set instance attributes and randomly generate the initial category number of the instance; Add clustering training instances to the clustering stream instance set; The cluster generator iterates through the clustering stream instance set, reading instances sequentially and performing clustering processing. Output the clustering results, storing the category number, origin and destination latitude and longitude, OD statistics, and execution timestamp in the real-time order clustering table.
4. The method for real-time aggregation and visualization of ride-hailing OD data streams according to claim 3, characterized in that: The OD map includes at least 18 levels for displaying aggregated OD data; Among them, levels 1-7 do not display 3D arc diagrams; Levels 8 and 9 display the OD curve between cities; Levels 10-11 display the OD arc diagram between districts / counties; Levels 12-13 display the OD curve diagram between towns / streets; Level 14 displays the OD arc map between geographic grids, with a hexagonal grid area of 5.161 km². 2 ; Level 15 displays the OD arc map between geographic grids, with a hexagonal grid area of 0.73 km². 2 ; Levels 16-17 display the OD curve between cluster points; 3D arc graphs are not displayed for levels 18 and above. The map display level, ground resolution, and display scale data comply with the relevant provisions of GB / T 35634-2017 Specification for Number of Tiles in Public Service Electronic Maps.
5. A device for real-time aggregation and visualization of ride-hailing OD data streams, characterized in that, include: The data acquisition and transmission module is used to extract OD data from ride-hailing order data. The OD data includes the latitude and longitude of the trip start and end points, the boarding time stamp and the alighting time stamp, and uploads the OD data to the message queue. The regional statistics module is used to listen to the message queue to obtain OD data in real time and cluster it to generate OD data clusters. The center point of the OD data cluster represents the OD data of that cluster, and the OD statistics of that cluster are output. The data processing module is used to preprocess the OD statistics to output processed OD data, which includes the center point of the starting region, the center point of the ending region, and the OD statistics. The spatial clustering module is used to process data based on OD and apply streaming data clustering methods. Through an OD data similarity model, it updates the cluster centers and OD statistics of aggregated data to generate aggregated OD data. The OD data similarity model is as follows: To improve the consistency between OD point data clustering and geographic grid classification, the OD data similarity model comprehensively considers the differences in OD point coordinates and the differences in the coordinates of the center point of the geographic grid where the OD point is located. By setting similarity weight coefficients, the clustering degree of OD points belonging to the same geographic grid is higher. Wherein, Sim is the OD data similarity evaluation coefficient, and the... It is the similarity of OD data coordinates, the It is the similarity of the geographical grid center points where the OD data is located; the and It is a similarity weight coefficient, and its value is within... Between, and ; The and The latitude and longitude of the starting point of OD data 1, the stated and The latitude and longitude of the starting point of OD data 2, the and It is the latitude and longitude of the termination point of OD data 1, the stated and These are the latitude and longitude coordinates of the endpoint of OD data 2; The and It is the latitude and longitude of the center point of the geographic grid to which the starting point of OD data 1 belongs. and The latitude and longitude of the center point of the geographic grid to which the starting point of OD data 2 belongs, the and It is the latitude and longitude of the geographical grid center point where the termination point of OD data 1 is located. and It is the latitude and longitude of the center point of the geographical grid where the termination point of OD data 2 is located; The arc display module is used to read OD aggregation data through the data service interface according to a preset time period, draw a three-dimensional arc graph based on the OD aggregation data, and display the aggregation flow direction and OD statistics on the three-dimensional arc graph to obtain the OD arc graph. The map display module is used to combine OD aggregated data and OD arc map onto a map to obtain an OD map. The OD map displays the spatial distribution and flow of OD aggregated data on the map in a hierarchical manner, based on city, district / county, town / street, grid, and clustering pattern.
6. The apparatus for real-time aggregation and visualization of ride-hailing OD data streams according to claim 5, characterized in that... When the regional statistics module is running, it performs the following steps: Real-time acquisition of OD data; OD data is clustered to generate OD data clusters. Obtain the center point of the OD data cluster, and use the center point of the OD data cluster to represent the OD data of that class; Based on OD data, we traverse each area / a certain level of geographic grid within the ride-hailing operation range to obtain the boundary polygon coordinate string; Determine whether the coordinates of the starting point in the OD data fall within the boundary polygon; If the starting point is located within the boundary polygon, then the region / geographic grid is recorded as the starting region / grid in the OD data details table of the ride-hailing order; Determine whether the coordinates of the endpoint in the OD data fall within the boundary polygon; If the starting point is located within the boundary polygon, then the OD data details table of the ride-hailing order will record that region / geographic grid as the ending region / grid. According to the preset time period and the dimension of regional / geographical grid, the starting area / grid and ending area / grid of ride-hailing orders are summarized to obtain OD statistics; Output the OD statistics for this class.
7. The apparatus for real-time aggregation and visualization of ride-hailing OD data streams according to claim 6, characterized in that, When the spatial clustering module is running, it performs the following steps: Initialize the cluster generator and cluster stream instance set, and set the decay threshold, accuracy evaluation frequency and time window attributes; Read the existing data from the OD data details table of ride-hailing orders to generate initial clusters; Listen to the message queue, build cluster training instances, read the latitude and longitude of the origin, destination and the center point of the geographic grid from the processed OD data, combine with the OD data similarity model, set instance attributes and randomly generate the initial category number of the instance; Add clustering training instances to the clustering stream instance set; The cluster generator iterates through the clustering stream instance set, reading instances sequentially and performing clustering processing. Output the clustering results, storing the category number, origin and destination latitude and longitude, OD statistics, and execution timestamp in the real-time order clustering table.
8. The apparatus for real-time aggregation and visualization of ride-hailing OD data streams according to claim 7, characterized in that: The OD map includes at least 18 levels for displaying aggregated OD data; Among them, levels 1-7 do not display 3D arc diagrams; Levels 8 and 9 display the OD curve between cities; Levels 10-11 display the OD arc diagram between districts / counties; Levels 12-13 display the OD curve diagram between towns / streets; Level 14 displays the OD arc map between geographic grids, with a hexagonal grid area of 5.161 km². 2 ; Level 15 displays the OD arc map between geographic grids, with a hexagonal grid area of 0.73 km². 2 ; Levels 16-17 display the OD curve between cluster points; 3D arc graphs are not displayed for levels 18 and above. The map display level, ground resolution, and display scale data comply with the relevant provisions of GB / T 35634-2017 Specification for Number of Tiles in Public Service Electronic Maps.
Citation Information
Patent Citations
Visual Analysis Method for Large-Scale Taxi OD Data
CN105095481B
Step-by-step OD flow merging space-time joint clustering method
CN110232421A
Three-dimensional visualization method and device for OD relations in GIS
CN111063035A
Efficient OD data visualization method and system
CN112948651A
Trajectory data analysis and visualization method and system based on online car-hailing travel
CN110716935A