OD matrix acquisition method and device, electronic equipment and computer readable storage medium

The OD matrix acquisition in polar coordinate space is solved through the CLIQUE clustering algorithm, and the problem of inaccurate and poor convenience of OD matrix construction in the prior art is solved, and more accurate and convenient traffic data distribution analysis is achieved.

CN119202760APending Publication Date: 2024-12-27ZHONGKE YUNGU TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411339083.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-25
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

The existing OD matrix construction method is difficult to accurately show the actual traffic data distribution in the urban road network structure, and it is not convenient to obtain the OD matrix.

Method used

The OD matrix acquisition method based on the CLIQUE clustering algorithm is adopted. By converting the rectangular coordinates into polar coordinates and performing clustering analysis in polar coordinate space, the clustering is generated using grid division and density threshold intervals to generate an accurate OD matrix.

Benefits of technology

The accuracy and convenience of the OD matrix are improved, making the grid division more in line with the actual road network structure and can accurately display the distribution of traffic data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119202760A_ABST
    Figure CN119202760A_ABST
Patent Text Reader

Abstract

The invention discloses an OD matrix acquisition method and apparatus, an electronic device and a computer readable storage medium. The method comprises the steps of S1, acquiring multiple pieces of order information of at least one shared vehicle; the order information comprises a starting point and an ending point which are represented by rectangular coordinates; s2, respectively converting the rectangular coordinates of the starting point and the ending point into polar coordinates relative to a preset original point; and S3, based on a CLIQUE clustering algorithm, carrying out clustering analysis on the starting point and the ending point represented by polar coordinates to obtain a corresponding OD matrix. Therefore, clustering is carried out through the polar coordinate-based CLIQUE algorithm, so that grid division is more in line with an actual road network structure, the actual data distribution condition can be accurately displayed, and the accuracy and convenience of the obtained OD matrix are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to an OD matrix acquisition method, device, electronic equipment and computer-readable storage medium. Background Art

[0002] The origin-destination matrix, or OD matrix, represents the quantity matrix of traffic volume between the origin and the destination, which can reflect the traffic demand situation in a certain time period. The elements on the OD matrix are the traffic flow from one area to another in the divided road network structure in a certain time period. This element can express the traffic situation of users traveling on the entire road network structure. If you master the OD matrix of the road network structure, you will master the temporal and spatial distribution of traffic demand on the road network structure. Therefore, a reasonable construction of the OD matrix is ​​conducive to the reasonable planning and induction of traffic.

[0003] However, due to the complexity of the urban road network structure, the existing OD matrix construction method cannot accurately reflect the actual data distribution, and the acquisition of the OD matrix is ​​not convenient enough. Summary of the invention

[0004] The purpose of the present application is to provide an OD matrix acquisition method, device, electronic device and computer-readable storage medium, which can accurately display the actual data distribution and improve the accuracy and convenience of the acquired OD matrix.

[0005] To achieve the above objectives:

[0006] In a first aspect, an embodiment of the present application provides an OD matrix acquisition method, comprising:

[0007] S1. Obtaining multiple order information of at least one shared transportation tool; the order information includes a starting point and an end point expressed in rectangular coordinates;

[0008] S2, converting the rectangular coordinates of the starting point and the end point into polar coordinates relative to a preset origin;

[0009] S3. Perform cluster analysis on the starting point and the end point represented by polar coordinates based on the CLIQUE clustering algorithm to obtain a corresponding OD matrix.

[0010] Optionally, the step S3 includes:

[0011] S10, performing spatial division on the starting point and the end point represented by polar coordinates to obtain at least one non-overlapping unit in each dimensional subspace in the n-dimensional subspace;

[0012] S20, constructing a candidate dense unit set based on at least one non-overlapping unit in each dimensional subspace;

[0013] S30, clustering the candidate dense unit set within a preset density threshold interval, and obtaining a minimized description under each density threshold in the density threshold interval;

[0014] S40, determining a corresponding OD matrix according to the target density threshold corresponding to the minimum minimization description.

[0015] Optionally, the step S10 includes:

[0016] Determine grid parameters and the number n of subspace dimensions according to the order information;

[0017] The starting point and the end point represented by polar coordinates are spatially divided based on the grid parameters to obtain at least one non-overlapping unit in each dimensional subspace of the n-dimensional subspace.

[0018] Optionally, the step S30 includes:

[0019] S301, determining an initial density threshold from the density threshold interval;

[0020] S302, determining a dense unit in a d-dimensional subspace from the candidate dense unit set according to a current density threshold; wherein the initial d is equal to 1;

[0021] S303, pruning dense cells in the d-dimensional subspace;

[0022] S304, searching for a candidate dense unit set in the d+1-dimensional subspace among the dense units in the pruned d-dimensional subspace;

[0023] S305, determining whether the candidate dense unit set in the d+1-dimensional subspace is not empty, if so, executing step S306, otherwise executing step S308;

[0024] S306, determine whether d+1 is less than n, if so, execute step S307, otherwise execute step S308;

[0025] S307, control d=d+1, and return to execute step S302;

