Method, device, equipment and storage medium for identifying shared bicycle congestion areas
By obtaining shared bicycle order data and electronic fence data, spatial matching and clustering are carried out, and the reachable time and vehicle usage pattern similarity of nearest electronic fences are used to identify the silted area, which solves the problem of difficulty in borrowing and parking during peak hours of shared bicycles, and improves the accuracy of identification.
Patent Information
- Application Number
- CN202210622045.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-01
- Publication Date
- 2025-08-12
- Estimated Expiration
- 2042-06-01
AI Technical Summary
The prior art is difficult to accurately identify the silted areas of shared bicycles, which leads to difficulties in borrowing and parking during peak periods.
By obtaining shared bicycle order data and electronic fence data, spatial matching and clustering are performed, and the silt area is identified using the accessible time and vehicle usage pattern similarity between nearby electronic fences.
It improves the accuracy of identifying silt areas of shared bicycles and solves the problems of difficulty in borrowing and parking during peak hours.
Smart Images

Figure CN115170171B_ABST
Abstract
Description
Technical Field
[0001] One or more embodiments of this specification relate to the field of shared transportation technology, and in particular, to a method, device, equipment, and storage medium for identifying congestion areas for shared bicycles. Background Art
[0002] In recent years, in order to alleviate urban traffic congestion, environmental pollution and resource waste, shared bicycles, as an innovative application of bicycle travel mode, have emerged as an important indicator of urban development and public transportation due to their advantages of environmental protection, energy saving, flexibility and convenience.
[0003] However, due to the rapid growth of shared bikes, there are often no bikes to rent or places to park during peak hours. Therefore, accurately identifying areas of shared bike congestion in cities is crucial for optimizing shared bike space scheduling and alleviating the difficulty of renting and parking bikes during peak hours. Summary of the Invention
[0004] In view of this, one or more embodiments of this specification provide a method, device, equipment, and storage medium for identifying a shared bicycle congestion area.
[0005] According to a first aspect of one or more embodiments of this specification, a method for identifying a shared bicycle congestion area is proposed, comprising:
[0006] Obtain shared bicycle order data and geo-fence data within the specified area;
[0007] Performing spatial matching on the shared bicycle order data and the electronic fence data to obtain the shared bicycle order data corresponding to each electronic fence;
[0008] Clustering the electronic fences according to the reachable time and vehicle usage pattern similarity between neighboring electronic fences to obtain an electronic fence group, wherein the neighboring electronic fences refer to two electronic fences whose straight-line distance between them is less than a first distance threshold;
[0009] The congestion area is determined based on the shared bicycle orders corresponding to each electronic fence group within the set range.
[0010] In some embodiments, the shared bicycle order data is obtained based on the shared bicycle's trajectory data, wherein the trajectory data is sequence data updated according to a set period, including switch status data, wherein a first value of the switch status data indicates that the vehicle is in an unlocked state, and a second value of the switch status data indicates that the vehicle is in a locked state;
[0011] The method further comprises:
[0012] In the switch state data sequence of the trajectory data, when there are multiple consecutive first values, retaining the last one of the multiple consecutive first values;
[0013] When there are a plurality of consecutive second values in the switch state data sequence of the trajectory data, the first one of the plurality of consecutive second values is retained.
[0014] In some embodiments, spatially matching the shared bicycle order data with the electronic fence data includes:
[0015] Constructing a binary tree using the location information of the electronic fence as a node;
[0016] Search the binary tree according to the starting point or end point of the shared bicycle order to determine a node that matches the shared bicycle order;
[0017] The electronic fence indicated by the matching node is determined as the electronic fence matched by the shared bicycle order.
[0018] In some embodiments, after obtaining the shared bicycle order data corresponding to each electronic fence, the method further includes:
[0019] When the distance between the electronic fence matched by the shared bicycle order and the starting point or end point of the shared bicycle order exceeds a second distance threshold, the shared bicycle order data is deleted.
[0020] In some embodiments, clustering the electronic fences according to the reachable time and vehicle usage pattern similarity between neighboring electronic fences in the electronic fences to obtain an electronic fence group includes:
[0021] The electronic fence relationship graph is constructed by taking the electronic fence as a node and forming edges between two adjacent electronic fences;
[0022] Determine the edge weight based on the reachable time and vehicle usage pattern similarity between the two neighboring electronic fences corresponding to the edge;
[0023] For each node, determine the modularity gain resulting from joining the geo-fence group of each neighboring node, where modularity refers to the ratio of the edge weight within the geo-fence group to the edge weight between geo-fence groups. Each node is initially in an independent geo-fence group.
[0024] The node is added to the electronic fence group where the neighboring node that generates the maximum gain and the gain is greater than the set gain threshold is located.
[0025] In some embodiments, the method further comprises:
[0026] Acquire road network data, where the road network data includes a plurality of road network nodes, and two road network nodes are connected by a path;
[0027] Constructing a topological network according to the plurality of road network nodes, and determining a position of a node indicating an electronic fence in the topological network;
[0028] Establish a link between the node indicating the electronic fence and the nearest road network node;
[0029] Determine the path length between the two neighboring nodes based on the connecting rod and the road network nodes between the two neighboring nodes;
[0030] The reachable time between the two neighboring nodes is determined according to the path length.
[0031] In some embodiments, the method further comprises:
[0032] Aggregate the shared order data corresponding to the electronic fence with a set time length as the time slice to obtain the number of rental cars and the number of return cars of the electronic fence in each time slice;
[0033] According to the number of car rentals and car returns in each time slice within the set time range, the car rental time series and car return time series are obtained;
[0034] Determine the similarity of the car rental time series and the similarity of the car return time series between two neighboring nodes;
[0035] The car usage mode similarity is obtained according to the average of the similarity of the car rental time series and the similarity of the car return time series.
[0036] In some embodiments, determining the edge weight based on the reachable time and vehicle usage pattern similarity between two neighboring electronic fences corresponding to the edge includes:
[0037] When the edge weight is less than a set weight threshold, the edge weight is set to 0.
[0038] In some embodiments, determining the congestion area based on the shared bicycle orders corresponding to each electronic fence group within the set range includes:
[0039] Determine the number of shared bicycles in the electronic fence group according to the shared bicycle orders corresponding to the electronic fence group;
[0040] Determining a net parking density in the electronic fence group according to the number of shared bicycles in the electronic fence group and the area of each electronic fence in the electronic fence group;
[0041] When the net parking density is higher than a set threshold, the electronic fence group is determined to be a congestion area.
[0042] According to a second aspect of one or more embodiments of this specification, a device for identifying a congestion area for a shared bicycle is provided, the device comprising:
[0043] An acquisition unit, used to obtain shared bicycle order data and electronic fence data within a set area;
[0044] a matching unit, configured to perform spatial matching between the shared bicycle order data and the electronic fence data to obtain the shared bicycle order data corresponding to each electronic fence;
[0045] a clustering unit, configured to cluster the electronic fences according to the reachable time and vehicle usage pattern similarity between adjacent electronic fences in the electronic fences to obtain an electronic fence group, wherein the adjacent electronic fences refer to two electronic fences whose straight-line distance between them is less than a first distance threshold;
[0046] The identification unit is used to determine the congestion area according to the shared bicycle orders corresponding to each electronic fence group within the set range.
[0047] In some embodiments, the shared bicycle order data is obtained based on the shared bicycle's trajectory data, wherein the trajectory data is sequence data updated according to a set period, including switch status data, wherein a first value of the switch status data indicates that the vehicle is in an unlocked state, and a second value of the switch status data indicates that the vehicle is in a locked state;
[0048] The device further includes an order merging unit, configured to:
[0049] In the switch state data sequence of the trajectory data, when there are multiple consecutive first values, retaining the last one of the multiple consecutive first values;
[0050] When there are a plurality of consecutive second values in the switch state data sequence of the trajectory data, the first one of the plurality of consecutive second values is retained.
[0051] In some embodiments, the matching unit is specifically configured to:
[0052] Constructing a binary tree using the location information of the electronic fence as a node;
[0053] Search the binary tree according to the starting point or end point of the shared bicycle order to determine a node that matches the shared bicycle order;
[0054] The electronic fence indicated by the matching node is determined as the electronic fence matched by the shared bicycle order.
[0055] In some embodiments, the apparatus further comprises an order filtering unit, configured to:
[0056] When the distance between the electronic fence matched by the shared bicycle order and the starting point or end point of the shared bicycle order exceeds a second distance threshold, the shared bicycle order data is deleted.
[0057] In some embodiments, the clustering unit is specifically configured to:
[0058] The electronic fence relationship graph is constructed by taking the electronic fence as a node and forming edges between two adjacent electronic fences;
[0059] Determine the edge weight based on the reachable time and vehicle usage pattern similarity between the two neighboring electronic fences corresponding to the edge;
[0060] For each node, determine the modularity gain resulting from joining the geo-fence group of each neighboring node, where modularity refers to the ratio of the edge weight within the geo-fence group to the edge weight between geo-fence groups. Each node is initially in an independent geo-fence group.
[0061] The node is added to the electronic fence group where the neighboring node that generates the maximum gain and the gain is greater than the set gain threshold is located.
[0062] In some embodiments, the apparatus further comprises a reachability calculation unit configured to:
[0063] Acquire road network data, where the road network data includes a plurality of road network nodes, and two road network nodes are connected by a path;
[0064] Constructing a topological network according to the plurality of road network nodes, and determining a position of a node indicating an electronic fence in the topological network;
[0065] Establish a link between the node indicating the electronic fence and the nearest road network node;
[0066] Determine the path length between the two neighboring nodes based on the connecting rod and the road network nodes between the two neighboring nodes;
[0067] The reachable time between the two neighboring nodes is determined according to the path length.
[0068] In some embodiments, the device further includes a vehicle usage mode similarity calculation unit, configured to:
[0069] Aggregate the shared order data corresponding to the electronic fence with a set time length as the time slice to obtain the number of rental cars and the number of return cars of the electronic fence in each time slice;
[0070] According to the number of car rentals and car returns in each time slice within the set time range, the car rental time series and car return time series are obtained;
[0071] Determine the similarity of the car rental time series and the similarity of the car return time series between two neighboring nodes;
[0072] The car usage mode similarity is obtained according to the average of the similarity of the car rental time series and the similarity of the car return time series.
[0073] In some embodiments, when the clustering unit is used to determine the edge weight based on the reachable time and vehicle usage pattern similarity between two neighboring electronic fences corresponding to the edge, it is specifically used to:
[0074] When the edge weight is less than a set weight threshold, the edge weight is set to 0.
[0075] In some embodiments, the identification unit is specifically configured to:
[0076] Determine the number of shared bicycles in the electronic fence group according to the shared bicycle orders corresponding to the electronic fence group;
[0077] Determining a net parking density in the electronic fence group according to the number of shared bicycles in the electronic fence group and the area of each electronic fence in the electronic fence group;
[0078] When the net parking density is higher than a set threshold, the electronic fence group is determined to be a congestion area.
[0079] In an embodiment of the present disclosure, by spatially matching the shared bicycle order data with the electronic fence data within a set area, the shared bicycle order data corresponding to each electronic fence can be obtained; according to the reachable time and vehicle usage pattern similarity between neighboring electronic fences in the electronic fence, the electronic fences are clustered to obtain electronic fence groups; and the congestion area is determined according to the shared bicycle orders corresponding to each electronic fence group within the set range. By considering the spatial correlation of the electronic fences and the vehicle usage pattern correlation between the electronic fences, the clustering of the electronic fences is more reasonable, which helps to improve the accuracy of identifying shared bicycle congestion areas. BRIEF DESCRIPTION OF THE DRAWINGS
[0080] Figure 1 This is a flowchart of a method for identifying a shared bicycle congestion area provided by an exemplary embodiment.
[0081] Figure 2 This is a flowchart of a shared bicycle order matching method provided by an exemplary embodiment.
[0082] Figure 3This is a schematic diagram of a binary tree constructed based on location information of an electronic fence, provided by an exemplary embodiment.
[0083] Figure 4 This is a schematic diagram of a topological structure of a road network node provided by an exemplary embodiment.
[0084] Figure 5 This is a flowchart of another method for identifying a shared bicycle congestion area provided by an exemplary embodiment.
[0085] Figure 6 This is a block diagram of a device for identifying a congestion area for shared bicycles provided by an exemplary embodiment.
[0086] Figure 7 It is a structural diagram of a computing device provided by an exemplary embodiment. DETAILED DESCRIPTION
[0087] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The implementations described in the following exemplary embodiments are not intended to represent all implementations consistent with one or more embodiments of this specification. Rather, they are merely examples of apparatuses and methods consistent with certain aspects of one or more embodiments of this specification, as detailed in the appended claims.
[0088] It should be noted that in other embodiments, the steps of the corresponding method are not necessarily performed in the order shown and described in this specification. In some other embodiments, the method may include more or fewer steps than those described in this specification. In addition, a single step described in this specification may be broken down into multiple steps for description in other embodiments, and multiple steps described in this specification may be combined into a single step for description in other embodiments.
[0089] This application provides a method for identifying a shared bicycle congestion area, which can be performed by a computing device. The computing device can be a server, such as a single server, multiple servers, a server cluster, a cloud computing platform, etc. This disclosure does not limit the type or number of computing devices.
[0090] See also Figure 1 , Figure 1 This is a flowchart of a method for identifying a shared bicycle congestion area provided by an exemplary embodiment, the method comprising:
[0091] Step 101: Obtain shared bicycle order data and electronic fence data within a set area.
[0092] The set area is the area where shared bicycle congestion areas are to be identified, for example, the entire city area, or a part of the city area.
[0093] The electronic fence refers to a virtual parking frame. Users need to park the shared bicycle in the area indicated by the parking frame before they can lock the bicycle and end the trip.
[0094] The geo-fence data may include the geo-fence number, the geo-fence vector surface in wkt (well-known text) format, the longitude and latitude of the geo-fence center point, and the like.
[0095] In one example, shared bicycle order data may include shared bicycle number, start timestamp, end timestamp, starting longitude and latitude, ending longitude and latitude, travel time, etc.
[0096] Electronic fence data and shared bicycle order data can usually be data provided by suppliers.
[0097] Step 102: spatially match the shared bicycle order data with the electronic fence data to obtain the shared bicycle order data corresponding to each electronic fence.
[0098] In the disclosed embodiments, the shared bicycle order data can be matched with the electronic fence data based on the location of the shared bicycle order's starting point or end point. For example, if the shared bicycle order's starting point or end point is located within the electronic fence, the shared bicycle order can be determined to correspond to the electronic fence; if the shared bicycle order's starting point or end point is not located within the electronic fence, the shared bicycle order can be matched with the electronic fence based on a set rule or algorithm.
[0099] Step 103 : Clustering the electronic fences according to the reachable time and vehicle usage pattern similarity between neighboring electronic fences in the electronic fences to obtain an electronic fence group.
[0100] Among them, neighboring electronic fences refer to two electronic fences whose straight-line distance is less than a first distance threshold. The first distance threshold can be based on the addressing limit distance acceptable to users when returning shared bicycles, that is, all electronic fences within the first distance threshold range of each electronic fence are set to have a neighboring relationship.
[0101] For every two neighboring electronic fences within the set area, the reachable time and the similarity of vehicle usage patterns are determined.
[0102] Among them, the reachable time can be determined based on the theoretical travel time between two neighboring electronic fences. That is, for the path length between the two neighboring electronic fences and the average riding speed of the shared bicycles, the theoretical travel time can be determined. The value of the reachable time is positively correlated with the determination of the theoretical travel time. For example, the longer the theoretical travel time, the higher the value of the reachable time; conversely, the shorter the theoretical travel time, the lower the value of the reachable time. The shorter the reachable time between two neighboring electronic fences, the higher the time accessibility between the two neighboring electronic fences, and vice versa.
[0103] The similarity of car usage patterns can be determined based on the similarity in the distribution of the number of rentals and returns of cars in each time slice between two neighboring electronic fences.
[0104] The shorter the reachable time between neighboring electronic fences, that is, the higher the temporal reachability, the higher the possibility of being classified into the same electronic fence group; the higher the similarity of vehicle usage patterns between neighboring electronic fences, the higher the possibility of being classified into the same electronic fence group.
[0105] Step 104: Determine the congestion area based on the shared bicycle orders corresponding to each electronic fence group within the set range.
[0106] A congestion area refers to an area where a high number of shared bikes are returned and a low number of bikes are rented during a specific period. Based on the shared bike orders corresponding to each of the electronic fences included in the electronic fence group, the shared bike orders corresponding to the electronic fence group can be determined, and the congestion area can be determined based on the shared bike orders.
[0107] In an embodiment of the present disclosure, by spatially matching the shared bicycle order data with the electronic fence data within a set area, the shared bicycle order data corresponding to each electronic fence can be obtained; according to the reachable time and vehicle usage pattern similarity between neighboring electronic fences in the electronic fence, the electronic fences are clustered to obtain electronic fence groups; and the congestion area is determined according to the shared bicycle orders corresponding to each electronic fence group within the set range. By considering the spatial correlation of the electronic fences and the vehicle usage pattern correlation between the electronic fences, the clustering of the electronic fences is more reasonable, which helps to improve the accuracy of identifying shared bicycle congestion areas.
[0108] The above is an introduction to the basic implementation process of this application. The following introduces multiple optional implementation methods of this application.
[0109] Before matching the shared bicycle order data and the electronic fence data, data cleaning can be performed.
[0110] In some embodiments, shared bicycle order data for time periods other than the target time period may be deleted.
[0111] Since the disclosed solution is to identify shared bicycle congestion areas, the identified time period is specific and can exclude data records on non-working days and data records outside the valid time period on working days, and only include data records during the valid time period on working days (for example, 7 am to 7 pm).
[0112] In some embodiments, shared bicycle order data with abnormal travel time and travel distance can also be deleted.
[0113] For example, the quartile method is used to perform secondary filtering on shared bicycle order data with abnormal travel time and travel distance, that is, only valid data records between Q3+1.5 (IQR) and Q1-1.5 (IQR) are retained, where Q1 is the lower quartile, Q3 is the upper quartile, and IQR is the difference between the upper quartile and the lower quartile.
[0114] By deleting abnormal and invalid order data, it is beneficial to improve recognition efficiency while also improving recognition accuracy.
[0115] In the embodiment of the present disclosure, the spatial geographic coordinate system adopts the GCJ02 coordinate system.
[0116] When it is impossible to directly obtain the shared bicycle order data, the shared bicycle order data can also be obtained based on the shared bicycle trajectory data.
[0117] The trajectory data includes the shared bike number, timestamp, longitude and latitude, and switch status data. A first value in the switch status data indicates the bike is unlocked, while a second value in the switch status data indicates the bike is locked; for example, 0 indicates unlocked, and 1 indicates locked. Because trajectory data is serial data updated at a set period, the switch status data sequence can be extracted from the trajectory data and used to perform order matching to obtain shared bike order data.
[0118] In some embodiments, the switch state data sequence can be order-matched in the following manner: when there are multiple consecutive first values in the switch state data sequence of the trajectory data, the last one of the multiple consecutive first values is retained; when there are multiple consecutive second values in the switch state data sequence of the trajectory data, the first one of the multiple consecutive second values is retained.
[0119] For example, the daily shared bicycle order data is grouped by the shared bicycle number, and the switch status data sequence is obtained by sorting the data update time within the group. When there are multiple consecutive unlock status records "0" in the sequence, only the last record is retained; when there are multiple consecutive locked status records "1", only the first record is retained. The order matching process is as follows Figure 2As shown, the data format after matching is the shared bicycle order data structure.
[0120] Due to human factors or positioning equipment, the starting and ending points of a bike may not be within the range of the electronic fence. Therefore, manual spatial matching of the electronic fence with the starting and ending points of the shared bike is required. Considering the large volume of data, this disclosure uses the following method to achieve spatial nearest neighbor matching between shared order data and electronic fence data.
[0121] First, a binary tree is constructed using the location information of the electronic fence as a node, wherein the location information includes the longitude and latitude of the center point, which is a two-dimensional feature.
[0122] In order to make the binary tree as balanced as possible and save time for subsequent searches, it is necessary to select an axis node. In the embodiment of the present disclosure, since the electronic fence is relatively dispersed in space, the axis node is selected based on the data variance of each node in each dimension, and the maximum value of the variance is selected. The corresponding dimension is the value of the segmentation attribute. For example, the i-th dimension is the value of the segmentation attribute. A large data variance indicates that the data points are relatively dispersed along the coordinate axis. In this direction, data segmentation can achieve a better balance. The data point set is then sorted according to the value of the i-th dimension, and the data point at the median is selected as the axis node.
[0123] After we have the axis node, the line perpendicular to the i-th dimension of the node is the splitting hyperplane. The axis node is the root node, and the tree composed of the nodes in the left subspace of the splitting hyperplane is the left subtree. Similarly, the tree composed of the nodes in the right subspace of the splitting hyperplane is the right subtree. Next, we continue to search for the axis node and divide the left and right subtrees until all nodes are in the tree. The result is as follows: Figure 3 shown.
[0124] Next, the binary tree is searched according to the location of the starting point or the end point of the shared bicycle order to determine the node that matches the shared bicycle order.
[0125] Specifically, the query node (the starting or ending point of a shared bike order) is input, and the i-th dimension of the query node and the split node are compared. If the value is less than or equal to the value, the left subtree branch is entered; if the value is equal, the right subtree branch is entered until the leaf node is reached. The nearest neighbor approximate point can be found along the search path, that is, the leaf node in the same subspace as the query node. The search path is then backtracked to determine whether there may be data points closer to the query node in the spaces of other subnodes of the node on the search path. If so, the search is performed in the spaces of other subnodes (adding other subnodes to the search path). This process is repeated until the search path is empty and the node that matches the query node is determined.
[0126] The electronic fence indicated by the matching node is determined as the electronic fence matched by the shared bicycle order.
[0127] The order data after spatial matching includes: shared bicycle number, start timestamp, end timestamp, starting latitude and longitude, ending latitude and longitude, travel time, starting point nearest neighbor geo-fence number, starting point nearest neighbor geo-fence distance, end point nearest neighbor geo-fence number, end point nearest neighbor geo-fence distance, starting point coordinates in WKT format, end point coordinates in WKT format.
[0128] After the spatial matching is completed, the shared bicycle order data is filtered based on the distance between the nearest electronic fence of the starting point and the end point of the shared bicycle order. If the distance between the electronic fence matched by the shared bicycle order and the location of the starting point or end point of the shared bicycle order exceeds a second distance threshold, the shared bicycle order data is deleted.
[0129] For example, 50 meters can be taken as the positioning deviation limit, that is, if the distance to the nearest neighboring electronic fence exceeds 50 meters, it is considered that the electronic fence matching at this point fails, otherwise it is valid data.
[0130] In some embodiments, geo-fences can be clustered by constructing a geo-fence relationship graph. Each node in the geo-fence relationship graph represents an geo-fence, and two adjacent geo-fences are connected by an edge. The edge weight is determined based on the reachability time and vehicle usage pattern similarity between the two adjacent geo-fences corresponding to the edge.
[0131] Next, the method of constructing the electronic fence relationship diagram is described in detail.
[0132] (1) Calculation of neighbor relationships of electronic fences
[0133] Based on the acceptable addressing limit distance when returning a shared bicycle, the first distance threshold, i.e., the neighbor radius, is determined. All electronic fences within the neighbor radius of each electronic fence are set to be adjacent, as shown in formula (1):
[0134]
[0135] Among them, dist(s i , s j ) represents the distance between nodes i and j, r is the set neighbor radius, and f(i, j) represents the neighbor relationship between nodes i and j. If there is a neighbor relationship, the value is 1, otherwise it is 0.
[0136] (2) Calculation of reachable time of neighboring electronic fences
[0137] First, obtain road network data. The road network data may be an Open Street Map (OSM) that indicates the location, shape, etc. of road segments. The road network data may include multiple road network nodes, with paths connecting two road network nodes.
[0138] Next, a topology network is constructed based on the multiple road network nodes. The topology network can also be called a reachability topology network, such as Figure 4 By mapping the node indicating the electronic fence in the topological network, the position of the electronic fence in the topological network can be determined.
[0139] Next, a link is established between the node indicating the electronic fence and the nearest road network node. Since there may be no path between the node indicating the electronic fence and the road network node, a link needs to be established between the node and the nearest road network node to form a complete path between the two neighboring nodes.
[0140] Finally, the path length between the two neighboring nodes is determined based on the link between them and the road network nodes, and the reachable time between the two neighboring nodes is determined based on the path length. The reachable time can be represented by the theoretical travel time, as shown in formula (2):
[0141]
[0142] Among them, dist ij is the path length from node i to node j, V0 is the average riding speed of shared bicycles, which can be obtained from the shared bicycle industry report. For example, the value can be taken as 10.9 kilometers per hour, t i,j is the theoretical travel time from node i to node j.
[0143] (3) Calculation of similarity between vehicle usage patterns of neighboring electronic fences
[0144] Due to their different spatial locations, electronic fences that are close to each other may not necessarily have the same vehicle usage patterns. In other words, the distribution of the number of rental and return vehicles in each time slice may be different. Therefore, in addition to clustering electronic fences by distance or travel time, it is also necessary to calculate the similarity of vehicle usage patterns.
[0145] First, the shared order data corresponding to the geo-fence is aggregated with a set duration as the time slice to obtain the number of rentals and returns within the geo-fence in each time slice. Furthermore, the net parking quantity within the time slice can be obtained by subtracting the number of rentals from the number of returns.
[0146] For example, shared order data can be aggregated using 30-minute time slices.
[0147] Next, the rental time series and the return time series can be obtained based on the number of rentals and returns in each time slice within the set time range, and the similarity of the rental time series and the return time series between two neighboring nodes can be determined.
[0148] In one example, the optimal matching of the rental and return time series of two neighboring nodes can be performed, that is, the matching with the minimum loss can be performed under the following rules and constraints. The minimum loss is the sum of the distances of the values at the mapping positions. The first sequence is the rental time series (or return time series) of one of the two neighboring nodes, and the second sequence is the rental time series (or return time series) of the other of the two neighboring nodes.
[0149] Each positional element of the first sequence must match one or more positional elements of the second sequence, and vice versa.
[0150] The first element of the first sequence must match the first element of the second sequence, but may also match other positions.
[0151] The last element of the first sequence must match the last element of the second sequence, but may also match other positions.
[0152] The position mapping relationship between the two sequences must be monotonically increasing, and vice versa. For example, if the first sequence is 1,
[0153] It is OK to map position 3 to positions 2 and 3 of the second sequence, but it is not OK to map to positions 3 and 2.
[0154] The above matching method takes into account the situation where the two series being compared have similar volatility, but one of the time series may have a certain lag, and provides a flexible alignment method for the two series.
[0155] After optimal matching is performed using the above method, the similarity of the car rental time series and the similarity of the car return time series between the two neighboring nodes are calculated, and the car usage mode similarity is obtained based on the average of the similarity of the car rental time series and the similarity of the car return time series.
[0156] For example, the weekday car rental time series is x0 = <n0,n1,n2…,n 23 >, the weekday return time series is x1= <n0,n1,n2…,n 23 >. First, calculate the similarity of the time series of the number of rental cars and the number of car returns, respectively denoted as w rent (s i , s j ), w return (si , s j ), normalize all the time series similarities of the number of rental cars and the number of return cars, scale the data to between 0 and 1, and obtain the normalized similarity w′ rent (s i , s j ), w′ return (s i , s j ), and finally calculate the mean of the similarity of the time series of the number of rental cars and the time series of the number of returned cars, which is recorded as the car usage mode similarity w(s i , s j ).
[0157] (4) Calculate the edge weights between the two neighboring electronic fences based on the accessibility and vehicle usage pattern similarity between the two neighboring electronic fences.
[0158] The edge weight is related to the similarity of vehicle usage patterns between neighboring nodes and the reachable time between them. The higher the similarity of vehicle usage patterns, the more likely they are to be assigned to the same electronic fence group. The shorter the reachable time, the more likely they are to be assigned to the same electronic fence group. That is, the relationship between reachable time and edge weight is negatively correlated, and the relationship between vehicle usage pattern similarity and edge weight is positively correlated. The calculation formula of edge weight is shown in formula (3):
[0159]
[0160] Among them, W(s i , s j ) is the edge weight between node i and node j, t(s i , s j ) is the theoretical travel time between node i and node j, w(s i , s j ) is the vehicle usage pattern similarity between node i and node j.
[0161] After determining the above information, an electronic fence relationship graph can be constructed with electronic fences as nodes and edges formed between two neighboring electronic fences. In this graph, the edge weight is determined based on the reachable time and vehicle usage pattern similarity between the corresponding two neighboring electronic fences.
[0162] In some embodiments, when the edge weight is less than the set weight threshold, the edge weight is set to 0, that is, the edges with edge weights less than the set weight threshold can be removed from the electronic fence relationship diagram, thereby avoiding the trend of merging separate groups in the cluster.
[0163] After constructing the electronic fence relationship graph, for each node, the modularity gain generated by joining the electronic fence group where each neighboring node is located is determined, wherein the modularity refers to the ratio of the edge weight within the electronic fence group to the edge weight between electronic fence groups, and each node is an independent electronic fence group in the initial state; the node is added to the electronic fence group where the neighboring node with the maximum gain and the gain is greater than the set gain threshold is located.
[0164] In one example, modularity can be expressed using formula (4):
[0165]
[0166] Among them, m represents the sum of the weights of the edges remaining in the graph after removing the weights of the edges in the electronic fence group, and k i represents the sum of the weights of all edges pointing to node i, k j A represents the sum of the weights of all edges pointing to node j. ij represents the edge weight between nodes i and j, δ(C i , C j ) function indicates that if nodes i and j are in the same electronic fence group, the return value is 1, otherwise it returns 0.
[0167] The modularity gain generated by adding an electronic fence to the electronic fence group where the neighboring node is located can be expressed using formula (5):
[0168]
[0169] Among them, k i,in represents the sum of the edge weights between node i and all nodes in the electronic fence group that i wants to move into, represents the sum of the edge weights between node i and all nodes or electronic fence groups in the graph, and m represents the sum of the weights of the remaining edges in the entire graph after removing the edge weights within the electronic fence.
[0170] Through the above method, it is possible to cluster neighboring electronic fences with high reachable time and high vehicle usage mode similarity, and by setting a gain threshold in the merging process, the electronic fences are only merged when the gain is greater than the gain threshold, further avoiding the trend of merging separated groups in the clustering.
[0171] In one example, clustering of electronic fences may be achieved in the following manner.
[0172] Step S1: Initialize each node as an independent electronic fence group, and the edge weight within the group is 0.
[0173] Step S2: traverse all nodes in the geo-fence relationship graph, and for each node, traverse all of its neighboring nodes. Measure the modularity gain before and after adding the node to the geo-fence group of its neighboring nodes (the difference in modularity between the previous and next geo-fence relationship graphs). If the modularity gain is less than 0, exit the loop; otherwise, continue.
[0174] Step S3: Select the neighboring node with the maximum benefit and add it to the electronic fence group.
[0175] Step S4, repeat S2 to S3 until the electronic fence group affiliation of each node no longer changes, and calculate the modularity Q;
[0176] In step S5, the electronic fence group formed above is folded into points, and the edge weights between these newly generated "electronic fence group points" and the sum of the edge weights between all points in the electronic fence group are calculated respectively. The above steps are repeated until the modularity Q no longer changes, and the loop is exited. The last step is the final clustering result.
[0177] In some embodiments, determining the congestion area based on the shared bicycle orders corresponding to each electronic fence group within the set range includes: determining the number of shared bicycles in the electronic fence group based on the shared bicycle orders corresponding to the electronic fence group; determining the net parking density in the electronic fence group based on the number of shared bicycles in the electronic fence group and the area of each electronic fence in the electronic fence group; and determining that the electronic fence group is a congestion area when the net parking density is higher than a set threshold.
[0178] By defining congestion areas based on net parking density, false congestion is avoided, where false congestion refers to areas where the number of shared bike returns and rentals in a certain period of time is similar.
[0179] The following combination Figure 5 The flowchart shown describes in detail the method for identifying the shared bicycle congestion area proposed in the embodiment of the present disclosure.
[0180] The first step is the raw data acquisition stage.
[0181] In this stage, the original data obtained includes shared bicycle order data, geo-fence data, and road network data. The road network data can be OSM road network data, and the geo-fence data can be geo-fence vector surface data.
[0182] Next comes the data preparation stage.
[0183] In this stage, the shared bicycle order data is cleaned and matched. The shared bicycle order data after data cleaning and order matching is then matched with the electronic fence data to determine the electronic fence that each shared bicycle order matches or belongs to. Furthermore, the shared bicycle order and the matched electronic fence are filtered by distance. That is, if the distance exceeds the second distance threshold (positioning deviation limit), the order data is considered invalid; if the shared bicycle order and the matched electronic fence are within the second distance threshold, the order data is determined to be valid.
[0184] Next comes the stage of building the electronic fence relationship diagram.
[0185] On the one hand, the order demand matrix of each time slice of the electronic fence is determined based on the valid order data, and the demand matrix can be used to identify true / false congestion.
[0186] On the other hand, the electronic fence is regarded as a point element, and the electronic fence neighbor relationship matrix is determined according to the electronic fence relationship radiation radius. The reachable time between neighboring electronic fences is determined according to the accessibility topology network determined by the OSM road network, and the similarity of vehicle usage patterns between two neighboring electronic fences is determined according to the valid order data. The weight of the edge between the two neighboring electronic fences is determined according to the reachable time and the similarity of vehicle usage patterns, thereby constructing an electronic fence relationship graph.
[0187] The last stage is the identification of siltation areas.
[0188] According to the community discovery algorithm, the neighboring electronic fences can be clustered based on the electronic fence relationship graph to obtain one or more electronic fence groups.
[0189] The net parking density in the electronic fence group is determined according to the shared bicycle orders corresponding to the electronic fence group, and combined with the true / false congestion identification results, the final shared bicycle congestion area identification results can be obtained.
[0190] Figure 6 This is a schematic diagram of the structure of a shared bicycle congestion area identification device. Figure 6 As shown, the device includes:
[0191] An acquisition unit 601 is used to acquire shared bicycle order data and geo-fence data within a set area;
[0192] A matching unit 602 is configured to perform spatial matching on the shared bicycle order data and the electronic fence data to obtain the shared bicycle order data corresponding to each electronic fence;
[0193] a clustering unit 603 configured to cluster the electronic fences according to the reachable time and vehicle usage pattern similarity between adjacent electronic fences in the electronic fences to obtain an electronic fence group, wherein the adjacent electronic fences refer to two electronic fences whose straight-line distance between them is less than a first distance threshold;
[0194] The identification unit 604 is used to determine the congestion area according to the shared bicycle orders corresponding to each electronic fence group within the set range.
[0195] In some embodiments, the apparatus further includes a data cleaning unit configured to:
[0196] Deleting shared bike order data for periods outside the target period; and / or,
[0197] Delete shared bicycle order data with abnormal travel time and distance.
[0198] In some embodiments, the shared bicycle order data is obtained based on the shared bicycle's trajectory data, wherein the trajectory data is sequence data updated according to a set period, including switch status data, wherein a first value of the switch status data indicates that the vehicle is in an unlocked state, and a second value of the switch status data indicates that the vehicle is in a locked state;
[0199] The device further includes an order merging unit, configured to:
[0200] In the switch state data sequence of the trajectory data, when there are multiple consecutive first values, retaining the last one of the multiple consecutive first values;
[0201] When there are a plurality of consecutive second values in the switch state data sequence of the trajectory data, the first one of the plurality of consecutive second values is retained.
[0202] In some embodiments, the matching unit is specifically configured to:
[0203] Constructing a binary tree using the location information of the electronic fence as a node;
[0204] Search the binary tree according to the starting point or end point of the shared bicycle order to determine a node that matches the shared bicycle order;
[0205] The electronic fence indicated by the matching node is determined as the electronic fence matched by the shared bicycle order.
[0206] In some embodiments, the apparatus further comprises an order filtering unit, configured to:
[0207] When the distance between the electronic fence matched by the shared bicycle order and the starting point or end point of the shared bicycle order exceeds a second distance threshold, the shared bicycle order data is deleted.
[0208] In some embodiments, the clustering unit is specifically configured to:
[0209] The electronic fence relationship graph is constructed by taking the electronic fence as a node and forming edges between two adjacent electronic fences;
[0210] Determine the edge weight based on the reachable time and vehicle usage pattern similarity between the two neighboring electronic fences corresponding to the edge;
[0211] For each node, determine the modularity gain resulting from joining the geo-fence group of each neighboring node, where modularity refers to the ratio of the edge weight within the geo-fence group to the edge weight between geo-fence groups. Each node is initially in an independent geo-fence group.
[0212] The node is added to the electronic fence group where the neighboring node that generates the maximum gain and the gain is greater than the set gain threshold is located.
[0213] In some embodiments, the apparatus further comprises a reachability calculation unit configured to:
[0214] Acquire road network data, where the road network data includes a plurality of road network nodes, and two road network nodes are connected by a path;
[0215] Constructing a topological network according to the plurality of road network nodes, and determining a position of a node indicating an electronic fence in the topological network;
[0216] Establish a link between the node indicating the electronic fence and the nearest road network node;
[0217] Determine the path length between the two neighboring nodes based on the connecting rod and the road network nodes between the two neighboring nodes;
[0218] The reachable time between the two neighboring nodes is determined according to the path length.
[0219] In some embodiments, the device further includes a vehicle usage mode similarity calculation unit, configured to:
[0220] Aggregate the shared order data corresponding to the electronic fence with a set time length as the time slice to obtain the number of rental cars and the number of return cars of the electronic fence in each time slice;
[0221] According to the number of car rentals and car returns in each time slice within the set time range, the car rental time series and car return time series are obtained;
[0222] Determine the similarity of the car rental time series and the similarity of the car return time series between two neighboring nodes;
[0223] The car usage mode similarity is obtained according to the average of the similarity of the car rental time series and the similarity of the car return time series.
[0224] In some embodiments, when the clustering unit is used to determine the edge weight based on the reachable time and vehicle usage pattern similarity between two neighboring electronic fences corresponding to the edge, it is specifically used to:
[0225] When the edge weight is less than a set weight threshold, the edge weight is set to 0.
[0226] In some embodiments, the identification unit is specifically configured to:
[0227] Determine the number of shared bicycles in the electronic fence group according to the shared bicycle orders corresponding to the electronic fence group;
[0228] Determining a net parking density in the electronic fence group according to the number of shared bicycles in the electronic fence group and the area of each electronic fence in the electronic fence group;
[0229] When the net parking density is higher than a set threshold, the electronic fence group is determined to be a congestion area.
[0230] Figure 7 This is a schematic structural diagram of a device provided by an exemplary embodiment. Figure 7 At the hardware level, the device includes a processor 702, an internal bus 704, a network interface 706, a memory 708, and a non-volatile memory 710. Of course, it may also include hardware required for other scenarios. One or more embodiments of this specification can be implemented based on software, such as the processor 702 reading the corresponding computer program from the non-volatile memory 710 into the memory 708 and then running it. Of course, in addition to software implementation, one or more embodiments of this specification do not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc., that is, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.
[0231] The systems, devices, modules, or units described in the above embodiments may be implemented by computer chips or entities, or by products having certain functions. A typical implementation device is a computer, which may be in the form of a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email transceiver, game console, tablet computer, wearable device, or any combination of these devices.
[0232] In a typical configuration, a computer includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0233] Memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
[0234] Computer-readable media include permanent and non-permanent, removable and non-removable media that can be used to store information using any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, disk storage, quantum memory, graphene-based storage media or other magnetic storage devices, or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory media such as modulated data signals and carrier waves.
[0235] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.
[0236] The foregoing description of this specification describes specific embodiments. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in an order different from that described in the embodiments and still achieve the desired results. Furthermore, the processes depicted in the accompanying drawings do not necessarily require the specific order shown or the sequential order to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0237] The terms used in one or more embodiments of this specification are for the purpose of describing specific embodiments only and are not intended to limit one or more embodiments of this specification. The singular forms "a," "an," "the," and "the" used in one or more embodiments of this specification and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0238] It should be understood that although the terms first, second, third, etc. may be used to describe various information in one or more embodiments of this specification, such 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 one or more embodiments of this specification, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when..." or "when..." or "in response to determining."
[0239] The above description is merely a preferred embodiment of one or more embodiments of this specification and is not intended to limit one or more embodiments of this specification. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of one or more embodiments of this specification shall be included in the scope of protection of one or more embodiments of this specification.
Claims
1. A method for identifying a shared bicycle congestion area, characterized in that: include: Obtain shared bicycle order data and geo-fence data within the specified area; Performing spatial matching on the shared bicycle order data and the electronic fence data to obtain the shared bicycle order data corresponding to each electronic fence; Clustering the electronic fences according to the reachable time and vehicle usage pattern similarity between neighboring electronic fences to obtain an electronic fence group, wherein the neighboring electronic fences refer to two electronic fences whose straight-line distance between them is less than a first distance threshold; The congestion area is determined based on the shared bicycle orders corresponding to each electronic fence group within the set range.
2. The method according to claim 1, characterized in that The shared bicycle order data is obtained based on the shared bicycle's trajectory data, wherein the trajectory data is sequence data updated according to a set period, including switch status data, wherein a first value of the switch status data indicates that the vehicle is in an unlocked state, and a second value of the switch status data indicates that the vehicle is in a locked state; The method further comprises: In the switch state data sequence of the trajectory data, when there are multiple consecutive first values, retaining the last one of the multiple consecutive first values; When there are a plurality of consecutive second values in the switch state data sequence of the trajectory data, the first one of the plurality of consecutive second values is retained.
3. The method according to claim 1, characterized in that The spatial matching of the shared bicycle order data with the electronic fence data includes: Constructing a binary tree using the location information of the electronic fence as a node; Search the binary tree according to the starting point or end point of the shared bicycle order to determine a node that matches the shared bicycle order; The electronic fence indicated by the matching node is determined as the electronic fence matched by the shared bicycle order.
4. The method according to claim 3, characterized in that After obtaining the shared bicycle order data corresponding to each electronic fence, the method further includes: When the distance between the electronic fence matched by the shared bicycle order and the starting point or end point of the shared bicycle order exceeds a second distance threshold, the shared bicycle order data is deleted.
5. The method according to claim 1, wherein The electronic fences are clustered according to the reachable time and vehicle usage pattern similarity between neighboring electronic fences in the electronic fences to obtain an electronic fence group, including: The electronic fence relationship graph is constructed by taking the electronic fence as a node and forming edges between two adjacent electronic fences; Determine the edge weight based on the reachable time and vehicle usage pattern similarity between the two neighboring electronic fences corresponding to the edge; For each node, determine the modularity gain resulting from joining the geo-fence group of each neighboring node, where modularity refers to the ratio of the edge weight within the geo-fence group to the edge weight between geo-fence groups. Each node is initially in an independent geo-fence group. The node is added to the electronic fence group where the neighboring node that generates the maximum gain and the gain is greater than the set gain threshold is located.
6. The method according to claim 5, characterized in that The method further comprises: Acquire road network data, where the road network data includes a plurality of road network nodes, and two road network nodes are connected by a path; Constructing a topological network according to the plurality of road network nodes, and determining a position of a node indicating an electronic fence in the topological network; Establish a link between the node indicating the electronic fence and the nearest road network node; Determine the path length between the two neighboring nodes based on the connecting rod and the road network nodes between the two neighboring nodes; The reachable time between the two neighboring nodes is determined according to the path length.
7. The method according to claim 5, characterized in that The method further comprises: Aggregate the shared order data corresponding to the electronic fence with a set time length as the time slice to obtain the number of rental cars and the number of return cars of the electronic fence in each time slice; According to the number of car rentals and car returns in each time slice within the set time range, the car rental time series and car return time series are obtained; Determine the similarity of the car rental time series and the similarity of the car return time series between two neighboring nodes; The car usage mode similarity is obtained according to the average of the similarity of the car rental time series and the similarity of the car return time series.
8. The method according to any one of claims 5 to 7, characterized in that Determining the edge weight according to the reachable time and vehicle usage pattern similarity between two adjacent electronic fences corresponding to the edge includes: When the edge weight is less than a set weight threshold, the edge weight is set to 0.
9. The method according to claim 1, characterized in that The determining of the congestion area according to the shared bicycle orders corresponding to each electronic fence group within the set range includes: Determine the number of shared bicycles in the electronic fence group according to the shared bicycle orders corresponding to the electronic fence group; Determining a net parking density in the electronic fence group according to the number of shared bicycles in the electronic fence group and the area of each electronic fence in the electronic fence group; When the net parking density is higher than a set threshold, the electronic fence group is determined to be a congestion area.
10. A device for identifying a shared bicycle congestion area, characterized in that: The device comprises: An acquisition unit, used to obtain shared bicycle order data and electronic fence data within a set area; a matching unit, configured to perform spatial matching between the shared bicycle order data and the electronic fence data to obtain the shared bicycle order data corresponding to each electronic fence; a clustering unit, configured to cluster the electronic fences according to the reachable time and vehicle usage pattern similarity between adjacent electronic fences in the electronic fences to obtain an electronic fence group, wherein the adjacent electronic fences refer to two electronic fences whose straight-line distance between them is less than a first distance threshold; The identification unit is used to determine the congestion area based on the shared bicycle orders corresponding to each electronic fence group within the set range.
11. A computing device, characterized in that include: processor; a memory for storing processor-executable instructions; The processor implements the method according to any one of claims 1 to 9 by running the executable instructions.
12. A computer-readable storage medium having computer instructions stored thereon, characterized in that: When the instruction is executed by a processor, the steps of the method according to any one of claims 1 to 9 are implemented.
Citation Information
Patent Citations
Parking monitoring method for shared bicycle, computing device and storage medium
CN108346282A
Bicycle sharing system based on regional Wi-Fi network awareness
CN108833455A