A spatio-temporal clustering method and system based on shared neighbors and representative point correction

CN122548350BActive Publication Date: 2026-10-23NANCHANG INST OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202611052455.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-07-15
Publication Date
2026-10-23
Estimated Expiration
2046-07-15

AI Technical Summary

Technical Problem

然而,DPC算法最初针对静态空间数据设计,未充分考虑时间因素

Benefits of technology

[0039]1、本发明根据地震监测数据在经度、纬度和时间维度上的离散程度自适应分配距离权重,分别计算时间加权距离和空间加权距离,能够更合理地度量地震事件样本之间的时空差异,避免因各维度尺度不同导致距离计算失真。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122548350B_ABST
    Figure CN122548350B_ABST
Patent Text Reader

Abstract

The application discloses a kind of space-time clustering method and system based on shared near neighbor and representative point rectification, applied to the field of earthquake monitoring technology, comprising: obtaining earthquake monitoring data, calculating the weighted distance of each earthquake event sample in longitude, latitude and time dimension, based on the intersection of time near neighbor set and space near neighbor set Determine space-time shared near neighbor, and calculate space-time shared near neighbor similarity and weighted shared near neighbor local density, to improve the accuracy of cluster center selection;Through extracting the candidate points in each cluster whose weighted shared near neighbor local density is higher than the average density of cluster, and screening representative points from them, using representative points to identify and reassign earthquake event samples with uncertain attribution, thereby strengthening space-time constraints and ensuring the accuracy of clustering allocation under complex space-time distribution.The present application can effectively identify foreshock events and aftershock events according to the final clustering result, providing a reference for earthquake prediction analysis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of earthquake monitoring and data processing technology, and in particular to a spatiotemporal clustering method and system based on shared nearest neighbors and representative point correction. Background Technology

[0002] Cluster analysis, as an important branch of data mining, has been widely applied in fields such as information retrieval and image processing. In the field of earthquake monitoring technology, spatiotemporal cluster analysis of earthquake events can identify foreshocks, mainshocks, and aftershocks from complex earthquake sequences, thereby exploring the mechanisms of strong earthquakes and providing valuable reference for earthquake prediction.

[0003] Earthquake monitoring data is typical spatiotemporal data, containing both spatial geographic location information (longitude and latitude) and temporal information (earthquake occurrence time), exhibiting a high degree of spatiotemporal coupling. Earthquakes occurring in the same region at different times, although spatially close, may belong to independent tectonic events and should not be grouped into the same cluster. If clustering algorithms fail to fully incorporate temporal attributes, they may incorrectly classify spatially adjacent but significantly different temporal events into the same cluster, leading to confusion between foreshocks and aftershock sequences and affecting the accuracy of seismic situation analysis and judgment.

[0004] Density Peaks Clustering (DPC) algorithms have gained widespread attention in cluster analysis due to their ability to identify clusters of arbitrary shapes and their low parameter requirements. However, DPC algorithms were initially designed for static spatial data and did not fully consider the temporal factor. While existing fast density peak search spatiotemporal clustering (ST-CFSFDP) algorithms introduce time constraints, they still have two main limitations when processing seismic monitoring data: First, the local density calculation method uses a truncated kernel function, ignoring samples that may still be relevant beyond the truncation distance. This leads to multiple samples obtaining the same local density value, reducing the accuracy of cluster center selection and making it difficult to accurately distinguish spatially adjacent but temporally independent earthquake swarms. Second, the sample allocation strategy relies excessively on the spatial distance between the sample and the cluster center, resulting in insufficient spatiotemporal constraints. When processing seismic events with prominent temporal characteristics and spatial proximity, this can easily lead to allocation errors, causing foreshock events to be incorrectly classified into the mainshock cluster or aftershock events to be missed. These shortcomings limit the practical application effectiveness of spatiotemporal clustering algorithms in seismic monitoring. Summary of the Invention

[0005] To address these issues, this invention provides a spatiotemporal clustering method and system based on shared nearest neighbors and representative point correction, which solves the above problems.

[0006] In a first aspect, the present invention provides a spatiotemporal clustering method based on shared nearest neighbors and representative point correction, comprising:

[0007] S1. Obtain the spatiotemporal dataset to be clustered. The spatiotemporal dataset is earthquake monitoring data, which includes multiple earthquake event samples. Each sample includes spatial attributes and temporal attributes. The spatial attributes include longitude and latitude, and the temporal attribute of each sample is the earthquake occurrence time.

[0008] S2. Determine the distance weights of the corresponding attribute dimensions based on the degree of dispersion of the spatiotemporal dataset in each attribute dimension, and calculate the time-weighted distance and spatial-weighted distance between samples based on the distance weights.

[0009] S3. Determine the temporal nearest neighbor set of each sample based on the time-weighted distance, and determine the spatial nearest neighbor set of each sample based on the spatial weighted distance;

[0010] S4. Determine the time-shared nearest neighbor based on the overlapping samples of the time-shared nearest neighbor sets of any two samples, determine the spatial-shared nearest neighbor based on the overlapping samples of the spatial-shared nearest neighbor sets of any two samples, and jointly determine the spatiotemporal-shared nearest neighbor based on the time-shared nearest neighbor and the spatial-shared nearest neighbor.

[0011] S5. Calculate the spatiotemporal similarity between any two samples based on the number of shared samples in the spatiotemporal shared nearest neighbors and the spatiotemporal distance corresponding to the shared samples.

[0012] S6. For each sample, take the sample as the target sample, select the neighboring samples whose spatiotemporal shared nearest neighbor similarity with the target sample meets the preset conditions, and calculate the weighted shared nearest neighbor local density of the target sample based on the spatiotemporal shared nearest neighbor similarity between the target sample and each of the neighboring samples, and the number of spatiotemporal shared nearest neighbors between the target sample and each of the neighboring samples.

[0013] S7. Based on the weighted shared nearest neighbor local density and the spatiotemporal relative distance determined by the time-weighted distance and the spatial-weighted distance, select cluster centers from the spatiotemporal dataset, and perform initial allocation of samples based on the cluster centers to obtain initial clusters;

[0014] S8. For each initial cluster, calculate the first average of the weighted shared nearest neighbor local densities of all samples in the initial cluster, as the average local density of the initial cluster; and determine the samples in the initial cluster whose weighted shared nearest neighbor local densities are higher than the average local density as candidate points; for each candidate point, determine a preset number of samples with the highest spatiotemporal shared nearest neighbor similarity to the candidate point, and calculate the second average of the weighted shared nearest neighbor local densities of the preset number of samples, as the average local density of the neighborhood corresponding to the candidate point; determine the candidate point with the largest average local density of the neighborhood as the representative point of the corresponding initial cluster;

[0015] S9. The sample that has obtained the initial cluster label after initial allocation is taken as the sample to be judged. The first similarity between the sample to be judged and the representative point of its current cluster is calculated, and the second similarity between the sample to be judged and the representative point of other clusters is calculated. The maximum value among all the second similarities is selected as the maximum second similarity. When the first similarity is less than the product of the maximum second similarity and the adjustment coefficient, the sample to be judged is identified as an uncertain sample.

[0016] S10. Identify samples that were not identified as uncertain samples as certain samples. Traverse the uncertain samples in descending order of weighted shared nearest neighbor local density. Select the object with the highest spatiotemporal shared nearest neighbor similarity to the current uncertain sample from the candidate reassignment objects. Reassign the current uncertain sample to the cluster to which the object belongs. The candidate reassignment objects include representative points of each initial cluster and certain samples with a weighted shared nearest neighbor local density higher than the current uncertain sample. Identify foreshock events and aftershock events based on the final clustering results.

[0017] Furthermore, determining the distance weight of the corresponding attribute dimension based on the dispersion of the spatiotemporal dataset in each attribute dimension includes: calculating the standard deviation of the longitude dimension, the latitude dimension, and the time dimension of the spatiotemporal dataset; and determining the distance weight of the corresponding dimension based on the sum of the standard deviations of the longitude dimension, the latitude dimension, and the time dimension, as well as the standard deviations of the longitude dimension, the latitude dimension, and the time dimension.

[0018] Furthermore, the time-weighted distance is determined based on the distance weight in the time dimension and the difference between the two samples in the time dimension; the spatial-weighted distance is determined based on the distance weight in the spatial dimension and the difference between the two samples in the longitude and latitude dimensions.

[0019] Furthermore, the temporal nearest neighbor set is a set of the top k samples selected in ascending order based on the time-weighted distance between the target sample and other samples; the spatial nearest neighbor set is a set of the top k samples selected in ascending order based on the spatial-weighted distance between the target sample and other samples; where k is a preset number of nearest neighbors.

[0020] Furthermore, the spatiotemporal shared nearest neighbor similarity is determined jointly based on the number of shared samples between the two samples and the spatiotemporal path distance formed by the shared samples; when there are no shared samples between the two samples, the spatiotemporal shared nearest neighbor similarity is determined to be zero.

[0021] Furthermore, the weighted shared nearest neighbor local density is determined based on the spatiotemporal shared nearest neighbor similarity between the target sample and its k most similar neighboring samples, as well as the number of shared samples; wherein, the higher the spatiotemporal shared nearest neighbor similarity between the target sample and the neighboring samples, and the more shared samples there are, the greater the contribution of the corresponding neighboring samples to the weighted shared nearest neighbor local density.