[0026] S308, determining a cluster in each dimensional subspace according to a set of candidate dense units in each dimensional subspace in the n-dimensional subspace;

[0027] S309, analyzing the clusters in each dimensional subspace by using an improved greedy algorithm to obtain a minimized description of the n-dimensional subspace under the current density threshold;

[0028] S310, determining whether the density threshold interval has not been traversed completely, if so, executing step S311, otherwise executing step S312;

[0029] S311, updating the current density threshold based on the density threshold interval, and returning to execute step S302;

[0030] S312, end.

[0031] Optionally, the step S302 includes:

[0032] Obtaining the density of each candidate dense unit in the candidate dense unit set;

[0033] The candidate dense cells whose density is greater than the current density threshold are determined as dense cells in the d-dimensional subspace.

[0034] Optionally, the minimization is described as the sum of intra-cluster dispersion and intra-cluster separation.

[0035] Optionally, the step S40 includes:

[0036] According to the target density threshold corresponding to the minimum minimization description, determine the clustering clusters in each dimensional subspace under the target density threshold;

[0037] Based on the clustering clusters in each dimensional subspace under the target density threshold, a corresponding OD matrix is ​​generated.

[0038] In a second aspect, an embodiment of the present application provides an OD matrix acquisition device, comprising:

[0039] An acquisition module, used to acquire a plurality of order information of at least one shared transportation tool; the order information includes a starting point and an end point expressed in rectangular coordinates;

[0040] A conversion module, used for converting the rectangular coordinates of the starting point and the end point into polar coordinates relative to a preset origin;

[0041] The processing module is used to perform cluster analysis on the starting point and the end point represented by polar coordinates based on the CLIQUE clustering algorithm to obtain a corresponding OD matrix.

[0042] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a processor and a memory storing a computer program, and when the processor runs the computer program, the above-mentioned OD matrix acquisition method is implemented.

[0043] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the above-mentioned OD matrix acquisition method is implemented.

[0044] The OD matrix acquisition method, device, electronic device and computer-readable storage medium provided in the embodiments of the present application include: obtaining multiple order information of at least one shared transportation tool; the order information includes a starting point and an end point expressed in rectangular coordinates; converting the rectangular coordinates of the starting point and the end point into polar coordinates relative to a preset origin; performing cluster analysis on the starting point and the end point expressed in polar coordinates based on the CLIQUE clustering algorithm to obtain the corresponding OD matrix. In this way, clustering is performed by the CLIQUE algorithm based on polar coordinates, so that the grid division is more in line with the actual road network structure, and the actual data distribution can be accurately displayed, thereby improving the accuracy and convenience of the obtained OD matrix. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] Figure 1 This is a schematic diagram of the principle of the greedy algorithm;

[0046] Figure 2 Schematic diagram of the implementation process of CLIQUE algorithm;

[0047] Figure 3 A schematic diagram of a flow chart of an OD matrix acquisition method provided in an embodiment of the present invention;

[0048] Figure 4 This is a schematic diagram of space division in an embodiment of the present invention;

[0049] Figure 5 A schematic diagram of the clustering process in an embodiment of the present invention;

[0050] Figure 6 A schematic diagram of the structure of an OD matrix acquisition device provided in an embodiment of the present invention;

[0051] Figure 7 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0052] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0053] It should be noted that, in this article, the terms "include", "comprises" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element. In addition, components, features, and elements with the same name in different embodiments of the present application may have the same meaning or different meanings, and their specific meanings need to be determined by their explanation in the specific embodiment or further combined with the context of the specific embodiment.

[0054] It should be understood that, although the terms first, second, third, etc. may be used to describe various information in this article, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of this article, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein can be interpreted as "at the time of..." or "when..." or "in response to determination". Furthermore, as used in this article, the singular forms "one", "one" and "the" are intended to also include plural forms, unless there is an opposite indication in the context. It should be further understood that the terms "comprising", "including" indicate that there are described features, steps, operations, elements, components, projects, kinds, and / or groups, but do not exclude the existence, occurrence or addition of one or more other features, steps, operations, elements, components, projects, kinds, and / or groups. The terms "or" and "and / or" used herein are interpreted as inclusive, or mean any one or any combination. Thus, “A, B, or C” or “A, B and / or C” means “any of the following: A; B; C; A and B; A and C; B and C; A, B, and C.” An exception to this definition will occur only when a combination of elements, functions, steps, or operations are inherently mutually exclusive in some manner.

[0055] It should be understood that, although the various steps in the flowchart in the embodiment of the present application are displayed in sequence according to the indication of the arrows, these steps are not necessarily performed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and it can be performed in other orders. Moreover, at least a portion of the steps in the figure may include a plurality of sub-steps or a plurality of stages, and these sub-steps or stages are not necessarily performed at the same time, but can be performed at different times, and their execution order is not necessarily performed in sequence, but can be performed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.

[0056] It should be noted that, in this article, step codes such as S101, S102, etc. are used for the purpose of expressing the corresponding content more clearly and concisely, and do not constitute a substantial limitation on the sequence. When implementing the step, those skilled in the art may execute S102 first and then S101, etc., but these should all be within the scope of protection of this application.

