Individual multi-day activity mode clustering method based on mobile phone signaling data

Through the introduction of dynamic pseudo-label renewal strategies in the multi-day activity mode clustering method based on mobile phone signaling data-student cycle model and new activity serial listing strategies, it solves the existing technologies to rely on residents to survey questionnaire data and difficulty To deal with the problem of multi -day activity sequences, it has achieved more accurate and stable activity mode recognition.

CN119357721AInactive Publication Date: 2025-01-24ZHEJIANG UNIV

Patent Information

Application Number
CN202411908109.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-24
Publication Date
2025-01-24
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the activity-based travel demand model, the prior art relies on residents' questionnaire data, limits the analysis depth of the model and is difficult to effectively process multi-day activity sequences, resulting in deviations and instability of inferred results.

Method used

Put forward a multi-day activity mode clustering method based on mobile phone signaling data. Teachers-student cycle models that introduce dynamic pseudo-label update strategies to make up for activity fields, and adopt a new activity serial listing strategy to enhance the characteristics of the characteristics to enhance the characteristics The depth of extraction and clustering efficiency.

Benefits of technology

It has improved the accuracy of activity type classification, enhanced the robustness and generalization capabilities of the model, reduced noise interference, strong adaptability, and can more accurately identify the multi -day activity mode.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119357721A_ABST
    Figure CN119357721A_ABST
Patent Text Reader

Abstract

The invention discloses an individual multi-day activity mode clustering method based on mobile phone signaling data. The method comprises the following steps: firstly, complementing activity fields of the mobile phone signaling data by using a teacher-student loop model which introduces a dynamic pseudo tag updating strategy; then, slicing a week according to 30 minutes, adding labels to slices based on activity types of individual stay points to obtain an activity sequence, and characterizing the activity sequence; and finally, clustering the represented activity sequence by using hierarchical clustering to obtain a typical activity mode. According to the method, firstly, a dynamic pseudo-label updating strategy is introduced in the knowledge migration process, data distribution difference is avoided, then an activity label with higher accuracy is obtained, and the activity label is added to a slice based on the determined activity label; the method further introduces a brand new activity sequence representation strategy, further improves the depth of feature extraction, also improves the clustering efficiency and effect, and provides important feature information for activity sequence prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of activity pattern clustering, and in particular to an individual multi-day activity pattern clustering method based on mobile phone signaling data. Background Art

[0002] Urban traffic congestion has become a global problem, and its core lies in the imbalance between traffic supply and demand. Effective response strategies include expanding traffic supply and implementing reasonable travel demand management to achieve a balance between supply and demand. In-depth evaluation of the effectiveness of travel demand management policies requires the establishment of accurate forecasting models. However, the traditional "four-stage" traffic model fails to fully consider the spatiotemporal connection between travel and activities, which limits our ability to deeply understand travel patterns. In contrast, the activity-based travel demand model provides decision makers with a flexible analytical tool by revealing these connections, helping them to develop effective strategies to optimize urban traffic.

[0003] At present, activity-based models mainly rely on resident questionnaire data, which limits the analytical depth of the model, and traditional measurement methods with relatively simple structures are often used. With the popularization of the concept of smart cities, mobile phone signaling data has become a hot topic of research due to its wide coverage and huge data volume. At the same time, the application of machine learning and deep learning technologies has become a growing trend, combining these novel data with advanced methods to provide new opportunities for optimizing activity sequence prediction models. An intuitive approach is to designate the most frequently visited places during the day and night as home and workplace, respectively, and identify home / work locations based on rules. In addition, some scholars enrich semantic information by pre-defining some common sense rules and applying nearby POIs, in which online map services (such as Baidu Maps) are used to access candidate POIs around the target location and assign the most likely POI label to the location. Some scholars have analyzed the check-in location and category, and determined the specific POI based on the surrounding POIs and Bayes' theorem. Although the surrounding land use can provide some information about user activities, mixed-use land development can easily distract the model and cause problems with matching accuracy. In addition, some scholars have combined spatial features such as POI distribution ratio and temporal features such as activity transfer probability by probability weighting, calculated the activity probability matrix, and used Monte Carlo simulation to infer the activity types of residents. However, due to the lack of clear annotation information, unsupervised learning methods are extremely sensitive to the distribution characteristics of sample data when processing data, and are easily affected by noise and outliers in the data, which may lead to bias and instability in the analysis results. More and more scholars are using supervised methods to infer the activity types of residents. Ermagun et al. used nested logit and random forest methods to predict travel purposes based on household travel survey data and data from location-based online search and discovery services. Hadjidimitriou et al. proposed a machine learning method to predict the travel purpose corresponding to GPS data based on the results in resident travel survey data. Li et al. trained a gradient boosting tree model based on resident travel survey data and migrated it to mobile phone signaling data to predict resident travel purposes. However, when the supervised learning model is transferred, due to the distribution difference between the training data and the predicted data, the model is often difficult to apply directly, which may cause the migrated model to be biased in prediction and affect the accuracy of the inference results.

[0004] After inferring the purpose of travel, individual activity patterns can be further extracted. In terms of activity pattern recognition, many studies extract activity features from travel survey data, mobile phone data, and other location-based data, and divide activity patterns into different representative types. Most of the research on activity pattern recognition is based on topic models and clustering models, analyzing human travel patterns from the time or space dimension. In the time dimension, in order to explain the time characteristics, some studies divide the time series features into discrete segments to construct special sequences containing activity information. However, the similarity of these classified sequences is difficult to use for clustering measurement. Some studies convert the sliced ​​sequences into flat binary vectors for distance calculation; some scholars also apply string or sequence clustering algorithms, such as using edit distance to measure the distance of classified sequences, but it does not consider the characteristics of state transitions. In addition, existing methods are mainly developed for the analysis of single-day activity sequences. When the time span of the activity sequence increases, they perform poorly in characterizing the relationship between multi-day activities and their subsequences and the overall sequence. Some studies try to identify multi-day activity patterns by adopting word and sentence embedding models to vectorize single activities and the entire activity chain, and perform clustering analysis on this basis. However, the slice units of activity sequences are not as semantically rich as words, which limits their effectiveness in characterizing multi-day activity pattern features. Summary of the invention