[0022] Furthermore, the method for determining the spatiotemporal relative distance includes: identifying the sample with the maximum weighted shared nearest neighbor local density from all samples as the maximum density sample; identifying samples other than the maximum density sample as non-maximum density samples; for each non-maximum density sample, selecting the minimum sum of the time-weighted distance and the spatial-weighted distance between the sample and the non-maximum density sample from the samples whose weighted shared nearest neighbor local density is higher as the spatiotemporal relative distance of the non-maximum density sample; and for the maximum density sample, taking the maximum sum of the time-weighted distance and the spatial-weighted distance between the maximum density sample and other samples as the spatiotemporal relative distance of the maximum density sample.

[0023] Furthermore, the step of identifying uncertain samples based on the similarity between the sample to be judged and the representative point of its current cluster, and the similarity between the sample to be judged and the representative point of other clusters, includes: determining a first similarity between the sample to be judged and the representative point of its current cluster; determining a second similarity between the sample to be judged and the representative point of other clusters, and selecting the maximum value from all the second similarities as the maximum second similarity; when the first similarity is less than the product of the maximum second similarity and the adjustment coefficient, the sample to be judged is identified as an uncertain sample.

[0024] Secondly, the present invention provides a spatiotemporal clustering system based on shared nearest neighbors and representative point correction, comprising:

[0025] The data acquisition module is used to acquire the spatiotemporal dataset to be clustered. The spatiotemporal dataset is earthquake monitoring data, which includes multiple earthquake event samples. Each sample includes spatial attributes and temporal attributes. The spatial attributes include longitude and latitude, and the temporal attribute of each sample is the time of earthquake occurrence.

[0026] The weighted distance calculation module is used to determine the distance weight of the corresponding attribute dimension based on the dispersion of the spatiotemporal dataset in each attribute dimension, and to calculate the time-weighted distance and spatial-weighted distance between samples based on the distance weight.

[0027] The nearest neighbor set determination module is used to determine the temporal nearest neighbor set of each sample based on the time-weighted distance, and to determine the spatial nearest neighbor set of each sample based on the spatial weighted distance.

[0028] The shared nearest neighbor determination module is used to determine time shared nearest neighbors based on the overlapping samples of the time nearest neighbor sets of any two samples, determine spatial shared nearest neighbors based on the overlapping samples of the spatial nearest neighbor sets of any two samples, and jointly determine spatiotemporal shared nearest neighbors based on the time shared nearest neighbors and the spatial shared nearest neighbors.

[0029] The similarity calculation module is used to calculate the spatiotemporal shared neighbor similarity between any two samples based on the number of shared samples in the spatiotemporal shared nearest neighbors and the spatiotemporal distance corresponding to the shared samples.

[0030] The local density calculation module, for each sample, takes the sample as the target sample, selects neighboring samples whose spatiotemporal shared nearest neighbor similarity with the target sample meets the preset conditions, and calculates the weighted shared nearest neighbor local density of the target sample based on the spatiotemporal shared nearest neighbor similarity between the target sample and each of the neighboring samples, and the number of spatiotemporal shared nearest neighbors between the target sample and each of the neighboring samples.

[0031] The cluster center selection and initial allocation module is used to select cluster centers from the spatiotemporal dataset based on the weighted shared nearest neighbor local density and the spatiotemporal relative distance determined based on the time-weighted distance and the spatial-weighted distance, and to perform initial allocation of samples based on the cluster centers to obtain initial clusters;

[0032] The representative point determination module is used to calculate, for each initial cluster, the first average value of the weighted shared nearest neighbor local density of all samples in the initial cluster, as the average local density of the initial cluster; and to determine the samples in the initial cluster whose weighted shared nearest neighbor local density is higher than the average local density as candidate points; for each candidate point, to determine a preset number of samples with the highest spatiotemporal shared nearest neighbor similarity to the candidate point, and to calculate the second average value of the weighted shared nearest neighbor local density of the preset number of samples, as the average local density of the neighborhood corresponding to the candidate point; and to determine the candidate point with the largest average local density of the neighborhood as the representative point of the corresponding initial cluster.

[0033] An uncertain sample identification module is used to take samples that have obtained initial cluster labels after initial allocation as samples to be judged, calculate the first similarity between the sample to be judged and the representative point of its current cluster, and calculate the second similarity between the sample to be judged and the representative point of other clusters. The maximum value among all the second similarities is selected as the maximum second similarity. When the first similarity is less than the product of the maximum second similarity and the adjustment coefficient, the sample to be judged is identified as an uncertain sample.

[0034] The reassignment module is used to identify samples that were not identified as uncertain samples as certain samples, traverse the uncertain samples in descending order of weighted shared nearest neighbor local density, and select the object with the highest spatiotemporal shared nearest neighbor similarity to the current uncertain sample from the candidate reassignment objects, and reassign the current uncertain sample to the cluster to which the object belongs; wherein, the candidate reassignment objects include representative points of each initial cluster and certain samples with a weighted shared nearest neighbor local density higher than that of the current uncertain sample;

[0035] The event identification module is used to identify foreshock events and aftershock events based on the final clustering results.

[0036] Thirdly, an electronic device is provided, comprising: at least one processor, and a memory communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the steps of the spatiotemporal clustering method based on shared nearest neighbors and representative point correction according to any embodiment of the present invention.

[0037] Fourthly, the present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein when the program instructions are executed by a processor, the processor performs the steps of the spatiotemporal clustering method based on shared nearest neighbors and representative point correction according to any embodiment of the present invention.

[0038] The spatiotemporal clustering method and system based on shared nearest neighbors and representative point correction proposed in this application have the following specific advantages:

[0039] 1. This invention adaptively allocates distance weights based on the degree of dispersion of earthquake monitoring data in the longitude, latitude and time dimensions, and calculates time-weighted distance and spatial-weighted distance respectively. This can more reasonably measure the spatiotemporal differences between earthquake event samples and avoid distance calculation distortion caused by different scales in each dimension.

[0040] 2. This invention determines spatiotemporal shared neighbors based on temporal and spatial proximity, and calculates sample similarity by combining the number of shared samples and spatiotemporal path distance, so that local density can simultaneously reflect the sample distance relationship and the degree of overlap of neighborhood structure, thereby improving the reliability of seismic swarm cluster center identification.

[0041] 3. This invention overcomes the problem of insufficient sample density discrimination in the traditional truncated kernel method by weighted sharing of nearest neighbor local density, so that earthquake event samples of different density levels can obtain differentiated density values, which is beneficial to improving the accuracy of earthquake swarm clustering under complex spatiotemporal distribution.

[0042] 4. This invention selects candidate points and determines representative points in the initial cluster, uses representative points to characterize the stable structure inside the earthquake swarm, and then identifies and corrects uncertain samples based on the similarity of representative points. This can reduce the probability of misassignment of earthquake swarm boundary samples and spatiotemporally overlapping samples, and ensure the correct division of foreshocks and aftershocks.

[0043] 5. The overall solution of this invention is a technical solution to solve the technical problem of earthquake swarm identification and earthquake sequence analysis in the field of earthquake monitoring technology. It adopts techniques such as spatiotemporal weighted distance calculation, shared nearest neighbor similarity analysis, and representative point correction allocation, and achieves the technical effect of accurately identifying foreshocks and aftershocks. Attached Figure Description

[0044] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0045] Figure 1 A flowchart illustrating a spatiotemporal clustering method based on shared nearest neighbors and representative point correction, provided in an embodiment of the present invention;

[0046] Figure 2 This invention provides three-dimensional spatiotemporal scatter plots of five datasets as an embodiment of the invention; wherein, Figure 2 (a) in the figure is a spatiotemporal scatter plot of STD1. Figure 2 (b) in the figure is a spatiotemporal scatter plot of STD2. Figure 2 (c) in the figure is a spatiotemporal scatter plot of STD3. Figure 2 (d) in the figure is the spatiotemporal scatter plot of STD4. Figure 2 (e) in the figure is the spatiotemporal scatter plot of STD5;

[0047] Figure 3 The present invention provides spatiotemporal clustering results of six algorithms on the STD1 dataset according to an embodiment of the invention; wherein, Figure 3 (a) in the table represents the result of the SNRP-STDPC algorithm. Figure 3 (b) in the table shows the result of the STSNN-DPC algorithm. Figure 3 (c) in the table represents the result of the ST-CFSFDP algorithm. Figure 3 In the table, (d) represents the result of the ST-DBSCAN algorithm. Figure 3 (e) in the table represents the result of the ST-AGNES algorithm. Figure 3 (f) in the table represents the result of the SNMP-STDPC algorithm;

[0048] Figure 4 The present invention provides spatiotemporal clustering results of six algorithms on the STD3 dataset according to an embodiment of the invention; wherein, Figure 4 (a) in the table represents the result of the SNRP-STDPC algorithm. Figure 4 (b) in the table shows the result of the STSNN-DPC algorithm. Figure 4 (c) in the table represents the result of the ST-CFSFDP algorithm. Figure 4 In the table, (d) represents the result of the ST-DBSCAN algorithm. Figure 4 (e) in the table represents the result of the ST-AGNES algorithm. Figure 4 (f) in the table represents the result of the SNMP-STDPC algorithm;