[0057] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0058] In the subsequent description, the suffixes such as "module", "component" or "unit" used to represent elements are only used to facilitate the description of the present application, and have no specific meanings. Therefore, "module", "component" or "unit" can be used in a mixed manner.

[0059] The following is a brief description of the algorithms and technical terms involved in this application:

[0060] 1. CLIQUE algorithm

[0061] The CLIQUE algorithm is a grid-based spatial clustering algorithm that divides the data space into multiple grid cells and then clusters each grid cell to discover the distribution pattern of the data. It is based on the distribution of data on the grid, comparing the density of the grid cells and the density threshold, and dividing each grid cell into two categories: sparse cells and dense cells. If the density of a grid cell is greater than the density threshold, it is classified as a dense cell; otherwise, it is classified as a sparse cell. The CLIQUE algorithm is to find the largest connected dense cell in each data cell. Among them,

[0062] Definition 1: Let A = {D1, D2, …, D n} are n bounded subspaces, then S = D1×D2×…×D n It is an n-dimensional data space, D1, D2, ..., D n Can be regarded as an n-dimensional attribute or field of S.

[0063] In the CLIQUE algorithm, the input to the algorithm is a data object point set in n-dimensional space, let it be V = {v1,v2,…,v n}, where v i = {v i1 ,v i2 ,…,v in},v i The jth component v ij ∈D j By using the parameter T = {t1, t2, ..., t k} divide the t dimensions separately, where t i (1≤i≤k) is the number of partitions of the interval in the i-th dimension. In this way, the entire space is divided into a finite number of non-intersecting rectangular-like units. Each rectangular-like unit is represented by U = {u1,u2,…,u n} to describe, where u i =[l i ,h i ) is D i A data object V = {v1, v2, ..., v k} falls into a cell U={u1,u2,…,u n}, if and only if for all v i Both have l i ≤v i <h i Established.

[0064] Definition 2: In n-dimensional data space, some connected dense cells are grouped into connected branches, namely clusters.

[0065] Two cells u1 and u2 in n-dimension are said to be connected if the following two conditions are met: (1) the two cells have a common face; (2) the two cells are connected to another cell u3. t1 ,R t2 ,…,R tk} and u2={X t1 ,X t2 ,…,X tk}Having a common face means that there is a k-1 dimension, with R tl =X tl holds, and for the tkth dimension we have h tk = l tk or h tk =x tk .

[0066] Among them, the core steps of the CLIQUE algorithm are the following three:

[0067] Core step 1: Determine the subspace containing dense units.

[0068] Assuming that the data set is k-dimensional, the calculation method for forming k-dimensional units after T division is as shown in the following formula:

[0069]

[0070] In actual applications, the amount of data in a data set is much smaller than the number of cells. Therefore, if the density is determined by directly traversing the k-dimensional cells, it will affect the computational efficiency and consume a lot of memory space. Therefore, the CLIQUE clustering algorithm adopts a "bottom-up" recognition method and designs a multi-layer tree data structure.

[0071] According to the multi-layer tree-like data structure, the calculation process is as follows: First, in the k-th dimensional space, the cell density is calculated. Then, it is determined whether the cell is a dense cell. If the cell is a dense cell, the storage resources of the k+1-th dimensional subspace are expanded; otherwise, the dense attribute of the cell is marked as FALSE. Then, when determining whether the k+1-th dimensional cell is a dense cell, it is only necessary to perform the operation based on whether the dense attribute mark of the k-th dimension is "FALSE". In the above manner, access to a large number of non-dense cells can be avoided, data points falling into non-dense cells can be deleted, and the traversal efficiency of the entire calculation process can be improved.

[0072] The above process uses the pruning algorithm based on MDL (Minimal Description Length). Assume that in the subspace set {S1, S2, L, S n}, calculate the number of records contained in each subspace:

[0073]

[0074] In the formula, count(u i ) is a dense unit u i The number of points covered in , is the subspace S j coverage.

[0075] In the MDL algorithm, first, the subspaces are arranged in descending order of coverage. Then, the subspaces are divided into a selected set R and a pruned set P. Next, the average value u of the area coverage under each set is calculated. R (i) The difference u between each subspace in the set and the mean value P (i), the corresponding calculation formula is as follows:

[0076]

[0077] Finally, add up the digits required for these values, and the encoding objective function is:

[0078]

[0079] When the objective function CL(i) is the minimum, the parameter i value is the split point of the MDL algorithm.

[0080] Core step 2: Use a depth-first algorithm to identify clusters.

[0081] After generating k-dimensional dense cells, clustering is required by connecting adjacent cells, that is, inputting a set of dense cells D and outputting a segmentation of D, D1, D2, ..., D c . Let the pth dense unit be U p , its j-th dimension adjacent units are U pjl and U pjr For each dense cell, it is necessary to determine whether its 2k adjacent cells are dense cells. In this process, the idea of ​​depth-first traversal is adopted to recursively search and classify each cell. When the total number of dense cells is m, the algorithm is executed 2km times.