[0005] In order to overcome the defects of the existing methods, the present invention proposes an innovative method to realize the clustering of multi-day activity patterns. The method first introduces a dynamic pseudo-label update strategy in the process of knowledge transfer to avoid data distribution differences, thereby obtaining activity types with higher accuracy and adding labels to slices based on the determined activity types; the method also introduces a new activity sequence characterization strategy to further enhance the depth of feature extraction, improve clustering efficiency and effect, and provide important feature information for activity sequence prediction.

[0006] The present invention is implemented by the following technical solutions:

[0007] A method for clustering individual multi-day activity patterns based on mobile phone signaling data, comprising the following steps:

[0008] Step 1: Use the Teacher-Student Cycling (TSC) model that introduces a dynamic pseudo-label update strategy to complete the activity field of the mobile phone signaling data. The specific content of the completion includes the activity types of resident stay points and individual stay points. The method for obtaining the resident stay points is: perform rule-based stay point recognition on the mobile phone signaling data to identify the resident stay points. The method for obtaining the activity type of the individual stay point is: based on the mobile phone signaling data, using the teacher-student cycle model, and determining the activity type of the individual stay point based on the dynamic pseudo-label update strategy.

[0009] Step 2: Identify residents’ stay points, slice them into 30-minute segments, label the slices based on the activity types of individual stay points, obtain activity sequences, and characterize the activity sequences.

[0010] Step 3: Select cosine distance as the similarity measurement strategy, and use the hierarchical clustering algorithm of the minimum variance method to cluster the characterized activity sequences to obtain typical activity patterns.

[0011] In the above technical solution, further, in step 1, the teacher-student cycle model provides an effective knowledge transfer method for realizing efficient activity type classification in labeled data and unlabeled data with different data distribution characteristics. The model uses a dynamic pseudo-label update strategy and the feedback of the student model to dynamically adjust the accuracy of the pseudo-label, thereby improving the robustness and generalization ability of the model. This model is suitable for application scenarios in dynamic data environments, especially in the detection of activity types in mobile phone signaling data.

[0012] Furthermore, in the traditional teacher-student cycle model, the pseudo-labels generated by the teacher model are used as temporary labels for unlabeled data and are directly used to train the student model. However, the distribution difference between unlabeled data and labeled data may lead to uneven quality of pseudo-labels generated by the teacher model, especially in an environment with a low signal-to-noise ratio. This situation will cause the student model to overfit on pseudo-labels of poor quality, reducing the accuracy and generalization ability of the model. In order to solve this problem, the present invention proposes a dynamic pseudo-label update strategy, which dynamically adjusts the pseudo-labels through feedback from the student model to ensure the quality and accuracy of the pseudo-labels. In step 1, the activity type of the individual stay point is determined based on the dynamic pseudo-label update strategy using the teacher-student cycle model, and the specific method is as follows:

[0013] 1) Using the resident travel survey data with labeled activity types to train the supervised learning model to form a teacher model; the teacher model first predicts the mobile phone signaling data of unlabeled activity types, generates preliminary pseudo labels, and filters the pseudo labels with confidence exceeding the confidence threshold through a preset confidence threshold; wherein the confidence threshold is a hyperparameter for controlling the accuracy of pseudo labels to ensure that the student model is trained only based on credible labels;

[0014] 2) The pseudo-label data with confidence exceeding the confidence threshold is input into the student model for training. During the training process, the confidence of each pseudo-label is calculated in real time. For pseudo-labels with confidence below the confidence threshold, the student model marks the corresponding data point as "pending re-evaluation". This feedback mechanism will continuously identify data points that are difficult to classify or whose confidence is significantly reduced in different models.

[0015] 3) The pseudo-labeled data marked as "pending re-evaluation" will be re-submitted to the teacher model for re-prediction. When the teacher model regenerates the pseudo-label, it will update the prediction results based on the knowledge accumulated in the previous round of training. In addition, if multiple student models participate in the training together, the feedback of each model can be voted to determine the credibility of the pseudo-label. When the consistency between models on the pseudo-label is high, the pseudo-label is considered reliable and fixed; when the models disagree on the pseudo-label, the system will continue to iterate and generate new pseudo-labels until a consensus is reached or the set number of iterations is reached.

[0016] 4) Repeat steps 1)-3) until the pseudo labels are consistent or the set number of iterations is reached, and the output label is the activity type of the individual stay point.

[0017] Furthermore, in each round of teacher-student switching, the student model will be retrained based on the updated pseudo-labels, thereby continuously improving the quality of the pseudo-labels. After several rounds of iterations, the credibility and accuracy of the pseudo-labels gradually improve, forming a more robust data set for the student model to learn. The specific number of iterative feedback can be dynamically adjusted based on the complexity and distribution heterogeneity of the data to ensure the optimal performance of the model. In this process, a dynamic pseudo-label update strategy is adopted, that is, when the student model shows uncertainty or low confidence in the pseudo-label, the teacher model re-labels the data point. This feedback mechanism gradually optimizes the quality of the pseudo-labels through multiple rounds of iterations, thereby improving the accuracy and adaptability of the model to unlabeled data.