[0049] Figure 5 The present invention provides spatiotemporal clustering results of six algorithms on the STD4 dataset according to an embodiment of the invention; wherein, Figure 5 (a) in the table represents the result of the SNRP-STDPC algorithm. Figure 5 (b) in the table shows the result of the STSNN-DPC algorithm. Figure 5 (c) in the table represents the result of the ST-CFSFDP algorithm. Figure 5 In the table, (d) represents the result of the ST-DBSCAN algorithm. Figure 5 (e) in the table represents the result of the ST-AGNES algorithm. Figure 5 (f) in the table represents the result of the SNMP-STDPC algorithm;

[0050] Figure 6The distribution of the EQ1 dataset and the clustering results of the SNRP-STDPC algorithm are shown in an embodiment of the present invention; wherein, Figure 6 (a) shows the spatial distribution of the EQ1 dataset. Figure 6 (b) in the figure shows the spatiotemporal distribution of the EQ1 dataset. Figure 6 (c) in the figure represents the spatiotemporal clustering effect of the SNRP-STDPC algorithm on the EQ1 dataset;

[0051] Figure 7 A structural block diagram of a spatiotemporal clustering system based on shared nearest neighbors and representative point correction is provided in an embodiment of the present invention;

[0052] Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0053] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0054] Example 1: A spatiotemporal clustering method based on shared nearest neighbors and representative point correction. Please refer to [link to example]. Figure 1 The diagram shows a flowchart of a spatiotemporal clustering method based on shared nearest neighbors and representative point correction according to this application.

[0055] In one embodiment, step S1 is performed to obtain a spatiotemporal dataset to be clustered. The spatiotemporal dataset is earthquake monitoring data, which includes multiple earthquake event samples. Each sample includes spatial attributes and temporal attributes. The spatial attributes include longitude and latitude, and the temporal attribute of each sample is the time of earthquake occurrence.

[0056] Obtain the spatiotemporal dataset D to be clustered. n is the total number of samples, and the sample size is 100%. For a feature vector of dimension 3, each sample Manifestation , Longitude latitude Latitude dimension The time dimension. In practical applications, samples Spatial attributes can also be extended to two-dimensional or higher spatial coordinates based on the data type, or time attributes can be represented as discrete-time indices.

[0057] After acquiring the data, it can be preprocessed. This preprocessing may include: removing duplicate samples, removing invalid samples, normalizing longitude, latitude, and time attributes, correcting abnormally formatted data, and converting time attributes into calculable numerical variables.

[0058] Execute step S2, determine the distance weight of the corresponding attribute dimension according to the degree of dispersion of the spatiotemporal dataset in each attribute dimension, and calculate the time-weighted distance and spatial-weighted distance between samples based on the distance weight.

[0059] Specifically, determining the distance weights for corresponding attribute dimensions based on the dispersion of the spatiotemporal dataset across each attribute dimension includes:

[0060] Calculate the longitude dimension, latitude dimension, and standard deviation of the time dimension of the spatiotemporal dataset;

[0061] The distance weights for the corresponding dimensions are determined based on the sum of the standard deviations of the longitude dimension, the latitude dimension, and the time dimension, as well as the standard deviations of the longitude dimension, the latitude dimension, and the time dimension.

[0062] Specifically, the time-weighted distance is determined based on the distance weight in the time dimension and the difference between the two samples in the time dimension; the spatial-weighted distance is determined based on the distance weight in the spatial dimension and the difference between the two samples in the longitude and latitude dimensions.

[0063] The distance weights for the corresponding attribute dimensions are determined based on the degree of dispersion of the spatiotemporal dataset across each attribute dimension.

[0064] In one specific embodiment, the standard deviations for longitude, latitude, and time are calculated separately. Let the standard deviation of the d-th dimension be... Where d = 1, 2, 3. Then the sum of the standard deviations of the three dimensions is... for:

[0065] ;

[0066] In one specific embodiment, the distance weight is calculated according to the following formula:

[0067] ;

[0068] in, This represents the distance weight corresponding to the d-th attribute dimension.

[0069] To reflect the differences across dimensions in distance calculations, the standard deviation of each dimension is calculated by quantifying its range of fluctuation. A smaller standard deviation indicates greater stability of a dimension within the sample, suggesting it may be more critical to the structural definition of the cluster; therefore, it should be given greater weight in distance calculations. This approach avoids the problem of treating time and space dimensions as equivalent in simple Euclidean distance, improving the rationality of subsequent spatiotemporal distance measurements.

[0070] The time-weighted distance and spatial-weighted distance between samples are calculated based on the distance weights.

[0071] For any two samples x i and x j Its time-weighted distance It can be represented as:

[0072] ;

[0073] Where W3 represents the distance weight in the time dimension.

[0074] Its spatial weighted distance It can be represented as:

[0075] ;

[0076] Where W1 represents the distance weight of the longitude dimension and W2 represents the distance weight of the latitude dimension.

[0077] By calculating the time-weighted distance and the spatial-weighted distance separately, the structural features of the time and spatial attributes can be preserved, and a basis can be provided for the subsequent determination of time neighbors, spatial neighbors, and shared neighbors.

[0078] Execute step S3 to determine the temporal nearest neighbor set of each sample based on the time-weighted distance, and determine the spatial nearest neighbor set of each sample based on the spatial-weighted distance.

[0079] Specifically, the time nearest neighbor set is a set of the top k samples selected in ascending order based on the time-weighted distance between the target sample and other samples;

[0080] The spatial nearest neighbor set is a set consisting of the top k samples selected in ascending order of the spatial weighted distance between the target sample and other samples.

[0081] Where k is the preset number of nearest neighbors. In practical applications, k can be determined based on the data size, data distribution density, or empirical parameters. For example, k can be taken as a percentage of the total number of samples, or it can be determined through experimental optimization.

[0082] The temporal nearest neighbor set of each sample is determined based on the time-weighted distance, and the spatial nearest neighbor set of each sample is determined based on the spatial-weighted distance.

[0083] For the target sample x i Calculate the time-weighted distance between it and other samples in the dataset. And sort them in ascending order, then select the k samples with the smallest distance to form sample x. i Time nearest neighbor set :

[0084] ;

[0085] Where D is the spatiotemporal dataset to be clustered; Indicates the relationship with sample x i The time-weighted distance to the k-th nearest sample. The calculation process is as follows: According to the formula Calculate the time distance matrix between samples, then sort each row in ascending order, and take the (k+1)th element, which is the... .

[0086] For target sample x i Calculate the spatial weighted distance between it and other samples in the dataset. And sort them in ascending order, then select the k samples with the smallest distance to form sample x. i Spatial nearest neighbor set :

[0087] ;

[0088] in, Indicates the relationship with sample x i The spatial weighted distance corresponding to the k-th nearest sample. The calculation process is as follows: According to the formula Calculate the spatial distance matrix between samples, then sort each row in ascending order, and take the (k+1)th element, which is the distance between the samples. .

[0089] Execute step S4 to determine time-shared neighbors based on the overlapping samples of the time-shared neighbor sets of any two samples, determine spatial-shared neighbors based on the overlapping samples of the spatial-shared neighbor sets of any two samples, and jointly determine spatiotemporal-shared neighbors based on the time-shared neighbors and the spatial-shared neighbors.

[0090] For any two samples x i and sample x j Its time-shared nearest neighbor set is defined as :

[0091] ;

[0092] In the formula, For sample x i Time nearest neighbor set, For sample x j The time nearest neighbor set.

[0093] For any two samples x i and sample x j Its spatially shared nearest neighbor set is defined as :

[0094] ;

[0095] In the formula, For sample x i Spatial nearest neighbor set, For sample x j The spatial nearest neighbor set.

[0096] For any two samples x i and sample x j Share the time nearest neighbor set between the two and space-sharing neighborhood set The intersection is determined as sample x i and sample x j Spatiotemporal shared nearest neighbor set :

[0097] ;

[0098] Therefore, if a sample belongs to both the temporal and spatial nearest neighbor intersections of two samples, then that sample can simultaneously reflect the common neighborhood structure of the two samples in both the temporal and spatial dimensions. Spatiotemporal shared nearest neighbors can more accurately characterize the spatiotemporal similarity relationship between samples.

[0099] Execute step S5, and calculate the spatiotemporal shared neighbor similarity between any two samples based on the number of shared samples in the spatiotemporal shared neighbors and the spatiotemporal distance corresponding to the shared samples.

[0100] Specifically, the spatiotemporal shared nearest neighbor similarity is determined by the number of shared samples between two samples and the spatiotemporal path distance formed by the shared samples; when there are no shared samples between two samples, the spatiotemporal shared nearest neighbor similarity is determined to be zero.

[0101] Based on the number of shared samples in the spatiotemporal shared nearest neighbors and the spatiotemporal distance between the shared samples, the spatiotemporal shared nearest neighbor similarity between any two samples is calculated.

[0102] For any two samples xi and sample x j If the spatiotemporal shared nearest neighbor set between the two is not empty, then the sample x is calculated. i and sample x j Spatiotemporal shared nearest neighbor similarity between :

[0103] ;

