An isolated forest model-based refuge identification method, device and medium
By constructing a refuge identification system based on the isolated forest model and using Wi-Fi handshake data to identify informal refuges, the system solves the problems of monitoring blind spots and high costs in existing technologies, enabling rapid and accurate identification of refuges and optimized resource allocation, thereby improving rescue efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN UNIV
- Filing Date
- 2025-01-02
- Publication Date
- 2026-06-16
AI Technical Summary
Existing disaster monitoring equipment cannot effectively monitor crowd gatherings in informal shelters under complex weather conditions, and its spatial coverage is limited and its cost is high.
By collecting Wi-Fi handshake data during non-disaster periods, an isolated forest model is constructed to identify informal refuge sites. Anomaly scores are used to identify potential refuge sites, generate geographic heat maps, and allocate relief resources.
It enables rapid and accurate identification and optimized resource allocation of informal shelters under complex weather conditions, improving rescue efficiency.
Smart Images

Figure CN120086210B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of public safety, specifically to a method, apparatus, and medium for identifying refuge sites based on an isolated forest model. Background Technology
[0002] Refuge sites are a disaster relief measure to address emergencies and also serve as safe havens in modern metropolises for people to escape major natural disasters such as earthquakes, fires, explosions, and floods. When disasters occur, many residents choose to take refuge in informal shelters, such as shopping malls, parking lots, and parks. These locations are often outside the scope of official monitoring and difficult to detect. If emergency rescue systems cannot monitor the population density in these informal shelters in real time, it can lead to inefficient resource allocation and delayed responses, increasing the complexity and difficulty of rescue efforts. However, in actual emergency management, traditional disaster monitoring and emergency response systems mainly rely on physical infrastructure monitoring, such as cameras or on-site reports from personnel, which still suffers from monitoring blind spots and delayed responses. Existing methods for obtaining real-time disaster relief needs information largely rely on satellite remote sensing imagery and drone field surveys. The former is insufficient to support the rescue needs of complex weather disasters accompanied by rainy weather, while the latter has limited spatial coverage and is costly.
[0003] Therefore, existing technologies still need to be improved and developed. Summary of the Invention
[0004] The technical problem to be solved by the present invention is to provide a method, device and medium for identifying refuge sites based on an isolated forest model, in order to address the above-mentioned deficiencies of the prior art. This invention aims to solve the problems that existing disaster detection equipment cannot meet the rescue needs of complex weather disasters, and has limited spatial coverage and high cost.
[0005] The technical solution adopted by this invention to solve the technical problem is as follows:
[0006] Firstly, the present invention provides a method for identifying refuge locations based on an isolated forest model.
[0007] The method includes:
[0008] Collect Wi-Fi handshake data during non-disaster periods and perform data preprocessing to obtain a training dataset;
[0009] An isolated forest model of informal shelters is constructed based on the training dataset, wherein the informal shelters are shelters that exclude official shelters and regular residences;
[0010] Wi-Fi handshake data from informal shelters during disasters are input into an isolated forest model of informal shelters to obtain anomaly scores for each data point;
[0011] Potential refuge locations are identified based on the abnormal scores, and rescue resources are allocated to these refuge locations.
[0012] In one implementation, the step of collecting Wi-Fi handshake data during non-disaster periods and performing data preprocessing to obtain a training dataset includes:
[0013] Collect Wi-Fi handshake data during non-disaster periods, wherein the Wi-Fi handshake data is the four-way handshake request data between the terminal device and the Wi-Fi access point, including device ID, access point location and connection time;
[0014] The collected Wi-Fi handshake data from non-disaster periods is cleaned and standardized to obtain standardized data;
[0015] Collect POI data and perform gridding processing on the POI data to generate POI features of the grid;
[0016] The standardized data is matched with the POI features of the grid to obtain enhanced training data;
[0017] The enhanced training data is divided according to a preset time window to obtain the training dataset.
[0018] In one implementation, the step of cleaning and standardizing the collected Wi-Fi handshake data from non-disaster periods to obtain standardized data includes:
[0019] In the Wi-Fi handshake data during the non-disaster period, Wi-Fi handshake data with access point locations in regular residential areas and official shelters are identified and removed according to the geographic information system database, resulting in the data after removal.
[0020] The data after removal is standardized to obtain the standardized data.
[0021] In one implementation, constructing an isolated forest model of informal refuges based on the training dataset includes:
[0022] Within each time window, feature vectors and split points are randomly selected from the training dataset, and an isolation tree is constructed based on the feature vectors and split points. The feature vectors include device connection frequency, device connection duration, device density, and access point location, and the split points are used to isolate data.
[0023] Repeat the steps of randomly selecting feature vectors and split points from the training dataset within each time window, and constructing an isolation tree based on the feature vectors and split points, until the termination condition is met, to obtain several isolation trees;
[0024] Based on the isolated trees, construct an isolated forest model of informal refuge sites.
[0025] In one implementation, the step of inputting Wi-Fi handshake data from informal shelters during disasters into an isolated forest model of informal shelters to obtain an anomaly score for each data point includes:
[0026] Wi-Fi handshake data during disasters was obtained. Based on the geographic information system database, Wi-Fi handshake data with access points located in regular residential areas and official shelters were removed to obtain Wi-Fi handshake data from informal shelters during disasters.
[0027] The Wi-Fi handshake data of informal shelters during the disaster period is input into the isolated forest model of informal shelters to calculate the average path length and expected path length of the Wi-Fi handshake data of informal shelters during the disaster period to each isolated tree.
[0028] The anomaly score for each data point is calculated based on the ratio of the expected path length to the average path length.
[0029] In one implementation, the step of identifying potential refuge locations based on the abnormal scores and allocating rescue resources to the refuge locations includes:
[0030] Based on the anomaly score of each data point, the anomaly strength of each Wi-Fi hotspot is calculated, wherein the anomaly strength is the average of the anomaly scores of the data points connected to each Wi-Fi hotspot;
[0031] The anomaly intensity is compared with a preset anomaly detection threshold. If the anomaly intensity is greater than or equal to the anomaly detection threshold, the geographical location corresponding to the Wi-Fi hotspot is marked as a potential refuge location.
[0032] A geographic heat map is generated based on the anomalous intensity of the potential refuge sites;
[0033] Rescue resources were allocated based on the aforementioned geographic heat map.
[0034] In one implementation, generating a geographic heatmap based on the anomalous intensity of the potential refuge sites includes:
[0035] A three-dimensional scene is created based on a geographic information system database, and the coordinates of the potential refuge site are correlated with the coordinates in the three-dimensional scene to obtain the target location;
[0036] The target location is combined with the anomalous intensity of the corresponding potential refuge sites and mapped onto the three-dimensional scene to generate the geographic heat map.
[0037] Secondly, embodiments of the present invention also provide a refuge identification device based on an isolated forest model, wherein the device includes:
[0038] The training dataset acquisition module is used to collect Wi-Fi handshake data during non-disaster periods and perform data preprocessing to obtain the training dataset;
[0039] The model training module is used to construct an isolated forest model of informal shelters based on the training dataset, wherein the informal shelters are shelters that exclude official shelters and regular residences;
[0040] The anomaly score calculation module is used to input Wi-Fi handshake data from informal shelters during disasters into the isolated forest model of informal shelters to obtain anomaly scores for each data point.
[0041] The potential refuge identification module is used to identify potential refuges based on the anomaly score and to allocate rescue resources to the refuges.
[0042] Thirdly, embodiments of the present invention also provide a smart terminal, wherein the smart terminal includes a memory, a processor, and a refuge identification program based on an isolated forest model stored in the memory and executable on the processor. When the processor executes the refuge identification program based on an isolated forest model, it implements the steps of the refuge identification method based on an isolated forest model as described in any of the above claims.
[0043] Fourthly, embodiments of the present invention also provide a computer-readable storage medium, wherein the computer-readable storage medium stores a refuge identification program based on an isolated forest model, and when the refuge identification program based on an isolated forest model is executed by a processor, it implements the steps of the refuge identification method based on an isolated forest model as described in any of the above claims.
[0044] Beneficial Effects: Compared with existing technologies, this invention provides a refuge identification method based on an isolated forest model. First, it collects Wi-Fi handshake data during non-disaster periods and preprocesses the data to obtain a training dataset. Using this Wi-Fi handshake data, it monitors device connections and crowd activity in real time during disasters, without relying on additional physical infrastructure, enabling faster and broader coverage of urban population dynamics. Then, based on the training dataset, an isolated forest model of informal refuges is constructed. By excluding hotspots between residences and official shelters, monitoring blind spots are identified. Next, Wi-Fi handshake data from informal refuges during disasters is input into the isolated forest model of informal refuges, obtaining anomaly scores for each data point. The intelligent algorithm enables the system to quickly and accurately detect hotspots where evacuated crowds gather, providing real-time decision support for emergency response. Finally, based on the anomaly scores, potential refuges are identified, and rescue resources are allocated to these refuges, helping rescue teams prioritize responses to high-risk areas and improving rescue efficiency. Attached Figure Description
[0045] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0046] Figure 1 This is a schematic diagram of the refuge identification method based on the isolated forest model provided in an embodiment of the present invention.
[0047] Figure 2 This is a schematic diagram of the refuge identification device based on the isolated forest model provided in this embodiment of the invention.
[0048] Figure 3 This is a block diagram illustrating the internal structure of a smart terminal provided in an embodiment of the present invention. Detailed Implementation
[0049] To make the objectives, technical solutions, and effects of this invention clearer and more explicit, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
[0050] Those skilled in the art will understand that, unless specifically stated otherwise, the singular forms “a,” “an,” “the,” and “the” used herein may also include the plural forms. It should be further understood that the term “comprising” as used in this specification means the presence of the stated features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof. It should be understood that when we say an element is “connected” or “coupled” to another element, it can be directly connected or coupled to the other element, or there may be intermediate elements. Furthermore, “connected” or “coupled” as used herein can include wireless connections or wireless coupling. The term “and / or” as used herein includes all or any units and all combinations of one or more associated listed items.
[0051] It will be understood by those skilled in the art that, unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. It should also be understood that terms such as those defined in general dictionaries should be understood to have the same meaning as in the context of the prior art, and should not be interpreted in an idealized or overly formal sense unless specifically defined as herein.
[0052] In practical emergency management, traditional disaster monitoring and emergency response systems mainly rely on physical infrastructure monitoring, such as cameras or on-site reports from personnel, which suffers from problems such as monitoring blind spots and delayed responses. With the acceleration of urbanization, disaster emergency systems face increasingly complex challenges, urgently requiring the use of digital technologies to improve emergency response efficiency.
[0053] Mobile Wi-Fi (Wireless Fidelity) hotspots are technologies that convert GPRS, 3G, or 4G signals received by a mobile phone into Wi-Fi signals and transmit them. This allows portable devices such as mobile phones, tablets, or laptops to access the internet outdoors or in areas without network coverage via wireless network cards or WLAN modules. The establishment of a Wi-Fi connection involves a four-way handshake. This handshake is a process of exchanging four messages between the terminal device and the Wi-Fi base station to generate a key for encrypting wireless data, ensuring the establishment of the data link. Intelligent analysis of Wi-Fi handshake protocol data can effectively detect abnormal crowd activity during disasters and identify gatherings of people in unofficial shelters in real time, without requiring additional hardware.
[0054] Exemplary methods
[0055] This embodiment provides a refuge identification method based on an isolated forest model. For example... Figure 1As shown, the method includes the following steps:
[0056] Step S100: Collect Wi-Fi handshake data during non-disaster periods and perform data preprocessing to obtain a training dataset;
[0057] Specifically, a Wi-Fi hotspot is a wireless signal transmitting device that wirelessly converts a wired network into a wireless network, enabling electronic devices to connect to the internet. During non-disaster periods, there is no abnormal crowd gathering. By collecting Wi-Fi handshake data during non-disaster periods, and performing data cleaning and standardization to remove invalid or redundant handshake data, it is possible to monitor the crowd gathering situation at specific locations in real time during non-disaster periods.
[0058] In one implementation, step S100 of this embodiment includes the following steps:
[0059] Step S101: Collect Wi-Fi handshake data during non-disaster periods, wherein the Wi-Fi handshake data is the four-way handshake request data between the terminal device and the Wi-Fi access point, including device ID, access point location and connection time;
[0060] Step S102: Clean and standardize the collected Wi-Fi handshake data from non-disaster periods to obtain standardized data;
[0061] Step S103: Collect POI data and perform gridding processing on the POI data to generate gridded POI features;
[0062] Step S104: Match the standardized data with the POI features of the grid to obtain enhanced training data;
[0063] Specifically, POI (Point of Interest) data typically includes various points of interest that people might be interested in, such as geographical locations, commercial facilities, public facilities, and transportation nodes. This data usually includes location coordinates (latitude and longitude), name, address, category, and other relevant information. POI data is widely used in navigation systems, map services, urban planning, and commercial site selection to help users quickly find specific services or facilities. Various types of POI data are aggregated on a grid scale, resulting in a value for each grid cell – this is POI gridding. In one embodiment, POI gridding first generates bounding rectangles and divides the collected POI data, then counts the number of POIs and attaches an attribute table back to the grid. Specifically, a UUIDGenerator is used to generate a unique ID for each grid cell, which serves as the key for attaching the attribute table; a Clipper is used to clip the POIs within each grid cell, and an Aggregator is used to aggregate the total number of POIs within each grid cell. Finally, the generated attribute table is attached back to the grid cell generated in the previous step using the unique ID and a FeatureMerger.
[0064] In this embodiment, POI data is aggregated into a POI grid using a 100*100 grid, and the standardized data flow within each grid is statistically analyzed. Specifically, the standardized data is matched to the POI features of the grid to obtain enhanced training data, which provides a clearer understanding of the data differences between grids. Further aggregation of the standardized data to a cluster scale enables a more refined and accurate assessment, reducing the difficulty of identifying outliers.
[0065] Step S105: Divide the enhanced training data according to a preset time window to obtain the training dataset.
[0066] Specifically, when mobile phones, tablets, and other terminal devices connect to a Wi-Fi hotspot, a four-way handshake is generated. The first handshake involves the terminal sending a message to the base station containing a random number and an asymmetric encryption public key. The second handshake involves the base station generating a random number and encrypting a message containing the random number and the previously sent random number using the terminal's public key, then sending it to the terminal. The third handshake involves the terminal decrypting the received message using its private key, verifying the random number, and generating a shared key (PTK). The fourth handshake involves the terminal sending a message to the base station containing the PTK and other necessary information; the base station verifies the PTK and completes the handshake process. During this four-way handshake, the terminal device exchanges request data with the Wi-Fi hotspot, including device ID, connection frequency, access point location, and access duration, to establish a data link. Using this request data, the number of people connected to the Wi-Fi hotspot can be determined, thus revealing the crowd gathering situation.
[0067] In this embodiment, Wi-Fi handshake data during non-disaster periods is first cleaned and standardized to remove invalid or redundant handshake data, and then divided into time windows T. In one embodiment, the time window is divided into half-hour intervals. This is because during a disaster, official shelters and regular residences are routine monitoring areas with sufficient rescue manpower and timely measures. However, unofficial shelters and unregular residences often become monitoring blind spots, making it difficult for people seeking refuge there to receive timely and effective rescue. Therefore, this embodiment excludes hotspots in residences and official shelters to obtain population gathering information in unofficial or monitoring blind spots.
[0068] In one implementation, step S102 of this embodiment includes the following steps:
[0069] Step S1021: In the Wi-Fi handshake data during the non-disaster period, based on the geographic information system database, identify and remove Wi-Fi handshake data where the access point location is a regular residential area or an official shelter, to obtain the data after removal;
[0070] Step S1022: Standardize the data after removal to obtain the standardized data.
[0071] Specifically, based on the Geographic Information System (GIS) database, Wi-Fi hotspots in regular residential areas and official shelters are identified and removed. The removal rule is: D filtered =D total -D residential -D official , where D filtered To remove the data, D total For all Wi-Fi handshake data, D residential and D official These represent Wi-Fi hotspot data from residential areas and official shelters, respectively. The data after removal is standardized using the Min-max method to obtain standardized data.
[0072] Step S200: Construct an isolated forest model of informal refuges based on the training dataset, wherein the informal refuges are refuges that exclude official refuges and regular residences;
[0073] Isolation Forest is a fast anomaly detection method based on the ensemble of isolation trees (iTrees). Its core idea is that outliers are easily isolated. Therefore, Isolation Forest uses random features and random thresholds to generate multiple isolation trees until each tree reaches a certain height or until each leaf node contains only one outlier. This allows outliers to be identified earlier (i.e., their leaf nodes are shallow). Since each isolation tree is independently generated from random sampling, they possess a degree of independence. The ensemble of multiple isolation trees forms the final Isolation Forest.
[0074] In this embodiment, an isolated forest model of informal refuges is constructed based on the training dataset. When a disaster occurs, by dividing outliers, areas with abnormal population gathering can be discovered, thereby identifying potential unofficial refuges.
[0075] In one implementation, step S200 of this embodiment includes the following steps:
[0076] Step S201: Within each time window, randomly select feature vectors and split points from the training dataset, and construct an isolation tree based on the feature vectors and split points. The feature vectors include device connection frequency, device connection duration, device density, and access point location. The split points are used to isolate data.
[0077] Specifically, a feature vector X = [x_1, x_2, ..., x_n] is extracted within each time window. In this embodiment, n = 4. The four feature vectors are: x_1 is the device connection frequency, x_2 is the device connection duration, x_3 is the device density, and x_4 is the access point location. The isolation tree isolates data points by randomly selecting features and split points.
[0078] Step S202: Repeat the steps of randomly selecting feature vectors and split points from the training dataset in each time window, and constructing an isolation tree based on the feature vectors and split points, until the termination condition is met, to obtain several isolation trees;
[0079] In this embodiment, an isolation tree is constructed for each time window. The process of constructing the isolation tree is recursive. At each node, a feature is randomly selected, and a split point is randomly chosen between the maximum and minimum values of that feature. Then, the data is divided into the left or right subtree according to this split point. When the tree reaches a certain height, the number of samples in the node reaches a certain number, or all samples have the same selected feature value, the isolation trees are repeatedly constructed until a specific number of isolation trees are formed, creating an isolation forest.
[0080] Step S203: Based on the isolated trees, construct an isolated forest model of informal refuge sites.
[0081] Specifically, by constructing an isolated forest model of informal refuge sites, the system can intelligently detect anomalies in Wi-Fi handshake data and identify the intensity of abnormal activity. This enables the system to quickly and accurately detect hotspots where evacuees gather, providing real-time decision support for emergency response.
[0082] Step S300: Input the Wi-Fi handshake data of informal shelters during the disaster into the isolated forest model of informal shelters to obtain the anomaly score for each data point;
[0083] In one implementation, step S300 of this embodiment includes the following steps:
[0084] Step S301: Obtain Wi-Fi handshake data during the disaster period. Based on the geographic information system database, remove Wi-Fi handshake data where the access point is located in a regular residential area or an official shelter, and obtain Wi-Fi handshake data of informal shelters during the disaster period.
[0085] Step S302: Input the Wi-Fi handshake data of informal shelters during the disaster period into the isolated forest model of informal shelters, and calculate the average path length and expected path length of the Wi-Fi handshake data of informal shelters during the disaster period to each isolated tree;
[0086] Specifically, for the new test sample—Wi-Fi handshake data from informal shelters during disasters—the path lengths within each isolated tree are calculated, and the average path length is also calculated. The expected path length, which is the average path length of the tree, is used for standardization.
[0087] Step S303: Calculate the anomaly score for each data point based on the ratio of the expected path length to the average path length.
[0088] In this embodiment, the isolated forest calculates anomaly scores for each data point. Based on these scores, a threshold can be set to determine which data points are anomalous. This involves the Wi-Fi handshake data X from terminal devices in informal shelters during disaster periods. j Calculate the anomaly score S(X) j )for:
[0089] Where n is the data size, X j For a data point, that is, the j-th terminal device connected to the Wi-Fi hotspot, E(h(X) j ) is X jThe average path length is given by c(n), which is the expected path length for a given data size n and is a constant. The path length is X. j The feature selection method used in the isolated tree construction phase determines the number of edges required to reach the isolated node of the sample (the final leaf node of the tree) from the root node of the tree, and the average path length E(h(X). j ) for X j The average path length of all trees in an isolated forest. Score S(X) j When the value is close to 1, it indicates that the data point is abnormal.
[0090] Step S400: Identify potential refuge locations based on the abnormal scores and allocate rescue resources to the refuge locations.
[0091] Specifically, when E(h(X j When E(h(X)) is approximately equal to c(n), the path length of the sample points is close to the average path length, making it impossible to determine anomalies. j The closer S(X) is to 0, the better. j The closer the score is to 1, the more isolated the sample is, indicating it may be an anomaly. Based on the anomaly score, potential refuge locations can be identified, and the rescue command system can allocate resources in real time, prioritizing responses to highly anomaly areas.
[0092] In one implementation, step S400 of this embodiment includes the following steps:
[0093] Step S401: Calculate the anomaly strength of each Wi-Fi hotspot based on the anomaly score of each data point, wherein the anomaly strength is the average of the anomaly scores of the data points connected to each Wi-Fi hotspot;
[0094] Specifically, based on the anomaly score of each data point, the anomaly intensity S of each Wi-Fi hotspot is calculated. avg (AP i )for:
[0095]
[0096] Where m is the number of terminal devices connecting to the Wi-Fi hotspot within the time window, S(X) j ) is device X j Abnormal scores, X j For a terminal device to connect to the i-th Wi-Fi hotspot and generate handshake data, the AP i Let i be the i-th Wi-Fi hotspot.
[0097] Step S402: Compare the abnormal intensity with a preset abnormal detection threshold. If the abnormal intensity is greater than or equal to the abnormal detection threshold, mark the geographical location corresponding to the Wi-Fi hotspot as a potential refuge location.
[0098] Specifically, based on historical data, the preset anomaly detection threshold is S. threshold If S avg (AP i )≥S threshold Then the geographical location corresponding to that Wi-Fi hotspot will be marked as a potential refuge location.
[0099] Step S403: Generate a geographic heat map based on the abnormal intensity of the potential refuge sites;
[0100] Step S404: Allocate rescue resources according to the geographic heat map.
[0101] Specifically, by calculating the anomaly intensity of each Wi-Fi access point and generating a geographic heat map, the system can provide the rescue command center with real-time, dynamic information on the distribution of abnormal hotspots, helping rescue teams prioritize responses to high-risk areas. In this embodiment, the rules for allocating rescue resources are set from four perspectives: resource type identification, resource priority determination, route planning, and real-time route adjustment, as follows: Based on the geographic heat map, when the anomaly score of a certain area exceeds a set threshold and lasts for a long time, such as more than 30 minutes, the system will predict demand based on historical data, including the required resource types, quantities, and allocation priorities; for different needs, the system will identify corresponding resource needs, such as medical support, rescue teams, supplies (such as water and food), and transportation; rescue resources are prioritized for high-risk areas to ensure that resources arrive in the shortest possible time. Combining multiple abnormal areas in the heat map, the command system determines the order of resource allocation; the system automatically generates the best path from the nearest resource point to the abnormal area, considering factors such as road conditions, traffic flow, and disaster impact to ensure rapid resource arrival; during execution, route planning is dynamically adjusted according to real-time traffic conditions and disaster situations to avoid resources being trapped or delayed.
[0102] In one implementation, step S403 of this embodiment includes the following steps:
[0103] Step S4031: Create a three-dimensional scene based on the geographic information system database, and associate the coordinates of the potential refuge site with the coordinates in the three-dimensional scene to obtain the target location;
[0104] Step S4032: Combine the target location with the abnormal intensity of the corresponding potential refuge site and map it onto the three-dimensional scene to generate the geographic heat map.
[0105] Specifically, a geographic heat map is a heat map created based on a base map. It is used to display the spatial distribution patterns of various data, such as population density, housing price distribution, and traffic flow. It can more accurately show the spatial distribution and trends of data, thereby helping people better understand and apply the data.
[0106] In this embodiment, the heatmap H(x,y) of the abnormal intensity at the target location is calculated as follows:
[0107]
[0108] Where (x,y) are the target position coordinates in the 3D scene, δ(xx i yy i ) indicates a Wi-Fi hotspot AP i The correlation between the location coordinates and the target location coordinates. A geographic heatmap generated from the anomaly intensity heatmap of the target location can visually display potential refuge sites in a 3D scene.
[0109] Exemplary device
[0110] like Figure 2 As shown in the illustration, this embodiment also provides a refuge identification device based on an isolated forest model, the device comprising:
[0111] The training dataset acquisition module 10 is used to collect Wi-Fi handshake data during non-disaster periods and perform data preprocessing to obtain the training dataset;
[0112] Model training module 20 is used to construct an isolated forest model of informal shelters based on the training dataset, wherein the informal shelters are shelters that exclude official shelters and regular residences;
[0113] Anomaly score calculation module 30 is used to input Wi-Fi handshake data from informal shelters during disasters into the isolated forest model of informal shelters to obtain anomaly scores for each data point;
[0114] The potential refuge identification module 40 is used to identify potential refuges based on the anomaly score and allocate rescue resources to the refuges.
[0115] In one implementation, the training dataset acquisition module 10 includes:
[0116] The data acquisition unit is used to collect Wi-Fi handshake data during non-disaster periods. The Wi-Fi handshake data is the four-way handshake request data between the terminal device and the Wi-Fi access point, including device ID, access point location and connection time.
[0117] The data processing unit is used to clean and standardize the collected Wi-Fi handshake data during non-disaster periods to obtain standardized data.
[0118] The POI feature generation unit is used to collect POI data and perform gridding processing on the POI data to generate gridded POI features;
[0119] A feature matching unit is used to match the standardized data with the POI features of the grid to obtain enhanced training data;
[0120] The training dataset acquisition unit is used to divide the enhanced training data according to a preset time window to obtain the training dataset.
[0121] In one implementation, the data processing unit includes:
[0122] The data removal subunit is used to identify and remove Wi-Fi handshake data with access point locations of regular residential areas and official shelters from the Wi-Fi handshake data during the non-disaster period, based on the geographic information system database, to obtain the removed data;
[0123] The data standardization subunit is used to standardize the data after it has been removed, so as to obtain the standardized data.
[0124] In one implementation, the model training module 20 includes:
[0125] An isolation tree construction unit is used to randomly select feature vectors and split points from the training dataset within each time window, and construct an isolation tree based on the feature vectors and split points, wherein the feature vectors include device connection frequency, device connection duration, device density, and access point location, and the split points are used to isolate data;
[0126] An iterative unit is used to repeatedly execute the steps of randomly selecting feature vectors and split points from the training dataset in each time window, and constructing an isolation tree based on the feature vectors and split points, until the termination condition is met, resulting in several isolation trees;
[0127] The model building unit is used to construct an isolated forest model of informal refuge sites based on the isolated trees.
[0128] In one implementation, the anomaly score calculation module 30 includes:
[0129] The data cleaning unit is used to obtain Wi-Fi handshake data during disasters. Based on the geographic information system database, it removes Wi-Fi handshake data whose access point locations are regular residential areas and official shelters, thus obtaining Wi-Fi handshake data from informal shelters during disasters.
[0130] The length calculation unit is used to input the Wi-Fi handshake data of informal shelters during the disaster period into the isolated forest model of informal shelters, and calculate the average path length and expected path length of the Wi-Fi handshake data of informal shelters during the disaster period to each isolated tree;
[0131] The anomaly score calculation unit is used to calculate the anomaly score for each data point based on the ratio of the expected path length to the average path length.
[0132] In one implementation, the potential refuge identification module 40 includes:
[0133] An anomaly strength calculation unit is used to calculate the anomaly strength of each Wi-Fi hotspot based on the anomaly score of each data point, wherein the anomaly strength is the average of the anomaly scores of the data points connected to each Wi-Fi hotspot;
[0134] The comparison unit is used to compare the anomaly intensity with a preset anomaly detection threshold. If the anomaly intensity is greater than or equal to the anomaly detection threshold, the geographical location corresponding to the Wi-Fi hotspot is marked as a potential refuge location.
[0135] A geographic heat map generation unit is used to generate a geographic heat map based on the abnormal intensity of the potential refuge sites;
[0136] The allocation unit is used to allocate rescue resources based on the geographic heat map.
[0137] In one implementation, the geographic heatmap generation unit includes:
[0138] The target location acquisition subunit is used to create a three-dimensional scene based on a geographic information system database, and associate the coordinates of the potential refuge site with the coordinates in the three-dimensional scene to obtain the target location;
[0139] The location mapping subunit is used to combine the target location with the anomalous intensity of the corresponding potential refuge site and map it onto the three-dimensional scene to generate the geographic heat map.
[0140] Based on the above embodiments, the present invention also provides a smart terminal, the principle block diagram of which can be as follows: Figure 3As shown, the intelligent terminal includes a processor, memory, network interface, display screen, and temperature sensor connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides the environment for the operation of the operating system and computer programs in the non-volatile storage media. The network interface is used to communicate with external terminals via a network connection. When executed by the processor, the computer program implements a refuge location identification method based on an isolated forest model. The display screen can be an LCD screen or an e-ink screen. The temperature sensor is pre-installed inside the intelligent terminal to detect the operating temperature of internal devices.
[0141] Those skilled in the art will understand that Figure 3 The block diagram shown is merely a partial structural diagram related to the present invention and does not constitute a limitation on the smart terminal to which the present invention is applied. A specific smart terminal may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0142] In one embodiment, a smart terminal is provided, comprising a memory, a processor, and a refuge identification program based on an isolated forest model stored in the memory and executable on the processor. When the processor executes the refuge identification program based on the isolated forest model, it implements the following operation instructions:
[0143] Collect Wi-Fi handshake data during non-disaster periods and perform data preprocessing to obtain a training dataset;
[0144] An isolated forest model of informal shelters is constructed based on the training dataset, wherein the informal shelters are shelters that exclude official shelters and regular residences;
[0145] Wi-Fi handshake data from informal shelters during disasters are input into an isolated forest model of informal shelters to obtain anomaly scores for each data point;
[0146] Potential refuge locations are identified based on the abnormal scores, and rescue resources are allocated to these refuge locations.
[0147] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, operational databases, or other media used in the embodiments provided by this invention can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual operating data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0148] In summary, this invention discloses a method for identifying refuge sites based on an isolated forest model. The method includes: collecting Wi-Fi handshake data during non-disaster periods and preprocessing the data to obtain a training dataset; constructing an isolated forest model of informal refuge sites based on the training dataset; inputting Wi-Fi handshake data from informal refuge sites during disaster periods into the isolated forest model to obtain anomaly scores for each data point; identifying potential refuge sites based on the anomaly scores and allocating rescue resources to these refuge sites. This invention can automatically identify crowd gatherings in informal refuge sites during disasters, greatly improving the monitoring capability of areas where refugees gather. By using Wi-Fi handshake data to monitor device connections and crowd activities in real time during disasters, it does not rely on additional physical infrastructure, saving equipment deployment costs and has broad application prospects.
[0149] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for identifying refuge sites based on an isolated forest model, characterized in that, The method includes: Collect Wi-Fi handshake data during non-disaster periods, wherein the Wi-Fi handshake data is the four-way handshake request data between the terminal device and the Wi-Fi access point, including device ID, access point location and connection time; In the Wi-Fi handshake data during the non-disaster period, Wi-Fi handshake data with access point locations in regular residential areas and official shelters are identified and removed according to the geographic information system database, resulting in the data after removal. The data after removal is standardized to obtain the standardized data; Collect POI data and perform gridding processing on the POI data to generate POI features of the grid; The standardized data is matched with the POI features of the grid to obtain enhanced training data; The enhanced training data is divided according to a preset time window to obtain the training dataset; An isolated forest model of informal shelters is constructed based on the training dataset, wherein the informal shelters are shelters that exclude official shelters and regular residences; Wi-Fi handshake data from informal shelters during disasters are input into an isolated forest model of informal shelters to obtain anomaly scores for each data point; Based on the anomaly score of each data point, the anomaly strength of each Wi-Fi hotspot is calculated, wherein the anomaly strength is the average of the anomaly scores of the data points connected to each Wi-Fi hotspot; The anomaly intensity is compared with a preset anomaly detection threshold. If the anomaly intensity is greater than or equal to the anomaly detection threshold, the geographical location corresponding to the Wi-Fi hotspot is marked as a potential refuge location. A three-dimensional scene is created based on a geographic information system database, and the coordinates of the potential refuge site are correlated with the coordinates in the three-dimensional scene to obtain the target location; The target location is combined with the anomalous intensity of the corresponding potential refuge sites and mapped onto the three-dimensional scene to generate a geographic heat map; Rescue resources were allocated based on the aforementioned geographic heat map; The allocation of rescue resources based on the aforementioned geographic heat map includes: Demand forecasting is conducted based on geographic heat maps and historical data, including resource types, quantities, and allocation priorities. Based on the requirements and the abnormal areas in the geographic heatmap, determine the order of resource allocation and the path from resource points to abnormal areas.
2. The refuge identification method based on the isolated forest model according to claim 1, characterized in that, The construction of the isolated forest model of informal refuges based on the training dataset includes: Within each time window, feature vectors and split points are randomly selected from the training dataset, and an isolation tree is constructed based on the feature vectors and split points. The feature vectors include device connection frequency, device connection duration, device density, and access point location, and the split points are used to isolate data. Repeat the steps of randomly selecting feature vectors and split points from the training dataset within each time window, and constructing an isolation tree based on the feature vectors and split points, until the termination condition is met, to obtain several isolation trees; Based on the isolated trees, construct an isolated forest model of informal refuge sites.
3. The refuge identification method based on the isolated forest model according to claim 1, characterized in that, The method involves inputting Wi-Fi handshake data from informal shelters during disasters into an isolated forest model of informal shelters to obtain anomaly scores for each data point, including: Wi-Fi handshake data during disasters was obtained. Based on the geographic information system database, Wi-Fi handshake data with access points located in regular residential areas and official shelters were removed to obtain Wi-Fi handshake data from informal shelters during disasters. The Wi-Fi handshake data of informal shelters during the disaster period is input into the isolated forest model of informal shelters to calculate the average path length and expected path length of the Wi-Fi handshake data of informal shelters during the disaster period to each isolated tree. The anomaly score for each data point is calculated based on the ratio of the expected path length to the average path length.
4. A refuge identification device based on an isolated forest model, characterized in that, The device includes: The training dataset acquisition module is used to collect Wi-Fi handshake data during non-disaster periods. This Wi-Fi handshake data consists of four handshake request data between a terminal device and a Wi-Fi access point, including device ID, access point location, and connection time. From this non-disaster Wi-Fi handshake data, based on a geographic information system database, Wi-Fi handshake data where the access point location is a regular residential area or an official shelter is identified and removed, resulting in the removed data. The removed data is then standardized to obtain the standardized data. POI data is collected and gridded to generate gridded POI features. The standardized data is matched with the gridded POI features to obtain enhanced training data. Finally, the enhanced training data is divided according to a preset time window to obtain the training dataset. The model training module is used to construct an isolated forest model of informal shelters based on the training dataset, wherein the informal shelters are shelters that exclude official shelters and regular residences; The anomaly score calculation module is used to input Wi-Fi handshake data from informal shelters during disasters into the isolated forest model of informal shelters to obtain anomaly scores for each data point. A potential refuge identification module is used to calculate the anomaly intensity of each Wi-Fi hotspot based on the anomaly score of each data point, wherein the anomaly intensity is the average of the anomaly scores of the data points connected to each Wi-Fi hotspot; compare the anomaly intensity with a preset anomaly detection threshold; if the anomaly intensity is greater than or equal to the anomaly detection threshold, mark the geographical location corresponding to the Wi-Fi hotspot as a potential refuge; create a three-dimensional scene based on a geographic information system database, associate the coordinates of the potential refuge with the coordinates in the three-dimensional scene to obtain the target location; combine the target location with the anomaly intensity of the corresponding potential refuge and map it onto the three-dimensional scene to generate the geographic heatmap; allocate rescue resources according to the geographic heatmap; the allocation of rescue resources according to the geographic heatmap includes: predicting demand based on the geographic heatmap and historical data, including resource types, quantities, and allocation priorities; and determining the order of resource allocation and the path from resource points to the anomaly areas based on demand and the anomaly areas in the geographic heatmap.
5. A smart terminal, characterized in that, The smart terminal includes a memory, a processor, and a refuge identification program based on an isolated forest model stored in the memory and executable on the processor. When the processor executes the refuge identification program based on the isolated forest model, it implements the steps of the refuge identification method based on an isolated forest model as described in any one of claims 1-3.
6. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a refuge identification program based on an isolated forest model. When the refuge identification program based on an isolated forest model is executed by a processor, it implements the steps of the refuge identification method based on an isolated forest model as described in any one of claims 1-3.