[0018] Furthermore, in order to adapt to the detection of different behavior patterns, the present invention designs a method for adaptively updating the confidence threshold: for pseudo-labels with higher confidence, the system will appropriately increase the threshold to prevent good quality labels from being frequently updated; for pseudo-labels with low confidence, the threshold will be lowered to make them easier to be re-labeled, so that the model can flexibly adapt to different data distributions and uncertainties.

[0019] Furthermore, the core idea of ​​the dynamic pseudo-label update strategy is to let the student model dynamically evaluate the confidence of the label during the pseudo-label training process to identify potential "noise" labels, and let the teacher model re-label these labels through a feedback mechanism. This strategy is equivalent to introducing a "self-correction" mechanism, so that the student model not only accepts the knowledge transfer of the teacher model in a one-way manner, but also can "reversely guide" the teacher model, thereby optimizing the quality of pseudo-labels in multiple rounds of interaction.

[0020] Furthermore, in step 2, the activity sequence is characterized by: dividing the activity sequence into subsequences of length n, and applying a random forest model to construct a decision tree; and constructing a vectorized representation of the sequence by calculating the frequency of occurrence of each subsequence at the terminal node of the decision tree.

[0021] Furthermore, the characterization of the activity sequence specifically includes the following steps:

[0022] The activity sequence of N residents forms a matrix , For one The matrix is ​​composed of N activity sequences. No. Activity Sequence It consists of 336 activity units; The specific formula is as follows:

[0023]

[0024] resident Activity sequence It is expressed as:

[0025]

[0026] in, Is an activity sequence The mth active unit in , 1≤m≤336.

[0027] Will The activity sequence in is converted into a vector form. The specific method is as follows:

[0028] 1) Construct a segmented matrix; first, use a sliding window of length n to segment the matrix Segment each activity sequence in to obtain all possible subsequences of length n in each activity sequence;

[0029] Each subsequence is expressed as follows: the leftmost column is a number with an asterisk, which represents the specific position of the subsequence in the entire sequence; the next to the leftmost column is n active units; the last column is the class label, which is the next active unit next to the subsequence in the active sequence;

[0030] Therefore, the matrix Reconstructed into a segmented matrix S with ((336−n)×N) rows and (n+2) columns;

[0031] 2) Based on the segmentation matrix of step 1), each subsequence in the segmentation matrix S is vectorized to represent the activity sequence, thereby converting the activity sequence into a vector form. The specific method is: the segmentation matrix is ​​modeled using a decision tree, and the terminal node index of the modeled decision tree is used to re-encode each subsequence. Each index corresponds to a subsequence, so that the segmentation matrix S is represented as a binary matrix. The number of columns of the binary matrix is ​​equal to the number of terminal nodes, and the number of rows is equal to the number of activity sequences.

[0032] The terminal node index of the decision tree modeled is used to recode each subsequence, so that the subsequence is represented by a binary vector, and each row of numbers in the binary vector corresponding to each subsequence respectively represents whether the subsequence is assigned to the corresponding terminal node of the corresponding decision tree, 0 represents not being assigned to the corresponding terminal node, and 1 represents being assigned to the corresponding terminal node;

[0033] According to the binary vector corresponding to each subsequence in the activity sequence, a binary matrix corresponding to the activity sequence is obtained, and each column in the binary matrix is ​​added to obtain the binary vector corresponding to the activity sequence.

[0034] Furthermore, in step 3, the average silhouette coefficient is used as an indicator for evaluating the clustering effect to quantitatively evaluate the rationality of the clustering process for dividing the residents' activity sequence; and the cluster with the highest average silhouette coefficient is selected as the clustering result.

[0035] The present invention also provides an individual multi-day activity pattern clustering device based on mobile phone signaling data, the device comprises an activity field completion module, an activity sequence characterization module, and a clustering module;

[0036] The activity field completion module is used to complete the activity field of the mobile phone signaling data, and the content of the activity field completion specifically includes the activity types of the resident stay point and the individual stay point;

[0037] The activity sequence characterization module is used to slice a week into 30-minute slices, add labels to the slices based on the activity types of individual stay points, obtain activity sequences, and characterize the activity sequences;

[0038] The clustering module is used to cluster the characterized activity sequences using hierarchical clustering to obtain typical activity patterns.

[0039] The present invention also provides an electronic device, comprising: one or more processors; a memory for storing one or more programs; when the one or more programs are executed by the one or more processors, the one or more processors implement the individual multi-day activity pattern clustering method based on mobile phone signaling data.

[0040] The present invention also provides a computer-readable storage medium on which computer instructions are stored, and the computer instructions are used to enable a computer to execute the individual multi-day activity pattern clustering method based on mobile phone signaling data.

[0041] The beneficial effects of the present invention are:

[0042] 1. The present invention proposes a teacher-student cycle model that introduces a dynamic pseudo-label update strategy. The model is used to complete the active field of mobile phone signaling data, which solves the problem that unsupervised learning methods are easily affected by noise and outliers, and the problem that the distribution difference between the original training data and the predicted data in the supervised learning model during transfer learning leads to low model accuracy. Specifically, the teacher-student cycle model of the present invention has the following advantages:

[0043] 1) Improving pseudo-label quality

[0044] The dynamic pseudo-label update strategy enables low-quality pseudo-labels to be gradually eliminated in multiple rounds of iterations, thereby reducing the situation of misleading the student model and significantly improving the classification accuracy of the model and its adaptability to unlabeled data.

[0045] 2) The model is robust