[0104] Wherein, only if sample x i and sample x j Local similarity is calculated only when there are spatiotemporally shared nearest neighbors; Indicates sample x i and sample x j The number of spatiotemporally shared nearest neighbors between them; x z This represents a shared sample in a spatiotemporally shared nearest neighbor set; Let x represent the sample. i To sample x z and sample x z To sample x j The sum of the spacetime distances, ;

[0105] Using the similarity calculation method described above, the greater the number of shared nearest neighbors between two samples, and the shorter the spatiotemporal path distance formed through these shared nearest neighbors, the higher the similarity between the two samples. This similarity considers not only the direct distance relationship between samples but also the common distribution relationship of samples in their local neighborhood structure.

[0106] Execute step S6: For each sample, take the sample as the target sample, select the neighboring samples whose spatiotemporal shared nearest neighbor similarity with the target sample meets the preset condition, and calculate the weighted shared nearest neighbor local density of the target sample based on the spatiotemporal shared nearest neighbor similarity between the target sample and each of the neighboring samples, and the number of spatiotemporal shared nearest neighbors between the target sample and each of the neighboring samples.

[0107] Specifically, the weighted shared nearest neighbor local density is determined based on the spatiotemporal shared nearest neighbor similarity between the target sample and its k most similar neighboring samples, as well as the number of shared samples. The higher the spatiotemporal shared nearest neighbor similarity between the target sample and its neighboring samples, and the more shared samples there are, the greater the contribution of the corresponding neighboring samples to the weighted shared nearest neighbor local density.

[0108] In one specific embodiment, for target sample x i Based on the spatiotemporal shared nearest neighbor similarity between the sample and other samples, the k samples with the highest similarity are selected to form a set H(x). i ).

[0109] Then, calculate the target sample x. i Weighted shared nearest neighbor local density:

[0110] ;

[0111] in, Indicates sample x i Weighted shared nearest neighbor local density, For sample x i and sample x j Spatiotemporal shared nearest neighbor similarity, Indicates sample x i and sample x j The number of spatiotemporally shared nearest neighbors between them.

[0112] Weighted shared nearest neighbor local density integrates the similarity between samples with the structural information of shared nearest neighbors. First, similarity is constructed using spatiotemporal weighted Euclidean distance and the intersection of shared nearest neighbors, ensuring that samples with more shared nearest neighbors and smaller path distances have higher similarity. Second, the contribution of the number of shared nearest neighbors is further enhanced by adding more of them. When distances are similar, the number of shared nearest neighbors directly determines the similarity and density increment; the larger the number of shared nearest neighbors, the higher the similarity and the greater the density contribution, thus finely characterizing the structural differences in local neighborhoods. When regional density differences are significant, sparse region samples receive a higher density contribution because their shared neighborhoods are more likely to overlap, effectively improving the adaptive recognition ability of density peaks for complex distribution data.

[0113] Compared to the traditional local density calculation method that only counts the number of samples within the cutoff distance, this embodiment can reduce the situation where multiple samples obtain the same local density value, thereby improving the discriminativeness of cluster center selection.

[0114] Execute step S7: select cluster centers from the spatiotemporal dataset based on the weighted shared nearest neighbor local density and the spatiotemporal relative distance determined based on the time-weighted distance and the spatial-weighted distance, and perform initial allocation of samples based on the cluster centers to obtain initial clusters.

[0115] Specifically, the methods for determining the spatiotemporal relative distance include:

[0116] The sample with the highest weighted shared nearest neighbor local density is identified from all samples and designated as the highest density sample.

[0117] For samples other than the maximum density sample, they are considered as non-maximum density samples; for each non-maximum density sample, from the samples whose weighted shared nearest local density is higher than that non-maximum density sample, the minimum value of the sum of the time-weighted distance and the spatial-weighted distance between the non-maximum density sample and the non-maximum density sample is selected as the spatiotemporal relative distance of the non-maximum density sample.

[0118] For the maximum density sample, the maximum value of the sum of the time-weighted distance and the spatial-weighted distance between the maximum density sample and other samples is taken as the spatiotemporal relative distance of the maximum density sample.

[0119] The sample x is determined based on the time-weighted distance and the spatial-weighted distance. i relative distance in space and time ;

[0120] ;

[0121] In the formula, The density of the sample with the highest weighted shared nearest neighbor local density among all samples is the weighted shared nearest neighbor local density of the sample with the highest density.

[0122] For non-maximum density samples x i Its spatiotemporal relative distance is defined as the minimum sum of the temporal weighted distance and the spatial weighted distance between it and samples with a weighted shared nearest neighbor local density higher than that sample:

[0123] ;

[0124] For the maximum density sample x i Its spatiotemporal relative distance is defined as the maximum value of the sum of its time-weighted distance and spatial-weighted distance with other samples:

[0125] ;

[0126] In the formula, X is the set of all samples, (Xx) i ) is the sample x removed from all samples. i The remaining sample set.

[0127] Spatiotemporal relative distance takes into account both spatial and temporal differences, which can avoid misjudgment caused by judging the relative relationship of samples solely based on spatial distance.

[0128] Calculate sample x i Decision value :

[0129] ;

[0130] Several samples are selected as cluster centers based on the magnitude of the decision values. For example, the samples with the top m decision values ​​can be selected as cluster centers, or samples with significantly higher local density and larger spatiotemporal relative distance can be selected as cluster centers based on the decision graph.

[0131] After determining the cluster centers, the non-cluster center samples are initially assigned. Specifically, the non-cluster center samples can be traversed in descending order of weighted shared nearest neighbor local density, and each sample can be assigned to the cluster containing the nearest sample whose weighted shared nearest neighbor local density is higher than that sample.

[0132] In another implementation, non-cluster center samples can be assigned to the cluster containing the high-density sample with the closest spatiotemporal weighted distance to form an initial cluster.

[0133] In step S8, for each initial cluster, the first average value of the weighted shared nearest neighbor local density of all samples in the initial cluster is calculated as the average local density of the initial cluster; and samples in the initial cluster whose weighted shared nearest neighbor local density is higher than the average local density are identified as candidate points; for each candidate point, a preset number of samples with the highest spatiotemporal shared nearest neighbor similarity to the candidate point are identified, and the second average value of the weighted shared nearest neighbor local density of the preset number of samples is calculated as the average local density of the neighborhood corresponding to the candidate point; the candidate point with the largest average local density of the neighborhood is identified as the representative point of the corresponding initial cluster.

[0134] For each initial cluster, samples with a weighted shared nearest neighbor local density higher than the average local density of that initial cluster are selected as candidate points. The candidate point set can then be represented as:

[0135] ;

[0136] Among them, C A This represents the set of candidate points corresponding to the initial cluster. The set of all samples in the initial cluster. This represents the average density of the initial cluster.

[0137] Candidate points are samples with high weighted shared nearest neighbor local density within a cluster, and they better reflect the stable structure within the cluster compared to boundary samples and sparse samples. By further filtering representative points from the candidate points, the assignment bias caused by using only the cluster center as the cluster representative can be avoided.

[0138] Representative points are determined from the candidate points based on the average local density of their similar neighborhoods.

[0139] Calculate the candidate point x i The corresponding average local density of similar neighborhoods :

[0140] ;

[0141] in, In the similarity matrix, the similarity between candidate point x and x is... i The set of k samples with the highest spatiotemporal shared nearest neighbor similarity is given. The similarity matrix is ​​constructed by the spatiotemporal shared nearest neighbor similarity between any two samples. The elements in the similarity matrix represent the spatiotemporal shared nearest neighbor similarity between the corresponding two samples.

[0142] The candidate point with the highest average density is selected as the representative point of this cluster. :

[0143] ;

[0144] In the formula, This means returning the argument that makes a function reach its maximum value, rather than returning the maximum value itself.

[0145] Representative points differ from cluster centers in traditional density-peak clustering. Cluster centers are primarily used to determine the initial cluster structure, while representative points characterize stable and continuous spatiotemporal distribution regions within the initial clusters. Representative points are determined by the average local density of similar neighborhoods of candidate points, thus avoiding the problem of insufficient representativeness caused by the occasional high density of a single sample.

[0146] In step S9, samples that have obtained initial cluster labels after initial allocation are taken as samples to be judged. The first similarity between the sample to be judged and the representative point of its current cluster is calculated, and the second similarity between the sample to be judged and the representative point of other clusters is calculated. The maximum value among all the second similarities is selected as the maximum second similarity. When the first similarity is less than the product of the maximum second similarity and the adjustment coefficient, the sample to be judged is identified as an uncertain sample.

[0147] Specifically, including:

[0148] Determine the first similarity between the sample to be judged and the representative point of its current cluster;

[0149] Determine the second similarity between the sample to be judged and other cluster representative points, and select the maximum value from all the second similarities as the maximum second similarity;

[0150] When the first similarity is less than the product of the maximum second similarity and the adjustment coefficient, the sample to be determined is identified as an uncertain sample.

[0151] In this embodiment, samples that have already obtained initial cluster labels after initial allocation are used as samples to be judged. Let the sample to be judged be x. iThe current cluster is C A The representative point of this cluster is Other clusters C B The representative point is .

[0152] Sample x to be judged i The first similarity with the representative point of the current cluster is:

[0153] ;

[0154] Sample x to be judged i The second similarity between the points and the representative points of other clusters is:

