Methods and devices for deploying shared bicycles based on electronic fences
By constructing a hybrid deep learning model that combines historical bike-sharing data with meteorological data, the model predicts future bike-sharing volumes, solving the problem of demand fluctuations in the bike-sharing system and achieving efficient operation management and improved user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-18
- Publication Date
- 2026-03-31
AI Technical Summary
Existing bike-sharing systems face problems such as tidal overflow, low utilization rate, and unreasonable layout in high-density and decentralized cities. They are unable to adapt to the spatiotemporal dynamic fluctuations in rental and return demand and lack a systematic multi-source information integration framework.
A method for deploying shared bicycles based on electronic fences is constructed. By acquiring historical borrowing and returning time series data and meteorological time series data, a hybrid deep learning model is used to predict the borrowing and returning volume within each electronic fence at future times, and the deployment is carried out accurately based on the prediction results.
It has improved the operational efficiency of shared bicycles, reduced operating costs, enhanced user experience, and enabled dynamic demand prediction and precise deployment of electronic fences.
Smart Images

Figure CN121352422B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of intelligent transportation technology, and in particular to a method and apparatus for deploying shared bicycles based on electronic fences. Background Technology
[0002] As a green and convenient mode of short-distance travel, shared bicycles have rapidly gained popularity worldwide, effectively solving the "last mile" connection problem of urban public transportation and playing a vital role in alleviating traffic congestion, reducing environmental pollution, and promoting low-carbon transportation development. However, their rapid development has also brought significant operational and management challenges, mainly including the occupation of public space and safety hazards caused by disorderly parking, and the coexistence of regional vehicle congestion and shortage due to the imbalance between supply and demand. To regulate parking behavior, electronic fence technology has been widely used to guide users to park through virtual geographical boundaries. However, existing systems mostly rely on static capacity allocation strategies, which are difficult to adapt to the strong spatiotemporal dynamic fluctuations in rental and return demand. In high-density cities and decentralized cities, they face problems such as tidal overflow, low utilization rate, and unreasonable layout.
[0003] Achieving accurate demand forecasting for shared bicycles has become crucial for improving the efficiency of geofence management and optimizing vehicle scheduling and operational decisions. While existing research has explored spatiotemporal modeling and the integration of external factors, several challenges remain to be addressed. For example, there is insufficient characterization of the complex spatial relationships between different functional areas of the city, and a lack of precise understanding of the potential periodic fluctuations in demand and the dynamic nonlinear influences such as weather conditions. Furthermore, a systematic framework is still lacking to unify the modeling of spatiotemporal dependencies and adaptively integrate multi-source external information. Summary of the Invention
[0004] This disclosure is made in view of the above-mentioned problems. This disclosure provides a method and apparatus for deploying shared bicycles based on electronic fences.
[0005] According to one aspect of this disclosure, a method for deploying shared bicycles based on electronic fences is provided, comprising:
[0006] The system acquires historical time-series data of shared bicycles in the target area during historical periods, corresponding historical meteorological time-series data, a pre-constructed spatial graph, and a hybrid deep learning model. The spatial graph has multiple nodes and edges between adjacent nodes. The multiple nodes represent multiple electronic fences in the target area used for parking the shared bicycles, and the edges represent the spatial correlation weights of adjacent electronic fences.
[0007] Using the hybrid deep learning model based on the spatial map, the historical borrowing and returning time series data, and the historical meteorological time series data, the predicted borrowing and returning volume of the shared bicycles within each of the electronic fences at future times is obtained;
[0008] Based on the predicted borrowing and returning volume, the number of shared bicycles deployed within each of the electronic fences at the future time is determined.
[0009] According to another aspect of this disclosure, a shared bicycle deployment device based on an electronic fence is provided, comprising:
[0010] The acquisition module is used to acquire historical borrowing and returning time series data of shared bicycles in the target area during historical time periods and corresponding historical meteorological time series data, as well as a pre-constructed spatial map and a hybrid deep learning model; wherein, the spatial map has multiple nodes and edges located between adjacent nodes, the multiple nodes represent multiple electronic fences in the target area for parking the shared bicycles, and the edges represent the spatial correlation weights of adjacent electronic fences;
[0011] The processing module is used to obtain the predicted borrowing and returning volume of the shared bicycles within each of the electronic fences at future times by using the hybrid deep learning model based on the spatial map, the historical borrowing and returning time series data and the historical meteorological time series data.
[0012] The processing module is also used to determine the number of shared bicycles to be deployed within each of the electronic fences at the future time based on the predicted borrowing and returning volume.
[0013] In another aspect of exemplary embodiments of this disclosure, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory, the processor executing the computer program to implement the methods described in exemplary embodiments of this disclosure.
[0014] In another aspect of exemplary embodiments of the present disclosure, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the methods described in exemplary embodiments of the present disclosure.
[0015] In another aspect of the exemplary embodiments of this disclosure, a computer program product is provided, including a computer program that, when executed by a processor, implements the methods described in the exemplary embodiments of this disclosure.
[0016] As will be described in detail below, the shared bicycle deployment method based on electronic fences according to embodiments of this disclosure acquires historical borrowing and returning time series data of shared bicycles in a target area over a historical period, corresponding historical meteorological time series data, and a pre-constructed spatial graph and a hybrid deep learning model. The spatial graph has multiple nodes and edges between adjacent nodes. The multiple nodes represent multiple electronic fences in the target area used for parking shared bicycles, and the edges represent the spatial correlation weights of adjacent electronic fences. The hybrid deep learning model, based on the spatial graph, historical borrowing and returning time series data, and historical meteorological time series data, obtains the predicted borrowing and returning volume of shared bicycles within each electronic fence at future times. Based on the predicted borrowing and returning volume, the deployment volume of shared bicycles within each electronic fence at future times is determined. This method utilizes the hybrid deep learning model to predict the borrowing and returning volume of each electronic fence at future times based on multi-source data, thereby enabling precise deployment and scheduling of shared bicycles. This improves the operational efficiency of shared bicycles while effectively reducing operating costs and enhancing user experience.
[0017] It should be understood that both the foregoing general description and the following detailed description are exemplary and intended to provide further illustration of the claimed technology. Attached Figure Description
[0018] The above and other objects, features, and advantages of this disclosure will become more apparent from the more detailed description of the embodiments thereof in conjunction with the accompanying drawings. The drawings are provided to further illustrate the embodiments of this disclosure and form part of the specification. They are used together with the embodiments of this disclosure to explain the disclosure and do not constitute a limitation thereof. In the drawings, the same reference numerals generally represent the same components or steps.
[0019] Figure 1 A flowchart illustrating the electronic fence-based shared bicycle deployment method provided in an exemplary embodiment of this disclosure is shown.
[0020] Figure 2 A schematic diagram of the network architecture of the hybrid deep learning model provided in this embodiment of the disclosure is shown.
[0021] Figure 3 The diagram illustrates the curves showing how the training loss and validation loss of the hybrid deep learning model provided in the exemplary embodiments of this disclosure change over the training period;
[0022] Figure 4 This invention discloses a comparison chart of the mean absolute error of the prediction performance of various different models provided in the embodiments of this invention.
[0023] Figure 5 The following diagram shows a comparison of the root mean square error of the prediction performance of various different models provided in the embodiments of this disclosure;
[0024] Figure 6 This diagram shows a comparison of the coefficients of determination for the predictive performance of various different models provided in embodiments of this disclosure.
[0025] Figure 7 A comparison chart of inference speeds for predicting performance of various models provided in embodiments of this disclosure is shown;
[0026] Figure 8 The diagram shows a comparison between the prediction results of the hybrid deep learning model provided in the exemplary embodiments of this disclosure and the actual car pick-up orders on sunny and rainy days;
[0027] Figure 9 The diagram shows a comparison between the prediction results of the hybrid deep learning model provided in the exemplary embodiments of this disclosure and the actual car pick-up orders on sunny and rainy mornings.
[0028] Figure 10 The diagram shows a comparison between the prediction results of the hybrid deep learning model provided in the exemplary embodiments of this disclosure and the actual car pick-up orders at noon on sunny and rainy days;
[0029] Figure 11 A schematic diagram of the structure of a shared bicycle deployment device based on an exemplary embodiment of the present disclosure is shown.
[0030] Figure 12 A schematic diagram of the structure of an electronic device provided in an exemplary embodiment of this disclosure is shown;
[0031] Figure 13 A schematic diagram of the structure of a computer system provided in an exemplary embodiment of this disclosure is shown. Detailed Implementation
[0032] To make the objectives, technical solutions, and advantages of this disclosure more apparent, exemplary embodiments according to this disclosure will now be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of this disclosure, and not all embodiments of this disclosure. It should be understood that this disclosure is not limited to the exemplary embodiments described herein.
[0033] It should be understood that the steps described in the method embodiments of this disclosure may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this disclosure is not limited in this respect.
[0034] The term "comprising" and its variations as used herein are open-ended, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the description below. It should be noted that the concepts of "first", "second", etc., used in this disclosure are only used to distinguish different devices, modules, or units, and are not intended to limit the order of functions performed by these devices, modules, or units or their interdependencies.
[0035] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".
[0036] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
[0037] To address the technical problems existing in related technologies, this disclosure provides a method and apparatus for deploying shared bicycles based on electronic fences. This method significantly improves the accuracy, robustness, and practicality of dynamic demand prediction for shared bicycles by constructing a high-precision hybrid deep learning model that can take into account spatiotemporal dynamic characteristics and has adaptive response capabilities to external weather disturbances. This provides key technical support for promoting the development of dynamic capacity management of electronic fences and intelligent transportation systems.
[0038] The shared bicycle deployment method based on electronic fences provided in this disclosure can be executed by a terminal or by a chip applied to the terminal.
[0039] For example, the terminal may include one or more of the following: mobile phone, tablet computer, wearable device, in-vehicle device, laptop computer, ultra-mobile personal computer (UMPC), netbook, PDA, and wearable device based on augmented reality (AR) and / or virtual reality (VR) technology. The exemplary embodiments disclosed herein do not impose specific limitations on these.
[0040] Figure 1 A flowchart illustrating an exemplary embodiment of the present disclosure of a method for deploying shared bicycles based on electronic fences is shown. Figure 1As shown, the method for deploying shared bicycles based on electronic fences includes:
[0041] S101, acquire historical borrowing and returning time series data of shared bicycles in the target area during historical time periods and corresponding historical meteorological time series data, as well as a pre-constructed spatial map and a hybrid deep learning model; wherein, the spatial map has multiple nodes and edges located between adjacent nodes, the multiple nodes represent multiple electronic fences used for parking shared bicycles in the target area, and the edges represent the spatial correlation weights of adjacent electronic fences.
[0042] S102, using a hybrid deep learning model based on spatial graphs, historical borrowing and returning time series data and historical meteorological time series data, to obtain the predicted borrowing and returning volume of shared bicycles within each electronic fence at future times;
[0043] S103, based on the predicted borrowing and returning volume, determines the number of shared bicycles to be deployed within each electronic fence at future times.
[0044] Specifically, the target area mentioned above can be divided according to administrative regions, or it can be a research area selected by researchers, technology developers, or operation and management personnel, depending on actual needs. This embodiment of the disclosure does not impose specific limitations in this regard. Here, this embodiment of the disclosure selects to divide the target area at the city level to study the borrowing and returning demand of shared bicycles in a certain city.
[0045] The aforementioned historical time period can be selected according to actual needs, such as the past week, the past month, or the past year. This disclosure does not specifically limit this.
[0046] This disclosure embodiment can determine the locations of multiple electronic fences within a target area, and set up electronic fences at these locations for parking shared bicycles for user use. The user's borrowing and returning needs within a certain electronic fence are related to multi-source data, which may include spatial maps related to spatial characteristics, historical borrowing and returning time series data related to time characteristics, and historical meteorological time series data related to meteorological characteristics.
[0047] The aforementioned spatial graph can be a pre-constructed city-level weighted undirected graph used to describe the topological relationships between all electronic fences within the target area. Each electronic fence is abstracted as a node, resulting in multiple nodes in the spatial graph and edges between adjacent nodes. Here, edges do not represent physical roads, but rather reflect the spatial correlation (also known as spatial dependency) of adjacent electronic fences due to proximity. The spatial correlation weights can be calculated using a Gaussian kernel function based on the Euclidean distance between the centroids of the electronic fences.
[0048] The aforementioned historical borrowing and returning time series data can be the historical borrowing and returning order data of shared bicycles. It can be time series data represented by "electronic fence identifier (ID) or geographic coordinates (latitude and longitude coordinates) - time - number of borrowed bicycles - number of returned bicycles", which can be used for subsequent analysis of the borrowing and returning demand of shared bicycles at different times within electronic fences located in different spatial locations.
[0049] The aforementioned historical meteorological time series data can be the meteorological data corresponding to each "time" in the aforementioned historical borrowing and returning time series data. It can be time series data represented as "electronic fence ID or geographic coordinates (latitude and longitude coordinates) - time - weather conditions", which can be used for subsequent analysis of the impact of meteorological data on the demand for borrowing and returning shared bicycles within the electronic fence.
[0050] The aforementioned hybrid deep learning model (also known as a Spatio-Temporal Graph Attention Network, STGATN) can be a pre-built shared bicycle borrowing and returning volume prediction model in this embodiment of the disclosure. During the inference phase of the hybrid deep learning model, based on the spatial graph, historical borrowing and returning time series data, and historical meteorological time series data, the predicted borrowing and returning volume of shared bicycles within each electronic fence at future times can be obtained. Here, the predicted borrowing and returning volume can include the predicted number of borrowed bicycles and the predicted number of returned bicycles. Based on this, this embodiment of the disclosure can also determine the deployment volume of shared bicycles within each electronic fence at future times based on the predicted borrowing and returning volume.
[0051] For example, deploying a sufficient number of vehicles in advance in geofences where high car rental volume is predicted (such as subway stations during the morning rush hour and commercial areas during the evening rush hour) ensures that users have available cars, reduces the situation of "not being able to find a car", and improves user experience and order completion rate.
[0052] For example, in electronic fences where the number of vehicles to be returned is predicted to be high and prone to overflow (such as office areas during working hours), by controlling the number of vehicles deployed or moving vehicles in advance to reserve parking spaces, the situation of "vehicles not being returned" can be reduced, thus avoiding fees incurred by users due to their inability to return vehicles.
[0053] For example, by predicting the differences in borrowing and returning volumes across different electronic fences, it is possible to identify which areas are "net borrowing" (where fewer and fewer bikes will be borrowed) and which areas are "net returning" (where more and more bikes will be returned). This allows for proactive and forward-looking deployment and scheduling of shared bikes in the future, rather than reactive scheduling after an imbalance has already occurred.
[0054] As can be seen, the embodiments of this disclosure can use a hybrid deep learning model to predict the borrowing and returning volume of each electronic fence at future times based on multi-source data, and thereby accurately deploy and schedule shared bicycles. This can improve the operational efficiency of shared bicycles, effectively reduce operating costs, and enhance user experience.
[0055] According to the technical solution of the exemplary embodiments of this disclosure, historical borrowing and returning time series data of shared bicycles in a target area over a historical period and corresponding historical meteorological time series data are obtained, along with a pre-constructed spatial map and a hybrid deep learning model. The spatial map has multiple nodes and edges between adjacent nodes. The multiple nodes represent multiple electronic fences used for parking shared bicycles within the target area, and the edges represent the spatial correlation weights of adjacent electronic fences. Based on the spatial map, historical borrowing and returning time series data, and historical meteorological time series data, the hybrid deep learning model obtains the predicted borrowing and returning volume of shared bicycles within each electronic fence at future times. Based on the predicted borrowing and returning volume, the deployment volume of shared bicycles within each electronic fence at future times is determined. This allows the hybrid deep learning model to predict the borrowing and returning volume of each electronic fence at future times based on multi-source data, and thereby enables precise deployment and scheduling of shared bicycles. This improves the operational efficiency of shared bicycles while effectively reducing operating costs and enhancing user experience.
[0056] In some embodiments, the method further includes:
[0057] Obtain multiple points of interest within the target area;
[0058] Density clustering is performed on multiple points of interest to obtain multiple cluster centers;
[0059] Based on multiple cluster centers, the locations of multiple electronic fences in the target area are determined.
[0060] Specifically, spatial correlation (also known as spatial dependence) plays a central role in urban traffic flow prediction. The demand for each geofence is not only influenced by its own attributes (spatial characteristics of its location, historical borrowing and returning time series data, etc.), but also closely related to the functional layout and traffic conditions of its surrounding area. This spatial interaction propagates and interacts within the urban network through various means such as traffic flow, pedestrian travel, and information transmission. To make the layout of geofences more consistent with residents' actual travel patterns, this disclosure breaks through the limitations of traditional administrative zoning methods and adopts a data-driven approach to generate virtual geofences.
[0061] This disclosure embodiment can obtain Point of Interest (POI) data of all categories categorized by function type within a target area through open platforms such as map application programming interfaces (APIs). Multiple POIs within the target area can be stored in the form of a list of POIs, each with corresponding geographic coordinates (latitude and longitude coordinates) and function type.
[0062] Given the inherent spatial clustering characteristics of shared bicycle parking behavior, a density-based clustering algorithm is employed to aggregate and analyze these points of interest. In the method of this embodiment, the density-based clustering algorithm can be Density-Based Spatial Clustering of Applications with Noise (DBSCAN), abbreviated as DBSCAN clustering algorithm. Compared to methods such as K-Means, the advantage of DBSCAN is that it does not require a pre-defined number of clusters and can identify density clusters of arbitrary shapes, making it highly suitable for accurately capturing naturally formed parking hotspots in cities. Through algorithmic processing, dense points of interest are aggregated into multiple clusters, and the centroid of each cluster, i.e., the cluster center, is positioned as a virtual electronic fence.
[0063] Based on this, the embodiments of this disclosure can determine the location of multiple electronic fences in a target area based on multiple cluster centers. Since there may be dynamic changes in the city, such as the emergence of new business districts and the renovation of old areas, these dynamic changes will lead to new points of interest. Once new points of interest are obtained, the density clustering algorithm can be re-run to automatically generate an updated and more reasonable electronic fence layout, thereby simultaneously optimizing the spatial map.
[0064] As can be seen, compared with the traditional methods of delineating electronic fences based on administrative grids, uniform distribution, or human experience, the adaptive dynamic generation method of electronic fences provided in this disclosure realizes a paradigm shift from "subjective delineation and static distribution" to "data-driven and dynamic optimization," making the layout of electronic fences more scientific and more in line with actual needs.
[0065] In some embodiments, multiple points of interest are classified into various types according to their functional types, and the functional diversity of each electronic fence is characterized by functional mixture entropy; wherein, the formula for calculating the functional mixture entropy of each electronic fence is:
[0066] (1)
[0067] in, Indicates the first The functional hybrid entropy of an electronic fence; Indicates the first Within the first electronic fence The proportion of similar interest points Indicates the first The total number of interest points within each electronic fence, greater than or equal to 1 and less than or equal to 1 Integers.
[0068] Here, the embodiments of this disclosure can be divided into five categories according to functional type: transportation facility points of interest, residential area points of interest, public service points of interest, commercial service points of interest, and education and park points of interest. Therefore, in the above formula (1), It equals 5; and the higher the functional hybrid entropy value of the electronic fence, the richer and more diverse the functional composition of the electronic fence.
[0069] Based on this, in order to better describe the node characteristics, each node defines an initial feature vector. The initial node characteristics may include static attributes (such as functional hybrid entropy), geographic coordinates, and time-series aggregation statistics (counts of historical borrowing and returning time series data in each time window) that will be added later.
[0070] In some embodiments, for the connection relationships between nodes in the spatial graph, based on the fundamental principle of the "first law of geography," it is assumed that spatially adjacent regions have stronger correlations. Therefore, the edges between nodes are determined by the geographical proximity between electronic fences. The spatial correlation weight of the edges is calculated using a Gaussian kernel function, which converts Euclidean distance into a similarity measure that decays exponentially with increasing distance. The formula for calculating the spatial correlation weight of adjacent electronic fences is:
[0071] (2)
[0072] in, Indicates adjacent electronic fences and electronic fence Spatial correlation weight, Indicates adjacent electronic fences and electronic fence The Euclidean distance between the centroids, This represents the Gaussian kernel bandwidth hyperparameter that controls the decay rate.
[0073] Under this formula (2), the spatial correlation weight of edges between nodes that are closer together is greater, which represents the stronger spatial interaction between them.
[0074] In some embodiments, Figure 2 A schematic diagram of the network architecture of the hybrid deep learning model provided in this disclosure embodiment is shown, such as... Figure 2As shown, the network architecture of the hybrid deep learning model 200 includes a multimodal feature extraction network 210, a multimodal feature fusion module 220, an encoding module 230, and a nonlinear module 240;
[0075] Using a hybrid deep learning model based on spatial graphs, historical borrowing and returning time series data, and historical meteorological time series data, the predicted borrowing and returning volume of shared bicycles within each electronic fence at future times is obtained, including:
[0076] Multimodal feature extraction network 210 was used to extract features from spatial map, historical borrowing and returning time series data and historical meteorological time series data to obtain the spatial features of each electronic fence, the borrowing and returning time features of shared bicycles and meteorological impact features;
[0077] The multimodal feature fusion module 220 is used to fuse spatial features, borrowing and returning time features and meteorological impact features to obtain the deep fusion features of each electronic fence;
[0078] Using the encoding module 230, long-range dependencies and global context information are obtained from the deep fusion features to obtain the encoded features;
[0079] The nonlinear module 240 is used to perform a nonlinear transformation on the encoded features to obtain the predicted borrowing and returning volume of shared bicycles at future times.
[0080] Specifically, the borrowing and returning demand patterns of shared bicycle systems not only exhibit significant spatial correlation, but also show complex dynamic characteristics in the time dimension, and are easily affected by external factors such as weather. Based on this, this embodiment of the disclosure designs a composite module, namely a multimodal feature extraction network 210, to accurately capture these key temporal and external meteorological features, and process spatial maps, historical borrowing and returning time series data and historical meteorological time series data in parallel.
[0081] Meanwhile, this embodiment also includes a multimodal feature fusion module 220, which is used to dynamically fuse spatial features, borrowing and returning time features, and meteorological influence features to obtain the deep fusion features of each electronic fence.
[0082] For example, the multimodal feature fusion module 220 may include a stitching module and a multi-layer perceptron (MLP).
[0083] In the feature fusion stage, the concatenation module can integrate features from different modalities using a concatenation method. Specifically, it integrates the topological features extracted by the multi-layer graph convolutional network 211. (i.e., spatial features), the final hidden state output by the temporal long short-term memory network 212. (i.e., borrowing and returning time characteristics) and the meteorological context vector generated by the meteorological attention module 213. (i.e., meteorological impact characteristics) are pieced together to form preliminary integrated characteristics, represented as follows: This initial fusion of features comprehensively carries three key types of information: spatial topology, temporal dynamic patterns, and meteorological environmental factors, laying the foundation for subsequent deep feature interaction.
[0084] Considering the complex nonlinear interactions between different modal features, embodiments of this disclosure further employ a multilayer perceptron to perform in-depth processing on the initially fused features. This processing can be formally represented as follows:
[0085] (3)
[0086] in, This represents the deep fusion characteristics of the electronic fence, namely the fused interactive representation; Represents a multilayer perceptron; and Represents the learnable parameter matrix; and Represents a learnable bias vector; This represents the ReLU activation function. Through this nonlinear transformation process, the model can effectively learn the complex interactions between different feature modes, producing more discriminative feature representations.
[0087] Based on this, the embodiments of this disclosure can utilize the multimodal feature fusion module 220 to perform two-layer fusion of spatial features, borrowing and returning time features and meteorological impact features to obtain the deep fusion features of each electronic fence, project and mix the heterogeneous features into the same semantic space for use by the encoding module 230.
[0088] To capture long-range dependencies and global contextual information in deeply fused features, the interactive feature representation is fed into encoding module 230. This encoding module 230 can be an encoder module based on the Transformer architecture. Before encoding, sinusoidal positional encoding is first applied to the input sequence to compensate for the Transformer architecture's inherent insensitivity to sequence order, ensuring the preservation of temporal information.
[0089] The Transformer encoder consists of multiple identical coding layers stacked together. Each coding layer contains two core sub-layers: a multi-head self-attention mechanism and a feed-forward network. The multi-head self-attention mechanism enables the model to simultaneously pay attention to information from all positions in the sequence and captures global dependencies between features by computing attention weights. Each sub-layer employs residual connections and layer normalization to promote the stability of the training process.
[0090] Here, residual connections alleviate problems such as gradient vanishing during deep network training, allowing information to be transferred more smoothly; layer normalization normalizes the results of residual connections, stabilizing the training process, accelerating convergence, and making the model's performance more stable across different samples. Its calculation process can be expressed as:
[0091] (4)
[0092] in, The intermediate variable symbol is introduced to clearly represent the data transfer state within a layer when describing the Transformer computation process; This represents the input to the coding layer; This indicates that multi-head attention is being performed on the input of the coding layer; Indicates to and Perform residual connection, Presentation layer normalization processing.
[0093] Finally, the coding features refined by coding module 230 The predicted result is transformed through a nonlinear module 240. To ensure that the predicted borrowing and repayment amounts meet the positive constraint of actual needs, a ReLU activation function is applied to the output layer for nonlinear transformation.
[0094] (5)
[0095] in, This represents the final prediction tensor, which is the predicted number of shared bicycles borrowed and returned within each electronic fence at future times. Represents encoded features; and This represents the linear projection parameter, which maps the encoded features to the prediction dimension, such as the number of prediction steps × the number of target variables; This indicates that the prediction is guaranteed to be non-negative; This means adjusting the vector after linear transformation into the target tensor structure (nodes × prediction steps × number of variables).
[0096] In the method of this embodiment, the Transformer encoder employs a configuration of two stacked encoding layers, with four attention heads per layer. The dimension of the fused input features is set to 128, and each feedforward sublayer uses 256 hidden units. A dropout rate of 0.1 is applied after both the multi-head attention sublayer and the feedforward sublayer to prevent overfitting. All these hyperparameter settings are determined based on a comprehensive consideration of performance on the validation set and computational efficiency.
[0097] Through this hierarchical feature processing architecture, the embodiments of this disclosure construct a structurally complete and logically rigorous hybrid deep learning framework, which can effectively integrate spatial, temporal, and environmental context information, providing a reliable technical solution for refined demand prediction of shared bicycle systems.
[0098] In some embodiments, such as Figure 2 As shown, the multimodal feature extraction network 210 includes a multi-layer graph convolutional network 211, a temporal long short-term memory network 212, and a meteorological attention module 213;
[0099] A multimodal feature extraction network 210 was used to extract features from the spatial map, historical borrowing and returning time series data, and historical meteorological time series data, respectively, to obtain the spatial features of each electronic fence, the borrowing and returning time features of shared bicycles, and meteorological impact features, including:
[0100] Using a multi-layer graph convolutional network 211, spatial features of each electronic fence are obtained from the spatial graph;
[0101] Using a temporal long short-term memory network 212, the borrowing and returning time characteristics of shared bicycles within each electronic fence are obtained from historical borrowing and returning time series data;
[0102] The meteorological attention module 213 is used to obtain the meteorological impact characteristics of each electronic fence from historical meteorological time series data.
[0103] Specifically, a multi-layer Spatial Graph Convolutional Network (Spatial GCN) is employed to aggregate neighborhood information and learn the high-dimensional spatial features of the electronic fence under the urban topology. The inter-layer propagation of the multi-layer Graph Convolutional Network follows these rules:
[0104] (6)
[0105] in, Indicates the first l +1 layer node feature matrix Indicates the first lThe node feature matrix of the layer Indicates the first l The weight matrix of the layer, This represents the adjacency matrix with added self-loops. express The degree matrix.
[0106] After multi-layer graph convolution propagation, a high-dimensional spatial feature is output for each node in the spatial graph representing the electronic fence. This high-dimensional spatial feature contains rich spatial context information. In the subsequent forward propagation, the multi-layer graph convolutional network 211 retrieves the corresponding spatial features from this global tensor based on the electronic fence identifier ID of each sample in the batch.
[0107] The temporal long short-term memory network 212 can use a bidirectional long short-term memory network (Bi-LSTM) as the core architecture to form a temporal LSTM module, which models the historical borrowing and returning time series data and time variables (such as the number of hours in a day, the day of the week, etc.) of each electronic fence to capture the periodicity, trend and nonlinear fluctuations of borrowing and returning demand, and obtain the borrowing and returning time characteristics of shared bicycles in each electronic fence.
[0108] Bi-LSTM networks utilize their unique gating mechanisms (including forget gates) Input gate and output gate ) Cyclicly update cell state and hidden state This allows for the effective learning of long-term dependencies in time series. Unlike standard Long Short-Term Memory Networks (LSTMs), which can only capture unidirectional contextual information, Bi-LSTMs consist of two parallel LSTM layers: one layer sequentially... The input is processed in reverse order in another layer. Processing. Finally, the outputs from both directions are concatenated to form a comprehensive temporal representation capable of simultaneously perceiving past and future contextual information, mathematically expressed as:
[0109] (7)
[0110] in, Indicates time step t The hidden state, Indicates time step t The orthogonal hidden state, Indicates time step tThe reverse hidden state.
[0111] The purpose of this formula is to encode a series of historical borrowing and returning time series data and time features of each electronic fence over a certain number of time steps (10 minutes per step, input length of 6) into a vector that can represent the "momentary dynamics". And will obtain the final moment This design serves as a time-based feature for shared bicycle rentals. It significantly enhances the model's ability to capture complex temporal dynamics in shared bicycle rental demand, such as periodic commuting tides, long-term trends, and non-linear fluctuation patterns.
[0112] In terms of external factor modeling, weather is widely recognized as one of the most critical external factors influencing users' willingness to cycle, but its influence mechanism is inherently dynamic and non-linear. Traditional methods simply concatenate weather variables as static features into the model input, failing to allow the model to flexibly determine the degree of weather influence based on the current context. To overcome this limitation, this disclosure innovatively introduces a dedicated Weather-Attention module 213 to extract the meteorological influence features of each electronic fence from historical meteorological time-series data. The module's design is inspired by the attention mechanism in natural language processing, and its core employs the standard Query-Key-Value computation framework. Specifically:
[0113] The query vector (Query, Q) originates from the output of the Temporal LSTM module and represents a question raised by the model regarding the current demand fluctuation pattern: "Given the current demand context, how much attention should we pay to weather conditions?"
[0114] Key vector (K) and value vector (V): Both are mapped from the input meteorological features (such as wind speed, precipitation, temperature, etc.). The key vector is used for similarity comparison with the query vector, while the value vector carries the actual meteorological information that needs to be incorporated into the prediction.
[0115] The attention weight matrix is calculated using a scaled dot product attention mechanism:
[0116] (8)
[0117] in, Represents the attention weight matrix. The weight matrix represents the query vector. The weight matrix represents the key vector. This represents the scaling factor used to stabilize the training process.
[0118] The attention weight matrix is then used to perform a weighted summation of the value vectors, thereby generating a context-aware meteorological impact vector (i.e., meteorological impact features): , Represents the meteorological influence vector. The parameter matrix representing the value vector.
[0119] This weather impact vector is not static, but dynamically generated based on the current borrowing and repayment demand pattern, accurately quantifying the immediate impact of weather factors on the forecast results.
[0120] Through this design with clear division of labor and collaborative work, the Temporal LSTM module and the Weather-Attention module together ensure that the model can comprehensively and meticulously depict the complex evolutionary behavior of shared bicycle demand under the combined influence of time and external environment.
[0121] Based on this, a novel hybrid deep learning model is proposed. By cleverly combining multi-layer graph convolutional networks, temporal long short-term memory networks, and meteorological attention modules, an end-to-end prediction framework is constructed, which can effectively capture the complex spatiotemporal dynamic features of shared bicycle demand.
[0122] In response to the influence of external factors such as weather, this disclosure innovatively designs a dynamic meteorological attention mechanism. This mechanism can adaptively assess the degree of influence of meteorological conditions based on real-time demand patterns, thereby enabling the model to intelligently respond to sudden weather changes and significantly improving the adaptability of predictions.
[0123] Based on urban point-of-interest (POI) data, the DBSCAN density clustering method was used to automatically generate electronic fences and construct a virtual network reflecting the functional relationships within the city. This method surpasses traditional spatial modeling based on geographical distance, and is better able to capture the semantic relationships between different functional areas such as commercial areas and residential areas.
[0124] This disclosure provides a practical solution for dynamic capacity management of electronic fences. By significantly improving prediction accuracy, the model can support refined and dynamic allocation of electronic fence capacity, providing a scientific basis for the sustainable operation of shared bicycle systems.
[0125] The technical solutions provided in the embodiments of this disclosure are further illustrated below with specific examples.
[0126] This embodiment of the invention takes a street in a district of a city as an example. It uses the proposed hybrid deep learning model to predict the number of shared bicycles borrowed and returned within each electronic fence at future times. The model shows good performance in both the bicycle borrowing and returning prediction tasks. It is also compared with several classic baseline models and their own variants to verify the effectiveness of the model.
[0127] 1. Data preprocessing.
[0128] The area selected in this embodiment covers a total area of 185.22 square kilometers, a typical high-density urban built-up area and an important commercial, residential, and technological innovation center, characterized by high population density, well-developed transportation infrastructure, and a rich variety of Points of Interest (POIs). The frequent use and complex demand patterns of shared bicycles in this area provide a representative scenario for this embodiment. The research data required for this embodiment mainly includes shared bicycle order data (historical borrowing and returning time series data), POI data (used to construct spatial maps), and weather data (historical meteorological time series data), as shown in Table 1. Table 1 illustrates the research data provided in this embodiment.
[0129] Table 1 Research Data
[0130]
[0131] The original shared bicycle order data covers shared bicycle order information from January to August 2021, including fields such as user ID, start time, start longitude, start latitude, end time, end longitude, end latitude, and company ID. The data has been appropriately anonymized to ensure user privacy. To focus the research scope and manage computational resources, all shared bicycle order data for this region from 00:00:00 on July 1, 2021 to 12:59:59 on July 31, 2021 were extracted, including both pick-up and return orders. After spatial and temporal filtering, a total of 1,784,936 valid order records were obtained. Within this time period, 922,724 bike-hailing orders and 980,405 bike-returning orders were recorded (the difference stems from vehicle dispatching or cross-regional trips). This order data contains precise spatiotemporal information on shared bicycle usage, forming the basis for analyzing user travel patterns and predicting regional demand.
[0132] To capture the potential impact and spatial correlation of different functional areas on shared bicycle demand, POI data for the area was collected. POI data was categorized into five types based on function: transportation facilities, residential areas, public services, commercial services, and education and parks. There are a total of 11,176 POIs within this area. A significant concentration of commercial and residential POIs in a particular area highlights its role as a hub for economic and daily activities. These areas are interconnected through a network of transportation facilities distributed along major transportation corridors, facilitating "last-mile" travel. Public services and education and parks are more dispersed but constitute a mixed urban functionality driving diverse demand patterns. In this embodiment, the location of the virtual electronic fences is not arbitrarily specified but rather generated from the centroids of high-density POI clusters identified by the DBSCAN algorithm, resulting in 1013 virtual electronic fences. This data-driven approach ensures that the electronic fences, as fundamental nodes in the spatial graph network, are located in natural hotspots of urban activity, thus providing a solid foundation for shared bicycle demand modeling.
[0133] Weather conditions are a key external factor influencing users' decisions to use shared bicycles. This disclosure collects weather data for the study area during the study period (July 2021). The weather data is updated every 60 minutes, generating 744 time intervals with meteorological records. To analyze the impact of precipitation and wind speed on shared bicycle demand, features are extracted from the weather data and classified. Precipitation is one of the most direct negative factors affecting riding comfort and willingness. According to meteorological data, precipitation occurred in approximately 11.5% of the time intervals during the selected study period. This provides representative negative samples for the model to learn the inhibitory effect of rainfall on riding demand. Furthermore, wind speed is another important factor affecting the riding experience. As wind speed increases, a downward trend in shared bicycle demand is observed; the inhibitory effect becomes more pronounced when wind speed exceeds a certain threshold. Weather data will be input into the prediction model as external influence features to improve the model's adaptability to environmental changes and prediction accuracy.
[0134] To map discrete order data points to meaningful regional units, the DBSCAN algorithm is used to perform spatial analysis of POIs (Points of Interest) in the study area. Parameters can be set as follows: and The DBSCAN algorithm identifies high-density POI clusters and then uses them to generate a set of optimized electronic fences, serving as the basic spatial units in this embodiment. Ultimately, 1013 electronic fences were identified and generated from the original 11,176 POIs. These electronic fences represent areas with potentially high demand for shared bicycle rentals / returns.
[0135] To construct historical bike-sharing time-series data, bike-sharing order data and bike-returning order data were aggregated using fixed 10-minute time intervals. For each geofence (spatial unit) and each 10-minute time interval, the number of shared bike-sharing order requests occurring at that time and location was counted. This aggregation process transformed the original discrete order events into continuous regional time-series data, forming a spatiotemporal tensor containing the characteristics of bike-sharing demand. The processed hourly weather data (historical meteorological time-series data) was then aligned with the 10-minute aggregated order data. Due to the coarse granularity of the weather data, the hourly weather data was replicated and applied to all six 10-minute intervals within that hour. These weather features were treated as exogenous variables affecting regional demand and were input into the model along with regional order demand.
[0136] Based on the requirements of time aggregation and external features, a spatiotemporal sequence dataset for model training was constructed using the sliding time window method. A large time series dataset containing 4,535,201 samples was ultimately built. To evaluate the generalization ability and predictive performance of the hybrid deep learning model, the dataset was strictly divided into training, validation, and test sets in chronological order, with proportions of 70%, 15%, and 15%, respectively.
[0137] The model training and inference of this disclosure embodiment were performed on a computing platform equipped with a 13th generation Intel® Core™ i7-13700K CPU and an NVIDIA GeForce RTX 4080 GPU. Key model parameters were set as follows: a time interval of 10 minutes, an input sequence length of 6 time steps, and a prediction sequence length of 2 time steps. To comprehensively measure the model's predictive performance, the following three widely accepted evaluation metrics were used:
[0138] Mean Absolute Error (MAE): Directly measures the average magnitude of the error between the predicted and actual values. Its formula is:
[0139] (9)
[0140] in, Indicates the mean absolute error. Indicates the first i The predicted borrowing and repayment amount for a sample at a certain moment. Indicates the first i The actual borrowing and repayment amount of a sample at a certain moment. n This represents the total number of samples. Here, one sample corresponds to one electronic fence.
[0141] Root Mean Square Error (RMSE): An error measure that assigns higher weight to larger errors. Its formula is:
[0142] (10)
[0143] in, This represents the root mean square error.
[0144] The coefficient of determination (R-squared, R²) measures the proportion of the variance of the dependent variable that can be predicted by the independent variables. It ranges from 0 to 1, with values closer to 1 indicating a better model fit. The formula is:
[0145] (11)
[0146] Where R² represents the coefficient of determination; Indicates the first i The average of the actual borrowing and repayment amounts of each sample.
[0147] 2. Model performance.
[0148] To optimize model performance, a grid search was performed on key hyperparameters using the validation set. The adjusted parameters included: learning rate ∈ [1×10⁻⁶]. -4 5×10 -4 1×10 -3 5×10 -4 Batch size ∈ [32, 64, 128]; GCN layer number ∈ [1, 2, 3]; Transformer The number of attention heads ∈ [2, 4, 8]; the dropout rate ∈ [0.1, 0.3, 0.5]; and the number of hidden units in the MLP layer ∈ [64, 128, 256]. The optimal configuration was determined based on the validation loss using an early stopping strategy. Figure 3 The diagram shows the curves of the training loss and validation loss of the hybrid deep learning model provided in the exemplary embodiments of this disclosure as a function of the training cycle.
[0149] like Figure 3 As shown, both training and validation losses exhibit a rapid decreasing trend in the initial training phase. This indicates that the model can effectively learn and capture the basic patterns of shared bicycle demand from the training data. As training progresses, the model performance continuously improves. Around the 46th epoch, the validation loss reaches its minimum (0.1244), while the training loss is 0.9293. According to the early stopping strategy, at this point, the model demonstrates the best generalization ability on the validation set, achieving a good balance between fitting ability and predictive ability on unseen data. Therefore, the model parameters for this epoch are saved and used for the final model evaluation.
[0150] After the 46th epoch, while the training loss continued to decrease slowly, the validation loss fluctuated and even rebounded slightly. This is usually a sign of overfitting, meaning the model starts learning noise and specific details in the training data that are not present in the unseen validation data, leading to a decrease in performance on the validation set. The application of the early stopping mechanism effectively prevents model overfitting and ensures its good generalization performance.
[0151] To comprehensively evaluate the final predictive performance of the hybrid deep learning model, the best model, preserved using an early stopping mechanism, was evaluated on an independent test set. Three common evaluation metrics used in prediction tasks were employed: MAE, RMSE, and R². MAE and RMSE measure the average deviation between predicted and true values; lower values indicate higher prediction accuracy. R² measures the model's ability to explain data variance; values closer to 1 (or 100%) indicate better goodness of fit. The evaluation results are summarized in Table 2. Table 2 shows the evaluation results of the predictive performance of the hybrid deep learning model provided by the exemplary embodiments of this disclosure.
[0152] Table 2 Evaluation results of the prediction performance of the hybrid deep learning model
[0153]
[0154] As shown in Table 2, the hybrid deep learning model performs exceptionally well in predicting shared bicycle demand via geofences. The model's R² reaches 0.8426, indicating that the proposed model can effectively explain over 84% of the variance in the test data. This high R² value strongly demonstrates that the model can effectively capture the complex dynamics of shared bicycle demand and has a high fitting ability. The model's MAE is only 0.0992. This means that on the test set, the average prediction error for each geofence at a future time step is less than 0.1 shared bicycles. Such a low MAE, especially in predicting the number of vehicles, demonstrates the model's extremely high prediction accuracy, which has significant practical value for guiding the dynamic adjustment of geofence capacity and refined vehicle scheduling.
[0155] It is noteworthy that the model's RMSE (1.1996) is significantly higher than its MAE (0.0992). RMSE is more sensitive to larger prediction errors and can increase significantly due to a few samples with large errors. This phenomenon indicates that while the model achieves high accuracy in the vast majority of prediction scenarios, it may produce relatively large prediction errors in a few specific situations. These situations may involve outliers or be strongly influenced by sudden factors (e.g., extreme weather events and large-scale unplanned events causing sharp fluctuations in demand). These large error points contribute far more to the RMSE than to the MAE, resulting in a much higher RMSE value. In-depth analysis of these large error samples can help further improve the model's robustness under extreme or anomalous conditions.
[0156] Analyzing the error distribution characteristics of the hybrid deep learning model in predicting car rental and return, the results show a strong positive correlation between the predicted and actual values, indicating that the model has good predictive ability for both car rental and return demand. Specifically, the overall pattern of car rental demand is more stable than that of car return demand, but its quantity is also susceptible to large, instantaneous "pulse-like" peaks caused by sudden events or specific starting point attributes (e.g., demand at subway exits during morning rush hour may far exceed normal levels). These sudden peaks may cause the model to produce significant biases at these times. Car return behavior may be relatively more dispersed and influenced by destination attractiveness, resulting in smoother demand fluctuations and a lower frequency or magnitude of large errors compared to car rental behavior.
[0157] The hybrid deep learning model demonstrated good performance in both car rental and return prediction tasks, proving that it can simultaneously model complex spatiotemporal dependencies and external factors.
[0158] 3. Comparative experiments and ablation analysis.
[0159] To further verify the performance advantages of the hybrid deep learning model and the contribution of its core internal modules to prediction accuracy, a series of comparative experiments and ablation studies were conducted. The STGATN model was compared with several classic baseline models and their variants on independent test sets. The evaluation metrics used were MAE, RMSE, and R². The experimental results are summarized in Table 3, which shows the experimental comparison results between the hybrid deep learning model provided in this disclosure and the classic baseline model.
[0160] Table 3. Experimental comparison results between hybrid deep learning models and classical baseline models.
[0161]
[0162] Here, ARIMA stands for AutoRegressive Integrated Moving Average; Random Forest stands for Random Forest; XGBoost stands for eXtreme Gradient Boosting; GCN stands for Graph Convolutional Network; Spatio-Temporal Transformer stands for Spatio-Temporal Transformer; STGATN without GCN stands for Hybrid Deep Learning Model without Graph Convolutional Network; and STGATN without Attention stands for Hybrid Deep Learning Model without Attention Module.
[0163] From the overall performance comparison results shown in Table 3, the following key conclusions can be drawn: Compared with the traditional statistical time series model ARIMA, it performs poorly in the task of predicting shared bicycle demand (R² is only 0.3542). In contrast, deep learning-based models such as LSTM and GCN show higher prediction accuracy and fitting ability. This fully demonstrates the advantages of deep learning models in capturing complex nonlinear spatiotemporal data such as shared bicycle demand.
[0164] When relying solely on time series models like LSTM (considering only the time dimension) or graph neural networks like GCN (considering only the spatial dimension), the performance of the model is limited. LSTM has an R² of 0.6215, and GCN has an R² of 0.5488. In stark contrast, the STGATN model proposed in this disclosure achieves an overall R² of 0.8426 by effectively fusing spatiotemporal features. Compared to the LSTM model that only considers time, STGATN's R² is improved by approximately 35.6%. Compared to the GCN model that only considers space, the R² is improved by approximately 53.5%. This result strongly demonstrates that simultaneously modeling the spatial and temporal interactions in shared bicycle demand is crucial for achieving high-accuracy predictions.
[0165] To quantify the contributions of the SpatialGCN and Weather Attention modules in the STGATN model, ablation variants with these modules removed were constructed for comparison. When the GCN module was removed, the model's R² significantly decreased from 0.8426 to 0.7411, MAE increased from 0.0992 to 0.2145, and RMSE increased from 1.1996 to 1.5881. This approximately 12% decrease in R² quantifies the significant contribution of the SpatialGCN module to the overall performance. This validates that effectively capturing the topological relationships and spatial interactions between electronic fences through GCN provides crucial spatial contextual information and is a key factor in improving prediction accuracy. When the Weather Attention module was removed, the model's R² decreased from 0.8426 to 0.8034, MAE increased from 0.0992 to 0.1583, and RMSE increased from 1.1996 to 1.3992. This approximately 5% decrease in R² demonstrates the model's predictive ability by dynamically incorporating external weather factors. This demonstrates that intelligently integrating weather information into the forecasting process through an attention mechanism enables the model to more accurately capture dynamic changes in demand affected by weather, thereby improving its robustness and forecasting accuracy.
[0166] This disclosure provides a more detailed analysis of the performance of each model on different prediction tasks (borrowing and returning a car). Figure 4 This paper presents a comparison chart of the mean absolute error of the prediction performance of various different models provided in embodiments of this disclosure. Figure 5 The diagram shows a comparison of the root mean square error of the prediction performance of various models provided in the embodiments of this disclosure. Figure 6 This diagram shows a comparison of the coefficients of determination for the predictive performance of various models provided in embodiments of this disclosure. Figure 7 A comparison chart of inference speeds for predicting the performance of various models provided in embodiments of this disclosure is shown. For example... Figure 4 As shown, the hybrid deep learning model achieves the lowest MAE. Figure 5 The comparison of RMSE is shown, while Figure 6 The R² value is explained. The LSTM time series model slightly outperforms the GCN model on the car rental task. This is likely because car rental behavior typically exhibits stronger periodic commuting patterns, which LSTM excels at capturing. Conversely, the GCN model has a slight advantage in predicting car returns. This confirms the previous hypothesis that car return behavior may be more spatially concentrated due to destination attractiveness, making spatial dependence play a more critical role in car return prediction. However, the performance of both base models is far inferior to STGATN, further highlighting the limitations of relying on single-dimensional modeling.
[0167] Figure 7The inference time efficiency of each model is shown, represented by average inference speed. Inference efficiency is also crucial for the practical deployment of models, as it directly affects whether the system can perform near real-time dynamic scheduling. It can be seen that there is a clear negative correlation between the computational efficiency of a model and its structural complexity. ARIMA, as the simplest model, has the fastest inference speed. As model complexity increases, such as with the introduction of LSTM, GCN, and the full Transformer framework, the inference time also increases accordingly. STGATN, as the most structurally complex model, has the highest computational cost. Despite STGATN's highest computational cost, the resulting accuracy improvement is significant. Compared to the second-best performing model (STGATN without attention), STGATN requires approximately 17% more computation time but delivers approximately 5% improvement in R² performance, while also exhibiting lower MAE and RMSE.
[0168] Overall, in the tasks of borrowing and returning bicycles, the STGATN model proposed in this disclosure achieved the best predictive performance metrics (lowest MAE and RMSE, highest R²) among all comparative models and their variants. This fully demonstrates that STGATN, through its complete and collaborative architectural design, effectively integrates spatial correlation, temporal heterogeneity, and external weather factors, achieving accurate dynamic demand prediction for shared bicycle electronic fences.
[0169] 4. Further analysis of influencing factors.
[0170] In addition to the overall performance of the model architecture, in-depth analysis of the impact of specific external factors (such as weather) and internal urban structures (such as POI distribution) on the forecasting of shared bicycle demand helps to understand the working mechanism of the model and the sources of forecasting errors.
[0171] In the ablation study, removing the weather attention module (STGATN without attention) led to a comprehensive decline in the overall model performance. The overall R² decreased from 0.8426 to 0.8034, quantifying the significant contribution of weather information to improving prediction accuracy. Figure 6 As shown, after removing weather-related concerns, the R² for bike-sharing decreased by approximately 6.2% (from 0.8479 to 0.7951), while the R² for bike-returning decreased by only approximately 2.1% (from 0.8296 to 0.8117). This difference indicates that rainy weather primarily affects users' decisions to "start a trip." Faced with rain, many potential users abandon bike-sharing and choose other modes of transportation, leading to a sharp drop in bike-sharing orders. However, for users already on their way, even if it starts raining, most will still complete their trip and find the nearest location to return the bike.
[0172] The Weather-Attention module learned that wind speed contributes a moderate amount of attention weight, with a larger weight when the wind speed exceeds 6 m / s. This is consistent with behavioral studies showing that cycling activity decreases under unfavorable wind conditions.
[0173] Different types of Points of Interest (POIs) in a city attract different population activities, resulting in different demand patterns for shared bicycles. For example, transportation facilities such as subway stations and bus stops are important transfer points, and the geofences around them typically experience high demand for bike rentals and returns during peak commuting hours. Residential areas mainly experience bike rental demand during the morning rush hour and bike return demand during the evening rush hour. Public service areas show strong demand on weekdays, while commercial service areas have prominent demand on weekends or other specific times. The model in this disclosure, by constructing a spatial graph network based on POI data and using a Geometric Graph Network (GCN) to learn the representations of nodes (geofences) in the graph, can implicitly capture the functional attributes of different POI types and their impact on demand in surrounding areas. For example, the spatial characteristics learned by geofence nodes closely connected to subway stations will reflect commuting-related demand patterns.
[0174] Bike-sharing trips are a crucial way to connect different Points of Interest (POIs). For example, a user might ride from a residential area to a subway station (residential POI to transportation hub POI), and then from another subway station to an office area (transportation hub POI to office area POI). The distance, accessibility, and functional complementarity between POIs collectively determine the origin-destination (OD) flow between areas. The GCN module, by propagating information in a graph network, can capture this cross-regional demand propagation effect. For instance, the model can learn that when an office area shows high bike-sharing demand on a weekday, a functionally related residential area or transportation hub may have already generated corresponding bike-returning demand shortly beforehand. This modeling of spatial correlations allows the model to more accurately predict demand linkages between areas.
[0175] The embodiments disclosed herein also provide a fine-grained perspective on the prediction dynamics of hybrid deep learning models through detailed time series analysis, and highlight the synergistic contributions of their core modules under different real-world environmental conditions. Figure 8 The diagram illustrates a comparison between the prediction results of the hybrid deep learning model provided in the exemplary embodiments of this disclosure and the actual car pickup orders on sunny and rainy days. Figure 9 The diagram illustrates a comparison between the prediction results of the hybrid deep learning model provided in the exemplary embodiments of this disclosure and the actual car pick-up orders on sunny and rainy mornings. Figure 10The diagram illustrates a comparison between the prediction results of the hybrid deep learning model provided in the exemplary embodiments of this disclosure and the actual car pick-up orders at midday on sunny and rainy days. Specifically, STGATN w / o Attention stands for STGATN without Attention, and its corresponding lines represent the prediction results of the hybrid deep learning model without a weather attention module; STGATN w / o GCN stands for STGATN without GCN, and its corresponding lines represent the prediction results of the hybrid deep learning model without a graph convolutional network; the corresponding lines of STGATN represent the prediction results of the hybrid deep learning model.
[0176] like Figure 8 As shown, the STGATN model's predictive performance over 16 hours is compared with actual car pickup orders on sunny and rainy days. On rainy days, when actual demand drops significantly, the full STGATN model accurately tracks this downward trend, demonstrating the model's robustness to external disturbances. This adaptability... Figure 9 and Figure 10 The importance of the Weather-Attention module is further emphasized in the magnified view; when this module is removed (STGATN without the attention mechanism), the model significantly overestimates demand during rainy weather because it fails to capture the inhibitory effect of weather on cycling demand. This validates the role of the attention mechanism in dynamically weighing the influence of external factors, which is mainly reflected in the initial stage of users' travel decisions.
[0177] Conversely, under clear weather conditions, the performance of the STGATN without the GCN module highlights the importance of the space module. This variant struggles to capture the peak characteristics of morning rush hour vehicle retrieval demand, indicating that the GCN module is essential for simulating the complex demand propagation effects arising from the interactions between different urban functional areas, such as residential areas and transportation hubs. Overall, Figure 8 The visualization results clearly demonstrate the advantages of integrating the STGATN framework: by fusing the spatial context extracted by GCN, temporal patterns, and dynamic external factors introduced through the attention mechanism, the model can achieve higher prediction accuracy and robustness in different time periods and diverse weather scenarios, accurately predicting the fluctuations in shared bicycle demand.
[0178] The foregoing mainly describes the solutions provided by the embodiments of this disclosure. It is understood that, in order to achieve the above functions, the electronic device includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should readily recognize that, based on the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein, this disclosure can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this disclosure.
[0179] This disclosure embodiment can divide the electronic device into functional units according to the above method example. For example, each function can be divided into a separate functional module, or two or more functions can be integrated into one processing module. The integrated module can be implemented in hardware or as a software functional module. It should be noted that the module division in this disclosure embodiment is illustrative and only represents one logical functional division; other division methods may be used in actual implementation.
[0180] By dividing each function into corresponding functional modules, an exemplary embodiment of this disclosure provides a shared bicycle deployment device based on an electronic fence. This shared bicycle deployment device based on an electronic fence can be a terminal or a chip applied to the terminal. Figure 11 A schematic diagram of the structure of a shared bicycle deployment device based on an electronic fence, provided in an exemplary embodiment of this disclosure, is shown. Figure 11 As shown, the device 1100 includes:
[0181] The acquisition module 1101 is used to acquire historical borrowing and returning time series data of shared bicycles in the target area during historical time periods and corresponding historical meteorological time series data, as well as a pre-constructed spatial map and a hybrid deep learning model; wherein, the spatial map has multiple nodes and edges located between adjacent nodes, the multiple nodes represent multiple electronic fences in the target area for parking the shared bicycles, and the edges represent the spatial correlation weights of adjacent electronic fences;
[0182] Processing module 1102 is used to obtain the predicted borrowing and returning volume of the shared bicycles within each of the electronic fences at future times by using the hybrid deep learning model based on the spatial map, the historical borrowing and returning time series data and the historical meteorological time series data.
[0183] The processing module 1102 is also used to determine the number of shared bicycles to be deployed within each of the electronic fences at the future time based on the predicted borrowing and returning volume.
[0184] In some embodiments, the acquisition module 1101 is further configured to acquire a plurality of points of interest included in the target area;
[0185] The processing module 1102 is further configured to perform density clustering on the plurality of points of interest to obtain a plurality of cluster centers; and based on the plurality of cluster centers, determine the setting positions of the plurality of electronic fences in the target area.
[0186] In some embodiments, the plurality of points of interest are divided into multiple types according to their functional types, and the functional diversity of each electronic fence is characterized by functional mixture entropy; wherein, the formula for calculating the functional mixture entropy of each electronic fence is:
[0187] (1)
[0188] in, Indicates the first The functional hybrid entropy of the aforementioned electronic fence; Indicates the first Within the electronic fence mentioned above, the first The proportion of similar interest points Indicates the first The total number of categories of points of interest within the aforementioned electronic fence, greater than or equal to 1 and less than or equal to 1 Integers.
[0189] In some embodiments, the formula for calculating the spatial correlation weight between adjacent electronic fences is:
[0190] (2)
[0191] in, Indicates adjacent electronic fences and electronic fence Spatial correlation weight, Indicates adjacent electronic fences and electronic fence The Euclidean distance between the centroids, This represents the Gaussian kernel bandwidth hyperparameter that controls the decay rate.
[0192] In some embodiments, the network architecture of the hybrid deep learning model includes a multimodal feature extraction network, a multimodal feature fusion module, an encoding module, and a nonlinear module;
[0193] The processing module 1102 is further configured to use the multimodal feature extraction network to extract features from the spatial map, the historical borrowing and returning time series data, and the historical meteorological time series data, respectively, to obtain the spatial features of each electronic fence, the borrowing and returning time features of the shared bicycles, and the meteorological impact features; use the multimodal feature fusion module to fuse the spatial features, the borrowing and returning time features, and the meteorological impact features to obtain the deep fusion features of each electronic fence; use the encoding module to obtain long-range dependencies and global context information from the deep fusion features to obtain encoded features; and use the nonlinear module to perform a nonlinear transformation on the encoded features to obtain the predicted borrowing and returning volume of the shared bicycles at future times.
[0194] In some embodiments, the multimodal feature extraction network includes a multilayer graph convolutional network, a temporal long short-term memory network, and a meteorological attention module;
[0195] The processing module 1102 is further configured to use the multi-layer graph convolutional network to obtain the spatial features of each of the electronic fences from the spatial graph; use the temporal long short-term memory network to obtain the borrowing and returning time features of the shared bicycles within each of the electronic fences from the historical borrowing and returning time series data; and use the meteorological attention module to obtain the meteorological impact features of each of the electronic fences from the historical meteorological time series data.
[0196] This disclosure also provides an electronic device, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the methods disclosed in this disclosure.
[0197] Figure 12 A schematic diagram of the structure of an electronic device provided in an exemplary embodiment of this disclosure is shown. For example... Figure 12 As shown, the electronic device 1200 includes at least one processor 1201 and a memory 1202 coupled to the processor 1201. The processor 1201 can perform the corresponding steps in the methods disclosed in the embodiments of this disclosure.
[0198] The processor 1201 described above can also be referred to as a Central Processing Unit (CPU), which can be an integrated circuit chip with signal processing capabilities. Each step in the method disclosed in this embodiment can be implemented by the integrated logic circuitry in the hardware of the processor 1201 or by instructions in software form. The processor 1201 can be a general-purpose processor, a digital signal processor (DSP), an ASIC, a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this embodiment can be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software modules can be located in the memory 1202, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The processor 1201 reads information from the memory 1202 and, in conjunction with its hardware, completes the steps of the method described above.
[0199] Furthermore, various operations / processes according to this disclosure, implemented via software and / or firmware, can be transmitted from a storage medium or network to a computer system with a dedicated hardware architecture, for example, Figure 13 The computer system 1300 shown is equipped with the programs that constitute the software. When various programs are installed, the computer system is able to perform various functions, including functions such as those described above. Figure 13 A schematic diagram of the structure of a computer system provided in an exemplary embodiment of this disclosure is shown.
[0200] Computer system 1300 is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. Electronic devices may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0201] like Figure 13As shown, the computer system 1300 includes a computing unit 1301, which can perform various appropriate actions and processes based on a computer program stored in a read-only memory (ROM) 1302 or a computer program loaded from a storage unit 1308 into a random access memory (RAM) 1303. The RAM 1303 may also store various programs and data required for the operation of the computer system 1300. The computing unit 1301, ROM 1302, and RAM 1303 are interconnected via a bus 1304. An input / output (I / O) interface 1305 is also connected to the bus 1304.
[0202] Multiple components in the computer system 1300 are connected to the I / O interface 1305, including: an input unit 1306, an output unit 1307, a storage unit 1308, and a communication unit 1309. The input unit 1306 can be any type of device capable of inputting information into the computer system 1300. The input unit 1306 can receive input numerical or character information and generate key signal inputs related to user settings and / or function control of the electronic device. The output unit 1307 can be any type of device capable of presenting information and may include, but is not limited to, a monitor, speaker, video / audio output terminal, vibrator, and / or printer. The storage unit 1308 may include, but is not limited to, a hard disk and an optical disk. The communication unit 1309 allows the computer system 1300 to exchange information / data with other devices via a network such as the Internet, and may include, but is not limited to, a modem, network card, infrared communication device, wireless communication transceiver, and / or chipset, such as Bluetooth™ device, WiFi device, WiMax device, cellular communication device, and / or the like.
[0203] The computing unit 1301 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 1301 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 1301 performs the various methods and processes described above. For example, in some embodiments, the methods disclosed in this disclosure can be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 1308. In some embodiments, part or all of the computer program can be loaded and / or installed on an electronic device via ROM 1302 and / or communication unit 1309. In some embodiments, the computing unit 1301 can be configured to perform the methods disclosed in this disclosure by any other suitable means (e.g., by means of firmware).
[0204] This disclosure also provides a computer-readable storage medium, wherein when the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is able to perform the methods disclosed in this disclosure.
[0205] The computer-readable storage medium in this disclosure can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. The aforementioned computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specifically, the aforementioned computer-readable storage medium may include electrical connections based on one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0206] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.
[0207] This disclosure also provides a computer program product, including a computer program, wherein when the computer program is executed by a processor, it implements the methods disclosed in the embodiments of this disclosure.
[0208] In embodiments of this disclosure, computer program code for performing the operations of this disclosure can be written in one or more programming languages or a combination thereof. These programming languages include, but are not limited to, object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network (including a local area network (LAN) or a wide area network (WAN)), or it can be connected to an external computer.
[0209] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0210] The modules, components, or units described in the embodiments of this disclosure can be implemented in software or hardware. The names of the modules, components, or units do not necessarily constitute a limitation on the module, component, or unit itself.
[0211] The functions described above in this document can be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary hardware logic components that can be used include: field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), system-on-a-chip (SoCs), complex programmable logic devices (CPLDs), and so on.
[0212] The above description is merely an illustration of some embodiments of this disclosure and the technical principles employed. Those skilled in the art should understand that the scope of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features disclosed in this disclosure that have similar functions.
[0213] While specific embodiments of this disclosure have been described in detail by way of example, those skilled in the art should understand that the examples are for illustrative purposes only and not intended to limit the scope of this disclosure. Those skilled in the art should understand that modifications can be made to the above embodiments without departing from the scope and spirit of this disclosure. The scope of this disclosure is defined by the appended claims.
Claims
1. A method for deploying shared bicycles based on electronic fences, characterized in that, include: The system acquires historical time-series data of shared bicycles borrowing and returning within a target area, corresponding historical meteorological time-series data, a pre-constructed spatial graph, and a hybrid deep learning model. The spatial graph has multiple nodes and edges between adjacent nodes. The nodes represent multiple electronic fences within the target area used for parking the shared bicycles, and the edges represent the spatial correlation weights between adjacent electronic fences. The network architecture of the hybrid deep learning model includes a multimodal feature extraction network, a multimodal feature fusion module, an encoding module, and a nonlinear module. The multimodal feature extraction network is used to extract features from the spatial map, the historical borrowing and returning time series data, and the historical meteorological time series data to obtain the spatial features of each electronic fence, the borrowing and returning time features of the shared bicycles, and the meteorological impact features. The spatial features, borrowing and returning time features, and meteorological impact features are fused using the multimodal feature fusion module to obtain the deep fusion features of each of the electronic fences; Using the encoding module, long-range dependencies and global context information are obtained from the deep fusion features to obtain the encoded features; The nonlinear module is used to perform a nonlinear transformation on the encoded features to obtain the predicted borrowing and returning volume of the shared bicycles at future times. Based on the predicted borrowing and returning volume, determine the number of shared bicycles to be deployed within each of the electronic fences at the future time. The method further includes: Obtain multiple points of interest included in the target area; Density clustering is performed on the multiple points of interest to obtain multiple cluster centers; Based on the multiple cluster centers, the installation locations of the multiple electronic fences in the target area are determined; The formula for calculating the spatial correlation weight of adjacent electronic fences is as follows: in, Indicates adjacent electronic fences and electronic fence Spatial correlation weight, Indicates adjacent electronic fences and electronic fence The Euclidean distance between the centroids, This represents the Gaussian kernel bandwidth hyperparameter that controls the decay rate.
2. The method as described in claim 1, characterized in that, The multiple points of interest are divided into various types according to their functional types, and the functional diversity of each electronic fence is characterized by functional mixture entropy; wherein, the formula for calculating the functional mixture entropy of each electronic fence is: in, Indicates the first The functional hybrid entropy of the aforementioned electronic fence; Indicates the first Within the electronic fence mentioned above, the first The proportion of similar interest points Indicates the first The total number of categories of points of interest within the aforementioned electronic fence, greater than or equal to 1 and less than or equal to 1 Integers.
3. The method as described in claim 1, characterized in that, The multimodal feature extraction network includes a multi-layer graph convolutional network, a temporal long short-term memory network, and a meteorological attention module; The multimodal feature extraction network is used to extract features from the spatial map, the historical borrowing and returning time series data, and the historical meteorological time series data to obtain the spatial features of each electronic fence, the borrowing and returning time features of the shared bicycles, and the meteorological impact features, including: The spatial features of each electronic fence are obtained from the spatial graph using the multi-layer graph convolutional network. Using the temporal long short-term memory network, the borrowing and returning time characteristics of the shared bicycles within each of the electronic fences are obtained from the historical borrowing and returning time series data; The meteorological attention module is used to obtain the meteorological impact characteristics of each electronic fence from the historical meteorological time series data.
4. A shared bicycle deployment device based on electronic fences, characterized in that, include: The acquisition module is used to acquire historical borrowing and returning time series data of shared bicycles in the target area over a historical period, corresponding historical meteorological time series data, as well as a pre-constructed spatial graph and a hybrid deep learning model. The spatial graph has multiple nodes and edges between adjacent nodes. The multiple nodes represent multiple electronic fences within the target area used for parking the shared bicycles, and the edges represent the spatial correlation weights between adjacent electronic fences. The network architecture of the hybrid deep learning model includes a multimodal feature extraction network, a multimodal feature fusion module, an encoding module, and a nonlinear module. The processing module is used to extract features from the spatial map, the historical borrowing and returning time series data, and the historical meteorological time series data using the multimodal feature extraction network, respectively, to obtain the spatial features of each electronic fence, the borrowing and returning time features of the shared bicycles, and the meteorological impact features; to fuse the spatial features, the borrowing and returning time features, and the meteorological impact features using the multimodal feature fusion module, to obtain the deep fusion features of each electronic fence; to obtain the encoded features by using the encoding module to extract long-range dependencies and global context information from the deep fusion features; and to obtain the encoded features by using the nonlinear module to perform a nonlinear transformation on the encoded features, to obtain the predicted borrowing and returning volume of the shared bicycles at future times. The processing module is also used to determine the number of shared bicycles to be deployed within each of the electronic fences at the future time based on the predicted borrowing and returning volume; The acquisition module is also used to acquire multiple points of interest included in the target area; The processing module is further configured to perform density clustering on the multiple points of interest to obtain multiple cluster centers; and based on the multiple cluster centers, determine the installation locations of the multiple electronic fences in the target area; The formula for calculating the spatial correlation weight of adjacent electronic fences is as follows: in, Indicates adjacent electronic fences and electronic fence Spatial correlation weight, Indicates adjacent electronic fences and electronic fence The Euclidean distance between the centroids, This represents the Gaussian kernel bandwidth hyperparameter that controls the decay rate.
5. An electronic device comprising a memory, a processor, and a computer program stored in the memory, characterized in that, The processor executes the computer program to implement the steps of the method according to any one of claims 1 to 3.
6. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the steps of the method described in any one of claims 1 to 3.
7. A computer program product, comprising a computer program, characterized in that, When executed by a processor, the computer program implements the steps of the method described in any one of claims 1 to 3.
Citation Information
Patent Citations
Electronic fence planning method and device, electronic equipment and storage medium
CN118072502A
Electronic Fence and Electronic Fence System
US20200168101A1