[0046] Through dynamic adjustment and multiple feedback, the model is more robust when dealing with data with large distribution differences, and can maintain good performance even in complex mobile phone signaling data environments. This adaptive pseudo-label quality control enables the model to handle more diverse data scenarios.

[0047] 3) Reduce noise interference

[0048] Compared with the fixed pseudo-label strategy, the present invention effectively controls data noise through an adaptive update and re-labeling mechanism, making the pseudo-label closer to the real label distribution and avoiding the performance degradation of the traditional model caused by noisy labels.

[0049] 4.) Strong adaptability

[0050] The dynamic pseudo-label update strategy can be flexibly adjusted according to different application scenarios and data characteristics, and is particularly suitable for highly dynamic scenarios such as mobile phone signaling data. The model can automatically adjust the re-evaluation frequency and confidence threshold to balance training accuracy and label quality, and improve the model's generalization ability on new data.

[0051] 2. The present invention proposes a new activity sequence characterization method. Compared with the prior art, this activity sequence characterization method solves the shortcomings of insufficiently fine time segment division, failure to fully consider state transition characteristics, and poor characterization of multi-day activity sequences when processing the time dimension analysis of activity sequences. In a more detailed time segment segmentation and a longer time span, the sequence vectorization is more in line with the dynamic changes of the actual activity sequence, thereby improving the accuracy of clustering analysis. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] Figure 1 This is a schematic diagram of the teacher-student cycle model;

[0053] Figure 2 A schematic diagram of the process for characterizing residents' multi-day activity sequences;

[0054] Figure 3 A schematic diagram of the average silhouette coefficient used to evaluate clustering effects;

[0055] Figure 4 An example diagram of using a sliding window to segment a sequence;

[0056] Figure 5 Schematic diagram for recoding subsequences using terminal node indexes of decision trees;

[0057] Figure 6-11 This is a schematic diagram of the clustering results of residents’ activity sequences, where: Figure 6 Corresponding to the free and flexible type, Figure 7 Corresponding to work-weekend activities, Figure 8 For regular work, Fig. 9 For work and entertainment, Fig.10 Corresponding work-overtime type, Fig.11 Corresponding to entertainment and leisure type. DETAILED DESCRIPTION

[0058] The embodiment of the present invention provides a method for clustering individual multi-day activity patterns based on mobile phone signaling data. The method comprises the following steps:

[0059] Step 1: Complete the activity field of the mobile phone signaling data, and the specific content to be completed includes the activity types of the residents' stay points and individual stay points. The method for obtaining the residents' stay points is: perform rule-based stay point recognition on the mobile phone signaling data to identify the residents' stay points. The method for obtaining the activity types of the individual stay points is: based on the mobile phone signaling data, using the teacher-student cycle model, and determining the activity types of the individual stay points based on the dynamic pseudo-label update strategy. This step is specifically:

[0060] First, the mobile phone signaling data needs to be collected and preprocessed.

[0061] In this embodiment, mobile phone signaling data is provided by mobile communication operators, covering 20,000 users in the main urban area of ​​Hangzhou as research samples, and recording a total of 4.8 million trajectory data in Zhejiang Province from May 15 to 21, 2023. At present, most mobile device location data often lack important basic personal attributes and socioeconomic attributes of residents due to their passive data collection nature and privacy concerns. This defect limits the ability of research models in policy analysis, intervention effect evaluation, or adaptation to individual behavior changes. However, in the present invention, the cooperating mobile operators provide desensitized user personal and socioeconomic attribute data under the premise of strictly protecting user privacy, as shown in Table 1, which effectively overcomes the aforementioned data shortage problem.

[0062] Table 1 User basic attribute meaning table

[0063]

[0064] The tasks of preprocessing mobile phone signaling data mainly include data cleaning and stay point identification. Data cleaning processes the ping-pong data and drift data in the mobile phone signaling data, and deletes the user data with cross-city traffic flow, so that the research focuses on travel activities in Hangzhou. After data cleaning, the Hangzhou map data is divided into 50m × 50m grids. If the user stays at a location for more than 30 minutes, the point is determined to be a mobile phone user stay point. The final processed mobile phone signaling data fields are shown in Table 2.

[0065] Table 2 Sample of processed mobile phone signaling data

[0066]

[0067] The pre-processed mobile phone signaling data contains longitude and latitude fields, which can be converted into POI data and combined with POI data to calculate the number of various points of interest near the location. The resident survey data contains traffic area information, which can also be converted into POI data and combined with POI data to calculate the number of various points of interest near the location.

[0068] POI (Point of Interest) is a type of tag that can be queried in an electronic map. Hangzhou POI data was crawled from the API provided by Amap using a web crawler. The data format is shown in Table 3. There are about 890,000 data items. Some POI data is shown in Table 3, where the name field represents the POI name, the type field represents the POI type, the location field represents the longitude and latitude of the POI location, the admin field represents the administrative district to which the POI belongs, and the address field represents the detailed address of the POI. The location is divided into longitude and latitude, and the POI type includes 24 major industry categories. The study focuses on the types of activities of mobile phone users at the destination.

[0069] Table 3 Examples of some POI data in Hangzhou

[0070]

[0071] Then, a teacher-student cycle model is constructed, and the activity types of individual stay points are determined using the teacher-student cycle model.

[0072] Obtain resident survey data: After sampling, travel data of 8,419 individual subjects in Hangzhou in 2023 were collected, including personal attributes, economic attributes, and travel attributes.

[0073] GPS-assisted survey data: Through the smartphone-assisted travel survey conducted in Hangzhou in 2023, using the TraceRecord application and A-Map API service, we obtain users' precise stay points and corresponding activity labels for a week as a test set for the teacher-student loop model.

