Crowd flow monitoring method, device and equipment based on communication data, medium and product
Through clustering and prediction models based on multi-source mobile communication data, the problem of poor real-time crowd flow monitoring is solved, real-time prediction and emergency response to crowd flow are achieved, and the efficiency of security management is improved.
Patent Information
- Application Number
- CN202510553956.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-29
- Publication Date
- 2025-07-18
AI Technical Summary
In the prior art, the real-time performance of crowd flow monitoring is poor, and it is impossible to deal with the congestion caused by excessive traffic.
By acquiring multi-source mobile communication data, clustering and behavioral feature extraction are performed based on spatial features, predicting using population flow prediction models, and generating planning schemes to improve monitoring real-timeness.
Real-time monitoring and prediction of population mobility is achieved, emergency response capabilities are improved, and safety management is timely.
Smart Images

Figure CN120336732A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and particularly to a method, device, equipment, medium and product for monitoring population flow based on communication data. Background Art
[0002] Excessive pedestrian flow may lead to congestion and affect safety. Therefore, timely monitoring of population flow is necessary.
[0003] In the prior art, video surveillance or manual statistics is used to monitor population flow, but these methods can only obtain the current pedestrian flow and have poor real-time performance. Summary of the Invention
[0004] The present invention provides a method, device, equipment, medium and product for monitoring population flow based on communication data, aiming to solve the defect of poor real-time performance of population flow monitoring in the prior art and achieve the effect of improving the real-time performance of population flow monitoring.
[0005] The present invention provides a method for monitoring population flow based on communication data, including: Obtain multi-source mobile communication data, where the multi-source mobile communication data comes from multiple data sources, and determine population clusters in each time window based on the spatial characteristics of a single user in the multi-source mobile communication data; Extract behavioral characteristics from the population clusters in each time window to obtain target mobile communication data, where the behavioral characteristics reflect the behavioral characteristics of users in the population clusters; Input the target mobile communication data into a trained population flow prediction model to obtain a population flow prediction result output by the population flow prediction model. The population flow prediction model is trained based on multiple sets of training data, and each set of training data includes sample target mobile communication data and a population flow prediction result label corresponding to the sample target mobile communication data.
[0006] According to a method for monitoring population flow based on communication data provided by the present invention, the population flow prediction model at least includes an input layer, a convolutional layer, a pooling layer, a bidirectional long short-term memory network layer, a fully connected layer and an output layer.
[0007] According to a method for monitoring population flow based on communication data provided by the present invention, the training process of the population flow prediction model includes: Optimize the structural parameters of the population flow prediction model based on an optimization algorithm. The structural parameters include at least one of an initial learning rate, the number of convolutional kernels, the size of convolutional kernels, the size of pooling kernels, the number of hidden units in the bidirectional long short-term memory network layer, and the number of layers of the bidirectional long short-term memory network layer; Train the population flow prediction model based on the multiple sets of training data.
[0008] A method for monitoring population flow based on communication data provided by the present invention, which determines population clusters in each time window based on the spatial characteristics of a single user in the multi-source mobile communication data, includes: Based on the spatial characteristics, clustering the multi-source mobile communication data in each time window to obtain initial clusters in each time window; Based on the initial clusters in adjacent time windows, determining the spatio-temporal correlation relationship of each initial cluster; Based on the spatio-temporal correlation relationship, determining the associated initial clusters and merging the associated initial clusters into one population cluster.
[0009] A method for monitoring population flow based on communication data provided by the present invention, after obtaining the population flow prediction result output by the population flow prediction model, includes: Generating a planning scheme based on the population flow prediction result, where the planning scheme at least includes security personnel allocation and evacuation routes.
[0010] A method for monitoring population flow based on communication data provided by the present invention, before clustering the multi-source mobile communication data in each time window based on the spatial characteristics of a single user in the multi-source mobile communication data, includes: Performing differential privacy processing on the multi-source mobile communication data.
[0011] The present invention also provides a device for monitoring population flow based on communication data, including: A clustering module, configured to obtain multi-source mobile communication data, where the multi-source mobile communication data comes from multiple data sources, and determine population clusters in each time window based on the spatial characteristics of a single user in the multi-source mobile communication data; A feature extraction module, configured to extract behavior features from the population clusters in each time window to obtain target mobile communication data, where the behavior features reflect the behavior characteristics of users in the population clusters; A prediction module, configured to input the target mobile communication data into a trained population flow prediction model to obtain a population flow prediction result output by the population flow prediction model, where the population flow prediction model is trained based on multiple sets of training data, and each set of training data includes sample target mobile communication data and a population flow prediction result label corresponding to the sample target mobile communication data.
[0012] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where when the processor executes the computer program, the method for monitoring population flow based on communication data as described in any one of the above is implemented.
[0013] The present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the method for monitoring population flow based on communication data as described in any one of the above is implemented.
[0014] The present invention also provides a computer program product, including a computer program. When the computer program is executed by a processor, the method for monitoring population flow based on communication data as described in any one of the above is implemented.
[0015] The method, device, equipment, medium and product for monitoring population flow based on communication data provided by the present invention, wherein the method includes: acquiring multi-source mobile communication data, the multi-source mobile communication data coming from multiple data sources, clustering the multi-source mobile communication data in each time window based on the spatial characteristics of a single user in the multi-source mobile communication data to obtain population clusters in each time window; extracting behavior characteristics from the population clusters in each time window to obtain target mobile communication data, the behavior characteristics reflecting the behavior characteristics of the users in the population clusters; inputting the target mobile communication data into a trained population flow prediction model to obtain a population flow prediction result output by the population flow prediction model. In this way, by collecting the mobile communication data of the mobile devices carried by the population, analyzing these data, and using the population flow prediction model to realize the prediction of population flow, the real-time performance of population flow monitoring can be improved. Description of the Drawings
[0016] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0017] Figure 1 It is a schematic flow chart of the method for monitoring population flow based on communication data provided by the present invention.
[0018] Figure 2 It is a schematic structural diagram of the device for monitoring population flow based on communication data provided by the present invention.
[0019] Figure 3 It is a schematic structural diagram of the electronic device provided by the present invention. Detailed Embodiments
[0020] To make the objectives, technical solutions, and advantages of the present invention clearer, the technical solutions in the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0021] It should be understood that when used in this specification and the appended claims, the term "comprising" indicates the presence of the described features, wholes, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components, and / or their combinations.
[0022] It should also be understood that the terms used in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the specification of the present invention and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an", and "the" are intended to include the plural forms.
[0023] It should be further understood that the term "and / or" used in the specification of the present invention and the appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0024] As used in this specification and the appended claims, the term "if" can be interpreted as "when", "once", "in response to determining", or "in response to detecting" according to the context. Similarly, the phrase "if determined" or "if [the described condition or event] is detected" can be interpreted as meaning "once determined", "in response to determining", "once [the described condition or event] is detected", or "in response to detecting [the described condition or event]" according to the context.
[0025] The following Figure 1 describes the method for monitoring population mobility based on communication data provided by the present invention. As Figure 1 shown, the method for monitoring population mobility based on communication data includes the steps of: S110. Obtain multi-source mobile communication data. The multi-source mobile communication data comes from multiple data sources. Based on the spatial characteristics of a single user in the multi-source mobile communication data, cluster the multi-source mobile communication data in each time window to obtain population clusters in each time window; S120. Extract behavioral characteristics from the population clusters in each time window to obtain target mobile communication data. The behavioral characteristics reflect the behavioral characteristics of the users in the population clusters; S130. Input the target mobile communication data into the trained crowd flow prediction model to obtain the crowd flow prediction result output by the crowd flow prediction model. The crowd flow prediction model is trained based on multiple sets of training data, and each set of training data includes sample target mobile communication data and the crowd flow prediction result label corresponding to the sample target mobile communication data.
[0026] The crowd flow monitoring method based on communication data provided by the present invention collects the mobile communication data of mobile devices carried by people, analyzes these data, and uses the crowd flow prediction model to realize the prediction of crowd flow, which can improve the real-time performance of crowd flow monitoring.
[0027] The multi-source mobile communication data at least includes location update records in the mobile communication network, social media check-in information, bus card swiping records, traffic camera images, etc. After collecting the mobile communication data through multiple data sources, the collected data is subjected to outlier deletion and missing value supplementation, and then normalized to obtain the multi-source mobile communication data in this application. It should be noted that when collecting multi-source mobile communication data, it should be collected within the scope permitted by law and with the user's notification and consent obtained.
[0028] After obtaining the multi-source mobile communication data, it is analyzed. Since the multi-source mobile communication data includes the mobile data of individual users, in order to prevent data leakage during the data processing process, in a possible implementation manner of the method provided by the present invention, before further analyzing the multi-source mobile communication data, it includes: performing differential privacy processing on the multi-source mobile communication data. Specifically, for the individual user data in the multi-source mobile communication data, the hash function is used to encrypt the individual user data, and then the sensitivity of differential privacy is set to Δf = 1, and the Laplace mechanism is used to add noise from the Laplace(Δf / ε) distribution to the query result to obtain the noisy multi-source mobile communication data of the user, where ε is a parameter determining the degree of privacy protection, ε = 0.1, and the noisy multi-source mobile communication data of all users is aggregated to obtain the multi-source mobile communication data after differential privacy processing.
[0029] Differential Privacy (DP) is a powerful privacy protection technology. It ensures the privacy of personal data is not leaked by adding noise to the data while maintaining the accuracy of data analysis. In the above-mentioned crowd flow monitoring and security guarantee system, differential privacy can be used to protect personal privacy information in mobile communication big data and other multi-source data.
[0030] The following is the specific processing method of differential privacy technology in the present invention: The core idea of differential privacy is to add random noise to the query results so that attackers cannot infer any information about individual individuals from the output. Differential privacy ensures that the probability distribution of the query results is almost the same regardless of whether a specific data item is included or excluded. This property is quantified by the differential privacy parameter ε, where a smaller value of ε means stronger privacy protection.
[0031] 1. Data collection phase: Anonymization: First, anonymize the collected user mobile communication data. For example, use a hash function or other methods to convert personal information such as mobile phone numbers into an irreversible form.
[0032] Sensitivity analysis: Determine the maximum possible change in the statistic to be released (such as population density, mobility patterns, etc.), that is, the sensitivity Δf. For count-based statistics, the sensitivity is usually 1; for the mean or other more complex statistics, the sensitivity needs to be calculated according to the specific situation.
[0033] 2. Adding noise: Laplace mechanism: This is one of the most commonly used differential privacy mechanisms. For a given statistical query q and sensitivity Δf, the Laplace mechanism adds noise from the Laplace(Δf / ε) distribution to the query results.
[0034] Gaussian mechanism: For some scenarios, especially when continuous numerical values need to be protected, the Gaussian mechanism can be used. This mechanism adds noise from the normal distribution N(0, σ²) to the query results, where the choice of σ depends on the sensitivity Δf and the required value of ε.
[0035] 3. Parameter selection: Selection of ε: ε is an important parameter that determines the degree of privacy protection. A smaller ε provides stronger privacy protection but may reduce the utility of the data. In practical applications, it is necessary to balance the relationship between privacy protection and data utility and reasonably select the value of ε.
[0036] Introduction of δ: In some cases, to further improve the utility and flexibility, the δ parameter can be introduced to form (ε, δ)-differential privacy. This means allowing a very small probability of a large privacy leak.
[0037] 4. Aggregation and publication: Aggregation operation: After processing each individual record, usually aggregate the noisy data of all users to obtain the overall population mobility situation. Since independent noise is added to each user's data, the final aggregated result is still protected by differential privacy.
[0038] Result Release: The statistical data processed with differential privacy can be securely released to a third party without revealing the specific location information of individuals.
[0039] Specific Example Description: Suppose we need to release the crowd density data at the site of a large event. The following steps can be taken: Define the query: Calculate the number of people in a certain area.
[0040] Determine the sensitivity: The change range of the number of people is ±1.
[0041] Select ε: Suppose we hope to provide strong privacy protection, we can choose ε = 0.1.
[0042] Add noise: Use the Laplace mechanism to draw noise from the Laplace(1 / 0.1) = Laplace(10) distribution and add it to the actual number of people.
[0043] Release the result: Release the result with noise for the use of public safety management agencies and subsequent analysis.
[0044] The multi-source mobile communication data includes the spatial locations of users. Based on the characteristics of the users' spatial locations, the aggregated users can be discovered, and thus the aggregated users can be grouped into a population cluster. Specifically, based on the spatial characteristics of a single user in the multi-source mobile communication data, the population clusters in each time window are determined, including: Cluster the multi-source mobile communication data in each time window based on the spatial characteristics to obtain the initial clusters in each time window; Determine the spatio-temporal association relationships of each initial cluster based on the initial clusters in adjacent time windows; Based on the spatio-temporal association relationships, determine the associated initial clusters and merge the associated initial clusters into a population cluster.
[0045] The method provided by the present invention identifies population clusters with similar behavior patterns from the multi-source mobile communication data and based on the changes of these population clusters over time. That is, identify the population clusters in each time window and determine the association relationships between these population clusters (which population clusters are actually associated and have the same behavior characteristics).
[0046] Before analyzing the multi-source mobile communication data, it can be preprocessed, including data cleaning, standardization, anonymization, etc. Among them, data cleaning is to remove invalid or abnormal data points, such as duplicate records, incorrect location information, etc. Standardization is to unify the formats of data from different sources. For example, convert all geographical locations into longitude and latitude coordinates. Anonymization processing is to perform hash processing on the user ID or anonymize it in other ways to protect personal privacy.
[0047] Divide the entire time period into multiple small time windows (e.g., one window every 5 minutes). Use the geographical coordinates of each data point as spatial features, and perform preliminary clustering on the data points within one time window (i.e., a single user) to obtain the initial clusters within the current time window.
[0048] Clustering can be achieved through existing clustering algorithms (such as DBSCAN, K-means, HDBSCAN, etc.). In one possible implementation, for the longitude and latitude coordinates and timestamps of each data point in the multi-source mobile communication data, each data point is transformed into a continuous time series. After dividing the entire time period into multiple small time windows, for each time window, use the Mini-batch K-means algorithm to perform preliminary clustering based on spatial features to obtain the initial clusters. The steps of the Mini-batch K-means algorithm are roughly as follows: Initialization: Randomly select K data points as the initial centroids.
[0049] Mini-batch data selection: In each iteration, randomly extract a mini-batch of data from the dataset.
[0050] Cluster assignment: Assign each data point in the mini-batch of data to the cluster where the centroid closest to it is located.
[0051] Centroid update: According to the assignment results, recalculate the centroids of each cluster. The centroid is usually the mean of all data points within the cluster, but here, only the mini-batch of data is used to calculate the new centroid position.
[0052] Iteration and convergence: Repeat the above steps until the centroids no longer change significantly or reach the preset number of iterations, and the algorithm converges.
[0053] After obtaining the initial clusters in each time window, compare the initial clusters in adjacent time windows, determine the spatio-temporal correlation relationship between the initial clusters in adjacent time windows, and based on the spatio-temporal correlation relationship, determine the associated initial clusters in adjacent time windows, and merge these initial clusters into a population cluster. Specifically, the spatio-temporal correlation relationship between the initial clusters can be determined based on the spatio-temporal feature similarity of the initial clusters. The spatio-temporal feature similarity can be measured by one or more of the following dimensions: Overlapping area: Calculate the degree of spatial overlap of the initial clusters in two time windows; Movement trajectory: Track the movement trajectory of users. If there is a large number of users in the initial clusters in two time windows whose movement paths intersect, then these two clusters are considered related; Density change: Analyze the density change trend of the initial clusters. If the density of an initial cluster gradually increases or decreases over time and is consistent with the density change trends of other clusters, it may belong to the same population cluster.
[0054] Based on the results of spatio-temporal association, merge the associated initial clusters into a larger population cluster, which can be achieved by constructing a graph structure, where nodes represent the clusters in each time window and edges represent the association strength between the clusters.
[0055] Furthermore, if a certain cluster does not have new data points added after a period of time, or its density significantly decreases, it can be considered that the cluster splits or disappears.
[0056] After obtaining each population cluster, behavioral characteristics can be extracted from the population clusters in each time window to obtain the target mobile communication data. It can be seen that the target mobile communication data is a time series, including the behavioral characteristics of the population clusters in different time windows. Behavioral characteristics reflect the behavioral characteristics of the people in the population cluster, and the behavioral characteristics can include but are not limited to the following dimensions: Average density: The number of people per unit area; Moving direction: The main moving direction and speed; Degree of aggregation: The compactness of the cluster; Lifecycle: The length of time the cluster exists.
[0057] In a possible implementation, after obtaining the target mobile communication data, it can be visually displayed. Specifically, GIS tools or visualization platforms can be used to display the population clusters and their behavioral characteristics in the form of a map to help managers intuitively understand the population flow pattern.
[0058] After obtaining the target mobile communication data, input it into the population flow prediction model to obtain the population flow prediction result output by the model.
[0059] In the method provided by the present invention, the population flow prediction model is a deep learning model, which is trained by means of supervised learning. In a possible implementation, the population flow prediction model is a CNN-LSTM hybrid model, which at least includes an input layer, a convolutional layer, a pooling layer, a bidirectional long short-term memory network layer, a fully connected layer, and an output layer. Replacing the unidirectional long short-term memory network layer with a bidirectional long short-term memory network layer can improve the model's processing ability for time series data. In the construction process of the population flow prediction model, the following steps are included: In a deep learning framework (such as TensorFlow or Keras), define the bidirectional LSTM layer. This usually involves specifying parameters such as the number of LSTM units and the boolean value of returning sequences (for whether to return the output of each time step).
[0060] Connect the CNN layer and the bidirectional LSTM layer: Use the feature sequence extracted by the CNN layer as the input of the bidirectional LSTM layer. Ensure that the output dimension of the CNN layer matches the input dimension of the bidirectional LSTM layer.
[0061] Configure the parameters of the bidirectional LSTM layer: According to the task requirements and data characteristics, adjust the parameters of the bidirectional LSTM layer, such as the number of LSTM units, dropout rate, etc.
[0062] Input the target multi-source mobile communication data into the CNN-LSTM hybrid crowd flow prediction model for training; Use the convolutional layer to extract the spatial features in the target multi-source mobile communication data, including at least crowd density distribution and hot spots; Use the LSTM layer to capture the long-term dependencies in the time series and understand the changing pattern of crowd flow over time; Use the fully connected layer to integrate the features extracted from the convolutional layer and the LSTM layer and make the final prediction to obtain the crowd flow prediction status.
[0063] In a possible implementation, the configuration of the structural parameters in the crowd flow prediction model can be optimized through an optimization algorithm. Based on the optimized structural parameters, multiple sets of training data are used for training, which can effectively improve the training efficiency and then improve the performance of the crowd flow prediction model. Specifically, the training process of the crowd flow prediction model includes: Optimize the structural parameters of the crowd flow prediction model based on the optimization algorithm. The structural parameters include at least one of the initial learning rate, the number of convolutional kernels, the size of the convolutional kernels, the size of the pooling kernels, the number of hidden units in the bidirectional long short-term memory network layer, and the number of layers in the bidirectional long short-term memory network layer; Train the crowd flow prediction model based on multiple sets of training data.
[0064] In a possible implementation, the optimization algorithm can adopt the grey wolf optimization algorithm. The process of optimizing the structural parameters of the crowd flow prediction model can include the following: Set the parameter range in the CNN-LSTM hybrid crowd flow prediction model: Initial learning rate: within the range of [0.0001, 0.1], which can be appropriately adjusted according to the specific model and data characteristics. Number of convolutional kernels: determined according to the complexity and feature diversity of the input data, and set within the range of [16, 128]. Size of the convolutional kernels: the setting range is [3x3, 7x7]. Size of the pooling kernels: the setting range is [2x2, 4x4]. Number of LSTM hidden units: the setting range is [32, 256]. Number of LSTM layers is in the range of [1, 3].
[0065] Population Generation: Determine the population size and select 30 to 50 grey wolf individuals. The individuals will represent different parameter combinations. Each grey wolf individual randomly initializes its position in the high-dimensional space within the above parameter range, that is, each individual has a set of random combinations of initial learning rate, number of convolutional kernels, size, pooling kernel size, number of LSTM hidden units, and number of layers.
[0066] Fitness Evaluation: For each grey wolf individual, apply the parameter combination it represents to the CNN-LSTM model. Use the training set to train the model, and use the corresponding initial learning rate and other parameters during the training process. Use the validation set to evaluate the performance of the model, and use the mean squared error (MSE) or mean absolute error (MAE) as the evaluation metric. The evaluation result is used as the fitness value of this grey wolf individual, reflecting the quality of this parameter combination.
[0067] Iterative Optimization Rank Update: In each iteration, update the hierarchical structure within the population according to the fitness values of the grey wolf individuals, and determine the alpha wolf (the optimal individual), beta wolf (the second-best individual), and delta wolf (the third-best individual). These three wolves guide other individuals (omega wolves) to move to a better position in the subsequent position update. Position Update: Based on the hunting behavior of grey wolves, the omega wolves update their positions according to the positions of the alpha wolf, beta wolf, and delta wolf. The position update process is carried out according to a specific formula, which takes into account the positions of the alpha wolf, beta wolf, and delta wolf, as well as some random factors, to guide the individuals to move to a better search space. At the same time, during the update process, it is necessary to ensure that the updated parameters are within the pre-set range to prevent unreasonable parameter values. As the iteration progresses, the update process gradually transitions from global search to local search to find the optimal parameter combination.
[0068] Convergence Condition Check Iteration Number: Set the maximum number of iterations, 100 or 200. When this number is reached, stop the optimization and output the current optimal parameter combination (the parameters represented by the alpha wolf). Performance Metric Threshold: Set a threshold for the performance metric, with MSE less than 0.01. If the fitness value of the alpha wolf is lower than this threshold, terminate the optimization process in advance. Observe the change in the fitness value of the alpha wolf in multiple consecutive iterations. If the change is extremely small (e.g., less than 0.0001), it indicates that the optimization has tended to be stable, and stop the optimization.
[0069] Apply the finally obtained optimal parameter combination (the parameters of the alpha wolf) to the CNN-LSTM model and retrain the model, this time using the complete training set. Performance Evaluation: Use the test set to evaluate the finally optimized model, and the evaluation metrics include MSE, MAE, R2 score, etc. Input the target multi-source mobile communication data into the population flow prediction model after passing the evaluation to obtain the population flow prediction result.
[0070] Further, in a possible implementation, after obtaining the crowd flow prediction result, it includes: generating a planning scheme based on the crowd flow prediction result, and the planning scheme includes at least security personnel allocation and evacuation routes.
[0071] According to the crowd flow prediction result, security personnel allocation and evacuation routes can be generated, thereby realizing the full-process automatic monitoring of crowd flow. Specifically, according to the predicted crowd density, security personnel are dynamically deployed to high-density areas and key points, more security personnel are added at the entrance, and more security personnel are deployed at the exit; an initial patrol route is designed, and the Floyd-Warshall algorithm is used to optimize the patrol route to obtain the target patrol route; the on-site situation is obtained through the real-time monitoring system and real-time mobile communication data, and the distribution of security personnel is adjusted according to the actual situation.
[0072] The core idea of the Floyd-Warshall algorithm is to successively use each vertex as an intermediate vertex to update the possible shorter paths passing through this intermediate vertex. For each pair of vertices i and j, if vertex k is an intermediate vertex, then the shortest distance dist[i][j] from path i to j can be updated by comparing the following two: The distance dist[i][j] directly from i to j.
[0073] The path passing through vertex k as an intermediate vertex, that is, dist[i][k] + dist[k][j].
[0074] By continuously adding new intermediate vertices, the Floyd-Warshall algorithm can update the shortest paths between each pair of vertices during the triple loop process.
[0075] Optimizing the security personnel patrol route Constructing a graph model: Abstract the area that security personnel need to patrol into a graph, where vertices represent important patrol points (such as entrances, exits, key areas, etc.), edges represent the paths between patrol points, and the weights of the edges represent the distances or times between patrol points.
[0076] Applying the Floyd-Warshall algorithm: Apply the Floyd-Warshall algorithm to the graph model to calculate the shortest paths between all patrol points.
[0077] Planning the patrol route: According to the calculated shortest paths, plan the optimal patrol route for security personnel. For example, a route can be designed so that security personnel can visit all important patrol points in sequence according to the shortest path, thereby ensuring the safety of the entire area.
[0078] Optimize patrol efficiency: Further optimize the patrol route and improve patrol efficiency by adjusting the positions and weights of patrol points and considering factors such as the movement speed and patrol time of security personnel.
[0079] The following describes the crowd flow monitoring device based on communication data provided by the present invention. The crowd flow monitoring device based on communication data described below can be correspondingly referred to the crowd flow monitoring method based on communication data described above. As Figure 2 shown, the crowd flow monitoring device based on communication data provided by the present invention includes a clustering model 210, a feature extraction module 220, and a prediction module 230. Among them: The clustering module 210 is used to obtain multi-source mobile communication data. The multi-source mobile communication data comes from multiple data sources, and determines the crowd clusters in each time window based on the spatial features of individual users in the multi-source mobile communication data; The feature extraction module 220 is used to extract behavioral features from the crowd clusters in each time window to obtain target mobile communication data. The behavioral features reflect the behavioral characteristics of the users in the crowd clusters; The prediction module 230 is used to input the target mobile communication data into the trained crowd flow prediction model to obtain the crowd flow prediction result output by the crowd flow prediction model. The crowd flow prediction model is trained based on multiple sets of training data, and each set of training data includes sample target mobile communication data and the crowd flow prediction result label corresponding to the sample target mobile communication data.
[0080] Figure 3 Illustrates a schematic physical structure diagram of an electronic device. As Figure 3 shown, the electronic device may include: a processor 310, a communication interface 320, a memory 330, and a communication bus 340. Among them, the processor 310, the communication interface 320, and the memory 330 communicate with each other through the communication bus 340. The processor 310 can call the logical instructions in the memory 330 to execute the crowd flow monitoring method based on communication data, and the method includes: obtaining multi-source mobile communication data. The multi-source mobile communication data comes from multiple data sources, and determines the crowd clusters in each time window based on the spatial features of individual users in the multi-source mobile communication data; extracting behavioral features from the crowd clusters in each time window to obtain target mobile communication data. The behavioral features reflect the behavioral characteristics of the users in the crowd clusters; inputting the target mobile communication data into the trained crowd flow prediction model to obtain the crowd flow prediction result output by the crowd flow prediction model. The crowd flow prediction model is trained based on multiple sets of training data, and each set of training data includes sample target mobile communication data and the crowd flow prediction result label corresponding to the sample target mobile communication data.
[0081] In addition, when the logical instructions in the above-mentioned memory 330 are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs that can store program codes.
[0082] On the other hand, the present invention also provides a computer program product. The computer program product includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the crowd flow monitoring method based on communication data provided by the above-mentioned various methods. The method includes: obtaining multi-source mobile communication data, where the multi-source mobile communication data comes from multiple data sources, and determining crowd clusters in each time window based on the spatial characteristics of a single user in the multi-source mobile communication data; extracting behavior characteristics from the crowd clusters in each time window to obtain target mobile communication data, where the behavior characteristics reflect the behavior characteristics of the users in the crowd clusters; inputting the target mobile communication data into a trained crowd flow prediction model to obtain a crowd flow prediction result output by the crowd flow prediction model. The crowd flow prediction model is trained based on multiple sets of training data, and each set of training data includes sample target mobile communication data and a crowd flow prediction result label corresponding to the sample target mobile communication data.
[0083] In another aspect, the present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements a method for monitoring population flow based on communication data provided by the above-mentioned various methods. The method includes: obtaining multi-source mobile communication data, where the multi-source mobile communication data comes from multiple data sources, and determining population clusters in each time window based on the spatial characteristics of a single user in the multi-source mobile communication data; extracting behavior characteristics from the population clusters in each time window to obtain target mobile communication data, where the behavior characteristics reflect the behavior characteristics of users in the population clusters; inputting the target mobile communication data into a trained population flow prediction model to obtain a population flow prediction result output by the population flow prediction model. The population flow prediction model is trained based on multiple sets of training data, and each set of training data includes sample target mobile communication data and a population flow prediction result label corresponding to the sample target mobile communication data.
[0084] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art can understand and implement it without creative efforts.
[0085] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution, in essence, or the part that contributes to the prior art can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disc, etc., and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0086] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments or perform equivalent replacements for some of the technical features. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for monitoring population flow based on communication data, characterized in that, Including: Obtain multi-source mobile communication data, where the multi-source mobile communication data comes from multiple data sources, and determine population clusters in each time window based on the spatial characteristics of a single user in the multi-source mobile communication data; Extract behavioral characteristics from the population clusters in each time window to obtain target mobile communication data, where the behavioral characteristics reflect the behavioral characteristics of users in the population clusters; Input the target mobile communication data into a trained population flow prediction model to obtain a population flow prediction result output by the population flow prediction model. The population flow prediction model is trained based on multiple sets of training data, and each set of training data includes sample target mobile communication data and a population flow prediction result label corresponding to the sample target mobile communication data.
2. The method for monitoring population flow based on communication data according to claim 1, wherein The population flow prediction model at least includes an input layer, a convolutional layer, a pooling layer, a bidirectional long short-term memory network layer, a fully connected layer, and an output layer.
3. The method for monitoring population flow based on communication data according to claim 2, wherein The training process of the population flow prediction model includes: Optimize the structural parameters of the population flow prediction model based on an optimization algorithm. The structural parameters include at least one of an initial learning rate, the number of convolutional kernels, the size of convolutional kernels, the size of pooling kernels, the number of hidden units in the bidirectional long short-term memory network layer, and the number of layers of the bidirectional long short-term memory network layer; Train the population flow prediction model based on the multiple sets of training data.
4. The method for monitoring population flow based on communication data according to claim 1, wherein The determining population clusters in each time window based on the spatial characteristics of a single user in the multi-source mobile communication data includes: Cluster the multi-source mobile communication data in each time window based on the spatial characteristics to obtain initial clusters in each time window; Determine the spatio-temporal association relationship of each initial cluster based on the initial clusters in adjacent time windows; Based on the spatio-temporal association relationship, determine the associated initial clusters and merge the associated initial clusters into one population cluster.
5. The method for monitoring population flow based on communication data according to claim 1, wherein After obtaining the population flow prediction result output by the population flow prediction model, it includes: Generate a planning scheme based on the population flow prediction result. The planning scheme at least includes security personnel allocation and evacuation routes.
6. The method for monitoring population flow based on communication data according to claim 1, wherein Before clustering the multi-source mobile communication data in each time window based on the spatial characteristics of a single user in the multi-source mobile communication data, it includes: Perform differential privacy processing on the multi-source mobile communication data.
7. A crowd flow monitoring device based on communication data, characterized in that Including: A clustering module for obtaining multi-source mobile communication data, where the multi-source mobile communication data comes from multiple data sources, and determining population clusters in each time window based on the spatial characteristics of a single user in the multi-source mobile communication data; A feature extraction module for extracting behavioral characteristics from the population clusters in each time window to obtain target mobile communication data, where the behavioral characteristics reflect the behavioral characteristics of users in the population clusters; A prediction module, configured to input the target mobile communication data into a trained crowd flow prediction model, and obtain a crowd flow prediction result output by the crowd flow prediction model. The crowd flow prediction model is trained based on multiple groups of training data, and each group of the training data includes sample target mobile communication data and a crowd flow prediction result label corresponding to the sample target mobile communication data.
8. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and running on the processor, characterized in that, When the processor executes the computer program, the crowd flow monitoring method based on communication data according to any one of claims 1 to 6 is implemented.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, the crowd flow monitoring method based on communication data according to any one of claims 1 to 6 is implemented.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, the crowd flow monitoring method based on communication data according to any one of claims 1 to 6 is implemented.