[0082] The calculation process of the depth-first algorithm is as follows: First, randomly select a dense unit u from D, and mark all units connected to u with the serial number 1, indicating that they are the first to be traversed. Then, randomly select a dense unit that has not been marked, and explore and mark it in ascending order according to the above method. Finally, when all dense units are traversed, all dense units are numbered, and each has its own number. Among them, when the depth-first algorithm is used for traversal, each dense unit is regarded as a node.

[0083] Core step 3: Generate a minimized description.

[0084] For each cluster, generating the minimization description is mainly divided into two parts: the first part is to obtain the maximum density covering each sub-cluster based on the greedy algorithm; the second part is to obtain the minimum coverage.

[0085] Definition 3: For a cluster C in a k-dimensional sub-data space S, the set of regions W in space S is covered by cluster C if every R∈W is contained in cluster C and any unit in cluster C is contained in at least one R.

[0086] The principle of the greedy algorithm is as follows Figure 1As shown. Starting from the dense unit u, first extend horizontally to find a rectangle A consisting of four dense units. Then, A is extended vertically. When A cannot be further extended, a maximum rectangle is obtained, called B. Next, start from the dense unit that is not covered by B (such as w) until the shaded part is covered by the maximized rectangle.

[0087] Based on the above three core steps, the steps of the standard CLIQUE algorithm are as follows: Figure 2 As shown, the details are as follows:

[0088] Step (1): Divide each dimension of data in the sample space and initialize d=0.

[0089] Here, d usually refers to the dimensionality of the data. Specifically, d represents the number of attributes contained in each data point in the data set. For example, if each data point in the data set has three attributes (such as length, width, and height), then d is equal to 3.

[0090] The CLIQUE algorithm is a clustering algorithm suitable for high-dimensional data. It divides the data space into grid cells to identify dense areas for clustering. When dividing the grid, the algorithm divides the data space into equally spaced grid cells in each dimension. Therefore, the value of d directly affects the grid division method and clustering results.

[0091] In the specific implementation of the CLIQUE algorithm, the value of d affects the following aspects:

[0092] 1) Grid partitioning: The algorithm divides the data space into equally spaced grid cells in each dimension. The value of d determines the number of dimensions that need to be divided.

[0093] 2) Density calculation: The density of each grid cell is determined by counting the number of data points within that cell. Therefore, the value of d affects the volume of the grid cell (i.e., the product of the grid size), and thus affects the density calculation.

[0094] 3) Dense area identification: The algorithm identifies grid cells with a density exceeding a certain threshold as dense areas. The value of d affects the shape and size of the dense area.

[0095] 4) Cluster generation: The algorithm generates clusters by connecting adjacent dense areas. The value of d affects the structure and number of clusters.

[0096] Therefore, the value of d is an important parameter in the CLIQUE algorithm, which is directly related to the performance of the algorithm and the quality of the clustering results. In practical applications, it is necessary to select an appropriate d value based on the specific characteristics and requirements of the data set.

[0097] Step (2): d=d+1, construct candidate dense units.

[0098] First, all cells are divided into candidate dense cells. Then, the entire data set is scanned, and the number of cells in the subspace is recorded. Finally, it is determined whether it is a dense cell, that is, a cell whose number of cells in the subspace is greater than the density threshold γ.

[0099] Step (3): Prune the subspace according to the MDL pruning technique in core step 1.

[0100] Step (4): In the d-dimensional space dense cells, find the candidate dense cell set of the d+1-dimensional subspace. When the d+1-dimensional candidate dense cell set is not empty, jump to step (2).

[0101] Step (5): Use the depth-first algorithm in the core step 2 to explore clusters in the d-dimensional space. That is, starting from a certain dense cell, determine the maximum connected set based on the depth-first algorithm. Then, randomly select a cell from other dense cells that have not performed the above operation, and repeat the above operation. Finally, many dense cell connected sets are obtained.

[0102] Step (6): Generate a minimized description. The cells in the same space that were originally connected in the n-dimensional space but separated due to the above operation are clustered using the greedy algorithm in the core step 3, and the maximum number of rectangles are used to cover the clusters. Then, the minimum covering principle is used to remove the repeated rectangles to obtain clusters.

[0103] Step (7): Get the final clustering result.

[0104] 2. S_Dbw indicator

[0105] In the data set S, for any given data point m, the density of m is defined as

[0106]

[0107] Where: n is the number of samples of S; x l is the lth data point.

[0108]

[0109] Where: k is the dimension of S; CI p Represents the confidence interval of the pth dimension, with a 95% confidence interval CI p Defined as

[0110]

[0111] Where: u p is the mean of the pth dimension; σp is the variance of the pth dimension.

[0112] Let mij represent two clusters (C i ,C j ) the midpoint of the line segment connecting the centers of

[0113]

[0114] Therefore, the inter-cluster separation degree Seprt can be defined * (c)

[0115]

[0116] Where: c is the number of clusters obtained by clustering; V i and V j are the cluster centers of cluster i and cluster j respectively.

[0117] At the same time, the intra-cluster dispersion Scat can be defined * (c)

[0118]