[0155] ;

[0156] Select the maximum second similarity from all second similarity scores:

[0157] ;

[0158] When the following conditions are met, sample x will be... i Identified as an uncertain sample:

[0159] ;

[0160] Here, θ is an adjustment coefficient used to regulate the stringency of the judgment on uncertain samples. In one embodiment, θ can be set to 0.8. In practical applications, θ can be adjusted according to the data distribution and clustering accuracy requirements.

[0161] When θ is large, the determination of uncertain samples is more stringent, and more boundary samples may be identified as uncertain samples; when θ is small, the number of uncertain samples identified decreases.

[0162] The above methods can effectively identify samples located at cluster boundaries, in spatiotemporally overlapping regions, or in areas where initial assignment may be incorrect.

[0163] In step S10, samples not identified as uncertain samples are identified as certain samples. The uncertain samples are traversed in descending order of weighted shared nearest neighbor local density. The object with the highest spatiotemporal shared nearest neighbor similarity to the current uncertain sample is selected from the candidate reassignment objects, and the current uncertain sample is reassigned to the cluster to which the object belongs. The candidate reassignment objects include representative points of each initial cluster and certain samples with a weighted shared nearest neighbor local density higher than the current uncertain sample. Foreshock events and aftershock events are identified based on the final clustering results.

[0164] This allows more reliable uncertain samples to complete the correction first, reducing the impact of low-density boundary samples on subsequent allocations.

[0165] Through the representative point correction mechanism, this embodiment can use more stable representative samples within the cluster to constrain the boundary sample assignment, reduce the chain error propagation caused by single-step allocation in traditional density peak clustering, and improve the clustering accuracy under complex spatiotemporal distributions.

[0166] Example 2: To evaluate the clustering performance of the spatiotemporal clustering method based on shared nearest neighbors and representative point correction (SNRP-STDPC) provided by this invention, experiments were conducted on simulated and real datasets, and compared with five clustering algorithms: spatiotemporal density spatial clustering algorithm (ST-DBSCAN), spatiotemporal clustering algorithm with fast search density peaks (ST-CFSFDP), spatiotemporal shared nearest neighbor density peak clustering algorithm (STSNN-DPC), spatiotemporal aggregation hierarchical clustering algorithm (ST-AGNES), and spatiotemporal density peak clustering algorithm with shared nearest neighbor weighting and membership point assignment (SNMP-STDPC).

[0167] This embodiment simulates five spatiotemporal datasets, STD1-STD5, with varying data volumes and numbers of clusters. Table 1 shows the basic information of the simulated datasets. Datasets STD1, STD2, and STD5 exhibit significant differences in their clusters along the time dimension, allowing us to examine the effectiveness of the algorithm when processing time-series data of significant importance. Dataset STD3 is designed to contain multiple spatially heterogeneous clusters within a specific time period, enabling us to examine the effectiveness of the algorithm when processing spatially densely distributed data. The uniqueness of dataset STD4 lies in its complex spatiotemporal coupling characteristics; the temporal characteristics of the clusters at the bottom of the dataset converge, while their characteristics differ significantly from those of the clusters at the top. Simultaneously, the overall dense spatial arrangement of the clusters presents a dual challenge to the spatiotemporal clustering task at both the temporal and spatial levels. Table 2 shows the basic information of the real dataset EQ1, which uses a domestic earthquake dataset spanning from July 2020 to July 2025, primarily consisting of moderate to strong earthquakes of magnitude 4.5. Its large time span makes it more representative of a wider range of real-world events. In this embodiment, the experimental environment for all clustering algorithms was: a 64-bit Windows 11 operating system, an AMD Ryzen 7 8745H processor, 16GB of memory, and MATLAB R2022b as the running software.

[0168] Table 1: Simulated Dataset

[0169]

[0170] Table 2: Real Dataset

[0171]

[0172] I. Conduct experiments using simulated datasets.

[0173] This embodiment uses three common external evaluation metrics to assess the clustering performance of the algorithms on a simulated dataset: Adjusted Mutual Information (AMI), Adjusted Rand Index (ARI), and Fowlkes-Mallows Index (FMI). Each evaluation metric has an upper limit of 1; a higher metric value indicates more accurate clustering results. To fairly evaluate the performance limits of each algorithm, reasonable search intervals and adjustment step sizes were preset for the core parameters, and multiple repeated experiments were conducted. Finally, the optimal result for each algorithm was selected on the corresponding dataset. Based on geometric analysis of the two-dimensional scatter plot, the maximum spatial radius S was extracted. max With maximum time height T max Two parameters. S max It is set to the maximum value of the minimum covering circle radius for each type of cluster, while T max This corresponds to the maximum range occupied by all clusters in the time dimension. The spatial neighborhood of the ST-DBSCAN algorithm is [0, 1, S]. max The spatial neighborhood is [0.1, T]. max [ / 2], step size is 0.1, minimum number of samples in the neighborhood minPts is taken as the logarithm of the dataset size N, lnN; the ST-CFSFDP algorithm parameters are set to spatial intercept d c Take [0.1, S] max Time intercept t c Take [0.1, T] max / 2], with a step size of 0.1; the spatial distance weight w1 and temporal distance weight w2 of the STSNN-DPC algorithm are set to 0.6 and 0.4, or 0.4 and 0.6, respectively, and the value of the neighbor parameter k ranges from 15% to 20% of the total number of samples, with the sample size of the highest similarity set to 15; the parameters in the ST-AGNES algorithm , The distance threshold for the ST-AGNES algorithm is N, where N is the total number of samples and the step size is 1; the time t-cutoff distance in the SNMP-STDPC algorithm is... c Take [0.1, T] max / 2], with a step size of 0.1, and the spatiotemporal k-nearest neighbors are taken as 1%~2% of the total number of samples, with a step size of 1; the SNRP-STDPC algorithm parameters are taken as 10%~15% of the total number of samples.

[0174] Table 3: Clustering results of the six algorithms on five simulated datasets

[0175]

[0176] Table 3 shows the clustering evaluation results of six algorithms on simulated datasets. Data in bold indicates the best clustering performance achieved by different algorithms when processing the same dataset. Observing Table 3, we can see that the SNRP-STDPC algorithm ranks first on all five datasets; the STSNN-DPC algorithm achieves second-best performance on four datasets (STD1, STD3, STD4, and STD5); the ST-DBSCAN algorithm performs second-best on the STD2 dataset; and the SNMP-STDPC algorithm is second only to the top three. In terms of AMI and ARI metrics, the SNRP-STDPC algorithm's average score is above 0.9, while the average scores of the other algorithms are below 0.9. The average FMI metric of the SNRP-STDPC algorithm is 4.77% higher than that of the second-best STSNN-DPC algorithm. In contrast, the ST-CFSFDP and ST-AGNES algorithms have poor overall performance, with both of their overall metrics ranking last.

[0177] Three-dimensional spatiotemporal scatter plots of datasets STD1, STD2, STD3, STD4, and STD5, as shown below. Figure 2 As shown. Figure 3 , Figure 4 and Figure 5 This paper presents the clustering results of six algorithms on three typical datasets, aiming to systematically evaluate their performance from different dimensions. Figure 3 The results validate the applicability of the SNRP-STDPC algorithm on the STD1 dataset, which has significant time characteristics; Figure 4 The ability of each algorithm to handle compact spatial distribution was then visually compared using the STD3 dataset. Figure 5 This is a comprehensive performance test conducted on the STD4 dataset, which presents both spatiotemporal challenges. All images are clustered using different colors, and identified outliers are marked in black.

[0178] The STD1 dataset consists of four class clusters of varying sizes, with samples connected in pairs, forming a spatial shape resembling a winding mountain road. The actual distribution of this dataset is as follows: Figure 2 As shown in (a) above, the various clusters exhibit significant differences in their temporal attributes. Figure 3It can be seen that, except for the ST-AGNES algorithm, all five algorithms can roughly identify the range of each cluster. Among them, the STSNN-DPC algorithm has some errors in the allocation of boundary samples, resulting in its accuracy being slightly lower than that of the SNRP-STDPC algorithm. The ST-CFSFDP algorithm did not find the correct cluster center, only identifying the three lower clusters, causing the uppermost cluster to be identified as outliers. The ST-DBSCAN and SNMP-STDPC algorithms made allocation errors when processing cluster boundary samples, causing all samples linked between clusters to be identified as outliers and samples within clusters to be marked as noise. The ST-AGNES algorithm failed to correctly identify the cluster center, resulting in unsatisfactory clustering results.

[0179] The STD3 dataset contains four specific clusters that exhibit high consistency in temporal characteristics but are spatially separated. Figure 4 It can be seen that the SNRP-STDPC, STSNN-DPC, ST-DBSCAN, and SNMP-STDPC algorithms can all correctly identify cluster centers and complete clustering. However, in terms of allocation strategy, SNRP-STDPC and STSNN-DPC algorithms successfully allocated the remaining samples, while ST-DBSCAN and SNMP-STDPC algorithms identified samples outside the clusters and samples within the clusters as outliers, leading to some errors. Although the ST-CFSFDP algorithm pre-determines four cluster centers based on the decision graph, only two cluster centers are obtained after merging. Due to the algorithm's allocation strategy along the time axis, all clusters are horizontally divided into three parts, resulting in poor clustering performance. The ST-AGNES algorithm divides the dataset into four clusters based on the time dimension, but its results fail to reflect the inherent spatial structure between samples, causing the algorithm to fail to complete accurate clustering.