[0074] The test set was mainly obtained using the TraceRecord application developed by the Tourism Behavior Laboratory of Zhejiang University, which can automatically record travel data throughout the workday. The application integrates the A-Map API, a free developer interface collection that supports global positioning, real-time trajectory tracking, recorded trajectory query, mileage calculation, position deviation correction and other services. The API was developed by AutoNavi, one of the leading digital map content solution providers in China. It can be deployed quickly and cost-effectively. By installing TraceRecord, personal attributes can be collected, trips can be recorded, and completed trajectories can be reviewed to achieve handheld traffic surveys. Participants are required to fill in personal attributes and a unique ID number is assigned to each individual to anonymize the data. Referring to traditional resident travel surveys, information such as name, gender, age, residential area, driver's license ownership, and mobile resources are collected. When the software is started or running in the background, the API's location and movement detection service will feedback the user's trip and stop status, so that TraceRecord automatically starts or ends recording. TraceRecord automatically records travel characteristics every 2 seconds, including GPS accuracy (horizontal position accuracy), GPS coordinates, timestamp, speed, heading, travel mode and purpose, etc. Participants were asked to review their recorded trips and verify each route, distance, mode of transportation, purpose, and duration before starting the survey the next day.

[0075] The data of the test set is completely consistent with the mobile phone signaling data in fields after preprocessing, and individuals with the same matching degree are selected as the test set, which makes up for the natural deficiency of the mobile phone signaling data that there is no label.

[0076] Traditional activity detection methods show limitations when the distribution of labeled and unlabeled data is very different. They usually use unsupervised or fully supervised learning methods, but fail to fully utilize the classification advantages of labeled data for heterogeneous datasets. Therefore, a new teacher-student cycle model is urgently needed to use labeled data to effectively classify unlabeled data in heterogeneous datasets.

[0077] The present invention proposes a teacher-student cycling (TSC) model (e.g. Figure 2 The construction of the TSC model consists of two main steps, and an innovative dynamic pseudo-label update strategy is added on this basis:

[0078] 1) Train a supervised learning model on labeled data (i.e., resident travel survey data with labeled activity types) to form an initial teacher model (ITM). This model is used to generate pseudo labels and filter pseudo labels based on a preset confidence threshold to ensure high quality of pseudo labels.

[0079] 2) The student model is trained by combining pseudo-labels and labeled data. After training, the student model is used as the new teacher model to generate predictions for the next round. In this process, a dynamic pseudo-label update strategy is adopted, that is, when the student model shows uncertainty or low confidence in the pseudo-label, the teacher model re-labels the data point. This feedback mechanism gradually optimizes the quality of pseudo-labels through multiple rounds of iterations, thereby improving the accuracy and adaptability of the model to unlabeled data.

[0080] The confidence threshold is a hyperparameter used to control the accuracy of pseudo labels to ensure that the student model is trained only based on credible labels.

[0081] Dynamic pseudo-label update strategy: In each round of iteration, the student model feeds back the confidence information of the pseudo-label, identifies uncertain label samples, and re-labels them to the teacher model, thereby ensuring the continuous update of high-quality pseudo-labels.

[0082] Specific models such as Figure 1 As shown in the figure, ITM is a single-layer MLP (fully connected neural network) with a dropout of 0.3 and a feature dimension of 256 to prevent overfitting on labeled datasets. The model uses a dynamic pseudo-label update strategy to adjust the confidence of the pseudo-label through a feedback mechanism to reduce the impact of low-quality pseudo-labels on model performance. In each iteration, the system adjusts the pseudo-label based on the label confidence fed back by the student model, and reuses the teacher model for re-labeling when labeling uncertain labels. The dynamic update strategy is used in combination with the confidence threshold to ensure that the student model is trained under high-quality pseudo-labels and improve its classification accuracy.

[0083] The experimental results on this dataset show that compared with the teacher-student cycle model using unsupervised learning LDA, supervised learning XGboost, and the teacher-student cycle model without the dynamic pseudo-label update strategy, the teacher-student cycle model with the dynamic pseudo-label update strategy proposed in this paper has significant improvements in pseudo-label quality control and distribution adaptability. With the support of the pseudo-label dynamic update strategy, the teacher-student cycle model shows higher accuracy and robustness in a complex signaling data environment (as shown in Table 4).

[0084] Table 4 Comparison of the effects of different models

[0085]

[0086] Step 2: Identify the residents’ stay points, slice them into 30-minute segments, label the slices based on the activity types of the individual stay points, obtain the activity sequence, and characterize the activity sequence. This step is as follows:

[0087] First, the identified residents’ stay points are sliced ​​according to 30 minutes, and the slices are labeled based on the activity types of individual stay points to obtain activity sequences. The specific method is as follows:

[0088] In order to deeply analyze the daily activity patterns of residents, an activity chain is reconstructed for each resident (which can be split into activity sequences according to time slices). The activity chain refers to the arrangement order of all activities of residents in a certain period of time. It intuitively reflects how residents arrange their daily activities. According to the method in the previous section, the activity types of all residents' records have been inferred in turn, and the complete activity chain of residents has been reconstructed. As shown in Table 5, this is a sample data of a resident. After leaving home in the morning, he went to work. After finishing a day's work, he carried out about 2 hours of entertainment activities and finally returned home. The time period of the resident data studied in this invention is 7 days. Due to length issues, only one day's activity records are shown here. The activity chain is home-work-entertainment-home, but the activity patterns reflected by the same order of activity chains at different times may also be different. The present invention adopts the method of time slicing division. According to the results of stay point identification, the minimum time unit of each activity is set to 30 minutes. 24 hours a day is divided into 48 slices, and each slice is regarded as an activity unit. 336 continuous activity units can be used to further reconstruct the resident activity sequence, such as Figure 2 As shown. Each activity unit is assigned a different color code according to its activity type. For example, an activity unit marked with "H" indicates that the resident is at home during that period. If consecutive activity units are of the same color, it means that the resident is continuously engaged in the same type of activity. When the color of the activity unit changes, it means that the resident has ended the previous activity and started a new activity. Finally, the activity types include "home", "work", "entertainment", "personal maintenance", "travel" and "other". The activity types except "travel" are derived from the activity type inference analysis in the previous section. "Home", "work", "entertainment", "personal maintenance", "travel" and "other" correspond to "H", "W", "E", "M", "T" and "O" respectively.

