Intelligent clustering mining method and system for passenger group characteristics based on spatio-temporal data fusion
By acquiring time and space data of customer groups, performing dynamic weighted fusion and high-order feature representation, the problem of insufficient data fusion in existing customer feature clustering methods is solved, achieving a comprehensive characterization and accurate clustering of customer group behavior, and providing a basis for precision marketing and personalized services.
Patent Information
- Application Number
- CN202510738837.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-04
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2045-06-04
AI Technical Summary
Existing customer group feature clustering methods lack effective data fusion mechanisms and cannot comprehensively consider the similarity of customer group behavioral characteristics across different dimensions. This makes it difficult for clustering results to fully reflect the true behavioral patterns of the customer group. Furthermore, traditional clustering algorithms have limited capabilities when dealing with complex relationships and are unable to capture potential complex customer group relationships.
By acquiring time-dimensional behavioral data and spatial-dimensional location data of the target customer group, calculating the time similarity matrix and spatial similarity matrix, performing dynamic weighted fusion, constructing a high-order association graph, and using graph neural networks to extract high-order feature representations, combined with density peak points and adaptive clustering number determination methods, intelligent clustering of the customer group is achieved.
It achieves a comprehensive characterization of customer spatiotemporal behavior patterns, improves the accuracy and comprehensiveness of customer feature mining, automatically discovers customer groups with similar spatiotemporal behavior characteristics, provides a more effective basis for customer segmentation, and improves the accuracy and interpretability of clustering results.
Smart Images