[0119] Where: ||x|| is the modulus of vector x, that is, ||x||=(x T ) 1 / 2 .

[0120] Finally, S_Dbw can be defined * (c) The indicator is

[0121] S_Dbw * (c) = Seprt * (c)+Scat * (c)

[0122] Among them, S_Dbw * The minimum value of (c) indicates the best clustering result.

[0123] See also Figure 3 , is an OD matrix acquisition method provided in an embodiment of the present application. The OD matrix acquisition method can be executed by an OD matrix acquisition device provided in an embodiment of the present application. The OD matrix acquisition device can be implemented in software and / or hardware, such as an electronic device such as a controller or a server. In this embodiment, the execution subject of the OD matrix acquisition method is a server as an example. The OD matrix acquisition method provided in this embodiment includes:

[0124] Step S1, obtaining multiple order information of at least one shared transportation tool; the order information includes a starting point and an end point expressed in rectangular coordinates.

[0125] The shared transportation tool may be an online car-hailing vehicle, a shared bicycle, a shared electric vehicle, etc., which are not specifically limited here. Optionally, obtaining multiple order information of at least one shared transportation tool may be obtaining multiple order information of at least one shared transportation tool within a certain location range within a period of time, such as obtaining multiple order information of at least one shared transportation tool in city A within the time period from 9:00 am to 9:15 am. It can be understood that if the starting point and the end point in the order information are expressed in longitude and latitude, the starting point and the end point expressed in longitude and latitude can be first converted into the starting point and the end point expressed in rectangular coordinates.

[0126] Step S102: Convert the rectangular coordinates of the starting point and the end point into polar coordinates relative to a preset origin.

[0127] The process of converting rectangular coordinates to polar coordinates is as follows:

[0128] Assuming that the rectangular coordinates of a point are (x, y), and the coordinates of the given origin (pole) are (x0, y0), then its rectangular coordinates can be converted to polar coordinates (ρ, θ) according to the following formula:

[0129]

[0130]

[0131] Wherein, ρ represents the polar diameter, and θ represents the polar angle. It should be noted that the preset origin can be determined based on the starting point and the end point in the multiple order information. For example, when the multiple order information is order information within a certain position range, the preset origin can be the center point of the position range or a position near the center point.

[0132] Step S3: Perform cluster analysis on the start and end points represented by polar coordinates based on the CLIQUE clustering algorithm to obtain the corresponding OD matrix.

[0133] Wherein, step S3 comprises:

[0134] S10, performing spatial division on the starting point and the end point represented by polar coordinates to obtain at least one non-overlapping unit in each dimensional subspace of the n-dimensional subspace;

[0135] S20, constructing a candidate dense unit set based on at least one non-overlapping unit in each dimensional subspace;

[0136] S30, clustering the candidate dense unit set within a preset density threshold interval, and obtaining a minimized description under each density threshold in the density threshold interval;

[0137] S40, determining the corresponding OD matrix according to the target density threshold corresponding to the minimum minimization description.

[0138] Where n refers to the dimension of the data. Specifically, n represents the number of attributes contained in each data point in the data set (i.e., all starting points and end points). The preset density threshold interval can be set according to actual needs, such as [0.1, 0.6], etc.

[0139] In one embodiment, step S10 includes:

[0140] According to the order information, determine the grid parameters and the number of subspace dimensions n;

[0141] The starting point and the end point represented by polar coordinates are spatially divided based on the grid parameters to obtain at least one non-overlapping unit in each dimensional subspace of the n-dimensional subspace.

[0142] In this embodiment, each data point in the data set has three attributes (polar diameter, polar angle, and the number of starting points and end points in the same space), so n can be 3. The grid parameter refers to the number of divisions of the data in the dimension, which mainly affects the area of ​​the grid area after the final clustering. Among them, according to the grid parameter, all starting points and end points can be divided into equal intervals in the dimension attribute, and at the same time, the division of each dimension in space can be saved. In this embodiment, the polar diameter ρ and polar angle θ are divided into and ψ. For example, the grid parameters are and ψ are divided into 8 and 7 respectively, such as Figure 4 shown.

[0143] In one embodiment, if Figure 5 As shown, step S30 includes:

[0144] S301, determining an initial density threshold from a density threshold interval;

[0145] S302, determining a dense unit in a d-dimensional subspace from a set of candidate dense units according to a current density threshold; wherein the initial d is equal to 1;

[0146] S303, pruning dense cells in the d-dimensional subspace;

[0147] S304, searching for a candidate dense unit set in the d+1-dimensional subspace among the dense units in the pruned d-dimensional subspace;

[0148] S305, determining whether the candidate dense unit set in the d+1-dimensional subspace is not empty, if so, executing step S306, otherwise executing step S308;

[0149] S306, determine whether d+1 is less than n, if so, execute step S307, otherwise execute step S308;

[0150] S307, control d=d+1, and return to execute step S302;

[0151] S308, determining a cluster in each dimensional subspace according to a set of candidate dense units in each dimensional subspace in the n-dimensional subspace;