[0089] Table 5 Example of resident activity chain

[0090]

[0091] Then, the activity sequence is characterized.

[0092] Specifically, after obtaining the multi-day activity sequence of residents, in order to deeply explore the potential features of the multi-day activity sequence, vectorization is required to reveal the relationship between subsequences and sequences and measure the differences between residents' activity sequences. Specifically, the activity sequence is divided into subsequences of length n, and a random forest model is applied to build a decision tree; the vectorized representation of the sequence is constructed by calculating the frequency of occurrence of each subsequence at the terminal node of the decision tree. This method not only improves the depth of feature extraction, but also improves clustering efficiency and accuracy.

[0093] matrix It consists of N activity sequences. No. Activity Sequence The 336 active units, therefore, Can be expressed as a The matrix is ​​as follows:

[0094]

[0095] Among them, residents Activity sequence It can be expressed as:

[0096]

[0097] In the above formula, Is an activity sequence The mth active unit in , 1≤m≤336.

[0098] This method uses two steps to transform individual activity sequences into vector representation.

[0099] Step 1: Construct a segmentation matrix. First, use a predefined sliding window of length n to segment each activity sequence to produce a length-smoothed dataset. This step aims to create a suitable condition for effectively applying the tree model for sequence characterization. This step sets the window size to n to extract all possible subsequences of length n from a given activity sequence. Each subsequence is represented as follows (see Figure 4): The leftmost column is a number with an asterisk (*), indicating the specific position of each subsequence in the entire activity sequence; next to the leftmost column are n activity units; the last column is the class label, specifically the next activity unit next to the subsequence in the activity sequence. Take the sequence "HWEHHHWEWHH" of length 11 to illustrate the above process. Since the label and the activity unit come from the same data, it mimics the autoregressive behavior, and the label traverses the entire activity sequence in an autoregressive manner. In the given sequence, n is equal to 5, "HWEHH" is five activity units with the label "H", which is the next activity unit next to the subsequence in the activity sequence. The number of subsequences is determined by the length of the activity sequence and the predefined "n". If There are 7000 inhabitants, which is the number of rows When the window size is 7000 and the window size is n=5, a segmentation matrix S containing 2317000 rows ((336−5)×7000) and 7 columns is obtained. Therefore, the output after segmentation is a segmentation matrix of size (336−n)×N times (n+2).

[0100] Step 2: Provide a new representation for the multi-day activity sequence of residents. Based on the segmentation matrix of the first step, each subsequence in the segmentation matrix is ​​vectorized to represent the activity sequence, thereby converting the activity sequence into a vector representation. The segmentation matrix output from the previous stage serves as the input of this stage. In this stage, the random forest algorithm will be used, which is a method of integrating multiple decision trees, each of which is able to handle continuous and discrete attributes, and optimizes its segmentation process through the Gini index to reduce impurity. Random forests effectively minimize prediction errors through this integrated learning mechanism. Each subsequence is re-encoded by the terminal node index of the decision tree, and each index corresponds to a specific subsequence. In other words, each subsequence is assigned to a specific terminal node, and this method accurately tracks the exact position of the subsequence in the sequence. Assuming that the number of decision trees in the random forest is three, then Figure 5 As shown in the figure, the subsequence "HWEHH" is input into the decision tree after modeling. The subsequence is assigned to the 2nd, 6th and 8th terminal node indexes of the first, second and third trees, and converted into a vector. The assigned terminal nodes are recorded as 1, and the unassigned nodes are recorded as 0. Figure 5 In Figure 1, three decision trees with different numbers of terminal nodes are shown. All three decision trees are trained based on sequence data and learn the order relationship between sequences (i.e., the characteristic relationship of sequences), but they are three different representations of this relationship. The n active units of the subsequence are input into the decision tree, and the position of the terminal node assigned to each decision tree is recorded. The terminal node position represents the characteristic relationship of the sequence. Each decision tree has only one terminal node assigned to each subsequence. The other subsequences go through the same process.

[0101] The above method can be used to record the binary matrix of the terminal node to which each activity sequence belongs, so that the binary vector corresponding to each activity sequence can be obtained. Therefore, the segmented matrix obtained in the first step can be represented by a binary matrix. The number of columns of the binary matrix is ​​equal to the number of terminal nodes, which is 10 in this example; the number of rows is equal to the number of activity sequences (i.e., the number of residents) in the original matrix. In the example given below, the activity sequence is divided into six subsequences, and the six subsequences are assigned to the corresponding terminal node indexes, as shown in the following formula. The first row of the binary matrix corresponding to this activity sequence shows that the subsequence "1*HWEHH | H" ends at the terminal nodes 2, 6, and 8 of trees 1, 2, and 3.

[0102]

[0103] The binary matrix above shows the index representation of the sequence "HWEHHHWEWHH" at the terminal nodes of the decision tree. This representation can be summarized as a two-dimensional vector representation as shown below, which shows the frequency of each resident activity sequence ending at a specific terminal node of the decision tree. "0" means that none of the subsequences of the sequence ends at terminal node 9. The number of rows in the following formula is equal to the total number of resident activity sequences, which is only explained as a part of an activity sequence.