Figure CN120634608B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data mining, and in particular to a customer group feature intelligent clustering mining method and system fusing spatio-temporal data. BACKGROUND
[0002] Traditional customer group analysis mainly relies on demographic characteristics or simple behavior indicators for division, while the customer group feature clustering mining method fusing spatio-temporal data can simultaneously consider the behavior patterns of customers in the time dimension and the location distribution characteristics in the space dimension, thereby providing more comprehensive and accurate customer group insights. This clustering technology based on multi-dimensional data fusion has wide application prospects in user portrait construction and precision marketing in retail, finance, telecommunications and other industries.
[0003] However, the existing customer group feature clustering methods have the following main defects and deficiencies:
[0004] Firstly, existing technologies often process time dimension data or space dimension data separately, lack effective data fusion mechanisms, and cannot comprehensively consider the similarity of customer group behavior characteristics in different dimensions, resulting in clustering results that are difficult to fully reflect the real behavior patterns of customer groups.
[0005] Secondly, traditional clustering algorithms have limited ability in handling complex customer group association relationships, and usually use simple distance measures such as Euclidean distance to calculate the similarity between samples, ignoring the high-order nonlinear associations that may exist between customer groups, making it difficult to capture potential complex customer group relationships in the clustering results. SUMMARY
[0006] The embodiments of the present application provide a customer group feature intelligent clustering mining method and system fusing spatio-temporal data, which can solve the problems in the prior art.
[0007] In a first aspect of the embodiments of the present application, a customer group feature intelligent clustering mining method fusing spatio-temporal data is provided, comprising:
[0008] obtaining time dimension behavior data and space dimension location data of a target customer group;
[0009] based on the time dimension behavior data and the space dimension location data, calculating a time similarity matrix and a space similarity matrix of the customer group, respectively, the time similarity matrix and the space similarity matrix representing the similarity of the time dimension behavior patterns and the space dimension location distribution between different customer groups, respectively;
[0010] dynamically weighting and fusing the time similarity matrix and the space similarity matrix, wherein the fusion weight is obtained by solving an optimization objective function that maximizes mutual information and minimizes information redundancy, to generate a spatio-temporal fusion similarity matrix;
[0011] Based on the spatio-temporal fusion similarity matrix, a high-order correlation graph of customer group characteristics is constructed, a high-order feature representation of the customer group node is extracted through a graph neural network, and a fusion feature vector is obtained;
[0012] Based on the fusion feature vector, the local density and relative distance of each customer group sample are calculated, the density peak point is identified as a clustering center, and the number of clusters is adaptively determined in combination with the similarity threshold in the spatio-temporal fusion similarity matrix.
[0013] According to the determined clustering center and the number of clusters, the density reachability principle is used to divide the customer groups with similar spatio-temporal behavior characteristics into corresponding clustering clusters, and a customer group clustering result is obtained.
[0014] Based on the time dimension behavior data and the space dimension position data, a time similarity matrix and a space similarity matrix of the customer group are calculated, including:
[0015] The time dimension behavior data and the space dimension position data are normalized to generate time behavior feature sequences and space position feature sequences.
[0016] Based on the time behavior feature sequence, a sliding time window is used to segment the customer group's consumption time, and the customer group's consumption frequency distribution feature and consumption amount distribution feature are extracted in each time window.
[0017] Based on the consumption frequency distribution feature and the consumption amount distribution feature, a time series behavior graph of the customer group is constructed, the nodes of the time series behavior graph represent the customer group, and the connection weight between the nodes is obtained by weighting the Pearson correlation coefficient of the consumption frequency distribution feature and the cosine similarity of the consumption amount distribution feature.
[0018] The time series embedding vector of the customer group node is obtained by random walk sampling of the time series behavior graph, and the time similarity matrix between the customer groups is calculated based on the time series embedding vector.
[0019] Based on the space position feature sequence, the consumption place coordinate information in it is divided into grid units, the proportion of the stay duration of each customer group in different grid units is calculated, the space distribution feature vector of the customer group is generated, and the space similarity matrix between the customer groups is calculated based on the space distribution feature vector.
[0020] The time similarity matrix and the space similarity matrix are dynamically weighted and fused, wherein the fusion weight is obtained by solving an optimization objective function that maximizes mutual information and minimizes information redundancy, a spatio-temporal fusion similarity matrix is generated, including:
[0021] calculate time dimension mutual information between each pair of customer groups in the time similarity matrix to obtain a time dimension mutual information matrix, and calculate space dimension mutual information between each pair of customer groups in the space similarity matrix to obtain a space dimension mutual information matrix;
[0022] construct a spatio-temporal dimension joint probability distribution matrix, elements of the spatio-temporal dimension joint probability distribution matrix being calculated from mutual information values of corresponding pairs of customer groups in the time dimension mutual information matrix and the space dimension mutual information matrix;
[0023] perform probability density modeling on the spatio-temporal dimension joint probability distribution matrix, determine adaptive bandwidth parameters of a kernel function, calculate conditional entropy of the time dimension and the space dimension based on the adaptive bandwidth parameters of the kernel function, and construct a fusion weight optimization objective function;
[0024] According to the spatio-temporal dimension joint probability distribution matrix and the adaptive bandwidth parameters of the kernel function, the fusion weight optimization objective function is iteratively solved to obtain time dimension fusion weights and space dimension fusion weights;
[0025] The time similarity matrix is weighted using the time dimension fusion weights, and the space similarity matrix is weighted using the space dimension fusion weights, and a spatio-temporal fusion similarity matrix is obtained based on the weighted matrices.
[0026] Perform probability density modeling on the spatio-temporal dimension joint probability distribution matrix, determine adaptive bandwidth parameters of a kernel function, calculate conditional entropy of the time dimension and the space dimension based on the adaptive bandwidth parameters of the kernel function, and construct a fusion weight optimization objective function, comprising:
[0027] Divide the spatio-temporal dimension joint probability distribution matrix into a plurality of data sub-regions, and construct a Gaussian kernel function for each data sub-region to calculate initial bandwidth parameters of the Gaussian kernel function;
[0028] Based on the probability values in the spatio-temporal dimension joint probability distribution matrix, a variational distribution is used to estimate the distribution type of each data sub-region, and a prior distribution of the bandwidth parameters is constructed based on the initial bandwidth parameters;
[0029] By calculating the expectation value and variance of the variational distribution, and combining the density distribution characteristics of the data sub-regions, the distribution parameters and bandwidth parameters of each data sub-region are iteratively updated until convergence to obtain optimal variational distribution;
[0030] Calculate the information divergence between the optimal variational distribution and the real distribution, and take the negative value of the information divergence as the lower bound of evidence;
[0031] The optimal bandwidth parameter corresponding to each data sub-region is obtained by maximizing the evidence lower bound in combination with the density distribution characteristics of the data sub-region;
[0032] The conditional probability distribution of the time dimension and the space dimension in each data sub-region is calculated by using the Gaussian kernel function corresponding to the optimal bandwidth parameter, and the time dimension conditional entropy and the space dimension conditional entropy are obtained.
[0033] Based on the time dimension conditional entropy, the space dimension conditional entropy and the optimal variational distribution of each data sub-region, a fusion weight optimization objective function is constructed.
[0034] Based on the spatio-temporal fusion similarity matrix, a high-order association graph of passenger group features is constructed, and a high-order feature representation of a passenger group node is extracted through a graph neural network to obtain a fusion feature vector, including:
[0035] Based on the spatio-temporal fusion similarity matrix, a high-order association graph of passenger group features is constructed, and each passenger group is taken as a node in the graph and the similarity value is taken as the edge weight between nodes.
[0036] The structural importance and the topological distance of each node in the high-order association graph are calculated, a first-order neighbor node set is constructed based on the structural importance and the topological distance, and the nodes in the first-order neighbor node set are weighted calculated by using the structural importance to obtain a node attention weight matrix.
[0037] Based on the attention weight matrix and the structural importance, the features of the first-order neighbor nodes are multidimensionally transformed, the transformed features are hierarchically aggregated according to the topological distance, and the historical feature information is retained in each layer of aggregation to obtain a multi-level feature representation.
[0038] The multi-level feature representation is weighted pooled according to the structural importance and the topological distance to obtain a fixed-dimension feature representation.
[0039] The fixed-dimension feature representation is fused with the structural importance, and a final fusion feature vector is obtained through nonlinear transformation.
[0040] Based on the attention weight matrix and the structural importance, the features of the first-order neighbor nodes are multidimensionally transformed, the transformed features are hierarchically aggregated according to the topological distance, and the historical feature information is retained in each layer of aggregation to obtain a multi-level feature representation, including:
[0041] The local clustering coefficient and the centrality index of the first-order neighbor nodes are calculated, and a feature decomposition matrix is constructed based on the local clustering coefficient and the centrality index.
[0042] perform tensor decomposition on the feature decomposition matrix, the attention weight matrix and the structure importance to obtain a mapping matrix of a plurality of feature subspaces;
[0043] transform initial features of the first-order neighbor nodes based on the mapping matrix, and construct a hierarchical feature propagation structure according to the topological distance, wherein a local neighborhood density and a relative density of nodes are calculated in each layer of feature propagation;
[0044] update attention weights by using the local neighborhood density and the relative density, adaptively combine features of to-be-aggregated nodes with the updated attention weights and structure importance, retain historical layer feature information through a residual mechanism, and obtain hierarchical feature representations of each layer;
[0045] weight and combine hierarchical feature representations of each layer based on the local neighborhood density and the relative density to obtain hierarchical features of a single feature subspace;
[0046] adaptively fuse hierarchical features of the plurality of feature subspaces to obtain a multi-level feature representation.
[0047] calculate a local density and a relative distance of each customer group sample based on the fused feature vector, identify a density peak point as a clustering center, and adaptively determine a number of clusters in combination with a similarity threshold in the spatio-temporal fusion similarity matrix, including:
[0048] calculate a feature distance matrix of each customer group sample based on the fused feature vector, and weight and combine the feature distance matrix and the spatio-temporal fusion similarity matrix to obtain a comprehensive distance matrix;
[0049] perform a truncated radius search on a distance value of each sample in the comprehensive distance matrix, calculate a local density of each sample based on the comprehensive distance matrix within a range of the truncated radius, and obtain a density distribution sequence;
[0050] calculate a density difference degree between samples based on the density distribution sequence, and select a high-density sample as a density reference point from the comprehensive distance matrix according to the density difference degree;
[0051] calculate distances of other samples to the density reference point based on the comprehensive distance matrix, correct distance values in combination with the local density, and obtain a relative distance sequence;
[0052] mapping the density distribution sequence and the relative distance sequence to a two-dimensional space to construct a density-distance decision graph, calculating a similarity distribution based on the spatio-temporal fusion similarity matrix to obtain a similarity threshold, adaptively screening density peak points in the density-distance decision graph by using the similarity threshold and the density difference degree, and taking the density peak points and the number of the density peak points as a clustering center and a clustering number respectively.
[0053] In a second aspect, the embodiment of the present application provides a customer group feature intelligent clustering mining system for fused spatio-temporal data, which comprises:
[0054] A first unit is configured to acquire time-dimension behavior data and space-dimension position data of a target customer group.
[0055] A second unit is configured to calculate a time similarity matrix and a space similarity matrix of the customer group based on the time-dimension behavior data and the space-dimension position data, respectively, wherein the time similarity matrix and the space similarity matrix represent the similarity degrees of time-dimension behavior modes and space-dimension position distributions between different customer groups.
[0056] A third unit is configured to dynamically weight fuse the time similarity matrix and the space similarity matrix, wherein a fusion weight is obtained by solving an optimization objective function of maximizing mutual information and minimizing information redundancy, and a spatio-temporal fusion similarity matrix is generated.
[0057] A fourth unit is configured to construct a high-order correlation graph of customer group features based on the spatio-temporal fusion similarity matrix, extract high-order feature representations of customer group nodes through a graph neural network, and obtain a fusion feature vector.
[0058] A fifth unit is configured to calculate local densities and relative distances of each customer group sample based on the fusion feature vector, identify density peak points as clustering centers, and adaptively determine a clustering number in combination with a similarity threshold in the spatio-temporal fusion similarity matrix.
[0059] A sixth unit is configured to divide customer groups with similar spatio-temporal behavior features into corresponding clustering clusters by using a density reachability principle according to the determined clustering centers and the clustering number, and obtain a customer group clustering result.
[0060] In a third aspect, the embodiment of the present application provides an electronic device, which comprises:
[0061] a processor;
[0062] a memory for storing processor-executable instructions;
[0063] The processor is configured to invoke the instructions stored in the memory to execute the method described above.
[0064] In a fourth aspect, the present application provides a computer readable storage medium having computer program instructions stored thereon, which, when executed by a processor, implement the method described above.
[0065] The present application has the following advantages:
[0066] The fusion spatiotemporal data customer group feature intelligent clustering mining method provided by the present application realizes comprehensive characterization of the spatiotemporal behavior pattern of the customer group by obtaining the time dimension behavior data and the space dimension position data of the target customer group, calculating and dynamically fusing the time and space similarity matrices, overcomes the limitations of single dimension data analysis, and improves the accuracy and comprehensiveness of customer group feature mining.
[0067] The fusion weight of spatiotemporal data is determined by the optimization objective function based on mutual information maximization and redundancy minimization, the present application realizes adaptive fusion of spatiotemporal data, avoids the subjectivity and uncertainty of manually specifying the fusion weight, can automatically adjust the weight according to the importance of spatiotemporal data in different scenarios, and improves the objectivity and adaptability of the fusion effect.
[0068] By constructing a customer group feature high-order correlation graph and extracting high-order feature representation by using a graph neural network, and combining the density peak value clustering and the adaptive clustering number determination method, the present application can automatically discover customer groups with similar spatiotemporal behavior characteristics without pre-specifying the clustering number, improves the accuracy and interpretability of the clustering result, and provides a more effective customer group segmentation basis for precision marketing and personalized service. BRIEF DESCRIPTION OF DRAWINGS
[0069] Figure 1 The figure is a flowchart of the fusion spatiotemporal data customer group feature intelligent clustering mining method of the present application embodiment.
[0070] Figure 2 The figure is a probability density modeling simulation diagram of the spatiotemporal dimension joint probability distribution.
[0071] Figure 3 The figure is a comparison diagram of the customer group classification performance of different clustering methods. DETAILED DESCRIPTION
[0072] In order to make the purpose, technical scheme and advantages of the present application embodiments clearer, the technical scheme of the present application embodiments will be described clearly and completely below with reference to the drawings of the present application embodiments. Obviously, the described embodiments are only part of the embodiments of the present application, not all the embodiments. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.
[0073] The technical solutions of the present application are described in detail below with specific examples. The following specific examples can be combined with each other, and the same or similar concepts or processes may not be described in detail in some examples.
[0074] Figure 1 The flowchart of the customer group feature intelligent clustering mining method for fusing spatio-temporal data according to an embodiment of the present application is shown in FIG. 1, which includes the following steps: Figure 1
[0075] Obtaining time-dimension behavior data and space-dimension location data of a target customer group;
[0076] Based on the time-dimension behavior data and the space-dimension location data, respectively calculating a time similarity matrix and a space similarity matrix of the customer group, the time similarity matrix and the space similarity matrix respectively representing the similarity degree of the time-dimension behavior mode and the space-dimension location distribution between different customer groups;
[0077] Fusing the time similarity matrix and the space similarity matrix dynamically, wherein the fusion weight is obtained by solving an optimization objective function of maximizing mutual information and minimizing information redundancy, to generate a spatio-temporal fusion similarity matrix;
[0078] Based on the spatio-temporal fusion similarity matrix, constructing a high-order association graph of customer group features, extracting high-order feature representation of customer group nodes through a graph neural network, and obtaining a fusion feature vector;
[0079] Based on the fusion feature vector, calculating the local density and relative distance of each customer group sample, identifying a density peak point as a clustering center, and adaptively determining the number of clusters in combination with the similarity threshold in the spatio-temporal fusion similarity matrix;
[0080] According to the determined clustering center and the number of clusters, using the density reachability principle to divide customer groups with similar spatio-temporal behavior features into corresponding clustering clusters, and obtaining a customer group clustering result.
[0081] In an optional implementation, based on the time-dimension behavior data and the space-dimension location data, respectively calculating a time similarity matrix and a space similarity matrix of the customer group includes:
[0082] Respectively performing normalization processing on the time-dimension behavior data and the space-dimension location data to generate a time behavior feature sequence and a space location feature sequence;
[0083] Based on the time behavior feature sequence, using a sliding time window to segment the consumption time of the customer group, and extracting the consumption frequency distribution feature and the consumption amount distribution feature of the customer group in each time window;
[0084] Based on the consumption frequency distribution characteristics and the consumption amount distribution characteristics, a time sequence behavior graph of the customer group is constructed, a node of the time sequence behavior graph represents a customer group, and a connection weight between nodes is obtained by weighting the Pearson correlation coefficient of the consumption frequency distribution characteristics and the cosine similarity of the consumption amount distribution characteristics.
[0085] By performing random walk sampling on the time sequence behavior graph, a time sequence embedding vector of a customer group node is obtained, and a time similarity matrix between customer groups is calculated based on the time sequence embedding vector.
[0086] Based on the spatial location feature sequence, the consumption place coordinate information therein is divided into grid units, the proportion of the stay duration of each customer group in different grid units is calculated, a spatial distribution feature vector of the customer group is generated, and a spatial similarity matrix between customer groups is calculated based on the spatial distribution feature vector.
[0087] In the embodiment, a method for calculating a customer group similarity matrix based on time dimension behavior data and space dimension location data is provided, which can comprehensively capture the behavior characteristics of customer groups in time and space dimensions, and provide data support for subsequent precise marketing and customer group management.
[0088] For example, the time dimension behavior data includes consumption timestamps, consumption frequencies and consumption amounts of customer group members, and the like; and the space dimension location data includes geographic coordinate information of consumption places of customer group members. For example, for a customer group A in a certain business district, the time dimension behavior data thereof can include records such as "2023-01-01 10:15:30 consumption 100 yuan" and "2023-01-03 18:20:45 consumption 85 yuan"; and the space dimension location data thereof can include information such as "(116.4074, 39.9042) consumption place stay 30 minutes".
[0089] The obtained time dimension behavior data and space dimension location data are normalized respectively to eliminate the dimensional differences between different data indicators. For the time dimension behavior data, the consumption amount is converted to a value between 0 and 1, for example, if the highest consumption of a certain customer group in a day is 1000 yuan, then the consumption record of 500 yuan is normalized to 0.5. For the space dimension location data, the geographic coordinates are standardized to a unified coordinate system, and the stay duration is converted to a standardized value. After such processing, a time behavior feature sequence and a space location feature sequence are generated, which makes the subsequent analysis more accurate.
[0090] For the time behavior feature sequence, a sliding time window technique is used to segment the consumption time of the customer group. For example, set the time window length to 7 days and the sliding step to 1 day, slide the data for 30 consecutive days to obtain 24 time windows. In each time window, the consumption frequency distribution feature and the consumption amount distribution feature of the customer group are extracted. The consumption frequency distribution feature records the proportion of the number of times of consumption of the customer group in different time periods (such as 9-12 am, 12-15 pm, etc.) in the time window; the consumption amount distribution feature records the proportion of the consumption amount in each time period. For example, the consumption frequency distribution feature of customer group A in the first time window may be [0.2, 0.3, 0.4, 0.1], indicating the proportion of the number of times of consumption in four time periods; the consumption amount distribution feature may be [0.15, 0.25, 0.5, 0.1], indicating the proportion of the consumption amount in four time periods.
[0091] Based on the extracted consumption frequency distribution feature and consumption amount distribution feature, a time sequence behavior graph of the customer group is constructed. In the graph, each node represents a customer group, and the connection weight between the nodes is obtained by weighting the Pearson correlation coefficient of the consumption frequency distribution feature and the cosine similarity of the consumption amount distribution feature between two customer groups. The Pearson correlation coefficient measures the correlation degree of the consumption frequency distribution of two customer groups, and the cosine similarity measures the similarity degree of the consumption amount distribution. For example, if the Pearson correlation coefficient of the consumption frequency distribution feature of customer group A and customer group B is 0.8, and the cosine similarity of the consumption amount distribution feature is 0.7, then the connection weight between them can be set to 0.75 (i.e. the average of 0.8 and 0.7).
[0092] By random walk sampling on the constructed time sequence behavior graph, the time sequence embedding vector of the customer group node is obtained. The random walk process starts from each customer group node and jumps according to the connection weight probability between nodes to generate multiple walk paths. For example, starting from customer group A, the path "A-B-C-E-A" may be generated. Based on these paths, deep learning technology is used to learn the low-dimensional embedding representation of each customer group node. For example, the time sequence embedding vector of customer group A may be [0.12, 0.34, -0.56, 0.78], indicating its behavior features in the time dimension. According to these time sequence embedding vectors, the time similarity matrix between customer groups is calculated, and the cosine similarity between vectors can be used as the similarity measure. For example, if the cosine similarity of the time sequence embedding vectors of customer group A and customer group B is 0.85, then the value of the corresponding position in the time similarity matrix is 0.85.
[0093] For the spatial location feature sequence, the consumption place coordinate information is divided into grid units. For example, a commercial area is divided into multiple grid units according to a size of 500m x 500m. The proportion of the stay duration of each customer group in different grid units is calculated to generate a spatial distribution feature vector of the customer group. For example, the proportion of the stay duration of customer group A in grid units 1, 2, 3, and 4 can be [0.4, 0.3, 0.2, 0.1], indicating that 40% of the consumption time of the customer group is in grid unit 1, 30% is in grid unit 2, and so on. Based on these spatial distribution feature vectors, the spatial similarity between customer groups is calculated using the cosine similarity. For example, the cosine similarity of the spatial distribution feature vectors of customer group A and customer group C is 0.92, and the value of the corresponding position in the spatial similarity matrix is 0.92.
[0094] Through the above steps, the system calculates the time similarity matrix and the spatial similarity matrix of the customer groups respectively, providing a basis for subsequent customer group analysis and marketing decision-making. The two similarity matrices can be used separately or can be fused by setting a weight coefficient to obtain a similarity matrix that comprehensively considers the time and space factors, further improving the accuracy of customer group analysis.
[0095] In an optional implementation, the time similarity matrix and the spatial similarity matrix are dynamically weighted and fused, wherein the fusion weight is obtained by solving an optimization objective function that maximizes mutual information and minimizes information redundancy, to generate a time-space fusion similarity matrix, including:
[0096] The time dimension mutual information between each pair of customer groups in the time similarity matrix is calculated to obtain a time dimension mutual information matrix, and the space dimension mutual information between each pair of customer groups in the spatial similarity matrix is calculated to obtain a space dimension mutual information matrix;
[0097] A time-space dimension joint probability distribution matrix is constructed, and the elements of the time-space dimension joint probability distribution matrix are calculated from the mutual information values of the corresponding pair of customer groups in the time dimension mutual information matrix and the space dimension mutual information matrix;
[0098] The time-space dimension joint probability distribution matrix is modeled for probability density, the adaptive bandwidth parameter of the kernel function is determined, the conditional entropy of the time dimension and the space dimension is calculated based on the adaptive bandwidth parameter of the kernel function, and a fusion weight optimization objective function is constructed;
[0099] According to the time-space dimension joint probability distribution matrix and the adaptive bandwidth parameter of the kernel function, the fusion weight optimization objective function is iteratively solved to obtain a time dimension fusion weight and a space dimension fusion weight;
[0100] The time-dimension fusion weight is used to weight the time similarity matrix, the space-dimension fusion weight is used to weight the space similarity matrix, and a spatio-temporal fusion similarity matrix is obtained based on the weighted matrices.
[0101] In the embodiment, the process of dynamically weighting and fusing the time similarity matrix and the space similarity matrix will be described in detail. The method generates a spatio-temporal fusion similarity matrix by maximizing mutual information and minimizing information redundancy to solve the fusion weight.
[0102] The generation of the spatio-temporal fusion similarity matrix starts with the calculation of the time-dimension mutual information matrix and the space-dimension mutual information matrix. Assuming that there are N customer groups in the system, for any two customer groups i and j, the mutual information value MI_T(i,j) of the two in the time similarity matrix is calculated. Specifically, the time behavior patterns of customer groups i and j are regarded as two random variables, and the mutual information is calculated by estimating their joint probability distribution and marginal probability distribution. For example, for shopping frequency data, if the shopping probability of customer group A on weekdays is 0.7 and that of customer group B is 0.6, and the joint occurrence probability of the two is 0.5, the time-dimension mutual information value of the two can be calculated. Similarly, each element MI_S(i,j) in the space-dimension mutual information matrix is calculated, which represents the mutual information of customer groups i and j in the space dimension. For example, if the probability of customer groups C and D appearing in shopping mall A at the same time is 0.4, and the probability of each appearing is 0.5 and 0.6 respectively, the space-dimension mutual information value of the two can be calculated.
[0103] Constructing the spatio-temporal dimension joint probability distribution matrix P_Joint is the next key operation. For any customer group pair (i,j), its joint probability P_Joint(i,j) is calculated by the time-dimension mutual information MI_T(i,j) and the space-dimension mutual information MI_S(i,j). In specific implementation, normalization processing can be used, i.e. P_Joint(i,j) = (MI_T(i,j) + MI_S(i,j)) / (total mutual information sum), to ensure that the sum of all elements is 1. For example, if the time mutual information of customer group pair (1,2) is 0.3, the space mutual information is 0.4, and the total mutual information sum of all customer group pairs is 10, the joint probability of the pair is 0.07.
[0104] When modeling the probability density of the joint probability distribution matrix of the time and space dimensions, the kernel density estimation method is adopted, and the Gaussian kernel function is selected for modeling. The determination of the adaptive bandwidth parameter is the key to improving the estimation accuracy. The system determines the optimal bandwidth parameters h_T and h_S through the cross-validation method, which are used for kernel density estimation of the time and space dimensions, respectively. For example, the bandwidth parameter range [0.1, 0.2, …, 2.0] can be selected for grid search, and the value that minimizes the cross-validation error is selected as the final bandwidth parameter. If it is found through experiments that h_T = 0.5 and h_S = 0.8 minimize the cross-validation error, these two values are used as the final bandwidth parameters.
[0105] Based on the determined bandwidth parameters, the conditional entropy of the time and space dimensions is calculated. The time dimension conditional entropy H(T|S) represents the uncertainty of the time information given the space information; the space dimension conditional entropy H(S|T) represents the uncertainty of the space information given the time information. In actual calculation, for each pair of customers, the kernel function is used to estimate the conditional probability distribution, and then the conditional entropy is calculated. For example, the overall conditional entropies H(T|S) = 1.2 and H(S|T) = 0.9 are calculated by summation.
[0106] The fusion weight optimization objective function J(w_T, w_S) is constructed, which aims to maximize the mutual information and minimize the information redundancy. The function consists of three parts: the time dimension information amount, the space dimension information amount, and the redundancy information penalty term. The specific expression is J(w_T, w_S) = w_T × I(T) + w_S × I(S) - λ × (w_T × w_S × R), where I(T) and I(S) are the information amounts of the time and space dimensions, respectively, R is the redundancy information measure, and λ is the penalty factor. In practical applications, λ = 0.5 can be set as a balance parameter.
[0107] The gradient descent method is used to solve the fusion weight optimization objective function. Initialize w_T = w_S = 0.5, set the learning rate α = 0.01, and the maximum number of iterations is 1000. In each iteration, calculate the gradient of the objective function with respect to w_T and w_S, and update the weight values. Stop iteration when the weight change of two consecutive iterations is less than a preset threshold (such as 0.0001) or the maximum number of iterations is reached. For example, after 300 iterations, w_T = 0.65 and w_S = 0.35 can be obtained as the optimal weight values.
[0108] Finally, based on the obtained fusion weight, the time similarity matrix and the space similarity matrix are fused. Assuming that the time similarity matrix is T and the space similarity matrix is S, the fused spatio-temporal similarity matrix TS is calculated as TS = w_T x T + w_S x S. For example, if the time similarity of customer group 1 and customer group 2 is 0.8 and the space similarity is 0.6, the spatio-temporal fusion similarity is calculated as 0.8 x 0.65 + 0.6 x 0.35 = 0.73 using w_T = 0.65 and w_S = 0.35.
[0109] Through the above detailed steps, dynamic weighted fusion of the time similarity matrix and the space similarity matrix is realized, a fusion similarity matrix considering both time and space dimensions is generated, and more comprehensive and accurate basis is provided for subsequent customer group relationship analysis and marketing decision-making.
[0110] In an optional implementation, the spatio-temporal dimension joint probability distribution matrix is modeled for probability density, adaptive bandwidth parameters of a kernel function are determined, conditional entropy of the time dimension and the space dimension is calculated based on the adaptive bandwidth parameters of the kernel function, and a fusion weight optimization objective function is constructed, including:
[0111] The spatio-temporal dimension joint probability distribution matrix is divided into a plurality of data sub-regions, a Gaussian kernel function is constructed for each data sub-region, and initial bandwidth parameters of the Gaussian kernel function are calculated;
[0112] Based on the probability values in the spatio-temporal dimension joint probability distribution matrix, a variational distribution is used to estimate the distribution type of each data sub-region, and a prior distribution of the bandwidth parameters is constructed based on the initial bandwidth parameters;
[0113] By calculating the expectation value and the variance of the variational distribution, and combining the density distribution characteristics of the data sub-regions, the distribution parameters and the bandwidth parameters of each data sub-region are iteratively updated until the optimal variational distribution is obtained;
[0114] The information divergence between the optimal variational distribution and the real distribution is calculated, and the negative value of the information divergence is taken as the lower bound of evidence;
[0115] By maximizing the lower bound of evidence, the optimal bandwidth parameters corresponding to each data sub-region are obtained in combination with the density distribution characteristics of the data sub-regions;
[0116] Using the Gaussian kernel function corresponding to the optimal bandwidth parameters, the conditional probability distribution of the time dimension and the space dimension in each data sub-region is calculated, and the time dimension conditional entropy and the space dimension conditional entropy are obtained;
[0117] Based on the time dimension conditional entropy, the space dimension conditional entropy, and the optimal variational distribution of each data sub-region, a fusion weight optimization objective function is constructed.
[0118] In the embodiment, the spatio-temporal joint probability distribution matrix is modeled for probability density, adaptive bandwidth parameters of the kernel function are determined, and the conditional entropy of the time dimension and the space dimension is calculated based on the adaptive bandwidth parameters of the kernel function to construct a method of fusing the weight optimization objective function.
[0119] The system divides the spatio-temporal joint probability distribution matrix into multiple data sub-regions, and constructs a Gaussian kernel function for each data sub-region. Specifically, according to the data distribution characteristics in the spatio-temporal joint probability distribution matrix, the matrix is divided into 5 data sub-regions by using a density clustering algorithm, and each sub-region contains data points with similar density characteristics. A Gaussian kernel function K1(x) is constructed for the first data sub-region, and an initial bandwidth parameter h1=0.85 is calculated; a Gaussian kernel function K2(x) is constructed for the second data sub-region, and an initial bandwidth parameter h2=1.02 is calculated; a Gaussian kernel function K3(x) is constructed for the third data sub-region, and an initial bandwidth parameter h3=0.76 is calculated; a Gaussian kernel function K4(x) is constructed for the fourth data sub-region, and an initial bandwidth parameter h4=0.93 is calculated; and a Gaussian kernel function K5(x) is constructed for the fifth data sub-region, and an initial bandwidth parameter h5=0.88 is calculated. The calculation of the initial bandwidth parameter is based on the data distribution density and variance characteristics of each sub-region.
[0120] Based on the probability values in the spatio-temporal joint probability distribution matrix, the system uses a variational distribution to estimate the distribution parameters of each data sub-region, and simultaneously constructs a prior distribution of the bandwidth parameter based on the initial bandwidth parameter. For the first data sub-region, it is assumed that its probability distribution conforms to a mixture Gaussian model, and the distribution parameters of the region are estimated by using a variational inference method, including a mean vector μ1=[0.25, 0.38] and a covariance matrix Σ1=[[0.08, 0.03], [0.03, 0.12]], and simultaneously a prior distribution p(h1) of the bandwidth parameter is constructed based on the initial bandwidth parameter h1=0.85, which is assumed to be a gamma distribution with a shape parameter α=3 and a scale parameter β=2.5. For other data sub-regions, similar parameter estimation methods are used to obtain their respective distribution parameters and bandwidth parameter prior distributions.
[0121] The system iteratively updates the distribution parameters and bandwidth parameters of each data sub-region by calculating the expectation value and variance of the variational distribution, combined with the density distribution characteristics of the data sub-region, until the optimal variational distribution is obtained. Taking the first data sub-region as an example, in the first iteration, the updated distribution parameters are the mean vector μ1' = [0.27, 0.40] and the covariance matrix Σ1' = [[0.07, 0.02], [0.02, 0.11]], and the bandwidth parameter h1' = 0.88. After 10 iterations, the distribution parameters converge to the mean vector μ1# = [0.29, 0.42] and the covariance matrix Σ1# = [[0.06, 0.02], [0.02, 0.10]], and the bandwidth parameter converges to h1# = 0.92. For other data sub-regions, the same iterative updating method is used until all parameters converge. The convergence condition is set to a parameter change rate less than 0.001.
[0122] The system calculates the information divergence between the optimal variational distribution and the true distribution, and takes the negative value of the information divergence as the lower bound of evidence. For the first data sub-region, the information divergence between the optimal variational distribution q1#(z) and the true posterior distribution p1(z|D) is KL(q1x||p1) = 0.037, and the corresponding lower bound of evidence ELBO1 = -0.037. Similarly, the lower bounds of evidence of other data sub-regions are calculated, ELBO2 = -0.042, ELBO3 = -0.031, ELBO4 = -0.039, ELBO5 = -0.044.
[0123] By maximizing the lower bound of evidence, combined with the density distribution characteristics of the data sub-region, the system obtains the optimal bandwidth parameter corresponding to each data sub-region. The gradient ascent method is used to maximize the lower bound of evidence of each region, and the bandwidth parameter is updated in each iteration, with a learning rate of 0.01. Using the optimal bandwidth parameter corresponding to the Gaussian kernel function, the system calculates the conditional probability distribution of the time dimension and the spatial dimension in each data sub-region, and obtains the time dimension conditional entropy and the spatial dimension conditional entropy. Taking the first data sub-region as an example, based on the optimal bandwidth parameter h1# = 0.95, the Gaussian kernel function is constructed, the conditional probability distribution p1(t|s) of the time dimension relative to the spatial dimension is calculated, and the time dimension conditional entropy H1(T|S) = 1.85 is obtained; the conditional probability distribution p1(s|t) of the spatial dimension relative to the time dimension is calculated, and the spatial dimension conditional entropy H1(S|T) = 2.13 is obtained. Similarly, the conditional entropies of other data sub-regions are calculated, H2(T|S) = 1.92, H2(S|T) = 2.05, H3(T|S) = 1.78, H3(S|T) = 2.24, H4(T|S) = 1.87, H4(S|T) = 2.08, H5(T|S) = 1.90, H5(S|T) = 2.17.
[0124] Based on the time-dimensional conditional entropy, the spatial-dimensional conditional entropy, and the optimal variational distribution of each data sub-region, the system constructs a fusion weight optimization objective function. For the i-th data sub-region, let the time-dimensional fusion weight be wi_t and the spatial-dimensional fusion weight be wi_s, which must satisfy wi_t + wi_s = 1 and wi_t, wi_s ≥ 0. The fusion weight optimization objective function is defined as minimizing the combination of weighted conditional entropy and distribution divergence, i.e., L_i = wi_t·Hi(T|S) + wi_s·Hi(S|T) + λ·KL(qix||pi), where λ is a balance parameter, set to 0.5. For the 1-th data sub-region, the objective function is L_1 = w1_t·1.85 + w1_s·2.13 + 0.5·0.037. Solving this optimization problem yields the optimal fusion weights w1_t# = 0.56 and w1_s# = 0.44. Similarly, the optimal fusion weights for other data sub-regions were calculated, resulting in w2_t# = 0.53, w2_s# = 0.47, w3_t# = 0.60, w3_s# = 0.40, w4_t# = 0.55, w4_s# = 0.45, w5_t# = 0.54, and w5_s# = 0.46.
[0125] Figure 2 A simulation diagram illustrating the probability density modeling of the joint probability distribution in the spatiotemporal dimensions, as shown below. Figure 2 As shown in the figure, this diagram illustrates the key features of the adaptive bandwidth parameter and fusion weight optimization process based on variational inference. In the coordinate system, the horizontal axis represents the time dimension, and the vertical axis represents the spatial dimension, both represented using standardized values from 0 to 1. The diagram contains three representative data sub-regions, labeled with different colors: blue for region 1, orange for region 2, and green for region 3. The scatter points within each region represent the distribution of customer samples within that region, exhibiting a specific distribution pattern around the region's center point.
[0126] The circular boundary lines surrounding each data sub-region represent the effective range of the Gaussian kernel function, and their radius is determined by the adaptive bandwidth parameter h. As shown in the figure, the bandwidth parameter h = 0.95 for region 1, h = 1.05 for region 2, and h = 0.80 for region 3. These parameter values are obtained through optimization by maximizing the lower bound of evidence (ELBO).
[0127] In one optional implementation, based on the spatiotemporal fusion similarity matrix, a high-order association graph of customer group features is constructed, and a high-order feature representation of customer group nodes is extracted through a graph neural network to obtain a fusion feature vector, including:
[0128] Based on the spatiotemporal fusion similarity matrix, a high-order association graph of customer group characteristics is constructed, with each customer group as a node in the graph and the similarity value as the edge weight between nodes.
[0129] calculate the structural importance and the topological distance of each node in the high-order correlation graph, construct a first-order neighbor node set based on the structural importance and the topological distance, calculate the weight of the nodes in the first-order neighbor node set by using the structural importance, and obtain a node attention weight matrix;
[0130] perform multi-dimensional transformation on the features of the first-order neighbor nodes based on the attention weight matrix and the structural importance, perform hierarchical aggregation on the transformed features according to the topological distance, retain historical feature information in each layer of aggregation, and obtain a multi-level feature representation;
[0131] perform weighted pooling on the multi-level feature representation according to the structural importance and the topological distance, and obtain a fixed-dimensional feature representation;
[0132] perform feature fusion on the fixed-dimensional feature representation and the structural importance, and obtain a final fusion feature vector through nonlinear transformation.
[0133] In one specific embodiment, based on the spatio-temporal fusion similarity matrix, a high-order correlation graph of passenger group features is constructed, and a high-order feature representation of a passenger group node is extracted through a graph neural network to obtain a fusion feature vector, which can be completed through the following detailed implementation steps:
[0134] The system first constructs a high-order correlation graph of passenger group features based on the generated spatio-temporal fusion similarity matrix. In this embodiment, the system regards each passenger group as a node in the graph, for example, a data set containing 100 passenger groups will construct a graph with 100 nodes. The connection relationship between nodes in the graph is determined by the spatio-temporal fusion similarity matrix, and the similarity value is directly used as the edge weight between nodes. For example, the spatio-temporal fusion similarity between passenger group A and passenger group B is 0.75, then in the high-order correlation graph, there is an edge with a weight of 0.75 between node A and node B. This construction method can retain the complex correlation information between passenger groups, laying a foundation for subsequent high-order feature extraction.
[0135] After the high-order correlation graph is constructed, the system calculates the structural importance and the topological distance of each node in the graph. The structural importance is measured by a centrality index, which considers multiple factors such as the degree, betweenness, and closeness of the node. In specific implementation, the system performs weighted summation on these factors, and the weights are set to 0.4, 0.3, and 0.3, respectively. For example, for a specific node, if its degree is 5, the standardized betweenness is 0.6, and the standardized closeness is 0.8, then its structural importance is calculated as 0.4x5+0.3x0.6+0.3x0.8=2.42. The topological distance is calculated by the shortest path algorithm to calculate the distance between nodes. In actual application, the system constructs a distance matrix to record the shortest path length between each pair of nodes.
[0136] Based on the calculated structural importance and topological distance, the system constructs a first-order neighbor node set for each node. For node i, its first-order neighbors refer to all nodes directly connected to i. In this embodiment, the system filters out all first-order neighbors according to the condition of topological distance being 1 to form the set Ni. For example, for a particular node, its first-order neighbors may contain 5 nodes. The system then calculates the weight of the first-order neighbor nodes using the structural importance to obtain an attention weight matrix. In the specific calculation, the structural importance value of neighbor node j is multiplied by the edge weight between nodes i and j, and then normalized by softmax. For example, if the structural importance of node j is 2.42 and the edge weight between nodes i and j is 0.75, the initial weight is 2.42 x 0.75 = 1.815, and the final weight needs to be normalized by the weight of all neighbor nodes.
[0137] After obtaining the attention weight matrix, the system performs multi-dimensional transformation on the features of the first-order neighbor nodes based on the matrix and the structural importance. In this embodiment, it is assumed that each node initially has a 64-dimensional feature vector, and the system uses three independent linear transformation matrices to convert the features into different representation spaces. Each transformation matrix has a dimension of 64 x 32, and the converted feature has a dimension of 32. The three transformations capture different aspects of node features, such as temporal patterns, spatial distribution, and behavior characteristics. The transformed features are multiplied by the attention weight matrix to achieve weighted aggregation of the features.
[0138] The system aggregates the transformed features according to the topological distance. In this embodiment, three levels of aggregation are considered: direct neighbors with a distance of 1, second-order neighbors with a distance of 2, and third-order neighbors with a distance of 3. In each layer of aggregation, the system preserves historical feature information and concatenates the current layer features with the previous layer features through a skip-connection mechanism. For example, the first layer aggregation obtains a 32-dimensional feature, the second layer aggregation concatenates it with another 32-dimensional feature to form a 64-dimensional feature, and the third layer forms a 96-dimensional feature vector. This multi-level feature representation can capture node relationships in different ranges.
[0139] According to the structural importance and topological distance, the system performs weighted pooling on the multi-level feature representation. The pooling operation uses an adaptive weight mechanism, and nodes with closer distances contribute more. In the specific implementation, the system assigns different weights to each layer of features: 0.5 for the first layer, 0.3 for the second layer, and 0.2 for the third layer. These weights are multiplied by the structural importance and applied to the corresponding layer of feature vectors. After weighted pooling, the system obtains a fixed-dimensional 64-dimensional feature representation.
[0140] Finally, the system fuses the fixed-dimensional feature representation with the structural importance as a feature, and obtains the final fusion feature vector through a nonlinear transformation. In this embodiment, the system splices the 64-dimensional feature vector with the structural importance value to form a 65-dimensional vector, and then performs nonlinear transformation through a two-layer fully connected network. The first layer maps the 65-dimensional vector to a 32-dimensional vector using a ReLU activation function; the second layer maps the 32-dimensional vector to the final 16-dimensional fusion feature vector. This fusion feature vector not only contains the node's own features, but also encodes the graph structure information, and can more comprehensively express the high-order correlation relationship of the customer group features.
[0141] In an optional embodiment, based on the attention weight matrix and the structural importance, the features of the first-order neighbor nodes are subjected to multidimensional transformation, the transformed features are aggregated in layers according to the topological distance, the historical feature information is retained in each layer aggregation, and a multi-level feature representation is obtained, including:
[0142] The local clustering coefficient and the centrality index of the first-order neighbor nodes are calculated, and a feature decomposition matrix is constructed based on the local clustering coefficient and the centrality index;
[0143] The feature decomposition matrix, the attention weight matrix and the structural importance are subjected to tensor decomposition, and a mapping matrix of a plurality of feature subspaces is obtained;
[0144] Based on the mapping matrix, the initial features of the first-order neighbor nodes are transformed, and the transformed features are used to construct a hierarchical feature propagation structure according to the topological distance, and the local neighborhood density and the relative density of the nodes are calculated in each layer of feature propagation;
[0145] The local neighborhood density and the relative density are used to update the attention weight, the features of the nodes to be aggregated are adaptively combined with the updated attention weight and the structural importance, the historical layer feature information is retained through a residual mechanism, and the hierarchical feature representation of each layer is obtained;
[0146] The hierarchical feature representation of each layer is weighted and combined based on the local neighborhood density and the relative density, and a hierarchical feature of a single feature subspace is obtained;
[0147] The hierarchical features of the plurality of feature subspaces are adaptively fused to obtain a multi-level feature representation.
[0148] In this embodiment, a method for multi-dimensional transformation of first-order neighbor node features based on attention weight matrix and structure importance is provided. The method first calculates the local clustering coefficient and centrality index of the first-order neighbor nodes, and constructs a feature decomposition matrix based on these indexes. For a given graph network G, containing node set V and edge set E, for a node v ∈ V, its first-order neighbor node set is N(v). For each first-order neighbor node u ∈ N(v), calculate its local clustering coefficient, which is the number of edges between the neighbors of node u divided by the maximum number of edges that can exist. For example, if node u has 5 neighbors, there are 4 edges between these neighbors, and the maximum number of edges that can exist is 10, then the local clustering coefficient is 0.4. At the same time, the centrality index of node u is calculated, which can be degree centrality (the number of edges of the node), betweenness centrality (the number of shortest paths passing through the node) or closeness centrality (the inverse of the average distance to all other nodes). If the degree centrality of node u is 8, i.e. there are 8 edges connected to it, then the index value is 8. Based on these indexes, a feature decomposition matrix F is constructed, the dimension of matrix F is |N(v)|×2, where each row corresponds to a neighbor node, and the two columns represent the local clustering coefficient and the centrality index.
[0149] The feature decomposition matrix F is tensor decomposed with the attention weight matrix A and the structure importance matrix S to obtain the mapping matrices of multiple feature subspaces. Assuming that the dimension of the attention weight matrix A is |N(v)|×|N(v)|, where each element represents the attention weight between two nodes; the dimension of the structure importance matrix S is |N(v)|×1, each element represents the structure importance of the node. Through tensor decomposition techniques such as Tucker decomposition or CP decomposition, the three matrices are decomposed into multiple low-dimensional mapping matrices M1, M2,..., Mk, where k is the number of feature subspaces. For example, if k = 3, three mapping matrices are obtained, each with a dimension of |N(v)|×d', where d' is the feature dimension after dimension reduction.
[0150] The initial features of the first-order neighbor nodes are transformed based on the mapping matrices. Assuming that the initial feature vector of node u is xu, with a dimension of d. By transforming xu through the mapping matrix Mi(i = 1, 2,..., k), the representation yi = Mi·xu in different feature subspaces is obtained, and the dimension of yi is d'. For example, if xu is a 256-dimensional vector and Mi is a 64×256 matrix, then yi obtained after transformation is a 64-dimensional vector.
[0151] The transformed features are constructed into a hierarchical feature propagation structure according to the topological distance. The topological distance is defined as the length of the shortest path between nodes. Starting from the center node v, the network is divided into multiple layers, the l-th layer contains all nodes with a topological distance of l from v. For each feature subspace, in each layer of feature propagation, the local neighborhood density and the relative density of the nodes are calculated. The local neighborhood density pu is defined as the weighted sum of the number of nodes and edges in the neighborhood of node u, and the relative density du is defined as the distance between node u and the nearest node with higher density. The attention weight is updated using the local neighborhood density and the relative density. For nodes u and v in the l-th layer, the updated attention weight a'uv = auv x (pu / pv) x exp(-du / dv), where auv is the original attention weight. For example, if auv = 0.7, pu = 8, pv = 10, du = 2, dv = 3, then the updated attention weight a'uv = 0.7 x (8 / 10) x exp(-2 / 3) ≈ 0.36. The features of the nodes to be aggregated are adaptively combined with the updated attention weight and the structural importance to obtain the feature representation zl,i of node v in the l-th layer. The historical layer feature information is retained through a residual mechanism, i.e. zl,i = α x zl,i + (1-α) x zl-1,i, where α is a weighting parameter, which can be set to 0.5.
[0152] The hierarchical feature representation of each layer is weighted and combined based on the local neighborhood density and the relative density. For feature subspace i, the hierarchical feature hi of node v is hi = Σl(βlx zl,i), where βl is the weight of the l-th layer, which can be calculated based on the average local neighborhood density and the average relative density of the nodes in the layer, βl = (avgpl x avgdl) / Σl(avgpl x avgdl), avgpl and avgdl are the average local neighborhood density and the average relative density of all nodes in the l-th layer, respectively. For example, if there are 3 layers, the average local neighborhood densities are 6, 8, and 4, and the average relative densities are 1.5, 2, and 2.5, respectively, then the weights β1 = 0.26, β2 = 0.47, and β3 = 0.27.
[0153] The hierarchical features of multiple feature subspaces are adaptively fused to obtain the final multi-level feature representation. An attention mechanism is used to assign weights wi to each subspace, wi = softmax(qi·tanh(W·hi+b)), where qi, W, and b are learnable parameters. The final feature representation h = Σi(wix hi). For example, if k = 3, the weights of the three subspaces are 0.3, 0.5, and 0.2, respectively, then the final feature is the weighted sum of the features of the three subspaces. This adaptive fusion method can dynamically adjust according to the importance of different subspace features, improving the expression ability and generalization ability of the feature representation.
[0154] In an alternative embodiment, local density and relative distance of each customer group sample are calculated based on the fusion feature vector, density peak points are identified as clustering centers, and the number of clusters is adaptively determined in combination with the similarity threshold in the spatio-temporal fusion similarity matrix, comprising:
[0155] A feature distance matrix of each customer group sample is calculated based on the fusion feature vector, and the feature distance matrix is combined with the spatio-temporal fusion similarity matrix to obtain a comprehensive distance matrix;
[0156] The distance values of each sample in the comprehensive distance matrix are searched for a truncated radius, and the local density of each sample is calculated based on the comprehensive distance matrix within the range of the truncated radius to obtain a density distribution sequence;
[0157] The density difference degree between samples is calculated based on the density distribution sequence, and high-density samples are selected as density reference points from the comprehensive distance matrix according to the density difference degree;
[0158] The distance of other samples to the density reference points is calculated based on the comprehensive distance matrix, and the distance values are corrected in combination with the local density to obtain a relative distance sequence;
[0159] The density distribution sequence and the relative distance sequence are mapped to a two-dimensional space to construct a density-distance decision graph, a similarity threshold is calculated based on the spatio-temporal fusion similarity matrix, the density peak points in the density-distance decision graph are adaptively screened using the similarity threshold and the density difference degree, and the density peak points and the number of density peak points are taken as the clustering centers and the number of clusters, respectively.
[0160] In a specific embodiment, local density and relative distance of each customer group sample can be calculated based on the fusion feature vector, and then density peak points are identified as clustering centers, and the number of clusters is adaptively determined in combination with the similarity threshold in the spatio-temporal fusion similarity matrix.
[0161] Specifically, the system first calculates the feature distance matrix between customer group samples based on the fusion feature vector. For any two customer group samples i and j, the Euclidean distance between their feature vectors can be calculated to form a feature distance matrix D_feature. For example, for a data set containing 1000 customer group samples, the dimension of the fusion feature vector of each sample is 128, and a 1000x1000 feature distance matrix can be obtained by calculation. The feature distance matrix is combined with the spatio-temporal fusion similarity matrix S by weighting, and the combination formula is D_comp=α×D_feature+(1-α)×(1-S), where α is a weight coefficient, and the value range is 0 to 1, which can be set to 0.6 in actual application, thereby obtaining a comprehensive distance matrix D_comp.
[0162] The distance value of each sample in the integrated distance matrix is searched with a cut-off radius. Set the cut-off radius dc, which can be determined by taking the qth percentile of all distance values in the distance matrix. In practical applications, q can be taken as 2%. Within the cut-off radius dc, the local density ρi of each sample i is calculated based on the integrated distance matrix. The calculation method is as follows: for sample i, count the number of all samples with a distance less than dc, and obtain the density distribution sequence {ρ1, ρ2,..., ρn}, where n is the total number of samples. For example, for a certain sample, if there are 15 neighboring samples within the set cut-off radius, then its local density value is 15.
[0163] The density difference degree between samples is calculated based on the density distribution sequence. All samples are sorted in descending order of local density value, the density difference value of adjacent samples is calculated, and the average of these difference values is taken as the density difference degree δρ. For example, for the sorted density value {25, 23, 20, 18, 15,...}, the adjacent density difference is {2, 3, 2, 3,...}, and the average difference value can be 2.5. According to the density difference degree, samples with local density value greater than the average density plus the standard deviation are selected from the integrated distance matrix as density reference points. Assuming that the average density is 12 and the standard deviation is 5, samples with local density value greater than 17 will be selected as density reference points.
[0164] The distance of other samples to the density reference points is calculated based on the integrated distance matrix. For each non-reference sample i, find all samples j with higher density than it, and calculate the minimum distance δi of sample i to these high-density samples j. For the sample with the highest density, set its δ value as the maximum distance value in the integrated distance matrix. The distance value is corrected in combination with the local density, which can be done in the manner of δi = δi × (1 + γ × (max(ρ) - ρi) / max(ρ)), where γ is an adjustment parameter, which can be taken as 0.3 in practical applications, thereby obtaining the relative distance sequence {δ1, δ2,..., δn}.
[0165] The density distribution sequence and the relative distance sequence are mapped to a two-dimensional space to construct a density-distance decision graph. The abscissa represents the local density p, and the ordinate represents the relative distance d. The similarity distribution is calculated based on the spatiotemporal fusion similarity matrix. The similarity threshold s_threshold can be determined by calculating the statistical distribution of all similarity values in the matrix S. For example, the 85th percentile of the similarity values is taken as the threshold, and the value is assumed to be 0.75. The density peak points in the density-distance decision graph are adaptively screened using the similarity threshold and the density difference degree. The screening condition is: p i > mean(p) + b x std(p) and d i > mean(d) + b x std(d), where b is an adjustment coefficient, which can be set to 1.2 according to the data distribution. The points that meet the condition are identified as density peak points and are determined as cluster centers at the same time. The number of density peak points is the number of clusters.
[0166] In a specific data case, consider a data set containing 2000 customer samples. The average distance value of the calculated comprehensive distance matrix D_comp is 0.45, and the standard deviation is 0.12. Set the cutoff radius dc to 0.15. In the calculated density distribution sequence, the maximum density value is 32, the minimum density value is 3, the average density is 14.5, and the density standard deviation is 6.2. The density difference degree d p is calculated to be 2.8. In the relative distance sequence, the maximum relative distance is 1.85, the minimum relative distance is 0.08, the average relative distance is 0.63, and the relative distance standard deviation is 0.35. According to the screening condition, 7 density peak points are identified, corresponding to sample indexes {125, 387, 542, 896, 1254, 1567, 1892}. These 7 points are determined as cluster centers, and the number of clusters is 7.
[0167] Figure 3 The performance comparison diagram of different clustering methods for customer classification shows that in terms of clustering accuracy, the basic density clustering is 75.2%, the feature distance clustering is 82.7%, and the spatiotemporal fusion clustering of the present application is 91.3%, which is significantly better than the other two methods. In terms of density peak recognition rate, the three methods are 68.9%, 79.5% and 86.8% respectively, and the method of the present application also performs best. In terms of consistency index, the three methods are 82.1%, 84.6% and 93.2% respectively, and the advantage of the method of the present application is more significant.
[0168] These performance data are based on experimental analysis of 2000 customer samples. The excellent performance of the method of the present application is mainly due to the combination of the clustering center recognition technology of the feature vector calculation and the local density-relative distance decision graph, and the method of adaptively determining the number of clusters based on the similarity threshold of the spatiotemporal fusion similarity matrix.
[0169] The embodiment of the application fuses the customer group feature intelligent clustering mining system of spatio-temporal data, comprising:
[0170] The first unit is used for acquiring time dimension behavior data and space dimension position data of a target customer group.
[0171] The second unit is used for calculating a time similarity matrix and a space similarity matrix of the customer group based on the time dimension behavior data and the space dimension position data, respectively, wherein the time similarity matrix and the space similarity matrix respectively represent the similarity degree of the time dimension behavior mode and the space dimension position distribution between different customer groups.
[0172] The third unit is used for dynamically weighting and fusing the time similarity matrix and the space similarity matrix, wherein the fusion weight is obtained by solving an optimization objective function of maximizing mutual information and minimizing information redundancy, and a spatio-temporal fusion similarity matrix is generated.
[0173] The fourth unit is used for constructing a high-order association graph of customer group features based on the spatio-temporal fusion similarity matrix, extracting a high-order feature representation of a customer group node through a graph neural network, and obtaining a fusion feature vector.
[0174] The fifth unit is used for calculating the local density and the relative distance of each customer group sample based on the fusion feature vector, identifying a density peak point as a clustering center, and adaptively determining the number of clusters in combination with a similarity threshold in the spatio-temporal fusion similarity matrix.
[0175] The sixth unit is used for dividing the customer groups with similar spatio-temporal behavior features into corresponding clustering clusters according to the determined clustering center and the number of clusters by using the density reachability principle, and obtaining a customer group clustering result.
[0176] The third aspect of the embodiment of the application provides an electronic device, comprising:
[0177] A processor;
[0178] A memory for storing processor-executable instructions;
[0179] The processor is configured to call the instructions stored in the memory to execute the method described above.
[0180] The fourth aspect of the embodiment of the application provides a computer readable storage medium, which stores computer program instructions, and the computer program instructions are executed by a processor to implement the method described above.
[0181] The present application can be a method, device, system and / or computer program product. The computer program product can include a computer readable storage medium having computer readable program instructions loaded thereon for performing various aspects of the present application.
[0182] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, and are not intended to limit the present application; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that the technical solutions described in the foregoing embodiments can still be modified, or some or all of the technical features can be replaced by equivalents; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for intelligent clustering and mining of passenger characteristics by fusing spatio-temporal data, characterized in that, The method comprises the following steps: acquiring time-dimension behavior data and space-dimension location data of target customer groups; based on the time-dimension behavior data and the space-dimension location data, respectively calculating a time similarity matrix and a space similarity matrix of the customer groups, the time similarity matrix and the space similarity matrix respectively representing the similarity degrees of time-dimension behavior modes and space-dimension location distributions between different customer groups; dynamically weighting and fusing the time similarity matrix and the space similarity matrix, wherein the fusion weight is obtained by solving an optimization objective function of maximizing mutual information and minimizing information redundancy, to generate a time-space fusion similarity matrix; based on the time-space fusion similarity matrix, constructing a high-order correlation graph of customer group features, extracting high-order feature representations of customer group nodes through a graph neural network, and obtaining a fusion feature vector; based on the fusion feature vector, calculating the local density and relative distance of each customer group sample, identifying density peak points as clustering centers, and adaptively determining the number of clusters in combination with a similarity threshold in the time-space fusion similarity matrix; according to the determined clustering centers and the number of clusters, dividing customer groups with similar time-space behavior features into corresponding clustering clusters by using the density reachability principle, to obtain a customer group clustering result.
2. The method of claim 1, wherein, Based on the time-dimension behavior data and the space-dimension location data, respectively calculating a time similarity matrix and a space similarity matrix of the customer groups, comprising: normalizing the time-dimension behavior data and the space-dimension location data respectively to generate time behavior feature sequences and space location feature sequences; based on the time behavior feature sequences, segmenting the consumption time of the customer groups by using a sliding time window, and extracting consumption frequency distribution features and consumption amount distribution features of the customer groups in each time window; based on the consumption frequency distribution features and the consumption amount distribution features, constructing a time-series behavior graph of the customer groups, wherein the nodes of the time-series behavior graph represent the customer groups, and the connection weights between the nodes are obtained by weighting the Pearson correlation coefficient of the consumption frequency distribution features and the cosine similarity of the consumption amount distribution features; obtaining time-series embedding vectors of the customer group nodes by performing random walk sampling on the time-series behavior graph, and calculating a time similarity matrix between the customer groups based on the time-series embedding vectors; based on the space location feature sequences, dividing the consumption place coordinate information therein into grid units, calculating the proportion of the stay duration of each customer group in different grid units, generating a space distribution feature vector of the customer groups, and calculating a space similarity matrix between the customer groups based on the space distribution feature vector.
3. The method of claim 1, wherein, dynamically weighting and fusing the time similarity matrix and the space similarity matrix, wherein the fusion weight is obtained by solving an optimization objective function of maximizing mutual information and minimizing information redundancy, to generate a time-space fusion similarity matrix, comprising: calculating the time-dimension mutual information between each pair of customer groups in the time similarity matrix to obtain a time-dimension mutual information matrix, and calculating the space-dimension mutual information between each pair of customer groups in the space similarity matrix to obtain a space-dimension mutual information matrix; construct a spatio-temporal joint probability distribution matrix, elements of the spatio-temporal joint probability distribution matrix are calculated from mutual information values of corresponding customer groups in a time dimension mutual information matrix and a space dimension mutual information matrix; perform probability density modeling on the spatio-temporal joint probability distribution matrix, determine an adaptive bandwidth parameter of a kernel function, calculate conditional entropies of the time dimension and the space dimension based on the adaptive bandwidth parameter of the kernel function, to construct a fusion weight optimization objective function; perform iterative solving on the fusion weight optimization objective function according to the spatio-temporal joint probability distribution matrix and the adaptive bandwidth parameter of the kernel function, to obtain a time dimension fusion weight and a space dimension fusion weight; weight the time similarity matrix using the time dimension fusion weight, weight the space similarity matrix using the space dimension fusion weight, and obtain a spatio-temporal fusion similarity matrix based on the weighted matrices.
4. The method of claim 3, wherein, perform probability density modeling on the spatio-temporal joint probability distribution matrix, determine an adaptive bandwidth parameter of a kernel function, calculate conditional entropies of the time dimension and the space dimension based on the adaptive bandwidth parameter of the kernel function, to construct a fusion weight optimization objective function, including: divide the spatio-temporal joint probability distribution matrix into a plurality of data sub-regions, and construct a Gaussian kernel function for each data sub-region to calculate an initial bandwidth parameter of the Gaussian kernel function; based on the probability values in the spatio-temporal joint probability distribution matrix, estimate the distribution type of each data sub-region using a variational distribution, and construct a prior distribution of the bandwidth parameter based on the initial bandwidth parameter; update the distribution parameter and the bandwidth parameter of each data sub-region by calculating the expectation value and the variance of the variational distribution, and combining the density distribution characteristics of the data sub-region, until the optimal variational distribution is obtained through iterative updating; calculate the information divergence between the optimal variational distribution and the real distribution, and take the negative value of the information divergence as the lower bound of evidence; obtain the optimal bandwidth parameter corresponding to each data sub-region by maximizing the lower bound of evidence and combining the density distribution characteristics of the data sub-region; calculate the conditional probability distribution of the time dimension and the space dimension in each data sub-region using the Gaussian kernel function corresponding to the optimal bandwidth parameter, to obtain the time dimension conditional entropy and the space dimension conditional entropy; construct a fusion weight optimization objective function based on the time dimension conditional entropy, the space dimension conditional entropy, and the optimal variational distribution of each data sub-region.
5. The method of claim 1, wherein, based on the spatio-temporal fusion similarity matrix, construct a high-order association graph of customer group features, extract high-order feature representations of customer group nodes through a graph neural network, and obtain a fusion feature vector, including: construct a high-order association graph of customer group features based on the spatio-temporal fusion similarity matrix, take each customer group as a node in the graph, and take the similarity value as the edge weight between nodes; calculate the structural importance and the topological distance of each node in the high-order association graph, construct a first-order neighbor node set based on the structural importance and the topological distance, and calculate the weight of the nodes in the first-order neighbor node set using the structural importance, to obtain an attention weight matrix of the nodes; performing multi-dimensional transformation on features of the first-order neighbor nodes based on the attention weight matrix and the structural importance, performing hierarchical aggregation on the transformed features according to the topological distance, retaining historical feature information in each layer of aggregation, and obtaining multi-level feature representation; performing weighted pooling on the multi-level feature representation according to the structural importance and the topological distance, and obtaining fixed-dimensional feature representation; performing feature fusion on the fixed-dimensional feature representation and the structural importance, and obtaining a final fusion feature vector through nonlinear transformation.
6. The method of claim 5, wherein, performing multi-dimensional transformation on features of the first-order neighbor nodes based on the attention weight matrix and the structural importance, performing hierarchical aggregation on the transformed features according to the topological distance, retaining historical feature information in each layer of aggregation, and obtaining multi-level feature representation, comprising: calculating local clustering coefficient and centrality index of the first-order neighbor nodes, and constructing a feature decomposition matrix based on the local clustering coefficient and the centrality index; performing tensor decomposition on the feature decomposition matrix, the attention weight matrix and the structural importance, and obtaining mapping matrices of multiple feature subspaces; transforming initial features of the first-order neighbor nodes based on the mapping matrices, constructing a hierarchical feature propagation structure according to the topological distance, and calculating local neighborhood density and relative density of nodes in each layer of feature propagation; updating attention weights using the local neighborhood density and the relative density, adaptively combining features of nodes to be aggregated with the updated attention weights and structural importance, retaining historical layer feature information through a residual mechanism, and obtaining hierarchical feature representation of each layer; performing weighted combination on the hierarchical feature representation of each layer based on the local neighborhood density and the relative density, and obtaining hierarchical features of a single feature subspace; performing adaptive fusion on the hierarchical features of the multiple feature subspaces, and obtaining multi-level feature representation.
7. The method of claim 1, wherein, calculating local density and relative distance of each customer group sample based on the fusion feature vector, identifying density peak points as clustering centers, and adaptively determining the number of clusters in combination with a similarity threshold in the spatio-temporal fusion similarity matrix, comprising: calculating a feature distance matrix of each customer group sample based on the fusion feature vector, and performing weighted combination on the feature distance matrix and the spatio-temporal fusion similarity matrix to obtain a comprehensive distance matrix; performing radius search on distance values of each sample in the comprehensive distance matrix, calculating local density of each sample based on the comprehensive distance matrix within the range of the truncated radius, and obtaining a density distribution sequence; calculating the degree of density difference between samples based on the density distribution sequence, and selecting high-density samples as density reference points from the comprehensive distance matrix according to the degree of density difference; calculating distances of other samples to the density reference points based on the comprehensive distance matrix, correcting distance values in combination with the local density, and obtaining a relative distance sequence; The density distribution sequence and the relative distance sequence are mapped to a two-dimensional space to construct a density-distance decision graph, a similarity threshold is calculated based on the spatio-temporal fusion similarity matrix, the density peak points in the density-distance decision graph are adaptively screened using the similarity threshold and the density difference degree, and the density peak points and the number of the density peak points are taken as a clustering center and a clustering number, respectively.
8. A system for spatiotemporal data-fused intelligent cluster mining of customer characteristics, for implementing the method of any one of claims 1-7, characterized in that, Comprise: A first unit for obtaining time-dimension behavior data and space-dimension location data of a target customer group; A second unit for calculating a time similarity matrix and a space similarity matrix of the customer group based on the time-dimension behavior data and the space-dimension location data, respectively, the time similarity matrix and the space similarity matrix representing the similarity degree of time-dimension behavior patterns and space-dimension location distribution between different customer groups, respectively; A third unit for dynamically weighting and fusing the time similarity matrix and the space similarity matrix, wherein the fusion weight is obtained by solving an optimization objective function that maximizes mutual information and minimizes information redundancy, to generate a spatio-temporal fusion similarity matrix; A fourth unit for constructing a high-order association graph of customer group features based on the spatio-temporal fusion similarity matrix, extracting high-order feature representation of customer group nodes through a graph neural network, and obtaining a fusion feature vector; A fifth unit for calculating the local density and the relative distance of each customer group sample based on the fusion feature vector, identifying density peak points as clustering centers, and adaptively determining the number of clusters in combination with a similarity threshold in the spatio-temporal fusion similarity matrix; A sixth unit for dividing customer groups with similar spatio-temporal behavior characteristics into corresponding clustering clusters using the density reachability principle according to the determined clustering centers and the number of clusters, to obtain a customer group clustering result.
9. An electronic device, comprising: Comprise: A processor; A memory for storing processor-executable instructions; Wherein the processor is configured to invoke the instructions stored in the memory to execute the method of any one of claims 1 to 7.
10. A computer-readable storage medium having stored thereon computer program instructions, wherein, The computer program instructions are executed by the processor to implement the method of any one of claims 1 to 7. The computer program instructions are executed by the processor to implement the method of any one of claims 1 to 7.
Citation Information
Patent Citations
Social media user behavior pattern mining method
CN115687429A
Customer portrait key data mining method and system based on space-time big data
CN118797542A