[0180] The STD4 dataset contains two adjacent clusters of unequal size. The lower cluster exhibits similar temporal characteristics, while its characteristics differ significantly from those of the upper cluster. Furthermore, clusters that should be temporally separable are spatially intertwined. Analysis Figure 5It can be seen that the SNRP-STDPC, STSNN-DPC, ST-DBSCAN, ST-AGNES, and SNMP-STDPC algorithms all perform well, correctly identifying cluster centers. However, due to their different allocation strategies for remaining samples, the clustering results vary. The SNRP-STDPC algorithm uses local density for initial allocation and employs a representative point allocation strategy for uncertain samples, ensuring the accuracy of the clustering results and thus achieving excellent overall clustering performance. The STSNN-DPC algorithm incorrectly assigns some samples from regions with similar temporal characteristics between two clusters to the same cluster, leading to a decrease in algorithm accuracy. The ST-AGNES algorithm, a bottom-up hierarchical clustering algorithm, also incorrectly assigns some samples from regions with similar temporal characteristics between two clusters to the same cluster. The ST-CFSFDP algorithm's allocation strategy lacks consideration of spatial distance, causing cluster centers to be incorrectly identified as outliers. The outlier identification strategies of the ST-DBSCAN and SNMP-STDPC algorithms incorrectly identify samples that should have been correctly assigned as outliers.

[0181] II. Conduct experiments using real datasets.

[0182] This embodiment applies the SNRP-STDPC algorithm to real earthquake data to verify its practicality. The core objective of the analysis is to identify the main impact range of moderate to strong earthquakes and distinguish foreshocks from aftershocks in complex earthquake sequences. The necessity of this research lies in the fact that although existing spatial clustering techniques can identify seismic zones, they generally ignore the dynamic characteristics of seismic activity over time. A deeper understanding of the spatiotemporal clustering characteristics of these seismic events is a crucial step in exploring the mechanisms of strong earthquakes and also provides valuable references for earthquake prediction. The SNRP-STDPC algorithm can better balance temporal and spatial characteristics. The dataset EQ1 used in this study comes from the National Earthquake Science Data Center. Since weak and perceptible earthquakes (M≤4.5, where M is magnitude) can cause noticeable shaking but rarely result in disasters, this study selects data from moderate to strong earthquakes of magnitude 4.5 and above (M>4.5) within the past 5 years.

[0183] The spatial and spatiotemporal distribution of dataset EQ1, such as Figure 6 (a) and Figure 6 As shown in (b), this covers 492 earthquake events with a magnitude greater than 4.5 that occurred in China between July 2020 and July 2025. The SNRP-STDPC algorithm analyzes and obtains three clusters: red cluster STC1, yellow cluster STC2, and blue cluster STC3.

[0184] Based on the simulated and real-dataset experiments described above, it is evident that this invention proposes a spatiotemporal clustering algorithm based on shared nearest neighbors and representative point correction. By introducing spatiotemporal weighted Euclidean distance and a spatiotemporal shared nearest neighbor strategy, the calculation method for local density is improved, thereby enhancing the reliability of cluster center selection. A representative point allocation strategy is designed to handle uncertain samples by extracting representative points, and the allocation results are dynamically optimized by combining shared nearest neighbor similarity, thus strengthening spatiotemporal constraints and improving the accuracy of cluster allocation. Experimental results show that the SNRP-STDPC algorithm significantly improves both cluster center identification and overall clustering performance, outperforming comparative algorithms in all performance metrics.

[0185] Please see Figure 7 The diagram shows a structural block diagram of a spatiotemporal clustering system based on shared nearest neighbors and representative point correction according to this application.

[0186] like Figure 7 As shown, a spatiotemporal clustering system based on shared nearest neighbors and representative point correction includes: a data acquisition module 200, a weighted distance calculation module 201, a nearest neighbor set determination module 202, a shared nearest neighbor determination module 203, a similarity calculation module 204, a local density calculation module 205, a cluster center selection and initial allocation module 206, a representative point determination module 207, an uncertain sample identification module 208, a redistribution module 209, and an event identification module 210;

[0187] The data acquisition module 200 is used to acquire the spatiotemporal dataset to be clustered. The spatiotemporal dataset is earthquake monitoring data, which includes multiple earthquake event samples. Each sample includes spatial attributes and temporal attributes. The spatial attributes include longitude and latitude, and the temporal attribute of each sample is the time of earthquake occurrence.

[0188] The weighted distance calculation module 201 is used to determine the distance weight of the corresponding attribute dimension according to the degree of dispersion of the spatiotemporal dataset in each attribute dimension, and calculate the time-weighted distance and spatial-weighted distance between samples based on the distance weight.

[0189] The nearest neighbor set determination module 202 is used to determine the temporal nearest neighbor set of each sample based on the time-weighted distance, and to determine the spatial nearest neighbor set of each sample based on the spatial weighted distance.

[0190] The shared nearest neighbor determination module 203 is used to determine time shared nearest neighbors based on the overlapping samples of the time nearest neighbor sets of any two samples, determine spatial shared nearest neighbors based on the overlapping samples of the spatial nearest neighbor sets of any two samples, and jointly determine spatiotemporal shared nearest neighbors based on the time shared nearest neighbors and the spatial shared nearest neighbors.

[0191] Similarity calculation module 204 is used to calculate the spatiotemporal shared neighbor similarity between any two samples based on the number of shared samples in the spatiotemporal shared neighbors and the spatiotemporal distance corresponding to the shared samples;

[0192] The local density calculation module 205 is used to, for each sample, take the sample as the target sample, select the neighboring samples whose spatiotemporal shared nearest neighbor similarity with the target sample meets the preset conditions, and calculate the weighted shared nearest neighbor local density of the target sample based on the spatiotemporal shared nearest neighbor similarity between the target sample and each of the neighboring samples, and the number of spatiotemporal shared nearest neighbors between the target sample and each of the neighboring samples.

[0193] The cluster center selection and initial allocation module 206 is used to select cluster centers from the spatiotemporal dataset based on the weighted shared nearest neighbor local density and the spatiotemporal relative distance determined based on the time-weighted distance and the spatial-weighted distance, and to perform initial allocation of samples based on the cluster centers to obtain initial clusters;

[0194] The representative point determination module 207 is used to calculate, for each initial cluster, the first average value of the weighted shared nearest neighbor local density of all samples in the initial cluster as the average local density of the initial cluster; and to determine the samples in the initial cluster whose weighted shared nearest neighbor local density is higher than the average local density as candidate points; for each candidate point, to determine a preset number of samples with the highest spatiotemporal shared nearest neighbor similarity to the candidate point, and to calculate the second average value of the weighted shared nearest neighbor local density of the preset number of samples as the average local density of the neighborhood corresponding to the candidate point; and to determine the candidate point with the largest average local density of the neighborhood as the representative point of the corresponding initial cluster.

[0195] The uncertain sample identification module 208 is used to take samples that have obtained initial cluster labels after initial allocation as samples to be judged, calculate the first similarity between the sample to be judged and the representative point of its current cluster, and calculate the second similarity between the sample to be judged and the representative point of other clusters, and select the maximum value from all the second similarities as the maximum second similarity; when the first similarity is less than the product of the maximum second similarity and the adjustment coefficient, the sample to be judged is identified as an uncertain sample;

[0196] The reallocation module 209 is used to identify samples that were not identified as uncertain samples as certain samples, traverse the uncertain samples in descending order of weighted shared nearest neighbor local density, and select the object with the highest spatiotemporal shared nearest neighbor similarity to the current uncertain sample from the candidate reallocation objects, and reallocate the current uncertain sample to the cluster to which the object belongs; wherein, the candidate reallocation objects include representative points of each initial cluster and certain samples with a weighted shared nearest neighbor local density higher than the current uncertain sample;

[0197] The event recognition module 210 is used to identify foreshock events and aftershock events based on the final clustering results.

[0198] It should be understood that Figure 7 The modules and references described in the document Figure 1 The steps described in the text correspond to those in the method described above. Therefore, the operations, features, and corresponding technical effects described above also apply to the method described in the text. Figure 7 The various modules in the document will not be described in detail here.

[0199] In other embodiments, the present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein when the program instructions are executed by a processor, the processor performs the spatiotemporal clustering method based on shared nearest neighbors and representative point correction in any of the above method embodiments.

[0200] S1. Obtain the spatiotemporal dataset to be clustered. The spatiotemporal dataset is earthquake monitoring data, which includes multiple earthquake event samples. Each sample includes spatial attributes and temporal attributes. The spatial attributes include longitude and latitude, and the temporal attribute of each sample is the earthquake occurrence time.

[0201] S2. Determine the distance weights of the corresponding attribute dimensions based on the degree of dispersion of the spatiotemporal dataset in each attribute dimension, and calculate the time-weighted distance and spatial-weighted distance between samples based on the distance weights.

[0202] S3. Determine the temporal nearest neighbor set of each sample based on the time-weighted distance, and determine the spatial nearest neighbor set of each sample based on the spatial weighted distance;