[0104]

[0105] Step 3: Use hierarchical clustering to cluster the characterized activity sequences to obtain typical activity patterns.

[0106] The average silhouette width (Average Silhouette Width, ASW) is used as an indicator to evaluate the clustering effect, in order to quantitatively evaluate the rationality of the clustering process for the division of residents' activity sequences. Clustering results with high silhouette coefficients usually indicate that the resident activity sequences within the same cluster have high similarities and maintain large differences with other clusters, which is an important basis for judging the excellent clustering effect. The average silhouette coefficient quantifies the degree of match between each resident activity sequence and its cluster relative to the closest other clusters by integrating the information of intra-cluster cohesion and inter-cluster separation. The value range of the average silhouette coefficient is from -1 to 1, where a value close to 1 means that the resident activity sequence has a high degree of match with the cluster to which it belongs and is far away from other clusters, indicating good clustering quality; while a value close to -1 implies that the activity sequence may have been incorrectly assigned to a cluster. The formula is as follows:

[0107]

[0108] in is the total number of residents, Is an activity sequence The silhouette coefficient is calculated as follows:

[0109]

[0110] in, and are cluster cohesion and inter-cluster separation, respectively. The cluster cohesion represents the activity sequence The average distance to other points in the cluster; the smaller this value is, the closer the points in the cluster are, that is, the higher the cluster cohesion. The separation between clusters indicates the activity sequence. The average distance to all points in the nearest other cluster; the larger this value is, the better the separation between clusters, that is, the farther the distance between points in different clusters.

[0111] The present invention uses a hierarchical clustering algorithm based on cosine similarity for clustering. As the number of clusters changes, the average silhouette coefficient used to evaluate the clustering effect also changes accordingly. In this case, the number of decision trees is set to 20 to fully cope with the complexity of the activity sequence. For an activity sequence of length 336, the window size n is set to 7 to capture the relationship between the subsequence and the overall sequence. As the number of clusters changes, the average silhouette coefficient used to evaluate the clustering effect also changes accordingly. Figure 3 As shown in the figure, when the number of clusters C is 9, the average silhouette coefficient reaches the maximum value of 0.651, indicating that the classification effect is excellent under this number of clusters. It should be pointed out that the samples of three clusters account for a relatively low proportion of the total, which is at the single-digit level, so they are not analyzed in depth. Therefore, six typical multi-day activity patterns were finally determined.

[0112] The clustering results of residents’ activity sequences are as follows: Figure 6-11 As shown, the horizontal axis of each sub-graph represents the time of a week, and the vertical axis represents the weekly activity arrangements of different residents in the same cluster. For each activity sequence, the activity units are colored according to 6 activity types, namely home (H), work (W), travel (T), entertainment (E), personal maintenance (M), and others (O). The activity sequences in the same cluster are mostly similar, and the time distribution and order of the activity units have consistent regularity. Therefore, each cluster can represent a typical multi-day activity pattern of residents, and different clusters intuitively show the significant differences in residents' multi-day activity patterns. According to the clustering result analysis, the 6 categories of residents' multi-day activity patterns can be defined as "free and flexible type", "work-weekend activity type", "regular work type", "work-entertainment type", "work-overtime type", and "entertainment and leisure type". In Category 1 (free and flexible type), see Figure 6 Residents usually do not have regular jobs and spend most of their time at home, occasionally participating in recreation, personal maintenance or other activities during the day. Figure 7Intuitively, in Category 2, i.e., work-weekend activity type, most office workers regularly spend a lot of time at their workplace during the weekdays, with the typical working hours being from 8 a.m. to 6 p.m. After work, they return to their homes and spend most of the evening time at their homes. However, on weekends, the activity pattern changes, with most residents tending to go out for entertainment, personal maintenance, and other activities. Figure 8 It was found that Category 3, the regular work type, has residents whose activities on weekdays are mainly centered around work, which occupies most of the daytime. However, compared with the work-weekend activity type, the proportion of residents in this group going to shopping malls and other places for entertainment after get off work is higher. On weekends, most of them choose to stay at home, and the proportion of going out for entertainment is significantly reduced compared with the work-weekend activity type. These patterns are very common in daily life. Some unconventional multi-day activity patterns were also noted in the study, as Fig. 9 and Fig.10 As shown, it shows a pattern that some residents continue to work on weekdays and weekends. This phenomenon reveals that there is a large amount of high-intensity work in Hangzhou. Although the residents of category 5 (work-entertainment type) and category 6 (work-overtime type) show commonalities in the behavior of continuous overtime work during the week, there are still differences between the two. Specifically, the residents of the work-overtime type work longer hours, and basically only stay at home except for work, without any other activities, which reflects the extremely high work intensity. Although the residents of the work-entertainment type also work overtime, their working hours are relatively short, and they participate in other entertainment and leisure activities after work more frequently. Finally, a more special activity pattern was also found, such as Fig.11 As revealed, recreational residents spend less time on work, enjoy relatively flexible work schedules, and tend to spend more time on recreational activities, especially in the afternoon and evening. This pattern is often associated with groups that have a special interest in specific activities.

Claims