[0152] S309, analyzing the clusters in each dimensional subspace by using the improved greedy algorithm to obtain a minimized description of the n-dimensional subspace under the current density threshold;

[0153] S310, determining whether the density threshold interval has not been traversed, if so, executing step S311, otherwise executing step S312;

[0154] S311, updating the current density threshold based on the density threshold interval, and returning to execute step S302;

[0155] S312, end the operation.

[0156] It can be understood that when performing the first iteration operation, the current density threshold is the initial density threshold, and in the subsequent iteration operation, the current density threshold is the updated density threshold. It should be noted that in this embodiment, when traversing the density threshold interval, the interval sampling method of the preset density interval threshold (for example, it can be set to 0.1, etc.) is used for traversal. Among them, if the minimum density threshold in the density threshold interval is selected as the initial density threshold, when the current density threshold needs to be updated based on the density threshold interval during the first iteration operation, the sum of the minimum density threshold in the density threshold interval and the preset density interval threshold can be used as the updated density threshold, that is, as the current density threshold corresponding to the second iteration operation, and so on. If the maximum density threshold in the density threshold interval is selected as the initial density threshold, when the current density threshold needs to be updated based on the density threshold interval during the first iteration operation, the difference between the maximum density threshold in the density threshold interval and the preset density interval threshold can be used as the updated density threshold, that is, as the current density threshold corresponding to the second iteration operation, and so on.

[0157] Since different units have different densities, the required dense unit can be determined from the candidate dense unit set based on the density threshold. In one embodiment, step S302 includes: obtaining the density of each candidate dense unit in the candidate dense unit set; and determining the candidate dense unit with a density greater than the current density threshold as a dense unit in the d-dimensional subspace.

[0158] Optionally, based on the coordinate information of different starting points and end points, the number of starting points and end points in each unit can be obtained, and then the density of different units, that is, the density of each candidate dense unit, can be obtained. For example, the number of starting points and end points in a unit can be directly determined as the density of the unit. After determining the density of each candidate dense unit, the density of each candidate dense unit is compared with the current density threshold, and the candidate dense unit with a density greater than the current density threshold is determined as a dense unit in the d-dimensional subspace.

[0159] Optionally, in this embodiment, the MDL algorithm is used to prune the dense cells in the d-dimensional subspace, and the details can be referred to the above description. In addition, according to the candidate dense cell set in each dimensional subspace in the n-dimensional subspace, the depth-first algorithm is used for clustering to determine the clustering clusters in each dimensional subspace.

[0160] Optionally, the minimization is described as the sum of the within-cluster dispersion and the within-cluster separation.

[0161] In one embodiment, step S40 includes:

[0162] According to the target density threshold corresponding to the minimum minimization description, the clustering clusters in each dimensional subspace under the target density threshold are determined;

[0163] Based on the clustering clusters in each dimensional subspace under the target density threshold, the corresponding OD matrix is ​​generated.

[0164] Specifically, the minimization descriptions under different density thresholds are compared to determine the minimum minimization description; according to the target density threshold corresponding to the minimum minimization description, based on the clustering clusters in each dimensional subspace generated by clustering under different density thresholds, the clustering clusters in each dimensional subspace under the target density threshold are determined; based on the clustering clusters in each dimensional subspace under the target density threshold, the corresponding OD matrix is ​​generated to obtain the corresponding traffic demand status.

[0165] Here, the target density threshold corresponding to the smallest minimized description refers to the density threshold selected when the smallest minimized description is obtained by clustering. It should be noted that since the minimized description is obtained by processing and calculating multiple order information, determining the target density threshold based on the smallest minimized description can make the selection of the density threshold more in line with actual needs. In this way, determining the appropriate density threshold through clustering results further improves the accuracy of the obtained OD matrix.

[0166] In summary, the OD matrix acquisition method provided in the above embodiment has the following advantages: 1) In order to be more in line with the actual road network structure during the grid division process, especially for the radial traffic road structure, the CLIQUE algorithm based on polar coordinates is used to obtain the OD matrix. 2) In the process of generating the minimum description, the unit is used as a unit to expand to the surrounding area, simplify the expansion rules, and optimize the steps of the minimum description. 3) According to the sum of the minimum intra-cluster dispersion and the intra-cluster separation, the density threshold in the CLIQUE algorithm is determined, which improves the rationality and accuracy of the density threshold. Therefore, in this embodiment, clustering is performed by using the CLIQUE algorithm based on polar coordinates, which can make the grid division more in line with the actual road network structure, can accurately display the actual data distribution, and improve the accuracy and convenience of obtaining the OD matrix.

[0167] Based on the same inventive concept as the above embodiments, refer to Figure 6 This embodiment also provides an OD matrix acquisition device, including:

[0168] An acquisition module, used to acquire multiple order information of at least one shared transportation tool; the order information includes a starting point and an end point expressed in rectangular coordinates;

[0169] A conversion module, used for converting the rectangular coordinates of the starting point and the end point into polar coordinates relative to a preset origin;

[0170] The processing module is used to perform cluster analysis on the starting point and the end point represented by polar coordinates based on the CLIQUE clustering algorithm to obtain the corresponding OD matrix.

