Daily activity trajectory-based resident income level classification method and equipment
By obtaining and analyzing the sequence of residents' daily activities and spatial and temporal residency characteristics indicators, quantitative indicators are extracted and income level classifiers are constructed, the problem of large errors in the classification of residents' income level in the existing technology is solved, and the accuracy and scientificity of classification are improved.
Patent Information
- Application Number
- CN202411641126.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-18
- Publication Date
- 2025-03-11
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
When using mobile phone data to classify residents' income levels, the error is large and cannot effectively reflect the socio-economic attributes of residents.
By obtaining the sequence of residents' daily activities and spatial and temporal residency characteristic indicators, quantitative indicators are extracted and an income level classifier is constructed, and residents' income levels are classified based on characteristic data.
The accuracy of the classification of residents' income level is improved, and the temporal and spatial characteristics of residents' daily activities and the built environment characteristics of the activity residency are comprehensively considered, which increases the scientificity, completeness and accuracy of the classification system.
Smart Images

Figure CN119598283A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data analysis technology, and in particular to a method and device for classifying residents' income levels based on daily activity trajectories. Background Art
[0002] In urban research, residents’ income level is crucial information and one of the basic attributes of residents’ socioeconomic status. It is widely used in the fields of urban social spatial structure, social justice, urban spatial resource equity, transportation equity, residential segregation, etc. This type of research mostly uses questionnaire survey data, which has detailed socioeconomic attributes of the surveyed subjects. However, due to human and economic costs, the sample size covered by the questionnaire survey is limited and cannot fully reflect the situation of residents in China’s large cities.
[0003] At present, some scholars and institutions have begun to use big data for urban research. The sample size of mobile phone data in megacities has reached millions, which can fully reflect the daily activity trajectories and mobility patterns of residents. However, mobile phone data has the characteristics of "detailed trajectories and lack of attributes". It only contains the spatiotemporal information of residents' movements and cannot obtain socioeconomic attributes. One method infers the income level of residents by identifying the place of residence and matching the house price / rent information. However, due to the relatively "fragmented" distribution of urban residential buildings in China, that is, the house prices / rents of residential buildings within a certain spatial range vary greatly, and the places visited by residents in their daily lives are not taken into account; another method divides income levels according to the phone package prices or mobile phone models provided by mobile data service providers, but the phone packages include both family and business packages, and the mobile phone models can only reflect the residents' willingness to consume high-tech products. Existing studies have shown that the income levels of residents deduced by these two methods have large errors. Summary of the invention
[0004] In order to solve the problems existing in the prior art, the present invention aims to provide a method and device for classifying residents' income levels based on daily activity trajectories, which can improve the accuracy of classification.
[0005] To achieve the above object, the present invention adopts the following technical solutions: A method for classifying residents' income levels based on daily activity trajectories, comprising the steps of: Obtain the sequence of residents' daily activity locations and temporal and spatial residence characteristic indicators; Extract quantitative indicators of residents' activity built environment from the sequence of residents' daily activity residence and spatiotemporal residence characteristic indicators; Construct an income level classifier, input quantitative indicators into the income level classifier, extract feature data, and classify residents' income levels based on the feature data.
[0006] As a further improvement of the present invention, the step of obtaining the sequence of residents' daily activity residence locations and the temporal and spatial residence characteristic indicators includes: Preprocess the residents’ mobile phone data to obtain the user’s daily activity trajectory dataset; Constructing user activity sequences for the user's daily activity trajectory dataset to obtain a user activity sequence dataset; The activity sequence dataset is processed by spatiotemporal clustering to obtain the sequence of residents' daily activity locations and spatiotemporal residence characteristic indicators.
[0007] As a further improvement of the present invention, the step of constructing a user activity sequence for the user's daily activity trajectory dataset to obtain the user activity sequence dataset includes: Taking natural days as units, we traverse all user daily activity trajectory datasets, and arrange the timestamp and coordinate records corresponding to each user ID in ascending order of time to obtain the initial user activity sequence dataset; Select an appropriate time resolution, aggregate the records in the initial user activity sequence dataset according to the time resolution, and obtain the user activity sequence dataset; The step of performing spatiotemporal clustering processing on the activity sequence data set to obtain the sequence of residents' daily activity residence locations and spatiotemporal residence characteristic indicators includes: Construct a residence identification standard, count the nighttime coordinates of each user ID for each natural day, and identify each user's residence; count the daytime coordinates of each user ID for workdays, and identify each user's work place; Based on the residence and work place, the coordinates of each user who stayed for more than a certain time threshold, non-work place, and non-residence place in a single day were counted, and spatial clustering was performed on the extracted coordinates to construct the sequence of residents' daily activity residence places; Based on the sequence of residents' daily activity locations, the residence time and frequency of each user in each location are counted to construct spatiotemporal residence characteristic indicators.
[0008] As a further improvement of the present invention, the quantitative index includes: a resident's daily activity consumption index, a first resident's daily activity built environment perception index, and a second resident's daily activity built environment perception index. The step of extracting the quantitative index of the resident's activity built environment from the resident's daily activity residence sequence and the spatiotemporal residence characteristic index includes: For the sequence of residents' daily activity locations, collect the public points of interest data and public street view data within the set space of the location, and perform data preprocessing; Filter and reclassify the public points of interest data, count the average consumption price and popularity of different types of points of interest around different residences, and calculate the daily activity consumption indicators of residents; Label the built environment elements in the street view data around different residences and train the sample set. Use deep learning algorithms to extract the built environment elements of the street view data and construct the first indicator of residents' daily activities in the built environment perception; Collect urban landscape perception annotations of street view data around different residences, build an urban landscape perception annotation training set, and use deep learning algorithms to construct the second indicator of residents' daily activities in the built environment perception based on public street view data.
[0009] As a further improvement of the present invention, the step of collecting the public points of interest data and public street view data within the set space of the residence for the residents' daily activities and performing data preprocessing includes: Establish a flat buffer zone for all residences in the sequence of daily activity residences of individual residents; Extract the data of points of interest in the buffer; Extract the urban road network included in the buffer zone, perform equidistant sampling, and obtain the coordinates of each sampling point; According to the sampling point coordinates, configure parameters and collect public street view data; Preprocess the collected public street view data; The steps of screening and reclassifying the public POI data, counting the average consumption price and popularity of different types of POIs around different residences, and calculating the consumption index of residents' daily activities include: Screen out some types of public POI data that are less relevant to residents' daily activities, and reclassify and map the types of public POIs based on residents' daily activities; For non-repeated residences in the sequence of residents' daily activities, the average consumption price of different types of points of interest is calculated, and the consumption index around each residence is calculated with heat as the weight. Based on the sequence of residents' daily activity residences and the consumption indicators around each residence, combined with the residence time and residence frequency, the residents' daily activity consumption indicators are calculated using the residence time and residence frequency as weights.
[0010] As a further improvement of the present invention, the steps of labeling the built environment elements in the street view data around different residences and training the sample set, extracting the built environment elements of the street view data using a deep learning algorithm, and constructing the first indicator of the built environment perception of residents' daily activities include: Create sample sets, training sets, and test sets based on the collected public street view data; Manually annotate the built environment related elements in the street view data training set, and produce a street view data sample set including built environment elements; For the street view data in the training set, a graph convolutional neural network feature based on a multi-layer heterogeneous graph of built environment elements and features is constructed, embedded in a panoramic segmentation model, and built environment elements are extracted; Input the street view data in the test set and extract the built environment elements based on the deep learning algorithm; According to the sequence of residents' daily activity locations, the built environment elements of each street view data around each non-repeated location are counted, and the first indicator of residents' daily activity built environment perception is constructed; The steps of collecting urban landscape perception annotations of street view data around different residences, constructing an urban landscape perception annotation training set, and using a deep learning algorithm to construct a second indicator of residents' daily activities built environment perception for public street view data include: According to the proportion of built environment elements extracted from the street view data, the street view data are divided into different types; For different types of street view data, collect perception annotations from different groups and make them into sample sets; The unlabeled street view data is divided into a training set and a test set. A deep learning algorithm is used to construct a graph convolutional neural network feature of built environment elements-perception type based on the sample set, generate a trained perception type classifier, and evaluate its accuracy. For the test set, based on the trained perception type classifier, the perception type and probability of the street view data are obtained; According to the sequence of residents' daily activity locations, the perception types of street view images around each non-repetitive location are counted, and the second indicator of residents' daily activity built environment perception is constructed.
[0011] As a further improvement of the present invention, the steps of constructing an income level classifier, inputting quantitative indicators into the income level classifier, extracting feature data, and classifying residents' income levels based on the feature data include: The input data are constructed with the resident daily activity consumption index, the first index of the resident daily activity built environment perception, and the second index of the resident daily activity built environment perception; Use neural network to extract input data feature values; The data feature value training set is clustered to obtain the resident income classification level index.
[0012] As a further improvement of the present invention, the step of extracting characteristic values of input data using a neural network includes: Initialize the neural network, randomly initialize weights and biases, define loss function and optimizer type, and configure parameters such as the number of iterations; Iterate the input data and update the weights and biases by back-propagating the error until the loss function is minimized or the maximum number of iterations is reached; Calculate the information loss ratio of the data reconstruction process.
[0013] As a further improvement of the present invention, the step of performing clustering processing on the data feature value training set to obtain the resident income classification level index includes: Each characteristic index in the characteristic value training set is used as a data point and input into the first classifier; According to the changes in classification errors generated by different k cluster classification methods in the first classifier, the value of the optimal cluster k is determined based on the standard of the largest error becoming smaller; Each feature index in the feature value training set is used as a data point, input into the second classifier, and divided into k clusters; Repeat the following steps: Determine any data point of each cluster as the centroid, calculate the similarity between each data point and each centroid, assign the data point to the cluster where the centroid with similarity greater than the threshold is located, and update the position of the centroid according to the distribution of the centroid. If a data point belongs to multiple clusters, calculate the new centroid position according to the weight of each cluster until the centroid remains unchanged; Calculate the intra-cluster sum of squares of k clusters, and cluster the k clusters whose intra-cluster sum of squares is greater than the threshold as the classification indicators of residents' income level.
[0014] The present invention provides a resident income level classification device based on daily activity trajectories, which is used to implement the above-mentioned resident income level classification method, including: The data acquisition module is used to obtain the sequence of residents' daily activity residences and spatiotemporal residence characteristic indicators; A quantitative index extraction module is used to extract quantitative indicators of the built environment of residents' activities from the sequence of residents' daily activity residences and spatiotemporal residence characteristic indicators; A classification module is used to construct an income level classifier, input quantitative indicators into the income level classifier, extract feature data, and classify residents' income levels based on the feature data; A visualization module used to display the classification of residents' income levels.
[0015] The present invention also provides an electronic device, which includes a central processing unit and a memory, wherein the memory stores at least one instruction, and the at least one instruction is loaded and executed by the central processing unit to implement the above-mentioned method for classifying residents' income levels.
[0016] The beneficial effects of the present invention are as follows: based on the sequence of residents' daily activity residences and the spatiotemporal residence characteristic indicators, quantitative indicators are extracted and input into the classifier to classify the residents' income levels, which integrates the characteristics of residents' daily activities and increases the scientificity, completeness and accuracy of the classification system. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The present invention is further described in detail below based on the accompanying drawings and embodiments.
[0018] Figure 1 A flowchart of the method for classifying residents' income levels of the present invention; Figure 2 This is a flow chart of step S1 of the present invention; Figure 3 This is a flow chart of step S2 of the present invention; Figure 4 This is a flow chart of step S3 of the present invention; Figure 5 It is a structural schematic diagram of the resident income level classification device of the present invention; Figure 6 It is a schematic diagram of the structure of the electronic device of the present invention. DETAILED DESCRIPTION
[0019] In order to make the technical problems solved by the present invention, the technical solutions adopted and the technical effects achieved clearer, the technical solutions of the embodiments of the present invention are further described in detail below. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0020] In the description of the embodiments of the present application, the meaning of the term "multiple" refers to two or more. For example, multiple systems refer to two or more systems, and multiple screen terminals refer to two or more screen terminals. In addition, the terms "first" and "second" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the indicated technical features. Thus, the features defined as "first" and "second" can explicitly or implicitly include one or more of the features. The terms "include", "comprise", "have" and their variations all mean "including but not limited to", unless otherwise specifically emphasized.
[0021] See also Figures 1 to 4 As shown, the method for classifying residents' income levels based on daily activity trajectories of the present invention comprises the following steps: S1. Obtain the sequence of residents' daily activity residences and spatiotemporal residence characteristic indicators. This step uses the sequence of residents' daily activity residences and spatiotemporal clustering to classify and identify the characteristics of residents' long-term activity residence points. This classification can more comprehensively reflect the categories of residences in daily activities and improve the accuracy and reliability of the resident income level classifier; using the spatiotemporal residence characteristic indicators, the residence frequency and residence time of different residents are integrated to avoid the defects of only considering the residence. This can be achieved by the following method: S11. Preprocess the residents' mobile phone data. The preprocessing methods include: data cleaning, coordinate conversion, etc., to obtain the user's daily activity trajectory data set. The user's daily activity trajectory data set includes: user desensitized serial number (ID), sampling timestamp, sampling point coordinates, base station serial number, and latitude and longitude coordinates of each base station, etc.
[0022] Among them, mobile phone data refers to the user's spatiotemporal location data estimated by the operator based on the communication between the mobile phone signal and the base station, including but not limited to fixed time interval sampling and mobile phone signaling data (MobileSignal Data) based on displacement sampling. In the embodiment of the present application, mobile phone data can be understood as the nearest base station where the mobile phone user is located at the sampling time point obtained from the operator, and the base station coordinates are attached. The sequence of residents' daily activity residences records the base station location of a single mobile phone user on each natural day at a certain time interval. The spatiotemporal residence characteristic indicators mainly include the residence time and residence frequency of each residence.
[0023] S111. Filter out duplicate data and invalid data in the acquired mobile phone data, and obtain a filtered valid mobile phone data set based on the uniqueness and validity of (user ID, sampling timestamp).
[0024] S112, filter out abnormal records in the valid mobile phone data set, including ping-pong records and drift records, to obtain a cleaned mobile phone data set. Ping-pong records are when the coordinates of the mobile phone user are switched between two base stations for multiple short periods of time, and drift records are when the coordinates of the mobile phone user are switched to a distant base station within a short time interval, resulting in coordinate "drift".
[0025] S113, selecting a suitable reference ellipsoid, geodetic datum and projection method, performing coordinate transformation on the cleaned mobile phone data set, and obtaining the user daily activity trajectory data set. The longitude and latitude of the base station are transformed into projection coordinates. Specifically, as an optional embodiment, the 2000 national reference ellipsoid, the 2000 national datum, and the 6-degree Gauss Kruger projection are used, with 117 degrees as the central meridian, to perform projection coordinate transformation.
[0026] Through the above steps S111 to S113, duplicate, invalid, and abnormal records can be screened out, which can improve the quality and accuracy of the mobile phone data set, and help improve the efficiency, precision, and accuracy of data processing in subsequent data analysis. Furthermore, by selecting a suitable projection coordinate system, the mobile phone data set after coordinate conversion is obtained, and the longitude and latitude based on the earth ellipsoid are converted into plane coordinates, thereby improving the data processing efficiency of subsequent analysis.
[0027] S12. Construct a user activity sequence for the user's daily activity trajectory dataset to obtain a user activity sequence dataset, which includes the user's desensitized serial number (ID), sampling timestamp, latitude and longitude coordinates of the sampling point, etc. Construct a user activity sequence dataset for the user's daily activity trajectory dataset according to the user ID to provide a data basis for subsequent analysis; and use appropriate resolution to aggregate data, unify data structure, reduce redundant data, reduce data volume, and improve processing efficiency for subsequent analysis. This can be achieved specifically through the following methods: S121. Taking natural days as units, traverse all user daily activity trajectory datasets, arrange the timestamp and coordinate records corresponding to each user ID in ascending order of time, and obtain an initial user activity sequence dataset.
[0028] S122, select an appropriate time resolution, aggregate the records in the initial user activity sequence data set according to the time resolution, and obtain the user activity sequence data set. If the base station where the user is located changes within the t-th time unit, compare the base station sequence number with the t-1 time unit and the t+1 time unit respectively, and record the base station sequence number with the longest residence within the t-th time unit. Exemplarily, using 1 hour as the time unit, the user activity sequence data set can be expressed as:
[0029] Among them, ID is the user number, d is a single natural day, CT is the base station serial number, and t is the time from 0:00 to 23:00. A sequence of user activities for a single resident.
[0030] S13. Perform spatiotemporal clustering on the activity sequence data set to obtain the residents' daily activity location sequence and spatiotemporal residence characteristic indicators. The residence, work place and other main residence places are identified in the user activity sequence data set to construct the residents' daily activity location sequence, so as to comprehensively and completely describe the residents' daily activity trajectory; at the same time, the spatiotemporal residence characteristic indicators can reflect the residents' preferences for daily activity location selection from the perspective of residence time and repeated visits, and provide weight references for subsequent analysis.
[0031] S131, the step of performing spatiotemporal clustering processing on the activity sequence data set to obtain the sequence of residents' daily activity residences and spatiotemporal residence characteristic indicators, comprises: S132, construct a residence identification standard, count the coordinates of each user ID at night for each natural day, and identify each user's residence; count the coordinates of each user ID during the day for each weekday, and identify each user's work place; for example, count the base station with the longest nighttime residence time every day as the residence; count the base station with the longest daytime residence time every weekday as the work place; select a certain residence time threshold, count other non-workplace, non-residence main residence places, the identification of the residence place can be expressed as:
[0032] Among them, the residence place is a base station where the cumulative stay time between 0:00 and 7:00 at night exceeds 4 hours, the work place is a base station where the cumulative stay time exceeds 5 hours from 9:00 to 18:00 during the day, and other residence places are base stations where the cumulative stay time exceeds 2 hours.
[0033] S133. Based on the residence and work place, the coordinates of each user who stays for more than a certain time threshold, non-work place, and non-residence in a single day are counted, and the extracted coordinates are spatially clustered to construct a sequence of residents' daily activity residences; the spatial clustering method can adopt the Mean Shift clustering algorithm based on kernel density estimation, and the cluster center after clustering is used as the central residence point of the activity. Specifically, as an optional embodiment, the sequence of residents' daily activity residences and the spatiotemporal residence characteristic indicators can be expressed as:
[0034] in, is the base station where you live. is the base station where the work is located, is the base station where the i-th main residence is located, is the frequency of repeated stays at the residence, The cumulative residence time at the residence location.
[0035] S134. Based on the sequence of residents' daily activity locations, the residence time and frequency of each user in each location are counted to construct a spatiotemporal residence characteristic index.
[0036] S2. Extract quantitative indicators of the built environment of residents' activities from the sequence of residents' daily activity residences and the spatiotemporal residence characteristic indicators; the quantitative indicators include: residents' daily activity consumption indicators, the first indicator of residents' daily activity built environment perception and the second indicator of residents' daily activity built environment perception; the built environment of residents' daily activities refers to the urban functions and urban landscapes within a certain spatial range around the residence, workplace and main residence, and the urban functions include but are not limited to point of interest data and street view data. Point of interest data in the embodiment of the present application can be understood as POI data obtained from a public network map service operator. Street view data can be understood as static panoramic images taken based on driving / walking on a street network, and its sources include but are not limited to collection from public network map service operators and self-purchased equipment.
[0037] S21. For the sequence of residents' daily activity locations, collect public points of interest data and public street view data within the set space of the location, and perform data preprocessing to improve the accuracy of subsequent analysis.
[0038] In the actual implementation process, based on the sequence of residents' daily activity residences, POI data is collected with a certain spatial distance as the threshold, and data preprocessing, category screening and reclassification are performed. Specifically, as an optional embodiment, a 1km circular buffer is generated for each residence point, and POI data in the buffer is collected, including name, coordinates, type, consumption price, popularity, etc. POIs with too low popularity and no reference consumption price are screened out, and POIs with little correlation with daily activity residence, such as car wash services, auto repair services, car sales, ATMs, etc. are screened out. POI data is reclassified into four categories: catering, shopping, leisure and entertainment, and culture.
[0039] S211. Establish a flat buffer zone for all residences in the sequence of daily activity residences of individual residents.
[0040] S212, extracting the data of the points of interest in the buffer, including name, coordinates, type, consumption price, popularity, etc.
[0041] S213, extracting the urban road network included in the buffer zone, and performing equidistant sampling to obtain the coordinates of each sampling point.
[0042] S214. According to the sampling point coordinates, appropriate parameters are configured to collect public street view data.
[0043] S215: pre-processing the collected public street view data, such as image cropping, image enhancement, abnormal image screening, etc.
[0044] S22. Screen and reclassify the public points of interest data, count the average consumption prices and popularity of different types of points of interest around different residences, and calculate the residents' daily activity consumption index; based on the consumption index of the residence, combined with the residence time and residence frequency, the residents' daily activity consumption index is calculated with the residence time and residence frequency as weights. Specifically, the residents' daily activity consumption index can be expressed as:
[0045]
[0046] in, is the consumption index of a resident at the i-th place of residence, is the frequency of repeated stays at the residence, The cumulative residence time at the residence location.
[0047] S221. Filter out some types of public interest points data that are less related to residents' daily activities, and reclassify and map the public interest points according to the types of residents' daily activities.
[0048] S222. For non-repeated residences in the sequence of residences for residents' daily activities, calculate the average consumption price of different types of points of interest, and calculate the consumption index around each residence with heat as weight. Based on the POI classification, for each residence, calculate the average consumption price of different types of points of interest with heat as weight, and calculate the consumption index around each residence. Specifically, the consumption index around the residence can be expressed as:
[0049] in, is the consumption index of a resident at the i-th place of residence, are POI categories, which are catering, shopping, leisure and entertainment, and culture in this embodiment. k is the kth POI among the jth POIs around the i-th residence. For its heat, For its consumption price.
[0050] S223. Calculate the residents' daily activity consumption index based on the sequence of residents' daily activity residence locations and the consumption index around each residence location, combined with the residents' daily activity residence index, with the residence time and residence frequency as weights.
[0051] Step S22 uses the consumption prices, residence time and frequency of points of interest around the residents' daily activity residence, fully considers the matching between the residents' residence selection and their own income level during their daily activities, and calculates the residents' daily activity consumption index.
[0052] S23, labeling the built environment elements in the street view data around different residences and training the sample set, using the deep learning algorithm to extract the built environment elements of the street view data, and construct the first indicator of residents' daily activities built environment perception. This step is based on supervised learning to achieve the extraction of the built environment elements and calculate the first indicator of residents' daily activities built environment perception, providing input for the classification of residents' income levels: S231. Based on the collected public street view data, establish a sample set, training set and test set; in the specific implementation process, a certain spatial distance can be used as a threshold to collect street view data and perform data preprocessing. For example, a 1km circular buffer is generated for each residence point, the OpenStreetMap public road network is extracted, and 30-meter equidistant sampling points are generated on the road. Use Python language to download street view data from Baidu Street View platform, set sampling point coordinates, resolution, image torsion angle, shooting pitch angle, image height, image width, horizontal viewing angle and other parameters, use HTTP protocol to download street view images, and preprocessing includes image cropping, image enhancement, abnormal image screening, etc.
[0053] S232, select part of the street view data as a training set, manually annotate the built environment related elements in the street view data training set, and produce a street view data sample set including built environment elements; built environment elements include roads, road signs, sidewalks, water areas, buildings, vegetation, sky, motor vehicles and pedestrians. In one implementation, the open source software Labelbox tool can be used for annotation, and a PASCAL VOC data set can be generated for subsequent use.
[0054] S233. For the street view data in the training set, a graph convolutional neural network feature based on a multi-layer heterogeneous graph of built environment elements and features is constructed, embedded in a panoramic segmentation model, and built environment elements are extracted. S234. Input the street view data in the test set and extract the built environment elements based on the deep learning algorithm. In one implementation, the graph convolutional neural network features are embedded into the OneFormer model to realize the extraction of built environment elements based on the street view image.
[0055] S235. According to the sequence of residents' daily activity residences, count the built environment elements of each street view data around each non-repeated residence, and construct the first indicator of residents' daily activity built environment perception. The first indicator of residents' daily activity built environment perception can be divided into green space, blue space, openness, closedness, concreteness, walkability, and vitality. Green space includes the vertical and horizontal vegetation pixel ratios, blue space includes the various water pixel ratios, openness is the sky pixel ratio, closedness is the building and tree pixel ratio, concreteness is the various sign pixel ratios, walkability includes the sidewalk / road pixel ratio, and profitability includes the number of vehicles and pedestrians.
[0056] S24. Collect urban landscape perception annotations of street view data around different residences, construct an urban landscape perception annotation training set, and use a deep learning algorithm to construct a second indicator of residents' daily activities in the built environment perception for public street view data. This step realizes the classification of street view image perception types based on supervised learning, and calculates the second indicator of residents' daily activities in the built environment perception, providing input for the classification of residents' income levels.
[0057] Specifically, for the perception annotation of urban landscape, the implementation method can be: publicly released street view images - emotional perception data, or obtaining perception annotations through questionnaires. As one implementation method, sample street view data can be prepared and distributed to 100 survey subjects of equal gender ratio and different ages, and the emotional perception type of each street view image can be counted as a training set.
[0058] S241. Classify street view data into different types according to the proportion of built environment elements extracted from the street view data.
[0059] S242. For different types of street view data, collect perception annotations of different groups and make them into sample sets.
[0060] S243. The unlabeled street view data are divided into a training set and a test set. A deep learning algorithm is used to construct a graph convolutional neural network feature of built environment elements-perception type based on the sample set, generate a trained perception type classifier, and evaluate the accuracy. Specifically, the perception type is divided into safety, frustration, beauty and wealth, and the ResNet50 network is used to alleviate possible degradation problems in the deep network structure.
[0061] S244. For the test set, based on the trained perception type classifier, obtain the perception type and probability of the street view data.
[0062] S245. According to the sequence of residents' daily activity locations, the perception type of street view images around each non-repeated location is counted, and the second indicator of residents' daily activity built environment perception is constructed, that is, the trained perception type classifier is applied to the street view data test set, and the second indicator of residents' daily activity built environment perception is calculated in combination with the residents' daily activity locations:
[0063] Among them, m is different perception types, is the probability that the street scene around the i-th residence is identified as the m-type perception type, is the frequency of repeated stays at the residence, The cumulative residence time at the residence location.
[0064] S3. Construct an income level classifier, input the income level classifier with quantitative indicators, extract feature data, and classify residents' income levels based on the feature data. This step comprehensively considers the spatiotemporal characteristics of residents' daily activities and the built environment characteristics of the activity residence; uses deep learning technology to mine the feature values of the two major indicators to achieve the purpose of data dimensionality reduction; clusters the data features to select different clusters for users' daily activity residences, and provides an accurate and reliable algorithm for the classification of residents' income levels. Among them, the classifier refers to the method and results based on one or more classification algorithms and used for classification, the parameter refers to one or more adjustable variables applicable to the implementation method of the selected classifier, and the optimal parameter refers to the parameter selection that achieves the optimal solution after evaluating the classification model based on the established criteria.
[0065] The specific implementation of step S3 is as follows: S31. Input data is constructed based on the residents’ daily activity consumption index, the first indicator of residents’ daily activity built environment perception and the second indicator of residents’ daily activity built environment perception. The three types of indicators are used as input to make a more detailed classification for the residents’ income level classification.
[0066] S32. Use a neural network to extract hidden feature values of input data, use an autoencoder to reduce data dimensionality, configure parameters such as loss function, optimizer type and number of iterations, use error back propagation to train the autoencoder, and use the decoder data features to reconstruct the data structure and output the data feature training set, and evaluate the information loss of the reconstruction process. This step reconstructs the high-dimensional residents' daily activity consumption indicators and built environment perception indicators, reduces the dimensionality while retaining the data features, and uses unsupervised learning to provide a comprehensive and reliable data feature training set for the classification of residents' income levels.
[0067] S321. Initialize the neural network, randomly initialize weights and biases, define the loss function and optimizer type, and configure parameters such as the number of iterations.
[0068] S322. Iterate the input data and update the weights and biases through back propagation of errors until the loss function is minimized or the maximum number of iterations is reached.
[0069] S323. Calculate the information loss ratio in the data reconstruction process, that is, the reconstruction error.
[0070] S33. Perform clustering processing on the data feature value training set to obtain the resident income classification level index.
[0071] S331. Each feature index after dimension reduction in the feature value training set is used as a data point and input into the first classifier.
[0072] S332. According to the change of classification error caused by different k cluster classification methods in the first classifier, the value of the optimal cluster k is determined with the largest error reduction as the standard; in a feasible implementation, a bottom-up agglomerative hierarchical clustering method is used as the first classifier, and according to the reduction of cluster variance when different numbers of clusters are merged, the change in the number of clusters with the largest variance reduction is selected as the optimal classification cluster k value.
[0073] S333. According to the above optimal classification cluster k value, each feature index in the feature value training set is used as a data point, input into the second classifier, and divided into k clusters.
[0074] S334, repeat the following steps: Determine any data point of each cluster as the centroid, calculate the similarity between each data point and each centroid, assign the data point to the cluster where the centroid with similarity greater than the threshold is located, and update the position of the centroid according to the distribution of the centroid. If a data point belongs to multiple clusters, calculate the new centroid position according to the weights of each cluster until the centroid remains unchanged.
[0075] Calculate the intra-cluster sum of squares of k clusters, and cluster the k clusters whose intra-cluster sum of squares is greater than the threshold as the classification indicators of residents' income level.
[0076] In a feasible implementation, a fuzzy C-means algorithm is used as the second classifier to classify the data features of residents' income.
[0077] In the above step S33, the first classifier is used to determine the optimal number of clusters according to the data feature training set, and the second classifier is used to construct k clusters, and the similarities and differences of the member data points in each cluster are calculated, so as to divide different clusters according to the different residence situations of residents' daily activities, and provide a scientific method for classifying residents' income levels.
[0078] S4. Visualize the classification of residents' income levels. According to the above-mentioned resident income level classification indicators, count the income level classification of a single or multiple residents in the form of spatial maps and charts to obtain the above-mentioned resident income level classification statistical visualization analysis.
[0079] In addition, the present invention also displays some other data in the classification process: according to the residents' daily activity residence sequence and residence characteristic indicators, a certain time section is selected, and the daily residence situation of a single or multiple residents is counted in the form of spatial maps and charts to obtain a visual analysis of the residents' daily activity residence; according to the residence consumption indicators, the types of interest points and average consumption levels of a single or multiple residences are counted in the form of spatial maps and charts to obtain a visual analysis of the residence consumption indicators; according to the first and second indicators of built environment perception, the objective and subjective perception indicators of the built environment in different dimensions of a single or multiple residences are counted in the form of spatial maps and charts to obtain a visual analysis of the built environment perception indicators of the residence.
[0080] The resident income level classification method can not only analyze the income level of residents' residence and work places through the analysis of residents' daily activity trajectories and the built environment of the residence, but also comprehensively evaluate the residents' income status according to the consumption level and built environment characteristics of the main residence points of residents' daily activities. This method is based on machine learning algorithms and constructs a comprehensive resident income level classification method with the characteristics of effectiveness. It also covers the built environment factors of residents' residence, work place and main residence place, and considers the consumption level of different types of points of interest and the objective and subjective perception of the built environment. It combines unsupervised learning and supervised learning methods, has completeness and predictability, and provides support for the resident income level classification method for spatiotemporal big data.
[0081] The second aspect of the present invention provides a resident income level classification device 200 based on daily activity trajectory, which is used to implement the above-mentioned resident income level classification method, such as Figure 5 As shown, including: The data acquisition module 201 is used to obtain the sequence of residents' daily activity residence locations and spatiotemporal residence characteristic indicators.
[0082] The quantitative index extraction module 202 is used to extract the quantitative index of the built environment of residents' activities from the sequence of residents' daily activity residence places and the spatiotemporal residence characteristic index.
[0083] The classification module 203 is used to construct an income level classifier, input quantitative indicators into the income level classifier, extract feature data, and classify residents' income levels based on the feature data.
[0084] The visualization module 204 is used to display the classification of residents' income levels.
[0085] Furthermore, the data acquisition module 201 includes: The mobile phone data preprocessing unit is used to preprocess the residents' mobile phone data to obtain the user's daily activity trajectory data set.
[0086] The user activity sequence data set construction unit is used to construct a user activity sequence for the user's daily activity trajectory data set to obtain a user activity sequence data set.
[0087] The spatiotemporal clustering processing unit is used to perform spatiotemporal clustering processing on the activity sequence data set to obtain the sequence of residents' daily activity residences and spatiotemporal residence characteristic indicators.
[0088] The quantitative index extraction module 202 includes: A data preprocessing unit, for collecting public points of interest data and public street view data within the set space of the residence for the residents' daily activities, and performing data preprocessing; The unit for calculating the consumption index of daily activities of residents is used to screen and reclassify the public points of interest data, count the average consumption price and popularity of different types of points of interest around different residences, and calculate the consumption index of daily activities of residents; The calculation unit of the first indicator of residents' daily activities built environment perception is used to mark the built environment elements in the street view data around different residences and train the sample set, and use the deep learning algorithm to extract the built environment elements of the street view data to construct the first indicator of residents' daily activities built environment perception; The second indicator calculation unit for residents' daily activities in the built environment perception is used to collect urban landscape perception annotations of street view data around different residences, construct an urban landscape perception annotation training set, and use a deep learning algorithm to construct the second indicator of residents' daily activities in the built environment perception for public street view data.
[0089] The classification module 203 includes: An input data construction unit, used to construct input data using a resident's daily activity consumption index, a resident's daily activity built environment perception first index, and a resident's daily activity built environment perception second index; An extraction unit, used for extracting characteristic values of input data using a neural network; The training set processing unit is used to perform clustering processing on the data feature value training set to obtain the resident income classification level index.
[0090] The visualization module 204 includes: The residents' daily activity residence visualization unit is used to select a certain time section according to the residents' daily activity residence sequence and residence characteristic indicators, and to count the daily residence of a single or multiple residents in the form of spatial maps and charts to obtain a visualization analysis of the residents' daily activity residence.
[0091] The residence consumption index visualization unit is used to count the types of points of interest and average consumption levels of a single or multiple residences in the form of spatial maps and charts according to the residence consumption index, so as to obtain a visualization analysis of the residence consumption index.
[0092] The built environment perception index visualization unit of the residence is used to count the objective and subjective perception indicators of the built environment in different dimensions of a single or multiple residences in the form of spatial maps and charts based on the first and second built environment perception indicators, so as to obtain a visualization analysis of the built environment perception indicators of the residence.
[0093] The resident income level classification statistical visualization unit is used to count the income level classification of a single or multiple residents in the form of spatial maps and charts based on the above-mentioned resident income level classification indicators, and obtain the above-mentioned resident income level classification statistical visualization analysis.
[0094] When the device provided in the above embodiment realizes its function, only the division of the above functional modules is used as an example. In actual application, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device and method embodiments provided in the above embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.
[0095] A third aspect of the present invention provides an electronic device, such as Figure 6 As shown, the electronic device 300 may include: at least one central processor 301, at least one graphics processor 302, at least one dynamic network server 303, at least one network interface 304, an internal memory 305, an external memory 306, at least one communication bus 307, and a user interface 8.
[0096] The communication bus 307 is used to realize the connection and communication between these components.
[0097] The user interface 308 may include a display screen, a mouse, a keyboard, and a camera, and the optional user interface 608 may also include a standard wired interface and a wireless interface.
[0098] Among them, the network interface 304 may include a standard wired interface, a wireless interface (such as a WI-FI interface, a 5G interface, and a Bluetooth interface).
[0099] The central processing unit 301 may include one or more processing cores. The central processing unit 301 uses various interfaces and lines to connect various parts of the entire server, and executes various functions of the server and processes data by running or executing instructions, programs, codes or instructions in the external memory 306, and calling data stored in the external memory 306, that is, mainly processing operating systems, user interfaces and application programs. The central processing unit 301 mainly includes an operation logic unit, a register unit and a control unit. Optionally, the central processing unit 1 can be implemented in at least one hardware form of an embedded CPU or a mainframe CPU.
[0100] Among them, the graphics processor 302 is composed of a display main chip graphics card core (GPU), a display buffer memory, and a RAMD / A converter. The GPU constructs and renders the image information input by the system, the display buffer memory is used to store the graphics information to be displayed and save the intermediate data of the graphics operation, and the RAMD / A converter converts the binary digits into analog signals suitable for the display. The graphics processor 602 is responsible for image processing, deep learning algorithms, and content rendering and drawing required by the display screen. Optionally, the graphics processor 302 can be implemented using at least one hardware architecture of the Hopper architecture, Ampere architecture, Turing architecture, and Polaris architecture. Optionally, the graphics processor 302 can be implemented using at least one graphics card resource scheduling method of a single machine single card, a single machine multiple cards, and multiple machines multiple cards. Optionally, the graphics processor 302 can use at least one heterogeneous computing programming model of the CUDA programming model, the OpenCL programming model, the HIP programming model, and the oneAPI programming model to implement the algorithm.
[0101] Among them, the dynamic network server 303 is used to store the built environment emotion perception labeling module. Its hardware part includes the network service software and the constituent files and databases of the website, and uses the external memory 305 as the medium storage. Its software part includes a web server, a database server, a file server, etc. Optionally, the hardware part of the dynamic network server 303 uses at least one hardware structure of a desktop server, a rack server, and a blade server. Optionally, the dynamic network server 303 can use the hypertext transfer protocol (HTTP) to process and respond to incoming requests, can use at least one web server of Apache, Proftpd, IIS, can use at least one database server of Oracle, MySQL, PostgreSOL, MongoDB, and can use at least one file server of FTP, TFTP, SMB, and NFS.
[0102] Among them, the internal memory 305 is used to temporarily store the operation data in the central processor 301 and the data exchanged with the external memory 306. It is a bridge for the external memory 306 to communicate with the central processor 301, and all programs in the server are run in the memory. The internal memory 5 includes a random access memory (RAM), a read-only memory (ROM), and a cache (CACHE). Optionally, the internal memory 5 can be implemented by using at least one configuration method of independent memory, shared memory, and distributed memory configuration.
[0103] The external memory 306 may include a program storage area and a data storage area. The program storage area may store instructions for implementing the operating system, instructions for at least one function, instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data involved in the above-mentioned various method embodiments, etc. Optionally, the external memory 306 may be implemented by at least one hardware storage medium selected from HDD and SSD. Optionally, the external memory 306 may be implemented by at least one file storage system selected from a stand-alone file system, HDFS, Ceph, and Swift system.
[0104] exist Figure 6 In the electronic device 300 shown in the figure, the user interface 308 is mainly used to provide an input interface for the user and display the user's income level classification results; the central processing unit 301 and the graphics processor 302 can be used to call a resident income level classification application based on daily activity trajectory stored in the external memory 306. When executed by one or more central processing units 301 and graphics processors 302, the electronic device 300 executes one or more methods described in the above embodiments.
[0105] Through the technical solution of this invention, the user activity trajectory based on the mobile phone data set and the urban built environment index can be input into the classifier to classify the residents' income level. The technical solution of the present invention integrates the residence characteristics of residents' daily activities and the built environment characteristics through unsupervised classification and supervised learning, and provides the built environment emotion perception index, which increases the scientificity, completeness and accuracy of the classification system.
[0106] The technical principle of the present invention is described above in conjunction with specific embodiments. These descriptions are only for explaining the principle of the present invention and cannot be interpreted as limiting the scope of protection of the present invention in any way. Based on the explanations herein, those skilled in the art can associate other specific implementations of the present invention without paying creative labor, and these methods will fall within the scope of protection of the present invention.
Claims
1. A method for classifying residents' income levels based on daily activity trajectories, characterized in that: Includes steps: Obtain the sequence of residents' daily activity locations and temporal and spatial residence characteristic indicators; Extract quantitative indicators of residents' activity built environment from the sequence of residents' daily activity residence and spatiotemporal residence characteristic indicators; Construct an income level classifier, input quantitative indicators into the income level classifier, extract feature data, and classify residents' income levels based on the feature data.
2. The method for classifying residents' income levels according to claim 1, characterized in that: The step of obtaining the sequence of residents' daily activity residence locations and spatiotemporal residence characteristic indicators includes: Preprocess the residents’ mobile phone data to obtain the user’s daily activity trajectory dataset; Constructing user activity sequences for the user's daily activity trajectory dataset to obtain a user activity sequence dataset; The activity sequence dataset is processed by spatiotemporal clustering to obtain the sequence of residents' daily activity locations and spatiotemporal residence characteristic indicators.
3. The method for classifying residents' income levels according to claim 2, characterized in that: The step of constructing a user activity sequence from the user's daily activity trajectory dataset to obtain the user activity sequence dataset includes: Taking natural days as units, we traverse all user daily activity trajectory datasets, and arrange the timestamp and coordinate records corresponding to each user ID in ascending order of time to obtain the initial user activity sequence dataset; Select an appropriate time resolution, aggregate the records in the initial user activity sequence dataset according to the time resolution, and obtain the user activity sequence dataset; The step of performing spatiotemporal clustering processing on the activity sequence data set to obtain the sequence of residents' daily activity residence locations and spatiotemporal residence characteristic indicators includes: Construct a residence identification standard, count the nighttime coordinates of each user ID for each natural day, and identify each user's residence; count the daytime coordinates of each user ID for workdays, and identify each user's work place; Based on the residence and work place, the coordinates of each user who stayed for more than a certain time threshold, non-work place, and non-residence place in a single day were counted, and spatial clustering was performed on the extracted coordinates to construct the sequence of residents' daily activity residence places; Based on the sequence of residents' daily activity locations, the residence time and frequency of each user in each location are counted to construct spatiotemporal residence characteristic indicators.
4. The method for classifying residents' income levels according to claim 1, characterized in that: The quantitative indicators include: residents' daily activity consumption indicators, residents' daily activity built environment perception first indicators and residents' daily activity built environment perception second indicators. The step of extracting the quantitative indicators of residents' activity built environment from the residents' daily activity residence sequence and spatiotemporal residence characteristic indicators includes: For the sequence of residents' daily activity locations, collect the public points of interest data and public street view data within the set space of the location, and perform data preprocessing; Filter and reclassify the public points of interest data, count the average consumption price and popularity of different types of points of interest around different residences, and calculate the daily activity consumption indicators of residents; Label the built environment elements in the street view data around different residences and train the sample set. Use deep learning algorithms to extract the built environment elements of the street view data and construct the first indicator of residents' daily activities in the built environment perception; Collect urban landscape perception annotations of street view data around different residences, build an urban landscape perception annotation training set, and use deep learning algorithms to construct the second indicator of residents' daily activities in the built environment perception based on public street view data.
5. The method for classifying residents' income levels according to claim 4, characterized in that: The step of collecting the public points of interest data and public street view data within the set space of the residence for the residents' daily activities and performing data preprocessing includes: Establish a flat buffer zone for all residences in the sequence of daily activity residences of individual residents; Extract the data of points of interest in the buffer; Extract the urban road network included in the buffer zone, perform equidistant sampling, and obtain the coordinates of each sampling point; According to the sampling point coordinates, configure parameters and collect public street view data; Preprocess the collected public street view data; The steps of screening and reclassifying the public POI data, counting the average consumption price and popularity of different types of POIs around different residences, and calculating the consumption index of residents' daily activities include: Screen out some types of public POI data that are less relevant to residents' daily activities, and reclassify and map the types of public POIs based on residents' daily activities; For non-repeated residences in the sequence of residents' daily activities, the average consumption price of different types of points of interest is calculated, and the consumption index around each residence is calculated with heat as the weight. Based on the sequence of residents' daily activity residences and the consumption indicators around each residence, combined with the residence time and residence frequency, the residents' daily activity consumption indicators are calculated using the residence time and residence frequency as weights.
6. The method for classifying residents' income levels according to claim 4, characterized in that: The steps of labeling the built environment elements in the street view data around different residences and training the sample set, extracting the built environment elements of the street view data using a deep learning algorithm, and constructing the first indicator of residents' daily activities built environment perception include: Create sample sets, training sets, and test sets based on the collected public street view data; Manually annotate the built environment related elements in the street view data training set, and produce a street view data sample set including built environment elements; For the street view data in the training set, a graph convolutional neural network feature based on a multi-layer heterogeneous graph of built environment elements and features is constructed, embedded in a panoramic segmentation model, and built environment elements are extracted; Input the street view data in the test set and extract the built environment elements based on the deep learning algorithm; According to the sequence of residents' daily activity locations, the built environment elements of each street view data around each non-repeated location are counted, and the first indicator of residents' daily activity built environment perception is constructed; The steps of collecting urban landscape perception annotations of street view data around different residences, constructing an urban landscape perception annotation training set, and using a deep learning algorithm to construct a second indicator of residents' daily activities built environment perception for public street view data include: According to the proportion of built environment elements extracted from the street view data, the street view data are divided into different types; For different types of street view data, collect perception annotations from different groups and make them into sample sets; The unlabeled street view data is divided into a training set and a test set. A deep learning algorithm is used to construct a graph convolutional neural network feature of built environment elements-perception type based on the sample set, generate a trained perception type classifier, and evaluate its accuracy. For the test set, based on the trained perception type classifier, the perception type and probability of the street view data are obtained; According to the sequence of residents' daily residence locations, the perception types of street view images around each non-repetitive residence location are counted, and the second indicator of residents' daily activity built environment perception is constructed.
7. The method for classifying residents' income levels according to claim 4, characterized in that: The steps of constructing an income level classifier, inputting quantitative indicators into the income level classifier, extracting feature data, and classifying residents' income levels based on the feature data include: The input data are constructed with the resident daily activity consumption index, the first index of the resident daily activity built environment perception, and the second index of the resident daily activity built environment perception; Use neural network to extract input data feature values; The data feature value training set is clustered to obtain the resident income classification level index.
8. The method for classifying residents' income levels according to claim 7, characterized in that: The step of extracting characteristic values of input data using a neural network comprises: Initialize the neural network, randomly initialize weights and biases, define loss function and optimizer type, and configure parameters such as the number of iterations; Iterate the input data and update the weights and biases by back-propagating the error until the loss function is minimized or the maximum number of iterations is reached; Calculate the information loss ratio of the data reconstruction process.
9. The method for classifying residents' income levels according to claim 8, characterized in that: The step of clustering the data feature value training set to obtain the resident income classification level index includes: Each characteristic index in the characteristic value training set is used as a data point and input into the first classifier; According to the changes in classification errors generated by different k cluster classification methods in the first classifier, the value of the optimal cluster k is determined based on the standard of the largest error becoming smaller; Each feature index in the feature value training set is used as a data point, input into the second classifier, and divided into k clusters; Repeat the following steps: Determine any data point of each cluster as the centroid, calculate the similarity between each data point and each centroid, assign the data point to the cluster where the centroid with similarity greater than the threshold is located, and update the position of the centroid according to the distribution of the centroid. If a data point belongs to multiple clusters, calculate the new centroid position according to the weight of each cluster until the centroid remains unchanged; Calculate the intra-cluster sum of squares of k clusters, and cluster the k clusters whose intra-cluster sum of squares is greater than the threshold as the classification indicators of residents' income level.
10. An electronic device, characterized in that: The electronic device includes a central processing unit and a memory, wherein the memory stores at least one instruction, and the at least one instruction is loaded and executed by the central processing unit to implement the method for classifying residents' income levels as described in any one of claims 1 to 9.