Regional anomaly detection method and related equipment
By acquiring urban POI information for density clustering and anomaly analysis, and combining it with the LSTM+GAN model, the problem of difficulty in acquiring urban anomaly detection data and changes in regional division was solved, achieving efficient and accurate urban anomaly detection.
Patent Information
- Application Number
- CN202410990232.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-23
- Publication Date
- 2024-11-15
AI Technical Summary
Traditional urban anomaly detection methods are ill-suited to the difficulty of accurately and comprehensively acquiring urban data, and their applicability is limited due to changes in urban area delineation.
By acquiring POI information of the target city, maximum density clustering is performed to obtain POI clusters. Then, an anomaly analysis model of POI clusters combined with the LSTM+GAN model is used to detect anomalies based on current and historical pedestrian flow and communication data.
It enables efficient and accurate anomaly detection in urban areas, allowing for timely detection of hotspots and potential anomalies, thereby improving urban management efficiency and security.
Smart Images

Figure CN118965220A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of remote sensing monitoring, and more specifically, the present invention relates to a regional anomaly detection method and related equipment. Background Art
[0002] Urban area anomalies usually refer to unusual events that occur in a certain area of a city, such as traffic jams and unexpected crowds. If not handled in a timely manner, they will pose a huge threat to public safety and stability. For city managers, if urban area anomalies can be reported in a timely manner at an early stage, measures can be taken in time to prevent accidents. Therefore, urban area anomaly detection is extremely valuable.
[0003] Traditional regional anomaly detection methods often mine the spatiotemporal information of a fixed area, so the trained anomaly recognition model has a small scope of application. At the same time, due to the randomness and suddenness of abnormal events, how to design a widely applicable and accurate urban area anomaly mining method is a problem.
[0004] At present, the methods of urban area anomaly detection can be mainly divided into the following three categories: abnormal area detection method based on tensor factor decomposition algorithm, regional anomaly detection method based on traffic flow feature statistics, and abnormal area detection method based on spatiotemporal feature mining. Urban data usually contains information of multiple dimensions, such as time and location information, and these multidimensional features can be represented by tensors. Therefore, the tensor factor decomposition algorithm is one of the main methods for urban area anomaly detection. Based on the method of traffic flow feature statistics; this method mainly detects anomalies by judging the relationship between multiple traffic flow features in the region and the corresponding thresholds. In addition, the analysis method of mining the spatiotemporal features of urban data is the mainstream method for abnormal area detection; this method mainly extracts information from urban data to construct or learn spatiotemporal features, and compares them with the traffic flow information in the current area to detect anomalies in the current area.
[0005] The premise for the successful implementation of the above three abnormal area detection methods is to collect urban data information of the entire urban sub-area in multiple time periods. However, it is difficult to collect urban data features of the entire area, whether it is based on detectors or trajectory statistics. Due to cost reasons, detectors cannot cover the entire urban area, making it difficult to obtain regional traffic flow information; and it is difficult to accurately collect traffic flow features based on trajectory statistics. Secondly, the division of urban areas sometimes changes dynamically, which is even more challenging for methods based on spatiotemporal feature mining. Summary of the invention
[0006] A series of simplified concepts are introduced in the Summary of the Invention, which will be further described in detail in the Detailed Description of the Invention. The Summary of the Invention does not mean to attempt to define the key features and essential technical features of the claimed technical solution, nor does it mean to attempt to determine the scope of protection of the claimed technical solution.
[0007] In order to solve the problem that it is difficult to obtain accurate and comprehensive urban data, the probability of anomalies in urban area data is small, and the urban area division will also change, which makes the traditional urban area feature mining solution difficult to effectively apply, in a first aspect, the present invention proposes a regional anomaly detection method, the above method includes:
[0008] Get the POI information of the target city;
[0009] Applying maximum density clustering to the POI information to obtain multiple POI clusters;
[0010] Based on the current crowd flow data and current communication data of each POI cluster in the target city, the abnormal situation of the POI cluster is determined through a POI cluster abnormality analysis model to perform abnormality detection on various areas of the target city.
[0011] Optionally, the performing maximum density clustering on the POI information to obtain a plurality of POI clusters includes:
[0012] The maximum density clustering is applied to the POI information, and the point with the largest density is selected as the POI cluster center to obtain multiple POI clusters.
[0013] Optionally, the POI cluster anomaly analysis model is obtained by training the historical passenger flow data and historical communication data of the area to which each POI cluster belongs based on the LSTM+GAN model.
[0014] Optionally, determining the abnormality of the POI cluster through a POI cluster abnormality analysis model based on the current crowd flow data and current communication data of each POI cluster in the target city to perform abnormality detection on various areas of the target city includes:
[0015] Based on the current crowd flow data, current communication data, historical crowd flow data and historical communication data of each POI cluster in the target city, the abnormal situation of the POI cluster is determined through a POI cluster abnormality analysis model to perform abnormality detection on various areas of the target city.
[0016] Optionally, determining the abnormality of the POI cluster through a POI cluster abnormality analysis model based on the current crowd flow data, current communication data, historical crowd flow data and historical communication data of each POI cluster in the target city to perform abnormality detection on various areas of the target city includes:
[0017] Inputting historical crowd flow data and historical communication data in the same period as the current crowd flow data and current communication data of each POI cluster in the target city into a generator of a POI cluster anomaly analysis model to generate current theoretical predicted crowd flow data and theoretical predicted communication data for each POI cluster in the target city;
[0018] The current theoretical predicted pedestrian flow data and theoretical predicted communication data of each POI cluster in the target city are compared and analyzed with the current pedestrian flow data and current communication data to perform anomaly detection on various areas of the target city.
[0019] Optionally, determining the abnormality of the POI cluster through a POI cluster abnormality analysis model based on the current crowd flow data, current communication data, historical crowd flow data and historical communication data of each POI cluster in the target city to perform abnormality detection on various areas of the target city includes:
[0020] Inputting historical pedestrian flow data and historical communication data in the same period as the current pedestrian flow data and current communication data of each POI cluster of the target city into a discriminator of the POI cluster anomaly analysis model to generate a normal score;
[0021] The normal score is compared with a comparison threshold N to perform anomaly detection on each area of the target city.
[0022] Optionally, determining the abnormality of the POI cluster through a POI cluster abnormality analysis model based on the current crowd flow data and current communication data of each POI cluster in the target city to perform abnormality detection on various areas of the target city includes:
[0023] Perform abnormal statistics on the POI clusters under each area in the target city;
[0024] The abnormal situation of the target area is determined based on the abnormal proportion of POI clusters under each area in the target city in the target area.
[0025] In a second aspect, the present invention further provides a regional anomaly detection device, comprising:
[0026] An acquisition unit, used to acquire POI information of a target city;
[0027] A processing unit, configured to perform maximum density clustering on the POI information to obtain a plurality of POI clusters;
[0028] The analysis and judgment unit is used to determine the abnormal situation of the POI cluster based on the current human flow data and current communication data of each POI cluster in the target city through the POI cluster abnormal analysis model, so as to perform abnormality detection on various areas of the target city.
[0029] In a third aspect, an electronic device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor is configured to implement the steps of any one of the method for detecting anomalies in the first aspect when executing the computer program stored in the memory.
[0030] In a fourth aspect, the present invention further proposes a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the method for detecting an abnormality in a region according to any one of the above items in the first aspect is implemented.
[0031] In summary, the regional anomaly detection method proposed in the present application obtains POI information of the target city; performs maximum density clustering on the POI information to obtain multiple POI clusters; determines the abnormality of the POI cluster based on the current flow data and current communication data of each POI cluster in the target city through the POI cluster anomaly analysis model, so as to perform anomaly detection on various areas of the target city. As a result, the POI data is rich and easy to obtain, and the source is wide. POI data is constantly updated with the development and changes of the city, which can reflect the dynamic changes of the urban area. Using the latest POI data for anomaly detection can timely capture new hot spots and potential anomalies in the city. Through density clustering, POIs in the city can be grouped to form multiple high-density cluster areas. These clusters can effectively represent the hot spots of human flow in the city, which helps to reduce the amount of data and improve processing efficiency. Through the high-density POI clusters after clustering, the hot spots in the city can be accurately located, and the impact of noise data on the detection results can be reduced. The combination of different data sources can provide a more comprehensive regional status and enhance the robustness of the detection model. It can monitor the flow of people and communication in various areas of the city in real time, detect anomalies in time, help city managers take effective measures to deal with emergencies, and improve the efficiency and safety of urban management. This method combines clustering and anomaly detection to effectively deal with challenges such as large amounts of data and the diversity of abnormal events in the city, and provides an efficient and accurate urban area anomaly detection solution.
[0032] The regional anomaly detection method of the present invention, other advantages, objectives and features of the present invention will be reflected in part through the following description, and in part will be understood by technicians in this field through research and practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present specification. Also, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:
[0034] Figure 1 A flowchart of a method for detecting anomalies in a region provided in an embodiment of the present application;
[0035] Figure 2 A flowchart of another method for detecting anomalies in a region provided in an embodiment of the present application;
[0036] Figure 3 A schematic diagram of the structure of a regional anomaly detection device provided in an embodiment of the present application;
[0037] Figure 4 A schematic diagram of the structure of an electronic device for detecting regional anomalies provided in an embodiment of the present application. DETAILED DESCRIPTION
[0038] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices. The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments.
[0039] In order to solve the problem that the current regional detection method is successfully implemented, it is necessary to collect urban data information of the entire urban sub-region in multiple time periods. However, the urban data characteristics of the entire region are difficult to collect. Whether it is based on detectors or trajectory statistics, it is not easy to achieve. Please refer to Figure 1 , is a flow chart of a method for detecting anomalies in a region provided in an embodiment of the present application, which may specifically include: steps S110 to S130.
[0040] S110, obtaining POI information of the target city.
[0041] Exemplarily, all POI (Point of Interest) information in all cities can be obtained from the network platform, including 8 core fields: POI name (name), category (type), address (address), longitude and latitude (location), name of the province where the POI is located (pname), name of the city where the POI is located (cityname), name of the area where the POI is located (adname), and code of the area where the POI is located (adcode). You can select the POI name and longitude and latitude from them to form a set denoted as P. POI information usually comes from multiple sources, such as government public data, commercial data providers, user-contributed data, etc. The collected data is processed and standardized and stored in a geographic information system for use in various applications. In the fields of urban planning, navigation, map services, etc., points of interest refer to places with specific functions or services, such as restaurants, shops, hospitals, subway stations, etc. The above-mentioned network platform can be Map POI (Point of Interest) data-Official data of the contest (pku.edu.cn), which is not limited here.
[0042] S120: Perform maximum density clustering on the POI information to obtain a plurality of POI clusters.
[0043] For example, by clustering POIs, a large number of discrete points of interest can be integrated into several high-density clusters, reducing the complexity and computational complexity of data processing.
[0044] S130, determining abnormal conditions of POI clusters through a POI cluster abnormality analysis model based on current crowd flow data and current communication data of each POI cluster in the target city, so as to perform abnormality detection on various areas of the target city.
[0045] For example, by analyzing the flow of people and traffic data in the current time period, abnormal situations in the city (such as sudden crowd gathering, traffic congestion, etc.) can be discovered in a timely manner. This method has high accuracy and adaptability, can monitor the dynamic changes of the city in real time, and improve the efficiency of public safety management.
[0046] Suppose that the downtown area of a city contains multiple shopping malls, restaurants, and subway stations. By obtaining the POI data of the area and performing maximum density clustering, these POIs can be aggregated into several high-density clusters. For example, obtain the POI data of the downtown area, including name, type, longitude and latitude. These POIs are density clustered to form several clusters, each of which represents a high-density area. Then, the current flow of people and traffic volume data of each cluster area are collected. These data are input into the anomaly analysis model for anomaly detection. Suppose that during a certain period of time, the flow of people and traffic volume in a shopping mall area increases abnormally. Through model analysis, it is found that the anomaly score of the area is higher than the threshold and is judged as abnormal. City managers can take timely measures to divert the crowd and avoid potential safety hazards. Using POI information for anomaly detection can quickly and accurately identify abnormal events in the city, provide real-time warning and response measures, and improve the efficiency of urban management and the level of public safety.
[0047] In summary, the regional anomaly detection method provided by the embodiment of the present application obtains the POI information of the target city; performs maximum density clustering on the POI information to obtain multiple POI clusters; determines the abnormal situation of the POI cluster based on the current flow of people data and current communication data of each POI cluster of the target city through the POI cluster anomaly analysis model, so as to perform anomaly detection on each area of the target city. As a result, the POI data is rich and easy to obtain, and the source is wide. POI data is constantly updated with the development and changes of the city, which can reflect the dynamic changes of the urban area. Using the latest POI data for anomaly detection can timely capture new hot spots and potential anomalies in the city. Through density clustering, POIs in the city can be grouped to form multiple high-density cluster areas. These clusters can effectively represent the hot spots of people flow in the city, which helps to reduce the amount of data and improve processing efficiency. Through the high-density POI clusters after clustering, the hot spots in the city can be accurately located, and the impact of noise data on the detection results can be reduced. The combination of different data sources can provide a more comprehensive regional status and enhance the robustness of the detection model. It can monitor the flow of people and communication in various areas of the city in real time, detect anomalies in time, help city managers take effective measures to deal with emergencies, and improve the efficiency and safety of urban management. This method combines clustering and anomaly detection to effectively deal with challenges such as large amounts of data and the diversity of abnormal events in the city, and provides an efficient and accurate urban area anomaly detection solution.
[0048] According to some embodiments, applying maximum density clustering to the POI information to obtain a plurality of POI clusters includes:
[0049] The maximum density clustering is applied to the POI information, and the point with the largest density is selected as the POI cluster center to obtain multiple POI clusters.
[0050] For example, MDCA clustering operation is performed on all elements in set P to obtain several clusters, and the set of these clusters is recorded as Clusters, where the center of each cluster is represented as the point with the highest density in the cluster. The density is defined as the reciprocal of the sum of the K nearest neighbor distances. For Maximum Density Clustering Aplication (MDCA) clustering, the following are its specific steps:
[0051] S121, obtain the maximum density point, denoted as x: For all points in the set P, the density is represented by the inverse of the sum of the K nearest neighbor distances.
[0052]
[0053] S122, Density Curve: Reorder the dataset according to the Euclidean distance of all objects from x.
[0054] S ρmax =x1,x2,…,x n ∣d(x,x1)≤d(x,x2)≤…≤d(x,x n )
[0055] S123, classify the data before the first valley value in the density curve into one category and eliminate it.
[0056] S124, repeat steps S121, S122, S123 until all points are below the threshold ρ0.
[0057] S125, for any two clusters C i and C j , using the nearest sample distance as the inter-cluster distance.
[0058] S126, judging whether merging is required according to the inter-cluster distance threshold d0.
[0059] It can be understood that by grouping POIs through density clustering, the amount of data can be reduced, and by selecting the point with the highest density as the cluster center, the characteristics of each cluster can be effectively represented.
[0060] According to some embodiments, the POI cluster anomaly analysis model is obtained by training the historical passenger flow data and historical communication data of the area to which each POI cluster belongs based on the LSTM+GAN model.
[0061] For example, the specific steps for training the LSTM+GAN model are as follows:
[0062] S131, data normalization, using Min-Max normalization.
[0063] S132, in the Generator, input is respectively 24-hour pedestrian flow data, 24-hour communication volume data, 7-day pedestrian flow data and 7-day communication volume data for the same time period, and output is the predicted value of pedestrian flow and communication volume for the current time period.
[0064] S133, concatenate the output of the generator with the input as the input of the Discriminator, output the anomaly score, and label it as 1. Compare the output of the generator with the true value, calculate the loss of the generator (LossG), and the output of the discriminator calculates the loss of the discriminator (LossD), and update the generator with Loss = (LossD + LossG) / 2.
[0065] S134, use the real data as the input of the discriminator, label it as 1, and obtain the loss (Loss1); remove the data of the last time period in the data as the input of the generator, concatenate the output and input as the input of the discriminator, label it as 0, and obtain the loss (Loss2). Update the discriminator with Loss = (Loss1 + Loss2) / 2.
[0066] S135 repeats the above steps until both the generator and the discriminator reach convergence.
[0067] It should be noted that in urban anomaly detection, the frequency of anomalies is usually low, and these data usually do not have pre-labeled labels. Traditional supervised learning methods rely on a large amount of labeled data for training, which is a great challenge in practical applications. GAN is an unsupervised learning method consisting of a generator and a discriminator. The generator tries to generate realistic data, and the discriminator tries to distinguish the generated data from the real data. Through this adversarial training, the generator gradually generates more and more realistic data, and the discriminator gradually improves its ability to distinguish between real and fake data. GAN is trained in an unsupervised learning manner and does not require pre-labeled labeled data, overcoming the dependence of traditional supervised learning methods on labeled data. In the case where the data is unlabeled or difficult to obtain labels, effective model training and anomaly detection can still be performed. The adversarial training of the generator and the discriminator enables the model to capture subtle differences in the data and improve the accuracy and sensitivity of anomaly detection. The GAN model can dynamically adapt to changes in data, dynamic changes in the urban environment, and new anomaly patterns. There is no need to frequently update labeled data, and the model can automatically adjust and optimize by providing new normal data. The model can generate diverse data samples and enhance the ability to detect unknown abnormal situations.
[0068] It should be noted that in unsupervised anomaly detection, LSTM can be used in conjunction with a generative adversarial network (GAN). Use an LSTM network as part of the generator to generate predicted sequence data. The generator generates sequences that are consistent with normal data patterns. The discriminator evaluates the difference between the generated data and the real data and outputs anomaly scores. Through adversarial training of GAN, the generator continuously improves the quality of the generated data, and the discriminator continuously improves its ability to distinguish. Combining the advantages of LSTM and GAN, it is possible to use long-term dependencies in time series for anomaly detection in the absence of labeled data, thereby improving the detection accuracy and adaptability of the model. This method is particularly effective in anomaly detection in urban areas, and can monitor pedestrian and communication volume data in real time, detect and respond to anomalies in a timely manner, and improve the efficiency and safety of urban management.
[0069] According to some embodiments, the determining the abnormality of the POI cluster through a POI cluster abnormality analysis model based on the current crowd flow data and the current communication data of each POI cluster of the target city to perform abnormality detection on various areas of the target city includes:
[0070] Based on the current crowd flow data, current communication data, historical crowd flow data and historical communication data of each POI cluster in the target city, the abnormal situation of the POI cluster is determined through a POI cluster abnormality analysis model to perform abnormality detection on various areas of the target city.
[0071] According to some embodiments, the determining the abnormality of the POI cluster through a POI cluster abnormality analysis model based on the current crowd flow data, current communication data, historical crowd flow data and historical communication data of each POI cluster of the target city to perform abnormality detection on various areas of the target city includes:
[0072] Inputting historical crowd flow data and historical communication data in the same period as the current crowd flow data and current communication data of each POI cluster in the target city into a generator of a POI cluster anomaly analysis model to generate current theoretical predicted crowd flow data and theoretical predicted communication data for each POI cluster in the target city;
[0073] The current theoretical predicted pedestrian flow data and theoretical predicted communication data of each POI cluster in the target city are compared and analyzed with the current pedestrian flow data and current communication data to perform anomaly detection on various areas of the target city.
[0074] According to some embodiments, the determining the abnormality of the POI cluster through a POI cluster abnormality analysis model based on the current crowd flow data, current communication data, historical crowd flow data and historical communication data of each POI cluster of the target city to perform abnormality detection on various areas of the target city includes:
[0075] Inputting historical pedestrian flow data and historical communication data in the same period as the current pedestrian flow data and current communication data of each POI cluster of the target city into a discriminator of the POI cluster anomaly analysis model to generate a normal score;
[0076] The normal score is compared with a comparison threshold N to perform anomaly detection on each area of the target city.
[0077] For example, the flow of people and communication volume in each cluster area in the current time period is counted and used together with historical data as input, and the output is used to determine the abnormal situation of each cluster area. There are two methods for this step:
[0078] The first method is to input historical data into the Generator, output the predicted value for the current time period, compare the predicted value with the data for the current time period, and calculate the anomaly score. The calculation method is Determine whether the anomaly score of each cluster area is greater than the threshold M. If it is greater than M, it is judged as abnormal.
[0079] The second method is to input historical data into the Discriminator and output the normal score of each cluster area in the current time period. If the normal score is less than the threshold N, it is judged as abnormal. This method uses the discriminator's discriminative ability to effectively detect abnormal areas by comparing normal and abnormal data patterns.
[0080] It can be understood that the Discriminator is a part of the Generative Adversarial Network (GAN) and is used to evaluate the authenticity of the data. In this method, the Discriminator outputs a score based on the input data (including historical data and current time period data) to indicate the "normality" of the data. The higher the score, the more normal the data; the lower the score, the more abnormal the data. The collected historical traffic and communication volume data are input into the Discriminator. The Discriminator outputs a score based on the input data to indicate the normality of each cluster area in the current time period. According to the output score of the Discriminator, if the score is lower than a preset threshold N, it means that there may be an abnormality in the cluster area. Compared with the first method of directly calculating the error, this method can more directly use the learning results of the Discriminator for abnormality judgment, which may have higher accuracy and robustness.
[0081] According to some embodiments, the determining the abnormality of the POI cluster through a POI cluster abnormality analysis model based on the current crowd flow data and the current communication data of each POI cluster of the target city to perform abnormality detection on various areas of the target city includes:
[0082] Perform abnormal statistics on the POI clusters under each area in the target city;
[0083] The abnormal situation of the target area is determined based on the abnormal proportion of POI clusters under each area in the target city in the target area.
[0084] For example, the abnormality of cluster regions in each region can be counted, and if the center of a cluster is in a certain region, the cluster belongs to the region. For example, when 60% of the cluster regions in a region are determined to be abnormal, the region is an abnormal region.
[0085] See also Figure 3 , an embodiment of the regional anomaly detection device in the embodiment of the present application may include:
[0086] An acquisition unit 21 is used to acquire POI information of a target city;
[0087] A processing unit 22 is used to perform maximum density clustering on the POI information to obtain multiple POI clusters;
[0088] The analysis and judgment unit 23 is used to determine the abnormal situation of the POI cluster based on the current human flow data and current communication data of each POI cluster in the target city through the POI cluster abnormal analysis model, so as to perform abnormality detection on each area of the target city.
[0089] In summary, the regional anomaly detection device provided by the embodiment of the present application obtains POI information of the target city; performs maximum density clustering on the POI information to obtain multiple POI clusters; determines the abnormal situation of the POI cluster based on the current flow of people data and current communication data of each POI cluster of the target city through the POI cluster anomaly analysis model, so as to perform anomaly detection on each area of the target city. As a result, the POI data is rich and easy to obtain, and the source is wide. POI data is constantly updated with the development and changes of the city, which can reflect the dynamic changes of the urban area. Using the latest POI data for anomaly detection can timely capture new hot spots and potential anomalies in the city. Through density clustering, POIs in the city can be grouped to form multiple high-density cluster areas. These clusters can effectively represent the hot spots of people flow in the city, which helps to reduce the amount of data and improve processing efficiency. Through the high-density POI clusters after clustering, the hot spots in the city can be accurately located, and the impact of noise data on the detection results can be reduced. The combination of different data sources can provide a more comprehensive regional status and enhance the robustness of the detection model. It can monitor the flow of people and communication in various areas of the city in real time, detect anomalies in time, help city managers take effective measures to deal with emergencies, and improve the efficiency and safety of urban management. This method combines clustering and anomaly detection to effectively deal with challenges such as large amounts of data and the diversity of abnormal events in the city, and provides an efficient and accurate urban area anomaly detection solution.
[0090] It is understandable that in regional anomaly detection, in addition to using human traffic data, we can also deeply analyze the content of communication data, especially the proportion of video data. Based on this idea, we can preliminarily determine whether an abnormal event has occurred in the area, and further analyze the specific video data and user behavior similarity when necessary, thereby improving the accuracy of regional anomaly monitoring.
[0091] Exemplarily, communication data is obtained from each POI cluster, including various media data such as pictures, text, audio and video. The proportion of video data in all communication data in each POI cluster is calculated. By analyzing this proportion, it can be preliminarily determined whether there is an abnormal situation in the area. Under normal circumstances, users tend to use pictures to record daily events, and only when abnormal events occur will there be a higher proportion of video records and social media sharing. A threshold for the proportion of video data is set. When the proportion of video data in a certain POI cluster is higher than this threshold, the specific video data is further analyzed. The video data above the threshold is further analyzed, including: Content analysis: using video content analysis technology (such as object detection, behavior recognition, etc.) to determine whether there is an abnormal situation in the video. Similarity analysis: analyzing the similarity of video content uploaded by different users to determine whether there are the same or similar abnormal events, so as to determine the level of abnormal events by the user's attention to abnormal events. Social media analysis: analyzing the spread of videos on social media to evaluate the influence and urgency of the event. By analyzing the proportion of video data in communication data, changes in user behavior when abnormal events occur can be effectively captured. Video recordings are usually more frequent in unconventional events. This feature can improve the accuracy of abnormal event detection. When initially judging abnormal events, the area where abnormalities may exist can be screened out by the proportion of video data to improve the accuracy of detection. Further analysis of specific video data can more accurately determine the type and severity of abnormal events. Only when the proportion of video data is higher than the threshold, in-depth analysis of specific video data can be performed to reduce unnecessary computing resource consumption. Concentrate resources to analyze areas where abnormal situations are more likely to exist to improve efficiency. By analyzing communication data in real time, abnormal events can be discovered and responded to in a timely manner. By using video content and user behavior similarity analysis, more comprehensive and timely regional abnormal monitoring can be provided. For example, suppose that abnormal event monitoring is carried out in a scenic spot area in a tourist city. Obtain communication data from the POI cluster in the scenic spot area, including pictures taken by tourists, text comments, audio recordings, and video uploads. Count the proportion of video data in all communication data. Assume that the proportion of video data in normal circumstances is 5%, and set a threshold of 10%. If the proportion of video data in a scenic spot area reaches 15% within a certain period of time, it indicates that an abnormal event may exist. Conduct content analysis on these video data to detect abnormal behaviors (such as large crowds, emergencies, etc.). Analyze the similarity of video content uploaded by different users to determine whether they are the same event. Analyze the spread of videos on social media to assess the urgency of the incident. In this way, abnormal events in scenic spots can be monitored in real time. When the proportion of video data increases abnormally, the system can automatically warn and further analyze the specific video content to help scenic spot managers detect and respond to abnormal situations in a timely manner, ensuring the safety of tourists and the order of scenic spots.This method combined with communication data content analysis can significantly improve the accuracy and efficiency of regional anomaly detection, providing strong support for urban management and public safety.
[0092] like Figure 4 As shown, the embodiment of the present application further provides an electronic device 300, including a memory 310, a processor 320, and a computer program 311 stored in the memory 320 and executable on the processor. When the processor 320 executes the computer program 311, the steps of any one of the above-mentioned methods for detecting regional anomalies are implemented:
[0093] Get the POI information of the target city;
[0094] Applying maximum density clustering to the POI information to obtain multiple POI clusters;
[0095] Based on the current crowd flow data and current communication data of each POI cluster in the target city, the abnormal situation of the POI cluster is determined through a POI cluster abnormality analysis model to perform abnormality detection on various areas of the target city.
[0096] Optionally, the performing maximum density clustering on the POI information to obtain a plurality of POI clusters includes:
[0097] The maximum density clustering is applied to the POI information, and the point with the largest density is selected as the POI cluster center to obtain multiple POI clusters.
[0098] Optionally, the POI cluster anomaly analysis model is obtained by training the historical passenger flow data and historical communication data of the area to which each POI cluster belongs based on the LSTM+GAN model.
[0099] Optionally, determining the abnormality of the POI cluster through a POI cluster abnormality analysis model based on the current crowd flow data and current communication data of each POI cluster in the target city to perform abnormality detection on various areas of the target city includes:
[0100] Based on the current crowd flow data, current communication data, historical crowd flow data and historical communication data of each POI cluster in the target city, the abnormal situation of the POI cluster is determined through a POI cluster abnormality analysis model to perform abnormality detection on various areas of the target city.
[0101] Optionally, determining the abnormality of the POI cluster through a POI cluster abnormality analysis model based on the current crowd flow data, current communication data, historical crowd flow data and historical communication data of each POI cluster in the target city to perform abnormality detection on various areas of the target city includes:
[0102] Inputting historical crowd flow data and historical communication data in the same period as the current crowd flow data and current communication data of each POI cluster in the target city into a generator of a POI cluster anomaly analysis model to generate current theoretical predicted crowd flow data and theoretical predicted communication data for each POI cluster in the target city;
[0103] The current theoretical predicted pedestrian flow data and theoretical predicted communication data of each POI cluster in the target city are compared and analyzed with the current pedestrian flow data and current communication data to perform anomaly detection on various areas of the target city.
[0104] Optionally, determining the abnormality of the POI cluster through a POI cluster abnormality analysis model based on the current crowd flow data, current communication data, historical crowd flow data and historical communication data of each POI cluster in the target city to perform abnormality detection on various areas of the target city includes:
[0105] Inputting historical pedestrian flow data and historical communication data in the same period as the current pedestrian flow data and current communication data of each POI cluster of the target city into a discriminator of the POI cluster anomaly analysis model to generate a normal score;
[0106] The normal score is compared with a comparison threshold N to perform anomaly detection on each area of the target city.
[0107] Optionally, determining the abnormality of the POI cluster through a POI cluster abnormality analysis model based on the current crowd flow data and current communication data of each POI cluster in the target city to perform abnormality detection on various areas of the target city includes:
[0108] Perform abnormal statistics on the POI clusters under each area in the target city;
[0109] The abnormal situation of the target area is determined based on the abnormal proportion of POI clusters under each area in the target city in the target area.
[0110] Since the electronic device introduced in this embodiment is a device used to implement a regional abnormality detection device in the embodiment of the present application, based on the method introduced in the embodiment of the present application, technical personnel in this field can understand the specific implementation method of the electronic device of this embodiment and its various variations. Therefore, how the electronic device implements the method in the embodiment of the present application is not introduced in detail here. As long as the equipment used by technical personnel in this field to implement the method in the embodiment of the present application is within the scope of protection of this application.
[0111] In the specific implementation process, when the computer program 311 is executed by the processor, it can achieve Figure 1 Any implementation manner in the corresponding embodiment:
[0112] Get the POI information of the target city;
[0113] Applying maximum density clustering to the POI information to obtain multiple POI clusters;
[0114] Based on the current crowd flow data and current communication data of each POI cluster in the target city, the abnormal situation of the POI cluster is determined through a POI cluster abnormality analysis model to perform abnormality detection on various areas of the target city.
[0115] Optionally, the performing maximum density clustering on the POI information to obtain a plurality of POI clusters includes:
[0116] The maximum density clustering is applied to the POI information, and the point with the largest density is selected as the POI cluster center to obtain multiple POI clusters.
[0117] Optionally, the POI cluster anomaly analysis model is obtained by training the historical passenger flow data and historical communication data of the area to which each POI cluster belongs based on the LSTM+GAN model.
[0118] Optionally, determining the abnormality of the POI cluster through a POI cluster abnormality analysis model based on the current crowd flow data and current communication data of each POI cluster in the target city to perform abnormality detection on various areas of the target city includes:
[0119] Based on the current crowd flow data, current communication data, historical crowd flow data and historical communication data of each POI cluster in the target city, the abnormal situation of the POI cluster is determined through a POI cluster abnormality analysis model to perform abnormality detection on various areas of the target city.
[0120] Optionally, determining the abnormality of the POI cluster through a POI cluster abnormality analysis model based on the current crowd flow data, current communication data, historical crowd flow data and historical communication data of each POI cluster in the target city to perform abnormality detection on various areas of the target city includes:
[0121] Inputting historical crowd flow data and historical communication data in the same period as the current crowd flow data and current communication data of each POI cluster in the target city into a generator of a POI cluster anomaly analysis model to generate current theoretical predicted crowd flow data and theoretical predicted communication data for each POI cluster in the target city;
[0122] The current theoretical predicted pedestrian flow data and theoretical predicted communication data of each POI cluster in the target city are compared and analyzed with the current pedestrian flow data and current communication data to perform anomaly detection on various areas of the target city.
[0123] Optionally, determining the abnormality of the POI cluster through a POI cluster abnormality analysis model based on the current crowd flow data, current communication data, historical crowd flow data and historical communication data of each POI cluster in the target city to perform abnormality detection on various areas of the target city includes:
[0124] Inputting historical pedestrian flow data and historical communication data in the same period as the current pedestrian flow data and current communication data of each POI cluster of the target city into a discriminator of the POI cluster anomaly analysis model to generate a normal score;
[0125] The normal score is compared with a comparison threshold N to perform anomaly detection on each area of the target city.
[0126] Optionally, determining the abnormality of the POI cluster through a POI cluster abnormality analysis model based on the current crowd flow data and current communication data of each POI cluster in the target city to perform abnormality detection on various areas of the target city includes:
[0127] Perform abnormal statistics on the POI clusters under each area in the target city;
[0128] The abnormal situation of the target area is determined based on the abnormal proportion of POI clusters under each area in the target city in the target area.
[0129] It should be noted that in the above embodiments, the description of each embodiment has its own emphasis, and for parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0130] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0131] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded computer, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0132] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0133] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0134] The present application also provides a computer program product, which includes computer software instructions. When the computer software instructions are executed on a processing device, the processing device is caused to execute the following Figure 1 The process of regional anomaly detection in the corresponding embodiment.
[0135] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, a computer, a server or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can store or a data storage device such as a server or a data center that includes one or more available media integration. The available medium can be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid state drive (SSD)), etc.
[0136] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0137] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0138] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0139] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0140] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), disk or optical disk and other media that can store program codes.
[0141] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for detecting regional anomalies, It is characterized in that include: Get the POI information of the target city; Applying maximum density clustering to the POI information to obtain multiple POI clusters; Based on the current crowd flow data and current communication data of each POI cluster in the target city, the abnormal situation of the POI cluster is determined through a POI cluster abnormality analysis model to perform abnormality detection on various areas of the target city.
2. The method according to claim 1, It is characterized in that The step of applying maximum density clustering to the POI information to obtain a plurality of POI clusters includes: The maximum density clustering is applied to the POI information, and the point with the largest density is selected as the POI cluster center to obtain multiple POI clusters.
3. The method according to claim 1, It is characterized in that The POI cluster anomaly analysis model is obtained by training the historical passenger flow data and historical communication data of the area to which each POI cluster belongs based on the LSTM+GAN model.
4. The method according to claim 3, It is characterized in that The method of determining the abnormality of the POI cluster based on the current crowd flow data and the current communication data of each POI cluster in the target city through a POI cluster abnormality analysis model to perform abnormality detection on various areas of the target city includes: Based on the current crowd flow data, current communication data, historical crowd flow data and historical communication data of each POI cluster in the target city, the abnormal situation of the POI cluster is determined through a POI cluster abnormality analysis model to perform abnormality detection on various areas of the target city.
5. The method according to claim 4, It is characterized in that The method of determining abnormal conditions of POI clusters based on current human flow data, current communication data, historical human flow data and historical communication data of each POI cluster in the target city through a POI cluster abnormality analysis model to perform abnormality detection on various areas of the target city includes: Inputting historical crowd flow data and historical communication data in the same period as the current crowd flow data and current communication data of each POI cluster in the target city into a generator of a POI cluster anomaly analysis model to generate current theoretical predicted crowd flow data and theoretical predicted communication data for each POI cluster in the target city; The current theoretical predicted pedestrian flow data and theoretical predicted communication data of each POI cluster in the target city are compared and analyzed with the current pedestrian flow data and current communication data to perform anomaly detection on various areas of the target city.
6. The method according to claim 4, It is characterized in that The method of determining abnormal conditions of POI clusters based on current human flow data, current communication data, historical human flow data and historical communication data of each POI cluster in the target city through a POI cluster abnormality analysis model to perform abnormality detection on various areas of the target city includes: Inputting historical pedestrian flow data and historical communication data in the same period as the current pedestrian flow data and current communication data of each POI cluster of the target city into a discriminator of the POI cluster anomaly analysis model to generate a normal score; The normal score is compared with a comparison threshold N to perform anomaly detection on each area of the target city.
7. The method according to any one of claims 1 to 6, It is characterized in that The method of determining the abnormality of the POI cluster based on the current crowd flow data and the current communication data of each POI cluster in the target city through a POI cluster abnormality analysis model to perform abnormality detection on various areas of the target city includes: Perform abnormal statistics on the POI clusters under each area in the target city; The abnormal situation of the target area is determined based on the abnormal proportion of POI clusters under each area in the target city in the target area.
8. A regional anomaly detection device, It is characterized in that include: An acquisition unit, used to acquire POI information of a target city; A processing unit, configured to perform maximum density clustering on the POI information to obtain a plurality of POI clusters; The analysis and judgment unit is used to determine the abnormal situation of the POI cluster based on the current human flow data and current communication data of each POI cluster in the target city through the POI cluster abnormal analysis model, so as to perform abnormality detection on various areas of the target city.
9. An electronic device, include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor is used to implement the steps of the regional anomaly detection method as described in any one of claims 1 to 7 when executing the computer program stored in the memory.
10. A computer-readable storage medium having a computer program stored thereon, Features: When the computer program is executed by a processor, the method for detecting anomalies in a region according to any one of claims 1 to 7 is implemented.