[0171] In one embodiment, the processing module is specifically configured to:

[0172] S10, performing spatial division on the starting point and the end point represented by polar coordinates to obtain at least one non-overlapping unit in each dimensional subspace in the n-dimensional subspace;

[0173] S20, constructing a candidate dense unit set based on at least one non-overlapping unit in each dimensional subspace;

[0174] S30, clustering the candidate dense unit set within a preset density threshold interval, and obtaining a minimized description under each density threshold in the density threshold interval;

[0175] S40, determining a corresponding OD matrix according to the target density threshold corresponding to the minimum minimization description.

[0176] In one embodiment, the processing module is specifically configured to:

[0177] Determine grid parameters and the number n of subspace dimensions according to the order information;

[0178] The starting point and the end point represented by polar coordinates are spatially divided based on the grid parameters to obtain at least one non-overlapping unit in each dimensional subspace of the n-dimensional subspace.

[0179] In one embodiment, the processing module is specifically configured to:

[0180] S301, determining an initial density threshold from the density threshold interval;

[0181] S302, determining a dense unit in a d-dimensional subspace from the candidate dense unit set according to a current density threshold; wherein the initial d is equal to 1;

[0182] S303, pruning dense cells in the d-dimensional subspace;

[0183] S304, searching for a candidate dense unit set in the d+1-dimensional subspace among the dense units in the pruned d-dimensional subspace;

[0184] S305, determining whether the candidate dense unit set in the d+1-dimensional subspace is not empty, if so, executing step S306, otherwise executing step S308;

[0185] S306, determine whether d+1 is less than n, if so, execute step S307, otherwise execute step S308;

[0186] S307, control d=d+1, and return to execute step S302;

[0187] S308, determining a cluster in each dimensional subspace according to a set of candidate dense units in each dimensional subspace in the n-dimensional subspace;

[0188] S309, analyzing the clusters in each dimensional subspace by using an improved greedy algorithm to obtain a minimized description of the n-dimensional subspace under the current density threshold;

[0189] S310, determining whether the density threshold interval has not been traversed completely, if so, executing step S311, otherwise executing step S312;

[0190] S311, updating the current density threshold based on the density threshold interval, and returning to execute step S302;

[0191] S312, end the operation.

[0192] In one embodiment, the processing module is specifically configured to:

[0193] Obtaining the density of each candidate dense unit in the candidate dense unit set;

[0194] The candidate dense cells whose density is greater than the current density threshold are determined as dense cells in the d-dimensional subspace.

[0195] In one embodiment, the minimization is described as the sum of the within-cluster dispersion and the within-cluster separation.

[0196] In one embodiment, the processing module is specifically configured to:

[0197] According to the target density threshold corresponding to the minimum minimization description, determine the clustering clusters in each dimensional subspace under the target density threshold;

[0198] Based on the clustering clusters in each dimensional subspace under the target density threshold, a corresponding OD matrix is ​​generated.

[0199] In summary, in the OD matrix acquisition device provided in this embodiment, clustering is performed through the CLIQUE algorithm based on polar coordinates, so that the grid division is more in line with the actual road network structure, can accurately display the actual data distribution, and improve the accuracy and convenience of the acquired OD matrix.

[0200] Based on the same inventive concept as the above embodiments, an embodiment of the present invention provides an electronic device, such as Figure 7 As shown, the electronic device includes: a processor 310 and a memory 311 storing a computer program; wherein, Figure 7 The processor 310 shown in the figure is not used to indicate that the number of the processor 310 is one, but is only used to indicate the positional relationship of the processor 310 relative to other devices. In actual applications, the number of the processor 310 may be one or more; similarly, Figure 7 The memory 311 shown in the figure has the same meaning, that is, it is only used to refer to the position relationship of the memory 311 relative to other devices. In practical applications, the number of memories 311 can be one or more. When the processor 310 runs the computer program, the above-mentioned OD matrix acquisition method is implemented.

[0201] The electronic device may also include: at least one network interface 312. The various components in the electronic device are coupled together via a bus system 313. It is understood that the bus system 313 is used to achieve connection and communication between these components. In addition to the data bus, the bus system 313 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, the bus system 313 is not used in the following examples. Figure 7 Various buses are labeled as bus system 313.

[0202] The memory 311 may be a volatile memory or a nonvolatile memory, or may include both volatile and nonvolatile memories. The nonvolatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a flash memory, a magnetic surface memory, an optical disk, or a compact disc read-only memory (CD-ROM); the magnetic surface memory may be a disk memory or a tape memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), synchronous static random access memory (SSRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM, SyncLink Dynamic Random Access Memory), and direct RAM bus random access memory (DRRAM, Direct Rambus Random Access Memory).The memory 311 described in the embodiments of the present invention is intended to include but is not limited to these and any other suitable types of memories.