[0203] S4. Determine the time-shared nearest neighbor based on the overlapping samples of the time-shared nearest neighbor sets of any two samples, determine the spatial-shared nearest neighbor based on the overlapping samples of the spatial-shared nearest neighbor sets of any two samples, and jointly determine the spatiotemporal-shared nearest neighbor based on the time-shared nearest neighbor and the spatial-shared nearest neighbor.

[0204] S5. Calculate the spatiotemporal similarity between any two samples based on the number of shared samples in the spatiotemporal shared nearest neighbors and the spatiotemporal distance corresponding to the shared samples.

[0205] S6. For each sample, take the sample as the target sample, select the neighboring samples whose spatiotemporal shared nearest neighbor similarity with the target sample meets the preset conditions, and calculate the weighted shared nearest neighbor local density of the target sample based on the spatiotemporal shared nearest neighbor similarity between the target sample and each of the neighboring samples, and the number of spatiotemporal shared nearest neighbors between the target sample and each of the neighboring samples.

[0206] S7. Based on the weighted shared nearest neighbor local density and the spatiotemporal relative distance determined by the time-weighted distance and the spatial-weighted distance, select cluster centers from the spatiotemporal dataset, and perform initial allocation of samples based on the cluster centers to obtain initial clusters;

[0207] S8. For each initial cluster, calculate the first average of the weighted shared nearest neighbor local densities of all samples in the initial cluster, as the average local density of the initial cluster; and determine the samples in the initial cluster whose weighted shared nearest neighbor local densities are higher than the average local density as candidate points; for each candidate point, determine a preset number of samples with the highest spatiotemporal shared nearest neighbor similarity to the candidate point, and calculate the second average of the weighted shared nearest neighbor local densities of the preset number of samples, as the average local density of the neighborhood corresponding to the candidate point; determine the candidate point with the largest average local density of the neighborhood as the representative point of the corresponding initial cluster;

[0208] S9. The sample that has obtained the initial cluster label after initial allocation is taken as the sample to be judged. The first similarity between the sample to be judged and the representative point of its current cluster is calculated, and the second similarity between the sample to be judged and the representative point of other clusters is calculated. The maximum value among all the second similarities is selected as the maximum second similarity. When the first similarity is less than the product of the maximum second similarity and the adjustment coefficient, the sample to be judged is identified as an uncertain sample.

[0209] S10. Identify samples that were not identified as uncertain samples as certain samples. Traverse the uncertain samples in descending order of weighted shared nearest neighbor local density. Select the object with the highest spatiotemporal shared nearest neighbor similarity to the current uncertain sample from the candidate reassignment objects. Reassign the current uncertain sample to the cluster to which the object belongs. The candidate reassignment objects include representative points of each initial cluster and certain samples with a weighted shared nearest neighbor local density higher than the current uncertain sample. Identify foreshock events and aftershock events based on the final clustering results.

[0210] Computer-readable storage media may include a stored program area and a stored data area, wherein the stored program area may store an operating system and an application program required for at least one function; the stored data area may store data created based on the use of a spatiotemporal clustering system based on shared nearest neighbor and representative point correction. Furthermore, the computer-readable storage medium may include high-speed random access memory, and may also include memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some embodiments, the computer-readable storage medium may optionally include memory remotely disposed relative to a processor, which can be connected to the spatiotemporal clustering system based on shared nearest neighbor and representative point correction via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0211] Figure 8 This is a schematic diagram of the structure of the electronic device provided in the embodiment of the present invention, such as... Figure 8 As shown, the device includes a processor 310 and a memory 320. The electronic device may also include an input device 330 and an output device 340. The processor 310, memory 320, input device 330, and output device 340 can be connected via a bus or other means. Figure 8 Taking a bus connection as an example, memory 320 is the computer-readable storage medium described above. Processor 310 executes various server functions and data processing by running non-volatile software programs, instructions, and modules stored in memory 320, thereby implementing the spatiotemporal clustering method based on shared nearest neighbors and representative point correction described in the above method embodiment. Input device 330 can receive input digital or character information and generate key signal inputs related to user settings and function control of the spatiotemporal clustering system based on shared nearest neighbors and representative point correction. Output device 340 may include a display device such as a screen.

[0212] The aforementioned electronic device can execute the method provided in the embodiments of the present invention, and has the corresponding functional modules and beneficial effects for executing the method. Technical details not described in detail in this embodiment can be found in the method provided in the embodiments of the present invention.

[0213] In one implementation, the above-described electronic device is applied to a spatiotemporal clustering system based on shared nearest neighbors and representative point correction, and is used as a client. It includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, which, when executed by the at least one processor, enable the at least one processor to:

[0214] S1. Obtain the spatiotemporal dataset to be clustered. The spatiotemporal dataset is earthquake monitoring data, which includes multiple earthquake event samples. Each sample includes spatial attributes and temporal attributes. The spatial attributes include longitude and latitude, and the temporal attribute of each sample is the earthquake occurrence time.

[0215] S2. Determine the distance weights of the corresponding attribute dimensions based on the degree of dispersion of the spatiotemporal dataset in each attribute dimension, and calculate the time-weighted distance and spatial-weighted distance between samples based on the distance weights.

[0216] S3. Determine the temporal nearest neighbor set of each sample based on the time-weighted distance, and determine the spatial nearest neighbor set of each sample based on the spatial weighted distance;

[0217] S4. Determine the time-shared nearest neighbor based on the overlapping samples of the time-shared nearest neighbor sets of any two samples, determine the spatial-shared nearest neighbor based on the overlapping samples of the spatial-shared nearest neighbor sets of any two samples, and jointly determine the spatiotemporal-shared nearest neighbor based on the time-shared nearest neighbor and the spatial-shared nearest neighbor.

[0218] S5. Calculate the spatiotemporal similarity between any two samples based on the number of shared samples in the spatiotemporal shared nearest neighbors and the spatiotemporal distance corresponding to the shared samples.

[0219] S6. For each sample, take the sample as the target sample, select the neighboring samples whose spatiotemporal shared nearest neighbor similarity with the target sample meets the preset conditions, and calculate the weighted shared nearest neighbor local density of the target sample based on the spatiotemporal shared nearest neighbor similarity between the target sample and each of the neighboring samples, and the number of spatiotemporal shared nearest neighbors between the target sample and each of the neighboring samples.

[0220] S7. Based on the weighted shared nearest neighbor local density and the spatiotemporal relative distance determined by the time-weighted distance and the spatial-weighted distance, select cluster centers from the spatiotemporal dataset, and perform initial allocation of samples based on the cluster centers to obtain initial clusters;

[0221] S8. For each initial cluster, calculate the first average of the weighted shared nearest neighbor local densities of all samples in the initial cluster, as the average local density of the initial cluster; and determine the samples in the initial cluster whose weighted shared nearest neighbor local densities are higher than the average local density as candidate points; for each candidate point, determine a preset number of samples with the highest spatiotemporal shared nearest neighbor similarity to the candidate point, and calculate the second average of the weighted shared nearest neighbor local densities of the preset number of samples, as the average local density of the neighborhood corresponding to the candidate point; determine the candidate point with the largest average local density of the neighborhood as the representative point of the corresponding initial cluster;

[0222] S9. The sample that has obtained the initial cluster label after initial allocation is taken as the sample to be judged. The first similarity between the sample to be judged and the representative point of its current cluster is calculated, and the second similarity between the sample to be judged and the representative point of other clusters is calculated. The maximum value among all the second similarities is selected as the maximum second similarity. When the first similarity is less than the product of the maximum second similarity and the adjustment coefficient, the sample to be judged is identified as an uncertain sample.

[0223] S10. Identify samples that were not identified as uncertain samples as certain samples. Traverse the uncertain samples in descending order of weighted shared nearest neighbor local density. Select the object with the highest spatiotemporal shared nearest neighbor similarity to the current uncertain sample from the candidate reassignment objects. Reassign the current uncertain sample to the cluster to which the object belongs. The candidate reassignment objects include representative points of each initial cluster and certain samples with a weighted shared nearest neighbor local density higher than the current uncertain sample. Identify foreshock events and aftershock events based on the final clustering results.

[0224] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods of various embodiments or some parts of embodiments.

