Abnormality prediction method, device, apparatus and storage medium
By constructing spatiotemporal regions and using user trajectory data to predict abnormal crowd gatherings, this technology solves the problem that existing technologies fail to consider the spatiotemporal characteristics of crowd activities, and achieves comprehensive and accurate prediction of crowd gatherings.
Patent Information
- Application Number
- CN202210483604.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-05
- Publication Date
- 2025-12-19
- Estimated Expiration
- 2042-05-05
AI Technical Summary
Existing technologies fail to effectively consider the spatiotemporal characteristics of population activities in predicting abnormal crowd gatherings, resulting in incomplete and inaccurate prediction results and a lack of analysis on the impact of abnormal gatherings in different regions and times.
By constructing a spatiotemporal region with the target area as the spatial axis and the historical and current time ranges as the time axis, user trajectory data is obtained. This data is used to determine the crowd gathering volume, and crowd gathering anomalies are predicted based on the difference and transition probability matrix. Anomaly thresholds are set for accurate prediction.
It achieves comprehensive and accurate prediction of abnormal crowd gatherings, taking into account the impact of the spatiotemporal characteristics of crowd activities on different regions and times, thus improving the accuracy and comprehensiveness of predictions.
Smart Images

Figure CN116701551B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of communication network, and particularly relates to an anomaly prediction method and device, equipment and a storage medium. BACKGROUND
[0002] At present, the abnormal gathering of people caused by an emergency usually brings safety risks, resource congestion and other problems. Generally, the historical passenger flow data of each region can be used for prediction, or the passenger flow time distribution characteristics and time sequence correlation can be combined for prediction, or the passenger flow at a future time can be predicted by extracting the time sequence pattern features of a sequence according to the existing passenger flow data. However, the perception of abnormal gathering of people mainly depends on passive real-time detection, which cannot form a good early warning mechanism, and the influence of the spatiotemporal characteristics of people's activities on the abnormal gathering judgment of different regions and times is not considered, resulting in that the abnormal gathering prediction result of people is not comprehensive and accurate. SUMMARY
[0003] Therefore, the embodiments of the present application aim to provide an anomaly prediction method, device, equipment and storage medium.
[0004] The technical scheme of the embodiments of the present application is as follows:
[0005] At least one embodiment of the present application provides an anomaly prediction method applied to a terminal, and the method comprises the following steps:
[0006] obtaining first user trajectory data of a first spatiotemporal region and second user trajectory data of a second spatiotemporal region; the first spatiotemporal region is a spatiotemporal region containing M spatiotemporal grids constructed by taking a target region as a spatial axis and a historical time range as a time axis; the second spatiotemporal region is a spatiotemporal region containing M spatiotemporal grids constructed by taking the target region as a spatial axis and a current time range as a time axis; the first user trajectory data is user trajectory point data obtained in the target region within the historical time range; and the second user trajectory data is user trajectory point data obtained in the target region within the current time range;
[0007] determining a first people gathering amount of each spatiotemporal grid in the first spatiotemporal region by using the first user trajectory data of the first spatiotemporal region, and determining a second people gathering amount of each spatiotemporal grid transferred to a third spatiotemporal region by using the second user trajectory data of the second spatiotemporal region; the third spatiotemporal region is a spatiotemporal region containing M spatiotemporal grids constructed by taking the target region as a spatial axis and a prediction time range as a time axis;
[0008] The first crowd gathering amount and the second crowd gathering amount are used to predict crowd gathering abnormalities in each space-time grid in the third space-time region.
[0009] M is a positive integer greater than 1.
[0010] In addition, according to at least one embodiment of the present application, the determination of the second crowd gathering amount transferred to each space-time grid in the third space-time region by using the second user trajectory data of the second space-time region comprises:
[0011] K time points are determined from the current time range;
[0012] The space-time grids corresponding to the K time points are determined from the second space-time region;
[0013] The third user trajectory data of the space-time grids corresponding to the K time points is determined by using the second user trajectory data of the second space-time region;
[0014] The second crowd gathering amount transferred to each space-time grid in the third space-time region is determined by using the third user trajectory data of the space-time grids corresponding to the K time points.
[0015] In addition, according to at least one embodiment of the present application, the determination of the second crowd gathering amount transferred to each space-time grid in the third space-time region by using the third user trajectory data of the space-time grids corresponding to the K time points comprises:
[0016] For each space-time grid corresponding to the i th time point, a 1 to K step transition probability matrix of the corresponding space-time grid to each space-time grid in the third space-time region is determined;
[0017] The third user trajectory data of the corresponding space-time grid is determined by using the 1 to K step transition probability matrix corresponding to the corresponding space-time grid to the target space-time grid in the third space-time region;
[0018] By analogy, until the third user trajectory data of the time grid corresponding to the K time points is determined to be transferred to the target space-time grid in the third space-time region; the total number of users transferred to the target space-time grid in the third space-time region is counted to obtain the second crowd gathering amount of the target space-time grid;
[0019] Wherein, i = 1, …, K; K is a positive integer greater than 1.
[0020] In addition, according to at least one embodiment of the present application, the prediction of crowd gathering abnormalities in each space-time grid in the third space-time region by using the first crowd gathering amount and the second crowd gathering amount comprises:
[0021] corresponding relationship between each first spatio-temporal grid in the first spatio-temporal region and each second spatio-temporal grid in the third spatio-temporal region is established;
[0022] a difference between the second crowd gathering amount of each second spatio-temporal grid in the third spatio-temporal region and the first crowd gathering amount of the corresponding first spatio-temporal grid is obtained to obtain a difference value corresponding to each second spatio-temporal grid;
[0023] a comparison between the difference value corresponding to each second spatio-temporal grid and the abnormal threshold of the corresponding first spatio-temporal grid is performed to obtain a comparison result;
[0024] based on the comparison result, crowd gathering abnormality of each second spatio-temporal grid in the third spatio-temporal region is predicted.
[0025] In addition, according to at least one embodiment of the present application, the method further comprises:
[0026] the first spatio-temporal region is divided into a first spatio-temporal grid containing at least one crowd gathering abnormal event and a first spatio-temporal grid not containing a crowd gathering abnormal event by using first user trajectory data in the first spatio-temporal region;
[0027] a crowd abnormal gathering amount of each crowd gathering abnormal event is determined by using first user trajectory data of the first spatio-temporal grid containing at least one crowd gathering abnormal event to obtain at least one crowd abnormal gathering amount;
[0028] an abnormal threshold of the first spatio-temporal grid containing at least one crowd gathering abnormal event is determined by using the at least one crowd abnormal gathering amount and the first crowd gathering amount;
[0029] an abnormal threshold of the first spatio-temporal grid not containing a crowd gathering abnormal event is determined by using the crowd abnormal gathering amount of each first spatio-temporal grid containing at least one crowd gathering abnormal event and the first crowd gathering amount of the first spatio-temporal grid not containing a crowd gathering abnormal event.
[0030] In addition, according to at least one embodiment of the present application, the determination of the abnormal threshold of the first spatio-temporal grid containing at least one crowd gathering abnormal event by using the at least one crowd abnormal gathering amount and the first crowd gathering amount comprises:
[0031] a difference between the at least one crowd abnormal gathering amount and the first crowd gathering amount is obtained to obtain at least one difference value;
[0032] the at least one difference value is taken as an observation quantity; and an estimation value is obtained by estimating the observation quantity;
[0033] the estimation value is taken as the abnormal threshold of the first spatio-temporal grid containing at least one crowd gathering abnormal event.
[0034] Further, according to at least one embodiment of the present application, the determining of the abnormal threshold of the first space-time grid not containing the crowd gathering abnormal event by using the crowd gathering abnormal amount of each first space-time grid containing at least one crowd gathering abnormal event and the first crowd gathering amount of the first space-time grid not containing the crowd gathering abnormal event comprises:
[0035] summing the at least one crowd gathering abnormal amount to obtain a total crowd gathering abnormal amount of the first space-time grid containing at least one crowd gathering abnormal event;
[0036] dividing the total crowd gathering abnormal amount of each first space-time grid containing at least one crowd gathering abnormal event by the first crowd gathering amount of the respective first space-time grid to obtain a plurality of ratios;
[0037] averaging the plurality of ratios to obtain an average value;
[0038] determining the abnormal threshold of the first space-time grid not containing the crowd gathering abnormal event by using the average value and the first crowd gathering amount of the first space-time grid not containing the crowd gathering abnormal event.
[0039] At least one embodiment of the present application provides an abnormality prediction device, comprising:
[0040] an acquisition unit configured to acquire first user trajectory data of a first space-time region and second user trajectory data of a second space-time region; the first space-time region is a space-time region containing M space-time grids constructed by taking a target region as a spatial axis and a historical time range as a time axis; the second space-time region is a space-time region containing M space-time grids constructed by taking the target region as a spatial axis and a current time range as a time axis; the first user trajectory data is user trajectory point data acquired in the target region within the historical time range; and the second user trajectory data is user trajectory point data acquired in the target region within the current time range;
[0041] a first processing unit configured to determine a first crowd gathering amount of each space-time grid in the first space-time region by using the first user trajectory data of the first space-time region, and determine a second crowd gathering amount of each space-time grid transferred to a third space-time region by using the second user trajectory data of the second space-time region; the third space-time region is a space-time region containing M space-time grids constructed by taking the target region as a spatial axis and a prediction time range as a time axis;
[0042] a second processing unit configured to predict crowd gathering abnormality of each space-time grid in the third space-time region by using the first crowd gathering amount and the second crowd gathering amount;
[0043] wherein M is a positive integer greater than 1.
[0044] At least one embodiment of the present application provides a terminal, comprising a processor and a memory for storing a computer program capable of running on the processor,
[0045] The processor is configured to execute the steps of any of the above terminal-side methods when running the computer program.
[0046] At least one embodiment of the present application provides a storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of any of the above methods.
[0047] The abnormality prediction method, device, equipment and storage medium provided by the embodiment of the present application, first user trajectory data of a first space-time region and second user trajectory data of a second space-time region are acquired; the first space-time region is a space-time region containing M space-time grids constructed by taking a target region as a spatial axis and a historical time range as a time axis; the second space-time region is a space-time region containing M space-time grids constructed by taking the target region as a spatial axis and a current time range as a time axis; the first user trajectory data is user trajectory point data acquired in the target region in the historical time range; the second user trajectory data is user trajectory point data acquired in the target region in the current time range; the first crowd gathering amount of each space-time grid in the first space-time region is determined by using the first user trajectory data of the first space-time region; and the second crowd gathering amount of each space-time grid transferred to a third space-time region is determined by using the second user trajectory data of the second space-time region; the third space-time region is a space-time region containing M space-time grids constructed by taking the target region as a spatial axis and a prediction time range as a time axis; the crowd gathering abnormality of each space-time grid in the third space-time region is predicted by using the first crowd gathering amount and the second crowd gathering amount; wherein M is a positive integer greater than 1. The technical scheme provided by the embodiment of the present application considers the influence of the space-time characteristics of crowd activities on the abnormal gathering judgment of different regions and times, and the comprehensiveness and accuracy of the crowd gathering abnormality prediction result. BRIEF DESCRIPTION OF DRAWINGS
[0048] Figure 1 is a flowchart of the implementation of the abnormality prediction method of the embodiment of the present application;
[0049] Figure 2 is a schematic diagram of a trajectory point in the historical trajectory of a user of the embodiment of the present application;
[0050] Figure 3 is a schematic diagram of a target region of the embodiment of the present application;
[0051] Figure 4is a schematic diagram of the component structure of an exception prediction device according to an embodiment of the present application;
[0052] Figure 5 is a schematic diagram of the component structure of a terminal according to an embodiment of the present application. DETAILED DESCRIPTION
[0053] Before the technical solutions of the embodiments of the present application are introduced, related technologies are described.
[0054] In related technologies, the abnormal gathering of people caused by emergencies usually brings about safety risks, resource congestion and other problems. At present, the perception of abnormal gathering of people mainly relies on relatively passive real-time detection, which cannot form a good early warning mechanism. Massive mobile signaling data contains real-time geographic location information of users, which well reflects the state and rules of urban crowd activities. Through analysis of the signaling data, the state of large-scale crowd gathering in urban areas can be perceived and predicted in advance, providing support for urban traffic departments to make crowd flow control decisions and for communication service departments to strengthen emergency communication support.
[0055] In related technologies, the technical solutions for predicting crowd gathering include the following:
[0056] Application No. 201711107770.6, entitled "Prediction method based on mobile Markov model under spatiotemporal big data" discloses a position prediction method using joint clustering algorithm and Markov model in a spatiotemporal big data environment. This technology is based on joint density estimation algorithm, which clusters historical trajectory data and classifies the user's trajectory changes into interest points represented by a number of static clustering clusters. A first-order Markov prediction model is established based on the probability of transition between interest points to realize the prediction of user location and behavior.
[0057] Application No. 201911081285.5, entitled "Method and device for constructing crowd gathering degree prediction model based on urban spatial structure" discloses a crowd gathering prediction method based on feature fusion. This method considers the influence of urban spatial structure information, traffic flow information and commercial information on regional crowd gathering degree, establishes a linear regression model, and forms an accurate prediction of crowd density.
[0058] Application No. 201910631245.7, entitled "Method for short-term prediction of crowd gathering at urban rail transit platform" provides a train departure time rolling prediction algorithm based on historical data. This algorithm establishes a least squares model for historical departure time data, calculates the estimated value and deviation, and is used for the prediction task at the current time; after the current train flow departs, the model is updated according to the deviation between the real time and the estimated time to improve the accuracy and timeliness of the prediction task.
[0059] The application number is 202010588491.1, and the invention name is a method for predicting the trend of crowd gathering based on ARMA algorithm. A crowd gathering trend estimation method based on autoregressive moving average model is provided. The technology uses crowd number time series data to predict future crowd number, and improves the accuracy of prediction by numerical iteration.
[0060] The application number is 202011443105.6, and the invention name is a crowd gathering prediction method for scenic spots based on model integration. A crowd gathering prediction method for scenic spots based on telecom operator base station data and integrated multiple statistical models is disclosed. The method includes models such as Poisson regression, gradient boosting tree, and time recurrent neural network, involving artificial intelligence technology fields such as deep learning.
[0061] The application number is 202110167010.4, and the invention name is a method for predicting the risk of personnel gathering based on personnel activity trajectory. A trajectory prediction and gathering risk warning method based on information extraction is proposed. The method extracts information from personnel trajectory data, and predicts future gathering points according to the flow direction change trend of personnel.
[0062] The application number is 202110142862.8, and the invention name is a city area gathering degree prediction method, device and medium based on deep neural network. A city area gathering degree prediction model based on city private car data is disclosed. The model uses deep learning method to rollingly predict the gathering degree of target prediction period, and has the characteristics of migration and strong expression.
[0063] The application number is 201610769009.8, and the invention name is a crowd gathering prediction method based on time series model. A crowd gathering prediction method integrating multiple time series models is proposed, which belongs to the field of security technology. According to the existing passenger flow data, the time sequence pattern characteristics of the sequence are extracted, and the passenger flow at future time is predicted.
[0064] The application number is 202010383161.9, and the invention name is a target object gathering prediction method, device and electronic equipment. A method for identifying abnormal gathering behavior of communication data is disclosed. The method can identify abnormal gathering behavior generated during communication between electronic devices, and belongs to the field of information security.
[0065] The application number is 201811490106.9, and the invention name is a prediction method, device and equipment for group gathering scene, and storage medium. A prediction method for judging whether the order comes from the user of gathering scene in public travel scene is disclosed. The method uses service description information such as user relationship network, and establishes a nonlinear model by gradient boosting tree algorithm for optimization to improve the prediction accuracy.
[0066] Application No. 201910159609.6, entitled "A special group gathering behavior early detection and gathering place prediction method and system" proposes a detection and prediction algorithm for special group gathering behavior. The algorithm clusters the target group in real time according to the member information and spatial movement information, inputs the nonlinear programming model, and converts it into a linear programming model for solution. Finally, the algorithm outputs the location and participants of the abnormal gathering event.
[0067] However, first, a joint clustering algorithm and Markov model are used for location prediction in a spatio-temporal big data environment. This method can only predict the next location of the user and does not mine user historical data to set abnormal gathering standards to predict the time and area where abnormal crowd gathering may occur. Without mining historical data and setting abnormal gathering standards, it cannot be used for time and location prediction of abnormal crowd gathering. Second, a crowd gathering prediction method based on feature fusion is based on the crowd gathering degree prediction of urban spatial structure. It does not mine user historical data to set abnormal gathering standards to predict the time and area where abnormal gathering may occur. Moreover, this method uses multiple environmental variables as input, which cannot be used to better reflect the location transfer of all users in the entire study area, and has certain limitations. Third, a train departure time rolling prediction algorithm based on historical data is limited to short-term prediction of the number of people gathering at the transportation platform. Fourth, a crowd gathering trend estimation method based on an autoregressive moving average model can only predict based on historical passenger flow data in each region, and cannot consider the impact of user transfer from other regions on the passenger flow in the target region. Fifth, a scenic crowd gathering prediction method based on telecom operator base station data and integrated multiple statistical models only considers time distribution features and time series correlation analysis in input features, and cannot consider the impact of user transfer from other regions on the passenger flow in the target region. Sixth, a trajectory prediction and gathering risk warning method based on information extraction. This method does not distinguish between travel modes, and the prediction accuracy will be affected by noise data when predicting passenger flow. Moreover, this method selects personnel flowing in the same direction in a certain time period to determine whether there will be a gathering, without considering multiple trajectories of personnel flowing in the same direction, which may not gather in the same time and area due to different speeds and destinations. It does not consider speed and destination. Seventh, a city area gathering degree prediction model based on city private car data does not distinguish between user appearance modes and is modeled based on city private car stay data, which cannot be directly used in the task of abnormal crowd gathering. Eighth, a crowd gathering prediction method that integrates multiple time series models belongs to the field of security technology. This method predicts future passenger flow based on existing passenger flow data by extracting time series pattern features. This method can only predict based on historical passenger flow data in each region and cannot consider the impact of user transfer from other regions on the passenger flow in the target region. Ninth, a method for predicting abnormal gathering behavior generated during communication between electronic devices. This method is only suitable for gathering prediction of multiple specified target objects and cannot be used to solve the problem of abnormal crowd gathering prediction in the entire study area. Tenth, a prediction method for determining whether an order comes from a user in a gathering scenario in a public travel scenario.The method uses service description information such as a user relationship network to establish a nonlinear model for optimization through a gradient boosting tree algorithm, and the method can only predict the area where a service order is generated, and cannot solve the problem of crowd gathering prediction in other areas where no service order has occurred. Eleventh, a detection and prediction algorithm for special crowd gathering behavior, which cannot predict the time of future gathering time, does not consider the difference in the movement mode of individuals in the crowd, and cannot be directly applied to crowd gathering anomaly prediction; when detecting the gathering behavior, the difference in the abnormal discovery standard of different geographical areas and time intervals cannot be considered.
[0068] In summary, in the related art, the spatiotemporal movement mode of individuals in the crowd is not recognized, the influence of the spatiotemporal characteristics of crowd activities on the abnormal gathering judgment standard of different areas and times is not considered, and the influence of the long-term trend of user movement trajectories on the future path is not utilized, resulting in incomplete and inaccurate crowd gathering anomaly prediction results.
[0069] Therefore, in the embodiment of the present application, first user trajectory data of a first spatiotemporal region and second user trajectory data of a second spatiotemporal region are obtained; the first spatiotemporal region is a spatiotemporal region containing M spatiotemporal grids constructed with a target region as a spatial axis and a historical time range as a time axis; the second spatiotemporal region is a spatiotemporal region containing M spatiotemporal grids constructed with the target region as a spatial axis and a current time range as a time axis; the first user trajectory data is user trajectory point data obtained in the target region within the historical time range; the second user trajectory data is user trajectory point data obtained in the target region within the current time range; the first crowd gathering amount of each spatiotemporal grid in the first spatiotemporal region is determined by using the first user trajectory data of the first spatiotemporal region; and the second crowd gathering amount of each spatiotemporal grid transferred to a third spatiotemporal region is determined by using the second user trajectory data of the second spatiotemporal region; the third spatiotemporal region is a spatiotemporal region containing M spatiotemporal grids constructed with the target region as a spatial axis and a prediction time range as a time axis; the crowd gathering anomaly of each spatiotemporal grid in the third spatiotemporal region is predicted by using the first crowd gathering amount and the second crowd gathering amount; and M is a positive integer greater than 1.
[0070] Figure 1 is a flowchart of an implementation of the anomaly prediction method of the embodiment of the present application, which is applied to a terminal, as shown in Figure 1 The method includes steps 101 to 103:
[0071] Step 101: Obtain first user trajectory data of a first spatiotemporal region and second user trajectory data of a second spatiotemporal region.
[0072] Here, the first spatio-temporal region is a spatio-temporal region containing M spatio-temporal grids, which is constructed with the target region as the spatial axis and the historical time range as the time axis; and the second spatio-temporal region is a spatio-temporal region containing M spatio-temporal grids, which is constructed with the target region as the spatial axis and the current time range as the time axis.
[0073] Here, the first user trajectory data is user trajectory point data acquired in the target region within the historical time range; and the second user trajectory data is user trajectory point data acquired in the target region within the current time range.
[0074] It can be understood that the historical time range can be divided into N time units in the time dimension, and the target region can be divided into M regions in the spatial dimension, so that M spatio-temporal grids can be determined by the N time units in the time dimension and the M regions in the spatial dimension, and the M spatio-temporal grids constitute the first spatio-temporal region. The time unit can be a time, a minute, etc. The lengths of the N time units can be the same or different. Similarly, the current time range can be divided into N time units in the time dimension, and the target region can be divided into M regions in the spatial dimension, so that M spatio-temporal grids can be determined by the N time units in the time dimension and the M regions in the spatial dimension, and the M spatio-temporal grids constitute the second spatio-temporal region. The time unit can be a day, a time, a minute, etc. The lengths of the N time units can be the same or different. N is a positive integer greater than 1.
[0075] It should be noted that the first spatio-temporal region and the second spatio-temporal region have the same way of dividing spatio-temporal grids, that is, the sizes and quantities of the multiple spatio-temporal grids contained in the two spatio-temporal regions are the same. The numbers of the spatio-temporal grids of the two spatio-temporal regions can be the same. For example, the spatio-temporal grid 1 in the first spatio-temporal region corresponds to the spatio-temporal grid 1 in the second spatio-temporal region.
[0076] In actual application, considering that the operator device can acquire the first signaling data from a network device such as a base station and send the first signaling data to the terminal, and the first signaling data carries real-time geographic position information of each user in the target region within the historical time range, so the terminal can acquire the first signaling data from the operator device, first, generate the historical trajectory of each user according to the first signaling data. Then, at least one historical trajectory belonging to a specific mobile mode is screened out from the historical trajectory of each user. Finally, the at least one historical trajectory belonging to the specific mobile mode is divided into multiple trajectory points, and the multiple trajectory points are stored in the corresponding spatio-temporal grid in the first spatio-temporal region.
[0077] Based on this, in an embodiment, acquiring the first user trajectory data of the first spatio-temporal region comprises:
[0078] acquiring first signaling data; the first signaling data representing geographic positions of each user in a target area in a historical time range;
[0079] generating a historical trajectory of each user by using the first signaling data; determining a historical trajectory belonging to a specific moving mode from the historical trajectory of each user, to obtain at least one historical trajectory belonging to a specific moving mode;
[0080] resampling the at least one historical trajectory belonging to a specific moving mode respectively to obtain a plurality of trajectory points;
[0081] storing the plurality of trajectory points as first user trajectory data into a corresponding space-time grid in the first space-time area.
[0082] It can be understood that the first signaling data can carry the following parameters: user identification (ID), service process start time, service process end time, longitude, latitude, process type, card type. Among them, the longitude and the latitude correspond to the real-time geographic position of the corresponding user in the target area. The service process start time can be used to mark the timestamp of the trajectory point corresponding to the real-time geographic position.
[0083] In actual application, due to factors such as uneven distribution of network equipment such as base stations, obvious terrain differences, etc., there may be some abnormal values in the first signaling data obtained by the operator equipment from the network equipment such as base stations. Therefore, after the terminal obtains the first signaling data from the operator equipment, it needs to preprocess the abnormal data that may exist in the first signaling data.
[0084] Based on this, in an embodiment, generating a historical trajectory of each user by using the first signaling data comprises:
[0085] preprocessing the first signaling data to obtain preprocessed first signaling data;
[0086] generating a historical trajectory of each user by using the preprocessed first signaling data.
[0087] It can be understood that after generating the historical trajectory of each user, a window mean filter can also be used to perform a smoothing operation on the historical trajectory of each user.
[0088] Among them, the smoothing operation can refer to taking the average position of five consecutive trajectory points in the historical trajectory as the position of the current trajectory point to obtain the historical trajectory of each user after smoothing. The five trajectory points can refer to the current trajectory point, the two trajectory points before the current trajectory point and the two trajectory points after the current estimated point.
[0089] Here, the first signaling data is preprocessed, including: deleting useless data existing in the first signaling data according to a preset rule.
[0090] Here, the preset rule specifically includes at least one of the following:
[0091] (1) deleting data in the first signaling data with latitude and longitude outside the delimited range.
[0092] (2) deleting data in the first signaling data with a business process time interval greater than or equal to a time interval threshold. The business process time interval refers to the time interval between the business process start time and the business process end time. The time interval threshold can be 3 seconds.
[0093] (3) deleting data in the first signaling data with continuous repeated positions. Wherein, the continuous repeated positions can refer to 2 or more positions that are repeated.
[0094] (4) only keeping data of a specific process type. The specific process type can refer to a process of performing base station switching.
[0095] (5) deleting users with abnormal total number of user records in the first signaling data. Wherein, the abnormal total number of user records can refer to the total number of users recorded within a preset time period being less than a preset threshold. For example, the total number of users recorded within 24 hours is less than 5.
[0096] Here, after preprocessing the first signaling data, for each user, a plurality of trajectory points corresponding to the user ID can be generated using the longitude and latitude corresponding to the user ID; and the plurality of trajectory points corresponding to the user ID can be concatenated according to the business process start time and the business process end time to form the user's historical trajectory.
[0097] It should be noted that after deleting the useless data existing in the first signaling data according to the preset rule, the trajectory points with abnormal speed calculation due to position offset in the first signaling data can also be deleted.
[0098] Specifically, for each user ID, the average speed of the five consecutive trajectory points (i.e. the current trajectory point, the two previous trajectory points of the current trajectory point, and the two subsequent trajectory points of the current trajectory point) is calculated, and the calculated average speed is taken as the speed of the current trajectory point. If the speed of the current trajectory point exceeds a speed threshold, the trajectory point is deleted.
[0099] Here, the speed of the current trajectory point is calculated according to the following formula (1), specifically as follows:
[0100]
[0101] wherein, v n represents the speed of the current trajectory point; d(P i , P i+1 ) represents the straight-line distance between the trajectory point P i and the trajectory point P i+1 . t n+2 -t n-2 represents the difference between the time point corresponding to the fifth trajectory point and the time point corresponding to the first trajectory point.
[0102] It should be noted that, after deleting the useless data existing in the first signaling data according to the preset rule, the ping-pong point existing in the first signaling data can also be deleted.
[0103] For example, Figure 2 is a schematic diagram of trajectory points in a user's historical trajectory, as shown in Figure 2 , it is assumed that the user's historical trajectory contains four consecutive trajectory points, denoted as A, B, C, and D. The angle 1 formed between the trajectory point A and the trajectory point B, the angle 2 formed between the trajectory point B and the trajectory point C, and the angle 3 formed between the trajectory point C and the trajectory point D are calculated. If the two consecutive angles are less than an angle threshold, such as 45°, it is considered that the center point of the first angle in the two consecutive angles is an abnormal point, and the trajectory point is removed from the first signaling data. For example, the angle 1 is less than the angle threshold and the angle 2 is less than the angle threshold, and the center point of the angle 1, i.e., the trajectory point B, is deleted.
[0104] In actual application, after obtaining the historical trajectories of each user, the historical trajectories belonging to a specific movement mode can be screened from the historical trajectories of each user.
[0105] Based on this, in an embodiment, determining at least one historical trajectory belonging to a specific movement mode based on the historical trajectories of each user can include:
[0106] identifying a stay point in the historical trajectory of each user;
[0107] using the stay point in the historical trajectory of each user to determine whether the historical trajectory of each user is a historical trajectory belonging to a specific movement mode.
[0108] Specifically, identifying a stay point in the historical trajectory of each user can include:
[0109] For each user's historical trajectory, starting from the third trajectory point, the time difference between each trajectory point P3 <t3, p3> and the previous two trajectory points P1 <t1, p1> and P2 <t2, p2> is calculated according to the following formula (2) and formula (3), and the time difference between each trajectory point P3 <t3, p3> and the next trajectory point P4 <t4, p4> is calculated according to the following formula (4), as follows:
[0110] Δt 13 = t3 - t1 (2)
[0111] Δt 23 = t3 - t2 (3)
[0112] Δt 34 = t4 - t3 (4)
[0113] If one of the following conditions is met, the trajectory point is considered to be a stay point:
[0114] (1) The time difference Δt 13 and Δt 23 between the current trajectory point and the previous two trajectory points are both less than a first time threshold, and the time difference Δt 34 between the current trajectory point and the next trajectory point exceeds a second time threshold. The first time threshold is less than the second time threshold, for example, the first time threshold is 5 minutes and the second time threshold is 30 minutes.
[0115] (2) The distance between the current trajectory point and the next trajectory point exceeds a distance threshold. The distance threshold can be 5Km.
[0116] Specifically, using the stay points in the historical trajectories of the respective users to determine whether the historical trajectories of the respective users are historical trajectories belonging to a specific movement mode can include:
[0117] Dividing the respective historical trajectories into a plurality of trajectory segments with respect to the stay points in the historical trajectories of the respective users;
[0118] Determining travel features of the respective trajectory segments corresponding to the respective historical trajectories;
[0119] Using the travel features of the respective trajectory segments corresponding to the respective historical trajectories of the respective users to determine whether the historical trajectories of the respective users belong to historical trajectories of a specific movement mode.
[0120] Here, the travel features include travel distance, average speed, maximum speed, and the number of trajectory points in the trajectory segment whose speed exceeds a speed threshold. Among them,
[0121] The travel distance can refer to the distance between the starting trajectory point and the ending trajectory point of the trajectory segment.
[0122] The average speed can be obtained by summing the speed of each trajectory point in the trajectory segment, obtaining a sum result, and then averaging the sum result. The speed of each trajectory point is calculated according to the following formula (5) as follows:
[0123]
[0124] wherein v i represents the speed of the trajectory point P i ; d(P i , P i+1 ) represents the straight-line distance between the trajectory point P i and the trajectory point P i+1 ; and △t i,i+1 represents the difference between the time point corresponding to the trajectory point P i+1 and the time point corresponding to the trajectory point P i .
[0125] The maximum speed can be the maximum speed selected from the speeds of the trajectory points in the trajectory segment.
[0126] The number of trajectory points with speed exceeding the speed threshold in the trajectory segment can be the number of trajectory points with speed greater than or equal to the speed threshold among the trajectory points in the trajectory segment.
[0127] If at least one trajectory segment of the historical trajectory of the corresponding user satisfies all the following conditions, it is determined that the historical trajectory of the corresponding user belongs to the historical trajectory of a specific moving mode:
[0128] (1) The average speed is less than a first speed threshold, or the maximum speed is less than a second speed threshold; wherein the first speed threshold can be 15 km / h, and the second speed threshold can be 30 km / h.
[0129] (2) The travel distance does not exceed a distance threshold; wherein the distance threshold can be 25 km.
[0130] (3) The number of trajectory points with speed exceeding the speed threshold in the trajectory segment is less than one third of the total number of trajectory points contained in the trajectory segment. Wherein the speed threshold can be 25 km / h.
[0131] Wherein the specific moving mode can also be referred to as a personnel travel moving mode.
[0132] In actual application, at least one historical trajectory belonging to the specific moving mode is resampled to obtain a plurality of trajectory points, and the plurality of trajectory points are taken as the first user trajectory data and divided into the corresponding space-time grid in the first space-time region.
[0133] Based on this, in an embodiment, at least one historical trajectory belonging to a specific movement mode is respectively resampled to obtain a plurality of trajectory points; the plurality of trajectory points are taken as first user trajectory data and divided into corresponding spatio-temporal grids in the first spatio-temporal region, including:
[0134] At least one historical trajectory belonging to a specific movement mode is respectively resampled at a fixed sampling time interval length to obtain a plurality of trajectory points; the trajectory points carry: historical trajectory ID, user ID, longitude, latitude, and resampled timestamp;
[0135] According to the historical trajectory ID, user ID, longitude, latitude, and resampled timestamp carried by each trajectory point, the each trajectory point is divided into corresponding spatio-temporal grids in the first spatio-temporal region.
[0136] It can be understood that the fixed sampling time interval length is represented by T tr .
[0137] It can be understood that the M spatio-temporal grids of the first spatio-temporal region are constructed with the target region as the spatial axis and the historical time range as the time axis, so that the longitude and latitude carried by each trajectory point can be used to determine the spatial coordinates of the each trajectory point in the first spatio-temporal region, and the resampled timestamp carried by the each trajectory point can be used to determine the time coordinates of the each trajectory point in the first spatio-temporal region. In this way, the plurality of trajectory points corresponding to the historical trajectory of each user can be divided into corresponding spatio-temporal grids in the first spatio-temporal region.
[0138] Figure 3 FIG. 1 is a schematic diagram of a target region, as shown in FIG. 1, the geographical space of the target region is divided into M spatial grids in the spatial dimension. The shape of the grid can be any closed shape, such as a square of equal size. In the time dimension, the historical time range such as a week can be divided into N time units according to the characteristics of user activities in a specific time period. Figure 3
[0139] Table 1 is a schematic diagram of dividing the historical time range into N time units, as shown in Table 1, for the historical time range from 0 to 24 on a certain working day and the historical time range from 0 to 24 on a certain Saturday, the time units divided respectively can be different, the purpose is to make the crowd movement characteristics in each time unit as stable as possible.
[0140]
[0141] Table 1
[0142] In actual application, considering that the operator device can obtain the second signaling data from a network device such as a base station and send the second signaling data to the terminal, and the second signaling data carries real-time geographic position information of each user in the target area in the current time range, thus, the terminal can obtain the first signaling data from the operator device, first, generates the current trajectory of each user according to the second signaling data. Then, at least one current trajectory belonging to a specific mobile mode is screened out from the current trajectory of each user. Finally, the at least one current trajectory belonging to the specific mobile mode is divided into a plurality of trajectory points, and the plurality of trajectory points are stored into the corresponding spatio-temporal grid in the second spatio-temporal area.
[0143] Based on this, in an embodiment, the second user trajectory data of the second spatio-temporal area is obtained, including:
[0144] Obtaining second signaling data; the second signaling data represents the geographic position of each user in the target area in the current time range;
[0145] Generating the current trajectory of each user by using the second signaling data; determining the current trajectory belonging to a specific mobile mode from the current trajectory of each user, obtaining at least one current trajectory belonging to a specific mobile mode;
[0146] Resampling the at least one current trajectory belonging to the specific mobile mode respectively, obtaining a plurality of trajectory points;
[0147] Storing the plurality of trajectory points as the second user trajectory data into the corresponding spatio-temporal grid in the second spatio-temporal area.
[0148] It can be understood that the (t p -T tr , t p ) can represent the time range of the pulled second signaling data; tp represents the time of pulling data from the second signaling data, T tr represents the sampling time interval length of the current trajectory belonging to the specific mobile mode.
[0149] It should be noted that the process of obtaining the second user trajectory data of the second spatio-temporal area is similar to the process of obtaining the first user trajectory data of the first spatio-temporal area, which will not be repeated here.
[0150] Step 102: determining the first crowd gathering amount of each spatio-temporal grid in the first spatio-temporal area by using the first user trajectory data of the first spatio-temporal area; and determining the second crowd gathering amount of each spatio-temporal grid transferred to the third spatio-temporal area by using the second user trajectory data of the second spatio-temporal area.
[0151] Here, the third spatio-temporal region is a spatio-temporal region containing M spatio-temporal grids constructed with the target region as a spatial axis and a prediction time range as a time axis.
[0152] It can be understood that the prediction time range can be divided into N time units in the time dimension, and the target region can be divided into M regions in the space dimension. Thus, the M spatio-temporal grids can be determined by the N time units in the time dimension and the M regions in the space dimension. The time unit can be a day, a time, a minute, or the like.
[0153] It should be noted that the first spatio-temporal region, the second spatio-temporal region, and the third spatio-temporal region have the same way of dividing spatio-temporal grids, that is, the sizes and quantities of the plurality of spatio-temporal grids contained in the three spatio-temporal regions are the same. The numbers of the spatio-temporal grids in the three spatio-temporal regions can be the same. For example, the spatio-temporal grid 1 in the first spatio-temporal region, the spatio-temporal grid 1 in the second spatio-temporal region, and the spatio-temporal grid 1 in the third spatio-temporal region are one-to-one corresponding.
[0154] In actual application, the first user trajectory data of the first spatio-temporal region can be used to count the first crowd gathering quantity of each spatio-temporal grid.
[0155] Based on this, in an embodiment, the first user trajectory data of the first spatio-temporal region is used to determine the first crowd gathering quantity of each spatio-temporal grid in the first spatio-temporal region, including:
[0156] The first user trajectory data of the first spatio-temporal region is used to determine the trajectory points in each spatio-temporal grid of the first spatio-temporal region. The trajectory points carry a user ID.
[0157] The first user trajectory data of the first spatio-temporal region is used to determine the first crowd gathering quantity of each spatio-temporal grid.
[0158] It can be understood that for each spatio-temporal grid in the first spatio-temporal region, the first crowd gathering quantity of the spatio-temporal grid can be determined according to the total number of all trajectory points collected in a specific time period in the corresponding spatio-temporal grid, the length of the time unit corresponding to the corresponding spatio-temporal grid, the specific time period of the collection of the trajectory points in the corresponding time grid, and the sampling time interval length of the resampling of the historical trajectory belonging to the specific moving mode.
[0159] For example, it is assumed that each spatio-temporal grid of the first spatio-temporal region is represented by (s, t), the spatial sequence number s ∈ {1, 2,..., M}, and the time sequence number t ∈ {1, 2,..., N}. All trajectory points in the spatio-temporal grid (s, t) are represented by a set ζ s,t . The set ζ s,tThe total number of all trajectory points in the first spatio-temporal region is denoted as V s,t The average value of the historical crowd aggregation degree of the spatio-temporal grid (s, t) is denoted as E s,t The first crowd aggregation degree is calculated according to the following formula (6):
[0160]
[0161] The average value of the historical crowd aggregation degree of the spatio-temporal grid (s, t) is denoted as E s,t The average value of the historical crowd aggregation degree of the spatio-temporal grid (s, t) is denoted as E s,t The total number of all trajectory points collected in n days in the spatio-temporal grid (s, t) is denoted as V t The length of the time unit corresponding to the spatio-temporal grid (s, t) is denoted as T tr The length of the sampling time interval for resampling the historical trajectory belonging to a specific mobile mode is denoted as T
[0162] The average value of the historical crowd aggregation degree of each spatio-temporal grid in the first spatio-temporal region, i.e., the first crowd aggregation degree, is denoted as E = {E s,t |s∈{1,2,...M},t∈{1,2,...N}}.
[0163] In actual application, third user trajectory data close to the maximum time point in the current time range can be selected from the second user trajectory data of the second spatio-temporal region, and the selected third user trajectory data is used to determine the second crowd aggregation degree transferred to each spatio-temporal grid in the third spatio-temporal region.
[0164] Based on this, in an embodiment, the determination of the second crowd aggregation degree transferred to each spatio-temporal grid in the third spatio-temporal region using the second user trajectory data of the second spatio-temporal region comprises:
[0165] K time points are determined from the current time range;
[0166] Spatio-temporal grids corresponding to the K time points in the second spatio-temporal region are determined;
[0167] Third user trajectory data of the spatio-temporal grids corresponding to the K time points in the second spatio-temporal region is determined using the second user trajectory data of the second spatio-temporal region;
[0168] Using the third user trajectory data corresponding to the spatiotemporal grids at K time points, the second population aggregation volume that has moved to each spatiotemporal grid in the third spatiotemporal region is determined.
[0169] The third user trajectory data can be user trajectory point data in the time grid corresponding to the K time points respectively.
[0170] Here, using the second user trajectory data from the second spatiotemporal region, the third user trajectory data corresponding to the spatiotemporal grids at the K time points is determined, including:
[0171] Using the second user trajectory data of the second spatiotemporal region, determine the trajectory points in each spatiotemporal grid of the second spatiotemporal region;
[0172] Using the trajectory points in each spatiotemporal grid of the second spatiotemporal region, determine the trajectory points in the spatiotemporal grids corresponding to the K time points respectively;
[0173] The trajectory points in the spatiotemporal grid corresponding to the K time points are used as the third user trajectory data.
[0174] Here, determining the second crowd aggregation volume that has moved to each spatiotemporal grid in the third spatiotemporal region using the third user trajectory data corresponding to the K time points includes:
[0175] For each spatiotemporal grid corresponding to the i-th time point, determine the 1 to K step transition probability matrix of the corresponding spatiotemporal grid to each spatiotemporal grid in the third spatiotemporal region;
[0176] Using the 1 to K step transition probability matrix corresponding to the corresponding spatiotemporal grid, the third user trajectory data of the corresponding spatiotemporal grid is transferred to the target spatiotemporal grid in the third spatiotemporal region;
[0177] This process continues until the third user trajectory data corresponding to the time grids at the K time points is determined to be transferred to the target time grid in the third spatiotemporal region; the total number of users transferred to the target time grid in the third spatiotemporal region is counted to obtain the second population aggregation size of the target time grid;
[0178] Where i = 1, ..., K; K is a positive integer greater than 1.
[0179] It is understandable that the second population aggregation in the spatiotemporal grid where no user transfer occurs in the third spatiotemporal region is zero.
[0180] Specifically, the process of determining the second population aggregation size may include:
[0181] First, assuming the maximum time point of the current time range is t.n K-1 times of a fixed time interval from the maximum time point t n of the current time range. The fixed time interval is not greater than t n -T tr K time points can also be selected arbitrarily from the current time range.
[0182] For example, assuming K=3, the fixed time interval is equal to 1 hour, the current time range is from 0 to 9 o'clock, and the maximum time point of the current time range is 9 o'clock, the first time point is 9 o'clock for K=1, which is K-1=0 times of the fixed time interval from the maximum time point 9 o'clock; the second time point is 8 o'clock for K=2, which is K-1=1 times of the fixed time interval from the maximum time point 9 o'clock; and the third time point is 7 o'clock for K=3, which is K-1=2 times of the fixed time interval from the maximum time point 9 o'clock.
[0183] Second, determine the space-time grid corresponding to each of the K time points in the second space-time region; for each space-time grid corresponding to the ith time point, determine the 1 to K-step transition probability matrix of the corresponding space-time grid to each space-time grid in the third space-time region.
[0184] For example, assuming that the K time points are represented by tn, tn-1, …, tn-K+1 respectively, and the space-time grids corresponding to the K time points are represented by {S tn ,S tn-1 ,...,S tn-K+1}, the transition probability matrix can be represented by .
[0185] From the transition probability matrix database, query the 1 to K-step transition probability matrix of the space-time grid s tn in the second space-time region, which is represented by . Each element in the transition probability matrix represents the transition probability of a trajectory point in the space-time grid s tn in the second space-time region to each space-time grid in the third space-time region.
[0186] By analogy, the 1 to K-step transition probability matrix of the space-time grid s tn-K+1 in the second space-time region is queried from the transition probability matrix database.
[0187] Second, the weighted sum of and the weight coefficient {w1, w2, …, w k} is calculated according to the following formula (7):
[0188]
[0189] in, This indicates that at the predicted time t n+1 Trajectory points in the spatiotemporal grid of the second spatiotemporal region are transferred to the spatiotemporal grid S corresponding to the next arrival point in the third spatiotemporal region. s The possibility. The larger the value, the more likely it is to reach the spacetime grid S. s The greater the likelihood, the higher the probability.
[0190] Therefore, according to formula (7), the prediction time t is calculated. n+1 After determining the probability that trajectory points in the spatiotemporal grid of the second spatiotemporal region will transfer to all spatiotemporal grids in the third spatiotemporal region, find... The maximum value in, that is, The maximum value of the corresponding element in the matrix. The spatiotemporal grid corresponding to this maximum value can be used as the target spatiotemporal grid, denoted by S. tn+1 express.
[0191] For example, assuming K=3, the first time point corresponds to spatiotemporal grid 1 in the second spatiotemporal region, the second time point corresponds to spatiotemporal grid 2 in the second spatiotemporal region, and the third time point corresponds to spatiotemporal grid 3 in the second spatiotemporal region. According to formula (7), the transition probability matrices of steps 1 to 3 corresponding to spatiotemporal grid 1 are weighted and summed to finally determine that the trajectory point in time grid 1 in the second spatiotemporal region is transferred to the target spatiotemporal grid in the third spatiotemporal region as spatiotemporal grid 3. According to formula (7), the transition probability matrices of steps 1 to 3 corresponding to spatiotemporal grid 2 are weighted and summed to finally determine that the trajectory point in time grid 2 in the second spatiotemporal region is transferred to the target spatiotemporal grid in the third spatiotemporal region as spatiotemporal grid 5. According to formula (7), the transition probability matrices of steps 1 to 3 corresponding to spatiotemporal grid 3 are weighted and summed to finally determine that the trajectory point in time grid 3 in the second spatiotemporal region is transferred to the target spatiotemporal grid in the third spatiotemporal region as spatiotemporal grid 3.
[0192] It should be noted that, because the closer to t n+1 The greater the correlation between a user's trajectory point at a given moment and the next arrival point, the greater the correlation between them. Therefore, the weighting coefficient is determined using a decaying method.
[0193] And so on, determining the predicted time t n+1 The trajectory points in the time grids corresponding to the K time points are transferred to the target time grid in the third time region.
[0194] Here, at the predicted time t n+1 The target spatiotemporal grids transferred to the third spatiotemporal region are respectively denoted by {Stn+1,S}. tn ,…,Stn-K+2} represents.
[0195] Third, the number of users in the target spatio-temporal grid in the third spatio-temporal region is counted to obtain the second crowd gathering amount of the target spatio-temporal grid.
[0196] First, the users in the spatio-temporal grid corresponding to the K time points are determined by using the third user trajectory data in the spatio-temporal grid corresponding to the K time points.
[0197] Specifically, the trajectory points in the spatio-temporal grid corresponding to the first time point are represented by a set (user ID, PT tn ,t n ), and the number of user IDs is counted to obtain the users in the spatio-temporal grid corresponding to the first time point, such as user ID1 and user ID2.
[0198] The trajectory points in the spatio-temporal grid corresponding to the second time point are represented by a set (user ID, PT tn-1 ,t n-1 ), and the number of different user IDs is counted to obtain the users in the spatio-temporal grid corresponding to the second time point, such as user ID4 and user ID5.
[0199] By analogy, the trajectory points in the spatio-temporal grid corresponding to the Kth time point are represented by a set (user ID, PT tn-k+1 ,t n-k+1 ), and the number of different user IDs is counted to obtain the users in the spatio-temporal grid corresponding to the Kth time point, such as user ID4 and user ID3.
[0200] Among them, the users in the spatio-temporal grid corresponding to the K time points can be called current active users. The third user trajectory data in the spatio-temporal grid corresponding to the K time points can be called the trajectory points of the current active users.
[0201] Then, the total number of users in the target spatio-temporal grid in the third spatio-temporal region is counted by using the users in the spatio-temporal grid corresponding to the Kth time point to obtain the second crowd gathering amount of the target spatio-temporal grid.
[0202] For example, assuming K=3, the first time point corresponds to space-time grid 1 in the second space-time region, the second time point corresponds to space-time grid 2 in the second space-time region, and the third time point corresponds to space-time grid 3 in the second space-time region. Among them, the time grid 1 in the second space-time region contains user 1 and user 3, and the trajectory point in the time grid 1 in the second space-time region is transferred to the target space-time grid in the third space-time region, which is space-time grid 3; the time grid 2 in the second space-time region contains user 2 and user 3, and the trajectory point in the time grid 2 in the second space-time region is transferred to the target space-time grid in the third space-time region, which is space-time grid 5; the time grid 3 in the second space-time region contains user 1 and user 4, and the trajectory point in the time grid 3 in the second space-time region is transferred to the target space-time grid in the third space-time region, which is space-time grid 3, then the total number of users in the target space-time grid 3 in the third space-time region is 3, which is user 1, user 3 and user 4; the total number of users in the target space-time grid 5 in the third space-time region is 2, which is user 2 and user 3.
[0203] Here, the process of establishing the transition probability matrix database can include: using the first user trajectory data of the first space-time region, establishing a 1-K step transition probability matrix for each space-time grid.
[0204] Specifically, first, a state transition frequency tensor F={F1, F2, …, F N}∈R N×M×M .
[0205] Among them, is the state transition frequency matrix of space-time grid t.
[0206] Then, according to the historical trajectory ID, user ID, longitude, latitude, and resampled timestamp carried by all trajectory points in the first user trajectory data, the number of times that the trajectory point in the space-time grid t is transferred from the space-time grid j to the space-time grid k through Ttr is counted Fill in F t . Wherein, T tr represents the time interval length of resampling the historical trajectory, j=1, …, M; k=1, …, M.
[0207] According to the following formula, F t is used to calculate the Markov single-step transition probability matrix. According to the C-K equation shown, the 2-K step transition probability matrix of space-time grid t can be obtained, which is as follows:
[0208]
[0209] P (K) =P K (12) k=2, …, K
[0210] Here, P t = {P t(1) , P t(2) , …, P t(K)} represents the 2-K step transition probability matrix of the space-time grid t.
[0211] Alternatively, the number of times that the user corresponding to the trajectory point in the space-time grid t moves from the space-time grid j to the space-time grid k in 2xT tr is counted, and the number of times is filled in F t ; the Markov two-step transition probability matrix is calculated for F t . In this way, the number of times that the user corresponding to the trajectory point in the space-time grid t moves from the space-time grid j to the space-time grid k in KxT tr is counted, and the number of times is filled in F t ; the Markov K-step transition probability matrix is calculated for F t .
[0212] In this way, the 1-K step transition probability matrix P t is calculated for each space-time grid.
[0213] Step 103: predicting the crowd gathering anomaly of each space-time grid in the third space-time region by using the first crowd gathering amount and the second crowd gathering amount.
[0214] In actual application, a one-to-one correspondence relationship can be established between each space-time grid in the first space-time region and each space-time grid in the third space-time region corresponding thereto. In this way, the crowd gathering amount of each space-time grid in the first space-time region can be compared with the crowd gathering amount of the space-time grid in the third space-time region corresponding thereto, and the abnormal threshold of each space-time grid in the first space-time region is combined to determine whether the geographical position corresponding to the space-time grid in the third space-time region will have a crowd gathering anomaly.
[0215] Based on this, in an embodiment, the predicting the crowd gathering anomaly of each space-time grid in the third space-time region by using the first crowd gathering amount and the second crowd gathering amount comprises:
[0216] establishing a correspondence relationship between each first space-time grid in the first space-time region and each second space-time grid in the third space-time region;
[0217] obtaining a difference value corresponding to each second space-time grid by subtracting the first crowd gathering amount of the first space-time grid corresponding to each second space-time grid from the second crowd gathering amount of each second space-time grid in the third space-time region;
[0218] comparing the difference value corresponding to each second spatio-temporal grid with the abnormality threshold value of the respective corresponding first spatio-temporal grid to obtain a comparison result;
[0219] based on the comparison result, predicting the crowd gathering abnormality of each second spatio-temporal grid in the third spatio-temporal region.
[0220] Here, the crowd gathering abnormality of each spatio-temporal grid in the third spatio-temporal region is predicted, which can specifically include:
[0221] First, the second crowd gathering amount of each second spatio-temporal grid in the third spatio-temporal region at the next time t n+1 is denoted as E . Wherein, t is the serial number of the spatio-temporal grid to which the next time t n+1 belongs.
[0222] Second, the difference between the second crowd gathering amount E of the second spatio-temporal grid and the first crowd gathering amount E s,t of the corresponding first spatio-temporal grid is calculated, and the difference is compared with the abnormality threshold value TH s,t of the corresponding first spatio-temporal grid.
[0223] Here, if E , it is predicted that the crowd abnormal gathering will occur in this region at this time. Then, the predicted gathering time occurrence place s, the predicted gathering time occurrence time t n+1 and the predicted gathering place crowd size
[0224] In an embodiment, the method further includes:
[0225] dividing the first spatio-temporal region into a first spatio-temporal grid containing at least one crowd gathering abnormality event and a first spatio-temporal grid not containing a crowd gathering abnormality event by using the first user trajectory data in the first spatio-temporal region;
[0226] determining the crowd abnormal gathering amount of each crowd gathering abnormality event by using the first user trajectory data of the first spatio-temporal grid containing at least one crowd gathering abnormality event, to obtain at least one crowd abnormal gathering amount;
[0227] determining the abnormality threshold value of the first spatio-temporal grid containing at least one crowd gathering abnormality event by using the at least one crowd abnormal gathering amount and the first crowd gathering amount;
[0228] determining the abnormality threshold value of the first spatio-temporal grid not containing a crowd gathering abnormality event by using the crowd abnormal gathering amount of each first spatio-temporal grid containing at least one crowd gathering abnormality event and the first crowd gathering amount of the first spatio-temporal grid not containing a crowd gathering abnormality event.
[0229] It can be understood that the first user trajectory data in the first spatio-temporal region can be used to determine the trajectory points in each spatio-temporal grid of the first spatio-temporal region; the trajectory points carry identification information; the identification information is used to indicate whether the trajectory points belong to the crowd gathering abnormal event; and the first spatio-temporal region is divided into the first spatio-temporal grid containing at least one crowd gathering abnormal event and the first spatio-temporal grid not containing the crowd gathering abnormal event according to the identification information carried by the trajectory points.
[0230] For example, it is assumed that the first spatio-temporal region includes spatio-temporal grid 1 and spatio-temporal grid 2. The spatio-temporal grid 1 includes trajectory point 1, trajectory point 2 and trajectory point 3; the trajectory point 1 carries the identification information 0, indicating that the trajectory point 1 does not belong to the crowd gathering abnormal event, the trajectory point 2 carries the identification information 1, indicating that the trajectory point 2 belongs to the crowd gathering abnormal event a1, and the trajectory point 3 carries the identification information 3, indicating that the trajectory point 1 belongs to the crowd gathering abnormal event a2; and the spatio-temporal grid 1 is the first spatio-temporal grid containing two crowd gathering abnormal events. Similarly, the spatio-temporal grid 2 includes trajectory point 1 and trajectory point 2; the trajectory point 1 carries the identification information 0, indicating that the trajectory point 1 does not belong to the crowd gathering abnormal event, and the trajectory point 2 carries the identification information 0, indicating that the trajectory point 2 does not belong to the crowd gathering abnormal event a1; and the spatio-temporal grid 2 is the first spatio-temporal grid not containing the crowd gathering abnormal event.
[0231] It can be understood that the first user trajectory data in the first spatio-temporal region can be used to determine the trajectory points in each spatio-temporal grid of the first spatio-temporal region; the trajectory points carry identification information and user ID; the identification information is used to indicate whether the trajectory points belong to the crowd gathering abnormal event. The first spatio-temporal region is divided into the first spatio-temporal grid containing at least one crowd gathering abnormal event and the first spatio-temporal grid not containing the crowd gathering abnormal event according to the identification information carried by the trajectory points. For the first spatio-temporal grid containing at least one crowd gathering abnormal event, the crowd abnormal gathering amount of each crowd gathering abnormal event is counted according to the identification information and the user ID carried by the trajectory points, and at least one crowd abnormal gathering amount is obtained.
[0232] In an embodiment, the determination of the abnormal threshold of the first spatio-temporal grid containing at least one crowd gathering abnormal event by using the at least one crowd abnormal gathering amount and the first crowd gathering amount includes:
[0233] The at least one crowd abnormal gathering amount and the first crowd gathering amount are subtracted to obtain at least one difference value;
[0234] The at least one difference value is taken as an observation quantity; and an estimation value is obtained by estimating the observation quantity;
[0235] The estimated value is used as the anomaly threshold for the first spatiotemporal grid containing at least one abnormal crowd gathering event.
[0236] Here, the process of determining the anomaly threshold of the first spatiotemporal grid containing at least one anomalous event of crowd gathering may include:
[0237] First, assume that the first spatiotemporal region contains at least one abnormal event of crowd gathering a. i The first spatiotemporal grid uses (s,t) i The first spatiotemporal grid (s,t) represents the first spatiotemporal grid. i The trajectory points in ) are represented by the set ζ. s,t Representation. Set ζ s,t Internal timestamp falls on (t) i ,t i +T tr This belongs to an abnormal event of crowd gathering. i The number of trajectory points, used express.
[0238] Calculate according to the following formula (8). With the first spatiotemporal grid (s,t) i The first crowd gathering size E s,t The difference, also known as the observation, is as follows:
[0239]
[0240] Second, using the weighted least squares method, for cases containing at least one abnormal event of crowd gathering a... i Anomaly detection threshold TH of the first spatiotemporal grid (s,t) s,t An estimate is made. That is, the estimated value is obtained by solving the following formula (9), as follows:
[0241]
[0242] Among them, TH s,t The estimator is the anomaly threshold of the first spatiotemporal grid containing at least one anomalous event of crowd gathering; The observations are calculated using formula (8).
[0243] It should be noted that, in setting the weights, Sort by value. The weight w of the largest term i =1, The weight w of the smaller term i For the one before The weight of the larger term times.
[0244] In one embodiment, determining the anomaly threshold of the first spatiotemporal grid that does not contain anomaly events by utilizing the anomalous crowd aggregation quantity of each first spatiotemporal grid containing at least one anomalous crowd aggregation event and the first crowd aggregation quantity of a first spatiotemporal grid that does not contain anomaly events includes:
[0245] Summing up at least one abnormal population clustering amount yields the total abnormal population clustering amount of the first spatiotemporal grid containing at least one abnormal population clustering event;
[0246] By quoting the total number of abnormal crowd gatherings in each of the first spatiotemporal grids containing at least one abnormal crowd gathering event with their respective first crowd gathering amounts, multiple ratios are obtained.
[0247] The average value is obtained by averaging the multiple ratios.
[0248] Using the average value and the first crowd gathering amount of the first spatiotemporal grid that does not contain abnormal crowd gathering events, the abnormal threshold of the first spatiotemporal grid that does not contain abnormal crowd gathering events is determined.
[0249] Here, the process of determining the anomaly threshold of the first spatiotemporal grid that does not contain abnormal events of crowd gathering may include:
[0250] According to the following formula (10), the anomaly threshold of the spatiotemporal grid (s,t) where there are no abnormal crowd gathering events is set as follows:
[0251] THs,t=(r s,t -1)E s,t (10)
[0252] Where THs,t represents the anomaly threshold of the spatiotemporal grid (s,t) where no abnormal crowd gathering events occur. E s,t This represents the first population aggregation quantity in the spatiotemporal grid (s,t) where no abnormal population aggregation events occur.
[0253] r s,t The calculation process includes: first, all crowd gathering anomaly events a on the spatiotemporal grid containing at least one crowd gathering anomaly event are considered. i abnormal crowd gatherings Summing these values yields the total abnormal crowd aggregation for each spatiotemporal grid containing at least one abnormal crowd aggregation event. Then, the total abnormal crowd aggregation for each spatiotemporal grid containing at least one abnormal crowd aggregation event is summed with the first crowd aggregation value E of the corresponding spatiotemporal grid. s,t Find the quotient to obtain multiple ratios; calculate the average of these ratios to obtain r. s,t .
[0254] It should be noted that if there is no any crowd gathering abnormal event on all spatio-temporal grids, r s,t is set to 1.5.
[0255] In the embodiment of the present application, the following advantages are provided:
[0256] (1) The crowd abnormal gathering prediction is performed by considering the crowd gathering situation at different positions and different times in the whole third spatio-temporal region, and combining the user transfer situation between different regions.
[0257] (2) The next arrival region of the user is predicted by considering the transfer characteristics between different regions and the user path selection rule in different time periods, so as to more accurately predict the trajectory path of the individual, calculate the change of each region and the passenger flow according to the moving trajectory of the individual, and predict the time and location of the possible crowd gathering.
[0258] (3) The spatio-temporal movement mode of the user is identified, and the trajectory data belonging to a specific movement mode is obtained based on the signaling data.
[0259] (4) The time and location of the abnormal crowd gathering can be predicted, and the crowd distribution statistical characteristics in the normal state of the spatio-temporal region are mined, the crowd gathering abnormal threshold in different regions and time is set, and the long-term trajectory trend of the user is comprehensively mined during the prediction, the next arrival point prediction technology of the user based on the long-term trajectory trend is applied to the spatio-temporal prediction of the crowd abnormal gathering, and the accuracy of the abnormal state prediction is improved.
[0260] (5) The problems such as too much noise data in the crowd abnormal gathering prediction in the related art and difficulty in generating a reasonable abnormal gathering judgment threshold can be solved.
[0261] (6) The trend of the user trajectory is modeled by using a weighted multi-step transfer probability model, the transfer characteristics of the crowd between different regions and the user path selection rule in different situations are considered, and the future passenger flow of a region is not only predicted according to the historical passenger flow data of the region itself.
[0262] To realize the abnormal prediction method in the embodiment of the present application, an abnormal prediction device is further provided in the embodiment of the present application. Figure 4 The component structure diagram of the abnormal prediction device in the embodiment of the present application is shown in Figure 4 The device comprises:
[0263] The acquisition unit 41 is configured to acquire first user trajectory data of a first space-time region and second user trajectory data of a second space-time region; the first space-time region is a space-time region including M space-time grids, which is constructed by taking a target region as a spatial axis and a historical time range as a time axis; the second space-time region is a space-time region including M space-time grids, which is constructed by taking the target region as the spatial axis and a current time range as the time axis; the first user trajectory data is user trajectory point data acquired in the target region within the historical time range; and the second user trajectory data is user trajectory point data acquired in the target region within the current time range.
[0264] The first processing unit 42 is configured to determine first crowd gathering amounts of each space-time grid in the first space-time region by using the first user trajectory data of the first space-time region, and determine second crowd gathering amounts transferred to each space-time grid in a third space-time region by using the second user trajectory data of the second space-time region; the third space-time region is a space-time region including M space-time grids, which is constructed by taking the target region as the spatial axis and a predicted time range as the time axis.
[0265] The second processing unit 43 is configured to predict crowd gathering abnormalities of each space-time grid in the third space-time region by using the first crowd gathering amounts and the second crowd gathering amounts.
[0266] M is a positive integer greater than 1.
[0267] In an embodiment, the first processing unit 42 is specifically configured to:
[0268] determine K time points from the current time range;
[0269] determine space-time grids corresponding to the K time points from the second space-time region respectively;
[0270] determine third user trajectory data of the space-time grids corresponding to the K time points respectively by using the second user trajectory data of the second space-time region;
[0271] determine the second crowd gathering amounts transferred to each space-time grid in the third space-time region by using the third user trajectory data of the space-time grids corresponding to the K time points respectively.
[0272] In an embodiment, the first processing unit 42 is specifically configured to:
[0273] for each space-time grid corresponding to an i-th time point, determine a 1-to-K step transition probability matrix of the corresponding space-time grid to each space-time grid in the third space-time region;
[0274] determine, by using the 1 to K step transition probability matrix corresponding to the corresponding spatio-temporal grid, third user trajectory data of the corresponding spatio-temporal grid to be transferred to a target spatio-temporal grid in the third spatio-temporal region;
[0275] By analogy, until the third user trajectory data of the time grid corresponding to the K time points is determined to be transferred to the target spatio-temporal grid in the third spatio-temporal region; the total number of users transferred to the target spatio-temporal grid in the third spatio-temporal region is counted to obtain the second crowd aggregation quantity of the target spatio-temporal grid;
[0276] Wherein, i = 1, …, K; K is a positive integer greater than 1.
[0277] In an embodiment, the second processing unit 43 is specifically configured to:
[0278] Establish a corresponding relationship between each first spatio-temporal grid in the first spatio-temporal region and each second spatio-temporal grid in the third spatio-temporal region;
[0279] Obtain a difference value corresponding to each second spatio-temporal grid by subtracting the first crowd aggregation quantity of the respective corresponding first spatio-temporal grid from the second crowd aggregation quantity of each second spatio-temporal grid in the third spatio-temporal region;
[0280] Compare the difference value corresponding to each second spatio-temporal grid with the abnormal threshold value of the respective corresponding first spatio-temporal grid to obtain a comparison result;
[0281] Based on the comparison result, predict the crowd aggregation anomaly of each second spatio-temporal grid in the third spatio-temporal region.
[0282] In an embodiment, the second processing unit 43 is further configured to:
[0283] Divide the first spatio-temporal region into a first spatio-temporal grid containing at least one crowd aggregation anomaly event and a first spatio-temporal grid not containing a crowd aggregation anomaly event by using the first user trajectory data in the first spatio-temporal region;
[0284] Determine a crowd anomaly aggregation quantity of each crowd aggregation anomaly event by using the first user trajectory data of the first spatio-temporal grid containing at least one crowd aggregation anomaly event, to obtain at least one crowd anomaly aggregation quantity;
[0285] Determine an abnormal threshold value of the first spatio-temporal grid containing at least one crowd aggregation anomaly event by using the at least one crowd anomaly aggregation quantity and the first crowd aggregation quantity;
[0286] Determine the abnormal threshold of the first spatio-temporal grid not containing the crowd gathering abnormal event by using the crowd gathering abnormal amount of each first spatio-temporal grid containing at least one crowd gathering abnormal event and the first crowd gathering amount of the first spatio-temporal grid not containing the crowd gathering abnormal event.
[0287] In an embodiment, the second processing unit 43 is specifically configured to:
[0288] Obtain at least one difference value by subtracting the first crowd gathering amount from the at least one crowd gathering abnormal amount;
[0289] Take the at least one difference value as an observation quantity; and estimate the observation quantity to obtain an estimated value;
[0290] Take the estimated value as the abnormal threshold of the first spatio-temporal grid containing at least one crowd gathering abnormal event.
[0291] In an embodiment, the second processing unit 43 is specifically configured to:
[0292] Obtain a total crowd gathering abnormal amount of the first spatio-temporal grid containing at least one crowd gathering abnormal event by summing up the at least one crowd gathering abnormal amount;
[0293] Obtain a plurality of ratios by dividing the total crowd gathering abnormal amount of each first spatio-temporal grid containing at least one crowd gathering abnormal event by the first crowd gathering amount of the respective first spatio-temporal grid;
[0294] Obtain an average value by averaging the plurality of ratios;
[0295] Determine the abnormal threshold of the first spatio-temporal grid not containing the crowd gathering abnormal event by using the average value and the first crowd gathering amount of the first spatio-temporal grid not containing the crowd gathering abnormal event.
[0296] In actual application, the obtaining unit 41 can be implemented by a communication interface in the abnormal prediction device; and the first processing unit 42 and the second processing unit 43 can be implemented by a processor in the abnormal prediction device.
[0297] It should be noted that the abnormal prediction device provided in the above embodiments is only taken as an example in abnormal prediction, and in actual application, the above processing can be completed by different program modules according to needs, that is, the internal structure of the device is divided into different program modules to complete all or part of the above processing. In addition, the abnormal prediction device and the abnormal prediction method provided in the above embodiments belong to the same concept, and the specific implementation process is detailed in the method embodiments, which will not be repeated here.
[0298] The embodiment of the present application further provides a terminal, such as Figure 5as shown, comprising:
[0299] a communication interface 51, capable of information interaction with other devices;
[0300] a processor 52, connected with the communication interface 51, for running a computer program, and executing the method provided by one or more technical solutions of the terminal side. The computer program is stored in the memory 53.
[0301] It should be noted that the specific processing process of the processor 52 and the communication interface 51 will be described in the method embodiment, which will not be repeated here.
[0302] Of course, in actual application, each component in the terminal 50 is coupled together through the bus system 54. It can be understood that the bus system 54 is used to realize the connection and communication between the components. The bus system 54 includes not only the data bus, but also the power bus, the control bus and the state signal bus. However, in order to clearly illustrate, all kinds of buses are marked as the bus system 54 in the Figure 5 .
[0303] The memory 53 in the embodiment of the application is used to store various types of data to support the operation of the terminal 50. Examples of these data include: any computer program for operating on the terminal 50.
[0304] The method disclosed in the above embodiment of the application can be applied to the processor 52 or implemented by the processor 52. The processor 52 can be an integrated circuit chip with signal processing capability. In the implementation process, each step of the above method can be completed by integrated logic circuits or instructions in the form of software in the processor 52. The processor 52 mentioned above can be a general processor, a digital data processor (DSP), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The processor 52 can implement or execute the methods, steps and logic block diagrams disclosed in the embodiments of the application. The general processor can be a microprocessor or any conventional processor, etc. In combination with the steps of the method disclosed in the embodiments of the application, it can be directly embodied as a hardware decoding processor for execution, or a combination of hardware and software modules in the decoding processor for execution. The software module can be located in a storage medium, which is located in the memory 53, and the processor 52 reads the information in the memory 53, and combines the hardware to complete the steps of the above method.
[0305] In an exemplary embodiment, the terminal 50 can be implemented with one or more Application Specific Integrated Circuits (ASICs), DSPs, Programmable Logic Devices (PLDs), Complex Programmable Logic Devices (CPLDs), Field-Programmable Gate Arrays (FPGAs), general-purpose processors, controllers, microcontrollers (MCUs), microprocessors, or other electronic elements for executing the aforementioned methods.
[0306] It can be understood that the memory (the memory 53) of the embodiments of the present application can be a volatile memory or a non-volatile memory, and can also include both volatile and non-volatile memories. The non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a ferromagnetic random access memory (FRAM), a flash memory, a magnetic surface memory, an optical disc, or a compact disc read-only memory (CD-ROM). The magnetic surface memory can be a disk memory or a tape memory. The volatile memory can be a random access memory (RAM) used as an external cache. By way of example but not limitation, many forms of RAM can be used, such as static random access memory (SRAM), synchronous static random access memory (SSRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), sync link dynamic random access memory (SLDRAM), and direct rambus random access memory (DRRAM).The memory described in the embodiments of the present application is intended to include, but not limited to, these and any other suitable types of memory.
[0307] In the example embodiments, the embodiments of the present application also provide a storage medium, i.e. a computer storage medium, specifically a computer readable storage medium, such as a memory storing a computer program executable by the processor 52 of the terminal 50 to complete the steps of the aforementioned terminal-side method. The computer readable storage medium can be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, Flash Memory, magnetic surface memory, optical disc, or CD-ROM.
[0308] It should be noted that "first", "second", and the like are used to distinguish similar objects, and do not necessarily have to describe a specific order or sequence.
[0309] In addition, the technical solutions described in the embodiments of the present application can be arbitrarily combined without conflict.
[0310] The above description is only a preferred embodiment of the present application, and is not intended to limit the protection scope of the present application.
Claims
1. An anomaly prediction method characterized by, The method applied to a terminal comprises: obtaining first user trajectory data of a first space-time region and second user trajectory data of a second space-time region; the first space-time region is a space-time region comprising M space-time grids constructed with a target region as a spatial axis and a historical time range as a time axis; the second space-time region is a space-time region comprising M space-time grids constructed with the target region as a spatial axis and a current time range as a time axis; the first user trajectory data is user trajectory point data obtained in the target region within the historical time range; the second user trajectory data is user trajectory point data obtained in the target region within the current time range; determining a first crowd gathering amount of each space-time grid in the first space-time region by using the first user trajectory data of the first space-time region, and determining a second crowd gathering amount transferred to each space-time grid in a third space-time region by using the second user trajectory data of the second space-time region; the third space-time region is a space-time region comprising M space-time grids constructed with the target region as a spatial axis and a prediction time range as a time axis; predicting crowd gathering abnormalities of each space-time grid in the third space-time region by using the first crowd gathering amount and the second crowd gathering amount; wherein M is a positive integer greater than 1.
2. The method of claim 1, wherein, The method further comprises: determining K time points within the current time range; determining space-time grids corresponding to the K time points respectively in the second space-time region; determining third user trajectory data of the space-time grids corresponding to the K time points respectively in the second space-time region by using the second user trajectory data of the second space-time region; determining the second crowd gathering amount transferred to each space-time grid in the third space-time region by using the third user trajectory data of the space-time grids corresponding to the K time points respectively.
3. The method of claim 2, wherein, The method further comprises: for each space-time grid corresponding to an i-th time point, determining a 1-to-K-step transition probability matrix of the corresponding space-time grid to each space-time grid in the third space-time region; determining third user trajectory data of the corresponding space-time grid transferred to a target space-time grid in the third space-time region by using the 1-to-K-step transition probability matrix corresponding to the corresponding space-time grid; by analogy, until third user trajectory data of the time grids corresponding to the K time points respectively is determined to be transferred to a target space-time grid in the third space-time region; and a total number of users transferred to the target space-time grid in the third space-time region is counted to obtain the second crowd gathering amount of the target space-time grid; wherein i=1,…,K; and K is a positive integer greater than 1.
4. The method of claim 1, wherein, The method further comprises: corresponding relationship between each first spatio-temporal grid in the first spatio-temporal region and each second spatio-temporal grid in the third spatio-temporal region is established; a difference between the second crowd gathering amount of each second spatio-temporal grid in the third spatio-temporal region and the first crowd gathering amount of the corresponding first spatio-temporal grid is obtained as a difference value corresponding to each second spatio-temporal grid; a comparison between the difference value corresponding to each second spatio-temporal grid and the abnormal threshold value of the corresponding first spatio-temporal grid is performed to obtain a comparison result; based on the comparison result, crowd gathering abnormality of each second spatio-temporal grid in the third spatio-temporal region is predicted.
5. The method of claim 4, wherein, The method further comprises: the first spatio-temporal region is divided into a first spatio-temporal grid containing at least one crowd gathering abnormal event and a first spatio-temporal grid not containing a crowd gathering abnormal event by using the first user trajectory data in the first spatio-temporal region; a crowd abnormal gathering amount of each crowd gathering abnormal event is determined by using the first user trajectory data of the first spatio-temporal grid containing at least one crowd gathering abnormal event, and at least one crowd abnormal gathering amount is obtained; an abnormal threshold value of the first spatio-temporal grid containing at least one crowd gathering abnormal event is determined by using the at least one crowd abnormal gathering amount and the first crowd gathering amount; an abnormal threshold value of the first spatio-temporal grid not containing a crowd gathering abnormal event is determined by using the crowd abnormal gathering amount of each first spatio-temporal grid containing at least one crowd gathering abnormal event and the first crowd gathering amount of the first spatio-temporal grid not containing a crowd gathering abnormal event.
6. The method of claim 5, wherein, The method further comprises: a difference between the at least one crowd abnormal gathering amount and the first crowd gathering amount is obtained as at least one difference value; the at least one difference value is taken as an observation quantity; and an estimated value is obtained by estimating the observation quantity; the estimated value is taken as the abnormal threshold value of the first spatio-temporal grid containing at least one crowd gathering abnormal event.
7. The method of claim 5, wherein, The method further comprises: a sum of the at least one crowd abnormal gathering amount is obtained as a total crowd abnormal gathering amount of the first spatio-temporal grid containing at least one crowd gathering abnormal event; a quotient between the total crowd abnormal gathering amount of each first spatio-temporal grid containing at least one crowd gathering abnormal event and the first crowd gathering amount of the corresponding first spatio-temporal grid is obtained as a plurality of ratios; an average value is obtained by averaging the plurality of ratios; the average value and the first crowd gathering amount of the first spatio-temporal grid not containing a crowd gathering abnormal event are used to determine the abnormal threshold value of the first spatio-temporal grid not containing a crowd gathering abnormal event.
8. An anomaly prediction apparatus characterized by comprising: The method further comprises: an acquisition unit is configured to acquire first user trajectory data of a first spatio-temporal region and second user trajectory data of a second spatio-temporal region; The first spatio-temporal region is a spatio-temporal region containing M spatio-temporal grids constructed with a target region as a spatial axis and a historical time range as a time axis; the second spatio-temporal region is a spatio-temporal region containing M spatio-temporal grids constructed with the target region as a spatial axis and a current time range as a time axis; the first user trajectory data is user trajectory point data acquired in the target region in the historical time range; and the second user trajectory data is user trajectory point data acquired in the target region in the current time range; The first processing unit is configured to determine a first crowd gathering amount of each spatio-temporal grid in the first spatio-temporal region by using the first user trajectory data of the first spatio-temporal region, and determine a second crowd gathering amount of each spatio-temporal grid transferred to a third spatio-temporal region by using the second user trajectory data of the second spatio-temporal region; the third spatio-temporal region is a spatio-temporal region containing M spatio-temporal grids constructed with the target region as a spatial axis and a predicted time range as a time axis; The second processing unit is configured to predict crowd gathering abnormalities of each spatio-temporal grid in the third spatio-temporal region by using the first crowd gathering amount and the second crowd gathering amount. M is a positive integer greater than 1.
9. A terminal, characterized by comprising: The computer program is executed by the processor to implement the steps of the method of any one of claims 1 to 7. The computer program is executed by the processor to implement the steps of the method of any one of claims 1 to 7.
10. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method of any one of claims 1 to 7.
Citation Information
Patent Citations
Crowd gathering prediction method based on time sequence model
CN107798409A
A prediction method based on a moving Markov model for spatiotemporal big data
CN107977734B
A method and system for early detection of aggregation behavior and prediction of aggregation locations of special groups
CN109697438B
Short-term prediction method for number of gathered people at urban rail transit platform
CN110503237A
Method and apparatus for constructing a crowd density prediction model based on urban spatial structure
CN111008730B