[0203] The memory 311 in the embodiment of the present invention is used to store various types of data to support the operation of the electronic device. Examples of these data include: any computer program used to operate on the electronic device, such as an operating system and an application; contact data; phone book data; messages; pictures; videos, etc. Among them, the operating system includes various system programs, such as a framework layer, a core library layer, a driver layer, etc., which are used to implement various basic services and process hardware-based tasks. The application program may include various applications, such as a media player (Media Player), a browser (Browser), etc., which are used to implement various application services. Here, the program that implements the method of the embodiment of the present invention may be included in the application program.

[0204] Based on the same inventive concept as the above-mentioned embodiment, this embodiment further provides a computer storage medium, in which a computer program is stored. The computer storage medium may be a ferromagnetic random access memory (FRAM), a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a flash memory, a magnetic surface memory, an optical disc, or a compact disc read-only memory (CD-ROM) or the like; it may also be various devices including one or any combination of the above-mentioned memories, such as a mobile phone, a computer, a tablet device, a personal digital assistant, etc. When the computer program stored in the computer storage medium is executed by the processor, the above-mentioned OD matrix acquisition method is implemented. For the specific steps implemented when the computer program is executed by the processor, please refer to Figure 3 The description of the illustrated embodiment will not be repeated here.

[0205] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0206] In this document, the terms "comprises," "comprising," or any other variations thereof, are intended to cover a non-exclusive inclusion of elements other than those listed and may also include additional elements not expressly listed.

[0207] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. A method for obtaining an OD matrix, characterized in that: The method comprises the following steps: S1. Obtaining multiple order information of at least one shared transportation tool; the order information includes a starting point and an end point expressed in rectangular coordinates; S2, converting the rectangular coordinates of the starting point and the end point into polar coordinates relative to a preset origin; S3. Perform cluster analysis on the starting point and the end point represented by polar coordinates based on the CLIQUE clustering algorithm to obtain a corresponding OD matrix.

2. The method according to claim 1, characterized in that The step S3 comprises: S10, performing spatial division on the starting point and the end point represented by polar coordinates to obtain at least one non-overlapping unit in each dimensional subspace in the n-dimensional subspace; S20, constructing a candidate dense unit set based on at least one non-overlapping unit in each dimensional subspace; S30, clustering the candidate dense unit set within a preset density threshold interval, and obtaining a minimized description under each density threshold in the density threshold interval; S40, determining a corresponding OD matrix according to the target density threshold corresponding to the minimum minimization description.

3. The method according to claim 2, characterized in that The step S10 comprises: Determine grid parameters and the number n of subspace dimensions according to the order information; The starting point and the end point represented by polar coordinates are spatially divided based on the grid parameters to obtain at least one non-overlapping unit in each dimensional subspace of the n-dimensional subspace.

4. The method according to claim 2, characterized in that: The step S30 includes: S301, determining an initial density threshold from the density threshold interval; S302, determining a dense unit in a d-dimensional subspace from the candidate dense unit set according to a current density threshold; wherein the initial d is equal to 1; S303, pruning dense cells in the d-dimensional subspace; S304, searching for a candidate dense unit set in the d+1-dimensional subspace among the dense units in the pruned d-dimensional subspace; S305, determining whether the candidate dense unit set in the d+1-dimensional subspace is not empty, if so, executing step S306, otherwise executing step S308; S306, determine whether d+1 is less than n, if so, execute step S307, otherwise execute step S308; S307, control d=d+1, and return to execute step S302; S308, determining a cluster in each dimensional subspace according to a set of candidate dense units in each dimensional subspace in the n-dimensional subspace; S309, analyzing the clusters in each dimensional subspace by using an improved greedy algorithm to obtain a minimized description of the n-dimensional subspace under the current density threshold; S310, determining whether the density threshold interval has not been traversed completely, if so, executing step S311, otherwise executing step S312; S311, updating the current density threshold based on the density threshold interval, and returning to execute step S302; S312, end the operation.

5. The method according to claim 4, characterized in that The step S302 includes: Obtaining the density of each candidate dense unit in the candidate dense unit set; The candidate dense cells whose density is greater than the current density threshold are determined as dense cells in the d-dimensional subspace.

6. The method according to claim 4, characterized in that The minimization is described as the sum of the within-cluster dispersion and the within-cluster separation.

7. The method according to claim 4, characterized in that The step S40 includes: According to the target density threshold corresponding to the minimum minimization description, determine the clustering clusters in each dimensional subspace under the target density threshold; Based on the clustering clusters in each dimensional subspace under the target density threshold, a corresponding OD matrix is ​​generated.

8. An OD matrix acquisition device, characterized in that: include: An acquisition module, used to acquire multiple order information of at least one shared transportation tool; The order information includes a starting point and an end point expressed in rectangular coordinates; A conversion module, used for converting the rectangular coordinates of the starting point and the end point into polar coordinates relative to a preset origin; The processing module is used to perform cluster analysis on the starting point and the end point represented by polar coordinates based on the CLIQUE clustering algorithm to obtain a corresponding OD matrix.

9. An electronic device, characterized in that: include: A processor and a memory storing a computer program, wherein when the processor runs the computer program, the OD matrix acquisition method according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium, characterized in that: A computer program is stored, and when the computer program is executed by a processor, the OD matrix acquisition method according to any one of claims 1 to 7 is implemented.