[0225] 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 spatiotemporal clustering method based on shared nearest neighbors and representative point correction, characterized in that, include: S1. Obtain the spatiotemporal dataset to be clustered. The spatiotemporal dataset is earthquake monitoring data, which includes multiple earthquake event samples. Each sample includes spatial attributes and temporal attributes. The spatial attributes include longitude and latitude, and the temporal attribute of each sample is the earthquake occurrence time. S2. Determine the distance weights of the corresponding attribute dimensions based on the degree of dispersion of the spatiotemporal dataset in each attribute dimension, and calculate the time-weighted distance and spatial-weighted distance between samples based on the distance weights. S3. Determine the temporal nearest neighbor set of each sample based on the time-weighted distance, and determine the spatial nearest neighbor set of each sample based on the spatial weighted distance; S4. Determine the time-shared nearest neighbor based on the overlapping samples of the time-shared nearest neighbor sets of any two samples, determine the spatial-shared nearest neighbor based on the overlapping samples of the spatial-shared nearest neighbor sets of any two samples, and jointly determine the spatiotemporal-shared nearest neighbor based on the time-shared nearest neighbor and the spatial-shared nearest neighbor. S5. Calculate the spatiotemporal similarity between any two samples based on the number of shared samples in the spatiotemporal shared nearest neighbors and the spatiotemporal distance corresponding to the shared samples. S6. For each sample, take the sample as the target sample, select the neighboring samples whose spatiotemporal shared nearest neighbor similarity with the target sample meets the preset conditions, and calculate the weighted shared nearest neighbor local density of the target sample based on the spatiotemporal shared nearest neighbor similarity between the target sample and each of the neighboring samples, and the number of spatiotemporal shared nearest neighbors between the target sample and each of the neighboring samples. S7. Based on the weighted shared nearest neighbor local density and the spatiotemporal relative distance determined by the time-weighted distance and the spatial-weighted distance, select cluster centers from the spatiotemporal dataset, and perform initial allocation of samples based on the cluster centers to obtain initial clusters; S8. For each initial cluster, calculate the first average of the weighted shared nearest neighbor local densities of all samples in the initial cluster, as the average local density of the initial cluster; and determine the samples in the initial cluster whose weighted shared nearest neighbor local densities are higher than the average local density as candidate points; for each candidate point, determine a preset number of samples with the highest spatiotemporal shared nearest neighbor similarity to the candidate point, and calculate the second average of the weighted shared nearest neighbor local densities of the preset number of samples, as the average local density of the neighborhood corresponding to the candidate point; determine the candidate point with the largest average local density of the neighborhood as the representative point of the corresponding initial cluster; S9. Take the sample that has obtained the initial cluster label after initial allocation as the sample to be judged, calculate the first similarity between the sample to be judged and the representative point of its current cluster, and calculate the second similarity between the sample to be judged and the representative point of other clusters. Select the maximum value from all the second similarities as the maximum second similarity. When the first similarity is less than the product of the maximum second similarity and the adjustment coefficient, the sample to be determined is identified as an uncertain sample. S10. Identify samples that were not identified as uncertain samples as certain samples. Traverse the uncertain samples in descending order of weighted shared nearest neighbor local density. Select the object with the highest spatiotemporal shared nearest neighbor similarity to the current uncertain sample from the candidate reassignment objects. Reassign the current uncertain sample to the cluster to which the object belongs. The candidate reassignment objects include representative points of each initial cluster and certain samples with a weighted shared nearest neighbor local density higher than the current uncertain sample. Identify foreshock events and aftershock events based on the final clustering results.

2. The spatiotemporal clustering method based on shared nearest neighbors and representative point correction according to claim 1, characterized in that, The step of determining the distance weights for corresponding attribute dimensions based on the dispersion of the spatiotemporal dataset across each attribute dimension includes: Calculate the longitude dimension, latitude dimension, and standard deviation of the time dimension of the spatiotemporal dataset; The distance weights for the corresponding dimensions are determined based on the sum of the standard deviations of the longitude dimension, the latitude dimension, and the time dimension, as well as the standard deviations of the longitude dimension, the latitude dimension, and the time dimension.

3. The spatiotemporal clustering method based on shared nearest neighbors and representative point correction according to claim 1, characterized in that, The time-weighted distance is determined based on the distance weight in the time dimension and the difference between the two samples in the time dimension; The spatial weighted distance is determined based on the distance weights of the spatial dimensions and the differences between the two samples in the longitude and latitude dimensions.

4. The spatiotemporal clustering method based on shared nearest neighbors and representative point correction according to claim 1, characterized in that, The time nearest neighbor set is a set of the top k samples selected in ascending order of time-weighted distance between the target sample and other samples. The spatial nearest neighbor set is a set consisting of the top k samples selected in ascending order of the spatial weighted distance between the target sample and other samples. Where k is the preset number of nearest neighbors.

5. The spatiotemporal clustering method based on shared nearest neighbors and representative point correction according to claim 1, characterized in that, The spatiotemporal shared nearest neighbor similarity is determined by the number of shared samples between two samples and the spatiotemporal path distance formed by the shared samples. When there are no shared samples between two samples, the spatiotemporal shared nearest neighbor similarity is set to zero.

6. The spatiotemporal clustering method based on shared nearest neighbors and representative point correction according to claim 1, characterized in that, The weighted shared nearest neighbor local density is determined based on the spatiotemporal shared nearest neighbor similarity between the target sample and its k most similar neighboring samples, as well as the number of shared samples.

7. The spatiotemporal clustering method based on shared nearest neighbors and representative point correction according to claim 1, characterized in that, The methods for determining the spatiotemporal relative distance include: The sample with the highest weighted shared nearest neighbor local density is identified from all samples and designated as the highest density sample. For samples other than the maximum density sample, they are considered as non-maximum density samples; for each non-maximum density sample, from the samples whose weighted shared nearest local density is higher than that non-maximum density sample, the minimum value of the sum of the time-weighted distance and the spatial-weighted distance between the non-maximum density sample and the non-maximum density sample is selected as the spatiotemporal relative distance of the non-maximum density sample. For the maximum density sample, the maximum value of the sum of the time-weighted distance and the spatial-weighted distance between the maximum density sample and other samples is taken as the spatiotemporal relative distance of the maximum density sample.

8. A spatiotemporal clustering system based on shared nearest neighbors and representative point correction, used to implement the method described in any one of claims 1 to 7, characterized in that, include: The data acquisition module is used to acquire the spatiotemporal dataset to be clustered. The spatiotemporal dataset is earthquake monitoring data, which includes multiple earthquake event samples. Each sample includes spatial attributes and temporal attributes. The spatial attributes include longitude and latitude, and the temporal attribute of each sample is the time of earthquake occurrence. The weighted distance calculation module is used to determine the distance weight of the corresponding attribute dimension based on the dispersion of the spatiotemporal dataset in each attribute dimension, and to calculate the time-weighted distance and spatial-weighted distance between samples based on the distance weight. The nearest neighbor set determination module is used to determine the temporal nearest neighbor set of each sample based on the time-weighted distance, and to determine the spatial nearest neighbor set of each sample based on the spatial weighted distance. The shared nearest neighbor determination module is used to determine time shared nearest neighbors based on the overlapping samples of the time nearest neighbor sets of any two samples, determine spatial shared nearest neighbors based on the overlapping samples of the spatial nearest neighbor sets of any two samples, and jointly determine spatiotemporal shared nearest neighbors based on the time shared nearest neighbors and the spatial shared nearest neighbors. The similarity calculation module is used to calculate the spatiotemporal shared neighbor similarity between any two samples based on the number of shared samples in the spatiotemporal shared nearest neighbors and the spatiotemporal distance corresponding to the shared samples. The local density calculation module is used to, for each sample, take the sample as the target sample, select the neighboring samples whose spatiotemporal shared nearest neighbor similarity with the target sample meets the preset conditions, and calculate the weighted shared nearest neighbor local density of the target sample based on the spatiotemporal shared nearest neighbor similarity between the target sample and each of the neighboring samples, and the number of spatiotemporal shared nearest neighbors between the target sample and each of the neighboring samples. The cluster center selection and initial allocation module is used to select cluster centers from the spatiotemporal dataset based on the weighted shared nearest neighbor local density and the spatiotemporal relative distance determined based on the time-weighted distance and the spatial-weighted distance, and to perform initial allocation of samples based on the cluster centers to obtain initial clusters; The representative point determination module is used to calculate, for each initial cluster, the first average value of the weighted shared nearest neighbor local density of all samples in the initial cluster, as the average local density of the initial cluster; and to determine the samples in the initial cluster whose weighted shared nearest neighbor local density is higher than the average local density as candidate points; for each candidate point, to determine a preset number of samples with the highest spatiotemporal shared nearest neighbor similarity to the candidate point, and to calculate the second average value of the weighted shared nearest neighbor local density of the preset number of samples, as the average local density of the neighborhood corresponding to the candidate point; and to determine the candidate point with the largest average local density of the neighborhood as the representative point of the corresponding initial cluster. The uncertain sample identification module is used to take the samples that have obtained initial cluster labels after initial allocation as samples to be judged, calculate the first similarity between the sample to be judged and the representative point of its current cluster, and calculate the second similarity between the sample to be judged and the representative point of other clusters, and select the maximum value from all the second similarities as the maximum second similarity. When the first similarity is less than the product of the maximum second similarity and the adjustment coefficient, the sample to be determined is identified as an uncertain sample. The reassignment module is used to identify samples that were not identified as uncertain samples as certain samples, traverse the uncertain samples in descending order of weighted shared nearest neighbor local density, and select the object with the highest spatiotemporal shared nearest neighbor similarity to the current uncertain sample from the candidate reassignment objects, and reassign the current uncertain sample to the cluster to which the object belongs; wherein, the candidate reassignment objects include representative points of each initial cluster and certain samples with a weighted shared nearest neighbor local density higher than that of the current uncertain sample; The event identification module is used to identify foreshock events and aftershock events based on the final clustering results.

9. An electronic device, characterized in that, include: At least one processor, and a memory communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Earthquake event space-time density peak value clustering method and device, medium and electronic equipment

    CN120123802A

  • Space-time density peak value clustering method based on local covariance and space-time shared neighbor

    CN121456519A