Bus user attribute prediction model construction method based on semi-supervised learning, equipment and medium
Through a semi-supervised learning method, the residents' travel survey data and bus card swiping data are integrated to build a bus user attribute prediction model, which solves the accuracy and reliability of bus user attribute inference in the existing technology, and achieves more refined bus management.
Patent Information
- Application Number
- CN202411588865.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-08
- Publication Date
- 2025-03-18
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing technology has failed to effectively integrate residents' travel survey data and bus card swiping data, resulting in difficulty in inferring the attributes of bus users and lack of accuracy and reliability.
A method based on semi-supervised learning is adopted to build a bus user attribute prediction model by obtaining and preprocessing urban residents' travel survey data and bus card swiping data. The specific steps include: obtaining travel information, job-residential information and user attribute information, identifying job-residential information, adding population density and land price data as characteristics, training the initial model and performing semi-supervised learning, and iteratively updating the final model.
A more accurate and reliable prediction of bus user attributes has been achieved, helping to explore the deep socio-economic reasons behind travel behavior, and supporting bus companies to carry out refined management.
Smart Images

Figure CN119647645A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of big data processing, and in particular to a method, device and medium for constructing a public transportation user attribute prediction model based on semi-supervised learning. Background Art
[0002] Fine-grained management of bus operation services based on big data has become the goal of optimizing the resource allocation of the new generation of public transportation.
[0003] However, due to the lack of individual socioeconomic attributes in bus card swiping data, the study of the relationship between user activity pattern recognition and individual portraits lacks persuasiveness and verifiability. On the other hand, resident travel survey data contains a large amount of spatiotemporal information and individual socioeconomic attributes, which can provide a basis for analyzing the relationship between public transportation user activity pattern recognition and social portraits. However, compared with automatically collected data, the amount of resident travel survey data is always relatively small. Large datasets with marked travel purposes and user portrait features can provide a better basis for studying the relationship between travel demand and socioeconomic development.
[0004] Existing methods fail to effectively integrate resident travel survey data and bus card swiping data and make comprehensive use of the advantages of both, which makes it difficult to infer the attributes of bus users. Summary of the invention
[0005] The purpose of the present invention is to overcome the defects of the above-mentioned prior art and provide a more accurate and reliable method, device and medium for constructing a public transportation user attribute prediction model based on semi-supervised learning.
[0006] The purpose of the present invention can be achieved by the following technical solutions:
[0007] According to a first aspect of the present invention, a method for constructing a public transportation user attribute prediction model based on semi-supervised learning is provided, the method comprising:
[0008] Obtain urban residents' travel survey data containing travel information, work and residence information, and user attribute information, and obtain the first travel chain of public transportation users after preprocessing;
[0009] Obtain the city bus card swiping data and obtain the second travel chain of bus users after preprocessing;
[0010] According to the set rules, the job and residence information of the public transportation users in the second travel chain is identified, and the job and residence space characteristics of the users are added to the first travel chain and the second travel chain respectively using the population density data and the land price data;
[0011] The first travel chain data is used as training data to train the initial bus user attribute prediction model, and the second travel chain data is introduced for semi-supervised learning, and the final bus user attribute prediction model is obtained by iterative updating.
[0012] Preferably, the travel information includes a user identification code, a travel serial number, a departure location, a departure time, an arrival location, an arrival time and a travel mode; the work-residence information includes a home address and a workplace address; and the user attributes include age, income and occupation.
[0013] Preferably, the obtaining of the urban resident travel survey data including travel information, work and residence information and user attribute information, and obtaining the first travel chain of the public transport user after preprocessing, specifically includes:
[0014] Obtain urban residents travel survey data D survey , filter out the travel records where the travel mode is public transportation, and get the data set D′ survey ;
[0015] In the dataset D′ survey In the example, for the i-th trip record of a single bus user u, obtain the coordinates of its departure point Coordinates of the arrival location Departure Time Arrival time and travel purpose Get the first travel sequence TR of bus user u u :
[0016]
[0017] Preferably, the city bus card swiping data includes the user card number, departure station, arrival station, departure time, arrival time and pre-inferred travel purpose.
[0018] Preferably, the acquisition of the urban public transportation card swiping data and obtaining the second travel chain of the public transportation user after preprocessing specifically includes:
[0019] Get bus user card swiping data D card , for the i-th ride record of a single bus user u, obtain the coordinates of its departure station Coordinates of the arrival site Departure Time and arrival time Get the riding sequence TR′ of bus user u u :
[0020]
[0021] For the travel sequence TR′ of bus user u uPerform transfer behavior recognition and merge the transfer behavior into a single trip to update the ride sequence TR′ u , get the second travel chain TR″ of bus user u u ;
[0022]
[0023] Preferably, the travel sequence TR′ for the public transportation user u is u Perform transfer behavior recognition and merge the transfer behavior into a single trip to update the ride sequence TR′ u , specifically including:
[0024] For any two adjacent ride records and if Seconds and meters, identified as a transfer behavior, the two ride records are merged into a single ride record, recorded as Where, distance() is the distance function, C1 and C2 are the set constant coefficients;
[0025] From the first ride Start by traversing TR′ u All ride records in the list, up to the last ride record End, update the ride sequence TR′ u .
[0026] Preferably, the identifying the job and residence information of the public transportation users in the second travel chain according to the set rules, and adding the job and residence space characteristics of the users to the first travel chain and the second travel chain respectively by using the population density data and the land price data, specifically includes:
[0027] Obtain the current city's population density data and land price data, rasterize the city's geographic space, and calculate the average population density and land price in each grid;
[0028] According to the home addresses and workplace addresses of public transportation users in the resident travel survey data, the population density and land price information of the grids corresponding to the home addresses and workplace addresses are obtained;
[0029] For the bus user card swiping data, the departure station with the most first trips by the bus user and a proportion higher than the first threshold is identified as the user's home station, and the departure station with the most last trips by the bus user and a proportion higher than the second threshold is identified as the user's workplace station, and the population density and land price information of the grids corresponding to the home station and the workplace station are obtained.
[0030] Preferably, the first travel chain data is used as training data to train the initial public transport user attribute prediction model, and the second travel chain data is introduced for semi-supervised learning, and the final public transport user attribute prediction model is obtained by iterative updating. The specific training process is as follows:
[0031] 1) Create the initial teacher XGBoost model M t , initialize the number of estimators, maximum depth, minimum child node weight, sub-sample rate and learning rate;
[0032] 2) Set the loss function to the weighted cross entropy loss function and use the first row chain data as the initial teacher model M t Training data, taking the travel sequence characteristics, population density and land price information in the first travel chain as training features, and obtaining the initial teacher model M t The parameter θ t ;
[0033] 3) Using the initial teacher model M t , predict the attributes of the user to which the second trip chain data belongs; wherein, if the confidence of the user attribute label prediction is higher than the set threshold, the current user attribute label is used as a pseudo label of the second trip chain data;
[0034] 4) Mix the first trip chain data with the second trip chain data with pseudo labels, perform SMOTE sampling, and generate a mixed trip chain data set as a training set. t Train as the teacher model to obtain the student model M s ;
[0035] 5) Calculate the silhouette coefficient:
[0036]
[0037] Among them, a i Represents sample x i The cohesion, b i Represents sample x i The separation degree, c i and c j Respectively represent samples x i and x j The category it belongs to, K is the number of categories, n is the total number of categories, N is the number of samples in all categories i, N k is the number of samples of all categories k;
[0038] 6) If the value of the silhouette coefficient becomes smaller than that of the previous round, stop training and use the previous round model as the final model. Otherwise, use the student model M. s Replacement becomes the new teacher model M t , jump to 2) to continue training
[0039] According to a second aspect of the present invention, there is provided an electronic device, comprising a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the program, any one of the methods described above is implemented.
[0040] According to a third aspect of the present invention, there is provided a computer-readable storage medium having a computer program stored thereon, wherein when the program is executed by a processor, any one of the methods described above is implemented.
[0041] Compared with the prior art, the present invention has the following beneficial effects:
[0042] (1) The present invention uses the first travel chain data extracted from the urban residents' travel survey data as training data, and introduces the second travel chain data extracted from the urban public transportation card swiping data to perform semi-supervised learning on the public transportation user attribute prediction model, which can achieve more accurate and reliable public transportation user attribute prediction, help to explore the deep socio-economic reasons behind the travel behavior of public transportation users, and is of great significance for accurately grasping the travel characteristics of users and promoting the refined management of public transportation enterprises.
[0043] (2) The transfer behavior of bus users is identified through the interval threshold between the arrival time and departure time of two adjacent ride records and the distance threshold of the station. The transfer behavior is merged into a single trip to update the ride sequence, further improving the reliability and effectiveness of the travel sequence data.
[0044] (3) Population density data and land price data are added as the users' work-residence space characteristics into the first and second travel chains, which further improves the richness of travel chain data and helps to explore the deep socioeconomic reasons behind the travel behavior of public transportation users, facilitating a more accurate and reliable prediction of the age, income and occupational attributes of public transportation users in the future. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 is a flow chart of the method of the present invention;
[0046] Figure 2 Schematic diagram of prediction results of three user attributes in the embodiment; wherein (a), (b) and (c) correspond to age, occupation and income, respectively. DETAILED DESCRIPTION
[0047] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0048] Example
[0049] like Figure 1 As shown, this embodiment provides a method for constructing a public transportation user attribute prediction model based on semi-supervised learning, including:
[0050] S1. Acquire urban resident travel survey data containing travel information, work-residence information and user attribute information, and obtain the first travel chain of public transportation users after preprocessing, wherein the travel information includes user identification code, travel sequence number, departure location, departure time, arrival location, arrival time and travel mode, the work-residence information includes home address and workplace address, and the user attributes include age, income and occupation.
[0051] Specifically, the first trip chain acquisition process of a public transportation user is as follows:
[0052] Obtain urban residents travel survey data D survey , filter out the travel records where the travel mode is public transportation, and get the data set D s ' urvey ;
[0053] In the dataset D′ survey In the example, for the i-th trip record of a single bus user u, obtain the coordinates of its departure point Coordinates of the arrival location Departure Time Arrival time and travel purpose Get the first travel sequence TR of bus user u u :
[0054]
[0055] S2. Obtain urban public transportation card swiping data, which includes user card number, departure station, arrival station, departure time, arrival time and pre-inferred travel purpose. After pre-processing, obtain the second travel chain of the public transportation user, specifically:
[0056] Get bus user card swiping data D card , for the i-th ride record of a single bus user u, obtain the coordinates of its departure station Coordinates of the arrival site Departure Time and arrival time Connect them sequentially to get the riding sequence TR′ of bus user u u :
[0057]
[0058] For the travel sequence TR′ of public transportation user uu Perform transfer behavior recognition and merge the transfer behavior into a single trip to update the ride sequence TR′ u , get the second travel chain TR″ of bus user u u ;
[0059]
[0060] For the travel sequence TR′ of bus user u u Perform transfer behavior recognition and merge the transfer behavior into a single trip to update the ride sequence TR′ u , specifically including:
[0061] For any two adjacent ride records and if Seconds and meters, identified as a transfer behavior, the two ride records are merged into a single ride record, recorded as Where, distance() is the distance function, C1 and C2 are the set constant coefficients;
[0062] From the first ride Start by traversing TR′ u All ride records in the list, up to the last ride record End, update the ride sequence TR′ u .
[0063] The specific method for pre-inferring travel purpose from urban bus card swiping data is as follows: using point of interest data to characterize the spatial characteristics of user travel, using the start and end time of the trip to characterize the spatial characteristics of the user's travel, and establishing a machine learning model based on the above-mentioned spatiotemporal characteristics to infer the travel purpose. Any other existing method can also be used for prediction.
[0064] S3. Identify the job and residence information of the public transportation users in the second travel chain according to the set rules, and use the population density data and land price data to add the job and residence space characteristics of the users to the first travel chain and the second travel chain respectively, including:
[0065] Obtain the current city's population density data and land price data, rasterize the city's geographic space, and calculate the average population density and land price in each grid;
[0066] According to the home addresses and workplace addresses of public transportation users in the resident travel survey data, the population density and land price information of the grids corresponding to the home addresses and workplace addresses are obtained;
[0067] For the bus user card swiping data, the departure station with the most first trips by the bus user and a proportion higher than the first threshold is identified as the user's home station, and the departure station with the most last trips by the bus user and a proportion higher than the second threshold is identified as the user's workplace station, and the population density and land price information of the grids corresponding to the home station and the workplace station are obtained.
[0068] S4. Using the first travel chain data as training data, training the initial public transport user attribute prediction model, and introducing the second travel chain data for semi-supervised learning, iteratively updating to obtain the final public transport user attribute prediction model, specifically including:
[0069] 1) Create the initial teacher XGBoost model M t , initialize the number of estimators, maximum depth, minimum child node weight, sub-sample rate and learning rate;
[0070] 2) Set the loss function to the weighted cross entropy loss function The first row chain data is used as the initial teacher model M t Training data, taking the travel sequence characteristics, population density and land price information in the first travel chain as training features, and obtaining the initial teacher model M t The parameter θ t ;
[0071] 3) Using the initial teacher model M t , predict the attributes of the user to which the second trip chain data belongs; wherein, if the confidence of the user attribute label prediction is higher than the set threshold (set to 0.8 in this embodiment, and can also be adjusted according to the actual data situation), the current user attribute label is used as the pseudo label of the second trip chain data;
[0072] 4) Mix the first trip chain data with the second trip chain data with pseudo labels, perform SMOTE sampling, and generate a mixed trip chain data set as a training set. t Train as the teacher model to obtain the student model M s ;
[0073] 5) Calculate the silhouette coefficient:
[0074]
[0075] Among them, a i Represents sample x i The cohesion, b i Represents sample x i The separation degree, c i and c j Respectively represent samples x i and x jThe category it belongs to, K is the number of categories, n is the total number of categories, N is the number of samples in all categories i, N k is the number of samples of all categories k;
[0076] 6) If the value of the silhouette coefficient becomes smaller than that of the previous round, stop training and use the previous round model as the final model. Otherwise, use the student model M. s Replacement becomes the new teacher model M t , jump to 2) to continue training.
[0077] The present invention constructs a bus user attribute construction model based on semi-supervised learning to infer bus user attributes and obtain a more scientific and accurate user attribute portrait, which is helpful to explore the deep mechanism behind the travel behavior of bus users. It is of great significance for accurately grasping user travel characteristics and promoting refined management of bus companies.
[0078] Next, we selected a city’s 2020 resident travel survey data, bus card swiping data from October to December 2018, and all population density and land price data of the corresponding years to verify the prediction effect of the method of the present invention.
[0079] In this embodiment, for the convenience of modeling, the study area was divided into grids of 1 km*1 km and numbered (3043 in total), and the population density and land price characteristics were aggregated on this basis.
[0080] Based on the residents' travel survey data, the first travel chain of public transportation users based on the residents' travel survey data is obtained after data preprocessing and travel mode screening.
[0081] Based on the bus card swiping data, the second travel chain of bus users based on the bus card swiping data is obtained after data preprocessing and transfer behavior recognition.
[0082] Based on past research on the impact of public transportation user attributes, three major categories of characteristic variables required for modeling are selected. The specific division is shown in Table 1 below.
[0083] Table 1 Description of independent variable characteristics
[0084]
[0085] Based on the first trip chain data of bus users and the above-mentioned feature dimensions, the XGBoost machine learning model is used to model the user portrait features. The resident survey data is divided into a training set and a test set, with a ratio of 80% and 20% respectively. The setting of the initial model hyperparameters is determined by the grid search method. The specific hyperparameter values are shown in Table 2.
[0086] Table 2 Hyperparameter settings of deep learning models
[0087] Hyperparameters Specific settings Number of estimators 140 Maximum Depth 3 Minimum child node weight 8 Subsample rate 0.1 Learning Rate 0.01
[0088] The second travel chain data of bus users is introduced for semi-supervised learning training to obtain the final user portrait annotation model, which includes individual characteristics such as user age, employment status, and income.
[0089] The model of the present invention is tested on a test set with other models, such as K-nearest neighbor algorithm (KNN), support vector machine (SVM), random forest (RF), lightweight gradient boosting machine (LightGBM), and the accuracy (Acc), precision (Pre) and recall (Rec) of the comprehensive evaluation index system. The specific expression is as follows:
[0090]
[0091] Among them, TP, FP, FN, and TN are the number of true positives, true negatives, false positives, and false negatives, respectively, and K is the total number of categories.
[0092] The results are shown in Table 3.
[0093] Table 3 Comparison of evaluation indicators of the present invention and other models
[0094]
[0095]
[0096] From the comparison results of model indicators, it can be seen that the public transportation user attribute prediction model based on semi-supervised learning of the present invention is superior to other general machine learning models in terms of age and employment status prediction. In terms of income prediction, the accuracy of this method is much higher than other models, while the precision and recall rates are slightly lower than other models, and the overall performance is the best.
[0097] By comparing the silhouette coefficients of the initial model and the model after semi-supervised training on the residents’ travel survey data and card swiping data, it is found that the silhouette coefficients of the model after semi-supervised training are higher in both travel survey data and card swiping data, indicating that the model has a good classification effect.
[0098] Table 4 Comparison of silhouette coefficients of the initial model and the model after semi-supervised training
[0099]
[0100] Finally, the user attributes in the travel survey data and the user attribute distribution inferred based on the card swiping data are compared as follows: Figure 2 As shown, we can see that the distributions of the two are basically the same.
[0101] The electronic device of the present invention includes a central processing unit (CPU), which can perform various appropriate actions and processes according to computer program instructions stored in a read-only memory (ROM) or loaded from a storage unit into a random access memory (RAM). In the RAM, various programs and data required for device operation can also be stored. The CPU, ROM and RAM are connected to each other via a bus. An input / output (I / O) interface is also connected to the bus.
[0102] Multiple components in the device are connected to the I / O interface, including: input units, such as keyboards, mice, etc.; output units, such as various types of displays, speakers, etc.; storage units, such as disks, optical disks, etc.; and communication units, such as network cards, modems, wireless communication transceivers, etc. The communication unit allows the device to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunication networks.
[0103] The processing unit performs the various methods and processes described above, such as methods S1 to S4. For example, in some embodiments, methods S1 to S4 may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit. In some embodiments, part or all of the computer program may be loaded and / or installed on the device via a ROM and / or a communication unit. When the computer program is loaded into the RAM and executed by the CPU, one or more steps of methods S1 to S4 described above may be performed. Alternatively, in other embodiments, the CPU may be configured to execute methods S1 to S4 in any other appropriate manner (e.g., by means of firmware).
[0104] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip systems (SOCs), load programmable logic devices (CPLDs), and the like.
[0105] The program code for implementing the method of the present invention can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code can be executed entirely on the machine, partially on the machine, partially on the machine as a stand-alone software package and partially on a remote machine, or entirely on a remote machine or server.
[0106] In the context of the present invention, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0107] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.
Claims
1. A method for constructing a public transportation user attribute prediction model based on semi-supervised learning, characterized in that: The method includes: Obtain urban residents' travel survey data containing travel information, work and residence information, and user attribute information, and obtain the first travel chain of public transportation users after preprocessing; Obtain the city bus card swiping data and obtain the second travel chain of bus users after preprocessing; According to the set rules, the job and residence information of the public transportation users in the second travel chain is identified, and the job and residence space characteristics of the users are added to the first travel chain and the second travel chain respectively using the population density data and the land price data; The first travel chain data is used as training data to train the initial bus user attribute prediction model, and the second travel chain data is introduced for semi-supervised learning, and the final bus user attribute prediction model is obtained by iterative updating.
2. The method for constructing a public transportation user type prediction model based on semi-supervised learning according to claim 1, characterized in that: The travel information includes a user identification code, a travel serial number, a departure location, a departure time, an arrival location, an arrival time and a travel mode; the work-residence information includes a home address and a work address; and the user attributes include age, income and occupation.
3. The method for predicting bus user types based on semi-supervised learning according to claim 1, characterized in that: The method of obtaining the urban resident travel survey data including travel information, work and residence information and user attribute information, and obtaining the first travel chain of public transport users after preprocessing, specifically includes: Obtain urban residents travel survey data D survey , filter out the travel records where the travel mode is public transportation, and get the data set D′ survey ; In the dataset D′ survey In the example, for the ith trip record of a single bus user u, obtain the coordinates of its departure point Coordinates of the arrival location Departure Time Arrival time and travel purpose Get the first travel sequence TR of bus user u u :
4. The method for constructing a public transportation user type prediction model based on semi-supervised learning according to claim 1, characterized in that: The urban public transportation card swiping data includes the user card number, the departure station, the arrival station, the departure time, the arrival time and the pre-inferred travel purpose.
5. The method for constructing a public transportation user type prediction model based on semi-supervised learning according to claim 4, characterized in that: The method of obtaining the urban public transportation card swiping data and obtaining the second travel chain of the public transportation user after preprocessing specifically includes: Get bus user card swiping data D card , for the i-th ride record of a single bus user u, obtain the coordinates of its departure station Coordinates of the arrival site Departure Time and arrival time Get the riding sequence TR′ of bus user u u : For the travel sequence TR′ of public transportation user u u Perform transfer behavior recognition and merge the transfer behavior into a single trip to update the ride sequence TR′ u , get the second travel chain TR″ of bus user u u ; 6. The method for constructing a public transportation user type prediction model based on semi-supervised learning according to claim 5, characterized in that: The travel sequence TR′ for public transport user u u Perform transfer behavior recognition and merge the transfer behavior into a single trip to update the ride sequence TR′ u , specifically including: For any two adjacent ride records and if Seconds and meters, identified as a transfer behavior, the two ride records are merged into a single ride record, recorded as Where, distance() is the distance function, C1 and C2 are the set constant coefficients; From the first ride Start by traversing TR′ u All ride records in the list, up to the last ride record End, update the ride sequence TR′ u .
7. The method for constructing a public transportation user type prediction model based on semi-supervised learning according to claim 1, characterized in that: The identifying the job and residence information of the public transportation users in the second travel chain according to the set rules, and adding the job and residence space characteristics of the users to the first travel chain and the second travel chain respectively by using the population density data and the land price data, specifically includes: Obtain the current city's population density data and land price data, rasterize the city's geographic space, and calculate the average population density and land price in each grid; According to the home addresses and workplace addresses of public transportation users in the resident travel survey data, the population density and land price information of the grids corresponding to the home addresses and workplace addresses are obtained; For the bus user card swiping data, the departure station with the most first trips by the bus user and a proportion higher than the first threshold is identified as the user's home station, and the departure station with the most last trips by the bus user and a proportion higher than the second threshold is identified as the user's workplace station, and the population density and land price information of the grids corresponding to the home station and the workplace station are obtained.
8. The method for constructing a public transportation user type prediction model based on semi-supervised learning according to claim 1, characterized in that: The first travel chain data is used as training data to train the initial public transport user attribute prediction model, and the second travel chain data is introduced for semi-supervised learning, and the final public transport user attribute prediction model is obtained by iterative updating. The specific training process is as follows: 1) Create the initial teacher XGBoost model M t , initialize the number of estimators, maximum depth, minimum child node weight, sub-sample rate and learning rate; 2) Set the loss function to the weighted cross entropy loss function and use the first row chain data as the initial teacher model M t Training data, taking the travel sequence characteristics, population density and land price information in the first travel chain as training features, and obtaining the initial teacher model M t The parameter θ t ; 3) Using the initial teacher model M t , predict the attributes of the user to which the second trip chain data belongs; wherein, if the confidence of the user attribute label prediction is higher than the set threshold, the current user attribute label is used as a pseudo label of the second trip chain data; 4) Mix the first trip chain data with the second trip chain data with pseudo labels, perform SMOTE sampling, and generate a mixed trip chain data set as a training set. t Train as the teacher model to obtain the student model M s ; 5) Calculate the silhouette coefficient: Among them, a i Represents sample x i The cohesion, b i Represents sample x i The separation degree, c i and c j Respectively represent samples x i and x j The category it belongs to, K is the number of categories, n is the total number of categories, N is the number of samples in all categories i, N k is the number of samples of all categories k; 6) If the value of the silhouette coefficient becomes smaller than that of the previous round, stop training and use the previous round model as the final model. Otherwise, use the student model M. s Replacement becomes the new teacher model M t , jump to 2) to continue training.
9. An electronic device comprising a memory and a processor, wherein a computer program is stored in the memory, wherein: When the processor executes the program, the method according to any one of claims 1 to 8 is implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.