1. A method for clustering individual multi-day activity patterns based on mobile phone signaling data, characterized in that: The following steps are involved: Step 1: Complete the activity field of the mobile phone signaling data; the content of the activity field completion specifically includes the activity types of the resident stay points and the individual stay points; the method for obtaining the resident stay points is to perform rule-based stay point recognition on the mobile phone signaling data to identify the resident stay points; the method for obtaining the activity types of the individual stay points is to determine the activity types of the individual stay points based on the mobile phone signaling data, using the teacher-student cycle model and the dynamic pseudo-label update strategy; Step 2: Slice a week into 30-minute slices, add labels to the slices based on the activity types of individual stop points, obtain activity sequences, and characterize the activity sequences; Step 3: Use hierarchical clustering to cluster the characterized activity sequences to obtain typical activity patterns.

2. The method for clustering individual multi-day activity patterns based on mobile phone signaling data according to claim 1 is characterized in that: In step 1, the teacher-student cycle model is used to determine the activity type of the individual stay point based on the dynamic pseudo-label update strategy. The specific method is: 1) Using the resident travel survey data with labeled activity types to train the supervised learning model to form a teacher model; the teacher model first predicts the mobile phone signaling data of unlabeled activity types, generates preliminary pseudo labels, and filters the pseudo labels with confidence exceeding the confidence threshold through a preset confidence threshold; wherein the confidence threshold is a hyperparameter for controlling the accuracy of pseudo labels to ensure that the student model is trained only based on credible labels; 2) The pseudo-label data with confidence exceeding the confidence threshold is input into the student model for training. During the training process, the confidence of each pseudo-label is calculated in real time. For pseudo-labels with confidence below the confidence threshold, the student model marks the corresponding data point as "pending re-evaluation"; 3) The pseudo-labeled data marked as "pending re-evaluation" is sent back to the teacher model for re-prediction. When the teacher model regenerates the pseudo-labels, it updates the prediction results based on the knowledge accumulated in the previous round of training; 4) Repeat steps 1)-3) until the pseudo labels are consistent or the set number of iterations is reached, and the output label is the activity type of the individual stay point.

3. The method for clustering individual multi-day activity patterns based on mobile phone signaling data according to claim 1 is characterized in that: In step 2, the activity sequence is characterized by: dividing the activity sequence into subsequences of length n, and applying a random forest model to construct a decision tree; and constructing a vectorized representation of the activity sequence by calculating the frequency of occurrence of each subsequence at the terminal node of the decision tree.

4. The method for clustering individual multi-day activity patterns based on mobile phone signaling data according to claim 3 is characterized in that: The characterization of the activity sequence specifically includes the following steps: For a matrix consisting of N activity sequences , No. Activity Sequence It consists of 336 activity units; The specific formula is as follows: ; resident Activity sequence Specifically expressed as: ; in, Is an activity sequence The mth active unit in , 1≤m≤336; Will The activity sequence in is converted into a vector form. The specific method is as follows: 1) Construct a segmented matrix; first, use a sliding window of length n to segment the matrix Segment each activity sequence in to obtain all possible subsequences of length n in each activity sequence; Each subsequence is expressed as follows: the leftmost column is a number with an asterisk, which represents the specific position of the subsequence in the entire sequence; the next to the leftmost column is n active units; the last column is the class label, which is the next active unit next to the subsequence in the active sequence; Therefore, the matrix Reconstructed into a segmented matrix S with ((336−n)×N) rows and (n+2) columns; 2) Based on the segmentation matrix of step 1), each subsequence in the segmentation matrix S is vectorized to represent the activity sequence, thereby converting the activity sequence into a vector form. The specific method is: the segmentation matrix is ​​modeled using a decision tree, and the terminal node index of the modeled decision tree is used to re-encode each subsequence. Each terminal node index corresponds to a subsequence, so that the segmentation matrix S is represented as a binary matrix. The number of columns of the binary matrix is ​​equal to the number of terminal nodes, and the number of rows is equal to the number of activity sequences. The terminal node index of the decision tree modeled is used to recode each subsequence, so that the subsequence is represented by a binary vector, and each row of numbers in the binary vector corresponding to each subsequence respectively represents whether the subsequence is assigned to the corresponding terminal node of the corresponding decision tree, 0 represents not being assigned to the corresponding terminal node, and 1 represents being assigned to the corresponding terminal node; According to the binary vector corresponding to each subsequence in the activity sequence, a binary matrix corresponding to the activity sequence is obtained, and each column in the binary matrix is ​​added to obtain the binary vector corresponding to the activity sequence.

5. The method for clustering individual multi-day activity patterns based on mobile phone signaling data according to claim 1 is characterized in that: In step 3, the average silhouette coefficient is used as an indicator for evaluating the clustering effect to quantitatively evaluate the rationality of the clustering process for dividing the residents' activity sequence; the cluster with the highest average silhouette coefficient is selected as the clustering result.

6. A device for clustering individual multi-day activity patterns based on mobile phone signaling data, characterized in that: It includes activity field completion module, activity sequence representation module and clustering module; The activity field completion module is used to complete the activity field of the mobile phone signaling data, and the content of the activity field completion specifically includes the activity types of the resident stay point and the individual stay point; The activity sequence characterization module is used to slice a week into 30-minute slices, add labels to the slices based on the activity types of individual stay points, obtain activity sequences, and characterize the activity sequences; The clustering module is used to cluster the characterized activity sequences using hierarchical clustering to obtain typical activity patterns.

7. An electronic device, characterized in that: include: one or more processors; A memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 5.

8. A computer-readable storage medium having computer instructions stored thereon, characterized in that: The computer instructions are used to enable a computer to execute the steps of the method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • User activity type judgment method based on smart device data

    CN107529135A

  • Unsupervised pedestrian re-identification method based on category adaptive clustering

    CN111639561A

  • Travel OD accurate identification method based on mobile phone signaling and AOI data

    CN118215002A

Cited By

  • Large model-based resident leisure activity mode identification method and system

    CN121561205A