A method, device, terminal equipment and storage medium for classifying passenger trips at a station
By extracting passenger stay information and using unsupervised clustering detection methods, misclassified passengers are identified and removed, solving the problem of low accuracy in station passenger travel classification in existing technologies and achieving more accurate passenger travel classification.
Patent Information
- Application Number
- CN202510822697.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-19
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2045-06-19
AI Technical Summary
Due to the complexity of travel choices and the uneven quality of big data, the existing station passenger travel classification methods are difficult to fully cover various complex situations with simple rules, resulting in low classification accuracy.
By extracting passengers' stay information, determining the site range of the target station, generating categories of incoming and outgoing passengers, and using unsupervised clustering detection methods to identify and remove misclassified passengers, accurate classification is performed based on the number of days of stay and travel characteristics of passengers.
It improves the accuracy of passenger travel classification and can automatically discover hidden similarities based on the inherent structure and patterns of the data, comprehensively cover various complex situations, avoid misjudgments, and accurately identify passengers' travel intentions.
Smart Images

Figure CN120356337B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of transportation technology, and in particular to a method for classifying passenger travel at a station, a terminal device, and a storage medium. Background Art
[0002] High-speed rail has become a core component of modern transportation infrastructure and a highly efficient mode of transportation. Its high speeds and impressive passenger capacity have profoundly impacted intercity travel and even urban and regional development. In this context, accurately identifying and extracting high-speed rail passengers and their departure and arrival information is crucial for the development of TOD models within high-speed rail station areas and the socioeconomic advancement of cities and regions.
[0003] Existing methods for classifying passenger trips at stations typically rely on the knowledge of professionals and the spatiotemporal characteristics of research groups to establish classification rules for screening and categorization. However, due to the complexity of travel choices and the varying quality of big data, simple rules fail to fully capture the full range of complex situations, resulting in low accuracy in passenger trip classification at stations. Summary of the Invention
[0004] The present invention provides a method, device and storage medium for classifying passenger travel at stations, which can solve the technical problem in the prior art that due to the complexity of travel choices and the uneven quality of big data, simple set rules are difficult to fully cover various complex situations, resulting in low accuracy in classifying passenger travel at stations.
[0005] The present invention provides a method for classifying passenger trips at a station, comprising:
[0006] Extract the passenger's stay information;
[0007] Determining a station range of a target station, filtering target resident information whose resident positions are within the station range from the resident information, and determining passengers corresponding to the target resident information as a station passenger group;
[0008] Determine, based on the target residence information, a station passenger group whose residence position is within a preset area within the station range, and generate a first travel passenger category; wherein the first travel passenger category includes inbound passengers and outbound passengers;
[0009] Calculating the distance between the destination and the nearest station for each passenger in the first travel passenger category, determining an average travel speed based on the distance and travel duration, and removing passengers whose average travel speeds fall within a preset threshold range from the first travel passenger category to obtain a second travel passenger category;
[0010] An unsupervised cluster detection method is used to identify misclassified passengers in the second travel passenger category, and the misclassified passengers are removed from the second travel passenger category to obtain a third travel passenger category.
[0011] Furthermore, the station passenger group includes local passengers and non-local passengers, and determining the station passenger group whose station location is within a preset area within the station range according to the target residence information to generate the first travel passenger category includes:
[0012] For non-local passengers, if the current non-local passenger has no record of staying in the preset area before noon the next day, the current non-local passenger will be determined as an incoming passenger; if the current non-local passenger has a record of staying in the preset area before noon the next day, the current non-local passenger will be determined as an outgoing passenger;
[0013] For local passengers, if the current local passenger had no record of staying in the preset area on the previous day, but had a record of staying in the preset area on the same night, the current local passenger will be determined as an outgoing passenger; if the current local passenger had a record of staying in the preset area on the previous day, but had no record of staying in the preset area on the same night, the current local passenger will be determined as an incoming passenger.
[0014] Furthermore, before determining the station passenger group whose station location is within the preset area within the station range according to the target station information and generating the first travel passenger category, the method further includes:
[0015] Determine the dwelling location with the longest dwelling days for each passenger in the passenger group at the station;
[0016] Determining a residence days threshold value according to the distribution and inflection point of the residence days at the residence location;
[0017] Passengers whose number of stay days corresponding to the stay location is greater than or equal to the stay day threshold are determined as local passengers; passengers whose number of stay days corresponding to the stay location is less than the stay day threshold are determined as non-local passengers.
[0018] Furthermore, the misclassified passengers include a first misclassified passenger, and the identifying the misclassified passengers in the second travel passenger category includes:
[0019] Converting the stay information of passengers in the second travel passenger category into corresponding travel records, wherein the travel records include stay duration, travel speed, and travel duration;
[0020] For each passenger's destination in the second travel category, select the station with the shortest distance to the destination as the nearest station, and calculate the station distance between the destination and the nearest station;
[0021] performing unsupervised cluster detection according to the residence time, the travel speed, the travel time, and the station distance to determine a plurality of first clusters;
[0022] By analyzing the box plot characteristics of each first cluster, passengers who only pass through the target station are determined, and the passengers who only pass through the target station are determined as the first misclassified passengers.
[0023] Furthermore, the misclassified passengers further include a second misclassified passenger, and the identifying the misclassified passengers in the second passenger category further includes:
[0024] After removing the first misclassified passenger from the second travel passenger category, for each passenger's destination in the second travel passenger category after removing the first misclassified passenger, select a rail line with the shortest distance to the destination, and calculate the line distance between the destination and the rail line;
[0025] performing unsupervised cluster detection based on the dwell time, the travel speed, the travel time, the route distance, and the building environment of the destination to determine a plurality of second clusters;
[0026] By analyzing the box plot characteristics of each second cluster, passengers who only pass through the target station are determined, and the passengers who only pass through the target station are determined as second misclassified passengers.
[0027] Furthermore, the extracting of the passenger's residence information includes:
[0028] Obtain mobile phone signaling data provided by the operator;
[0029] Extract the residency information in the mobile phone signaling data, wherein the residency information includes a user unique number, a residency location, and a residency duration.
[0030] Furthermore, determining the site range of the target station includes:
[0031] Determine the usage status of the target station. When the usage status of the target station is normal, crawl the latitude and longitude information of the target station, convert the latitude and longitude information into a corresponding polygon range, and determine the polygon range as the site range of the target station.
[0032] The present invention also provides a station passenger travel classification device, comprising:
[0033] A residence information extraction module is used to extract the passenger's residence information;
[0034] a station passenger group determination module, configured to determine a station range of a target station, filter target resident information whose resident positions are within the station range from the resident information, and determine passengers corresponding to the target resident information as a station passenger group;
[0035] A first passenger classification module is configured to determine, based on the target residence information, a group of station passengers whose residence positions are within a preset area within the station range, and generate a first passenger category; wherein the first passenger category includes inbound passengers and outbound passengers;
[0036] a second passenger classification module configured to calculate the distance between the destination and the nearest station for each passenger in the first passenger category, determine an average travel speed based on the distance and travel duration, and remove passengers whose average travel speeds fall within a preset threshold from the first passenger category to obtain a second passenger category;
[0037] The third travel passenger classification module is used to identify misclassified passengers in the second travel passenger category by using an unsupervised cluster detection method, remove the misclassified passengers from the second travel passenger category, and obtain a third travel passenger category.
[0038] The present invention also provides a terminal device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements the station passenger travel classification method as described above.
[0039] The present invention also provides a computer-readable storage medium, comprising: a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the station passenger travel classification method as described above.
[0040] The present invention preliminarily screens out the categories of traveling passengers by extracting their residence information, screening target residence information, and calculating the average travel speed. On this basis, it uses an unsupervised clustering detection method to identify and remove misclassified passengers, further optimizing the classification results. It can automatically discover hidden similarities based on the inherent structure and pattern of the data, thereby more accurately distinguishing inbound and outbound passengers. It can comprehensively cover various complex situations and effectively improve the accuracy of passenger travel classification.
[0041] Furthermore, the present invention identifies passengers' travel intentions by analyzing their temporal and spatial characteristics. For non-local passengers, by judging their stay records in a preset area, misjudgments caused by short stays can be effectively avoided; for local passengers, by analyzing their stay records in a preset area, their travel intentions can be identified more accurately. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the technical solution of the present application, the following is a brief introduction to the drawings required for use in the implementation. Obviously, the drawings described below are only some implementation methods of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0043] Figure 1 This is a flow chart of a method for classifying passenger travel at a station provided by one embodiment of the present invention;
[0044] Figure 2 This is a schematic diagram of a first travel passenger category determination process provided by an embodiment of the present invention;
[0045] Figure 3 1 is a schematic diagram of a process for determining a third passenger travel category according to an embodiment of the present invention;
[0046] Figure 4 This is another flow chart of a method for classifying passenger travel at a station provided by one embodiment of the present invention;
[0047] Figure 5 It is a structural schematic diagram of a station passenger travel classification device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0048] To make the objectives, technical solutions, and advantages of this application more clear, the technical solutions in this application will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of this application. Obviously, the described embodiments are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making any creative efforts are within the scope of protection of this application.
[0049] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this application belongs; the terms used herein are only for the purpose of describing specific embodiments and are not intended to limit this application; the terms "including" and "having" and any variations thereof in the specification and claims of this application and the above-mentioned figure descriptions are intended to cover non-exclusive inclusions.
[0050] In the description of the embodiments of this application, the technical terms "first" and "second" are used only to distinguish different objects and should not be understood to indicate or imply relative importance or implicitly specify the quantity, specific order, or primary and secondary relationship of the indicated technical features. In the description of the embodiments of this application, the meaning of "plurality" is more than two, unless otherwise clearly and specifically defined.
[0051] References herein to "embodiments" mean that a particular feature, structure, or characteristic described in connection with the embodiments may be included in at least one embodiment of the present application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it constitute an independent or alternative embodiment that is mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0052] In the description of the embodiments of this application, the term "and / or" is simply a description of the association relationship between associated objects, indicating that three relationships can exist. For example, A and / or B can represent the following three situations: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " in this document generally indicates that the associated objects are in an "or" relationship.
[0053] In the description of the embodiments of the present application, the term "multiple" refers to more than two (including two). Similarly, "multiple groups" refers to more than two groups (including two groups), and "multiple pieces" refers to more than two pieces (including two pieces).
[0054] In the description of the embodiments of the present application, unless otherwise expressly specified or limited, technical terms such as "installed," "connected," "connected," and "fixed" should be understood in a broad sense. For example, they can refer to fixed connections, detachable connections, or integration; mechanical connections or electrical connections; direct connections or indirect connections through an intermediate medium; internal connections between two components or interactions between two components. Those skilled in the art can understand the specific meanings of the above terms in the embodiments of the present application based on specific circumstances.
[0055] See also Figure 1 In order to solve the technical problem in the prior art that due to the complexity of travel choices and the uneven quality of big data, simple rules cannot fully cover various complex situations, resulting in low accuracy of station passenger travel classification, an embodiment of the present invention provides a station passenger travel classification method, including:
[0056] S1. Extract the passenger's residence information;
[0057] In an embodiment of the present invention, the passenger's mobile phone signaling data can be obtained to further extract the passenger's residence information, wherein the residence information may include the start time point of the residence, the residence location, the residence duration, etc.
[0058] S2. Determine the station range of the target station, filter out target residency information whose residency location is within the station range from the residency information, and determine the passengers corresponding to the target residency information as the station passenger group;
[0059] In the embodiment of the present invention, the usage of the site can be determined according to the official railway website, and then the target station can be determined, and the site range of the target station can be further determined.
[0060] S3. Determine, based on the target residence information, a station passenger group whose residence location is within a preset area within the station range, and generate a first travel passenger category; wherein the first travel passenger category includes inbound passengers and outbound passengers;
[0061] In an embodiment of the present invention, the preset area may be a key area within the site for analysis or research, for example, the area may be an area where the density of hotels or inns is higher than a preset density threshold, or an area where a certain number of commercial entities are reached.
[0062] S4. Calculate the distance between the destination and the nearest station for each passenger in the first travel passenger category, determine the average travel speed based on the distance and travel duration, and remove passengers whose average travel speed falls within a preset threshold from the first travel passenger category to obtain a second travel passenger category.
[0063] In this embodiment of the present invention, the average travel speed is determined based on distance and travel duration, and compared with the average travel speed within a preset threshold range. This can determine whether the passenger's travel speed associated with the target station is unconventional. If so, the passenger corresponding to the travel record is removed. In this embodiment of the present invention, the unconventional travel speed can be 0 or above the preset threshold range. When the travel speed is 0, the passenger may enter and exit the same station. When the travel speed is above the preset threshold range, it is determined that a data error has occurred. Passengers whose travel records correspond to these unconventional travel speeds constitute noise data. By reducing the impact of this noise data, this embodiment of the present invention can effectively improve the accuracy of passenger travel classification.
[0064] S5. Use an unsupervised cluster detection method to identify misclassified passengers in the second travel passenger category, remove the misclassified passengers from the second travel passenger category, and obtain a third travel passenger category.
[0065] The embodiment of the present invention preliminarily screens out the categories of traveling passengers by extracting their residence information, screening target residence information, and calculating the average travel speed. On this basis, it uses an unsupervised clustering detection method to identify and remove misclassified passengers, further optimizing the classification results. It can automatically discover hidden similarities based on the inherent structure and pattern of the data, thereby more accurately distinguishing inbound and outbound passengers. It can comprehensively cover various complex situations and effectively improve the accuracy of passenger travel classification.
[0066] In one embodiment, step S1, extracting the passenger's stay information, includes:
[0067] S11. Obtain mobile phone signaling data provided by the operator;
[0068] S12. Extracting the residency information in the mobile phone signaling data, where the residency information includes the user's unique number, residency location, and residency duration.
[0069] In an embodiment of the present invention, mobile phone signaling data can record assistant information based on each mobile phone's communication event and its unique corresponding base station (BS), where communication events include sending and receiving text messages, making and receiving calls, etc. The mobile phone signaling data in this embodiment of the present invention includes the user's unique ID, dwell duration, corresponding location ID, and dwell start time, which are expressed as follows:
[0070] <uid, datetime, grid_id, date> .
[0071] In an embodiment of the present invention, specific stay information can be marked based on all stay information of each user in the current month, wherein the specific stay information may include the number of stay days and the stay location activity type of each stay location, wherein the stay location activity type is the type of activity of the passenger at the stay location, including residence type, work type and other types.
[0072] Please refer to Table 1, which is a schematic table of resident information provided by an embodiment of the present invention.
[0073] Table 1: Resident information diagram
[0074]
[0075] In an embodiment of the present invention, for all the locations that each user travels to during the month, the total number of days the user appears at each location during the month is counted and marked as days_poi. Secondly, the user's location activity type is distinguished, which can be divided into three types: residence, work, and others, and corresponded to 1, 2, and 0 respectively, and marked as ptype. Among them, the residence type (ptype = 1) is marked based on the user's longest stay time between 9 pm and 8 am the next day; the work type (ptype = 2) is marked based on the user's longest stay time between 9 am and 5 pm and is different from the residence location; the remaining residence types (ptype = 0) are all defined as other.
[0076] In an embodiment of the present invention, based on the above-obtained dwell information, the dwell information can be further converted into corresponding travel records. For the same user ID and date, and in descending order of dwell time, the end time of each dwell information is selected as the departure time, and the start time of the next dwell information is selected as the arrival time. The numbers of the two dwell records are used as the starting and ending position markers. A preliminary travel record is obtained and converted into the following data structure:
[0077] <uid, s_time, e_time, o_grid_id, d_grid_id, date> .
[0078] In this embodiment of the present invention, the trip duration can be obtained by subtracting the departure time from the arrival time of each trip, and the dwell duration of each dwell record can be calculated by subtracting the dwell start time from the dwell end time and added to the trip record, ultimately obtaining the basic trip record data:
[0079] <uid, s_time, e_time, o_grid_id, d_grid_id, duration, staytime, date> .
[0080] Please refer to Table 2, which is a schematic table of travel records provided in an embodiment of the present invention.
[0081]
[0082] The embodiment of the present invention realizes individual passenger identification and resident information extraction through mobile phone signaling data provided by the operator, which can effectively reduce data collection costs and efficiently expand coverage. Moreover, by extracting corresponding data through mobile phone information data, the accuracy and reliability of the data can be effectively ensured.
[0083] In one embodiment, step S2, determining the site range of the target station, includes:
[0084] Determine the usage status of the target station. When the usage status of the target station is normal, crawl the latitude and longitude information of the target station, convert the latitude and longitude information into corresponding polygon ranges, and determine the polygon range as the site range of the target station.
[0085] In the embodiments of the present invention, stations include train stations and high-speed rail stations. It is understood that any railway track with a speed of 200 / h or above is defined as a high-speed rail, where high-speed rail includes C, G, and D series trains, which serve both inter-regional connections and the flow of people within a region.
[0086] In an embodiment of the present invention, the usage of the site can be determined based on the official railway APP. After screening and determining the high-speed rail site research object, the site can be searched based on its name using the map web service to crawl the latitude and longitude information of the spatial range in the web page, and converted into the corresponding polygon range in QGIS, and finally the coordinate system is converted to WGS84.
[0087] In an embodiment of the present invention, the land use information within the target station can be summarized and marked. For example, the Sentinel-2 satellite remote sensing interpretation image data provided by ESRI is used, which has a WGS-84 coordinate system and 10-meter accuracy. The land use type is selected as the type of urban built-up area to reflect the built environment characteristics of the travel destination, and the number of this land use type in the grid unit to which the travel destination belongs is counted.
[0088] The embodiment of the present invention can accurately define the site range of the station by crawling the latitude and longitude information of the target station and converting it into a polygon range, so as to accurately determine whether the passenger's location is within the station range, and then more accurately identify whether the passenger is in the entry or exit state, effectively improving the accuracy of passenger travel classification.
[0089] In one embodiment, before step S3, determining the station passenger group whose station location is within the preset area within the station range according to the target residence information and generating the first travel passenger category, the method further includes:
[0090] Determine the dwelling location with the longest dwelling days for each passenger in the passenger group at the station;
[0091] In the embodiment of the present invention, the preset study area is an area determined according to a residential area within the site range. For example, the residential area can be determined as the preset study area.
[0092] Local passengers live in the preset study area of the target station for a long time, while non-local passengers do the opposite.
[0093] In an embodiment of the present invention, local passengers and non-local passengers can be classified based on the days_poi tag in the passenger's bibliographic information. Specifically, the longest number of days each passenger stays in all locations in that month (the maximum value of days_poi) is counted and defined as max_day.
[0094] Determine the residence days threshold based on the distribution and inflection point of the residence days at the residence location;
[0095] In the embodiment of the present invention, the residence days threshold k can be determined based on the distribution and inflection point of max_day to distinguish between local and non-local passengers.
[0096] Passengers whose number of stay days corresponding to their stay locations is greater than or equal to the stay day threshold are determined as local passengers; passengers whose number of stay days corresponding to their stay locations is less than the stay day threshold are determined as non-local passengers.
[0097] In this embodiment of the present invention, if a passenger's max_day is greater than or equal to k, it means that the passenger has a relatively stable residence pattern in the preset study area and is classified as a local passenger with a fixed residence; if a passenger's max_day is less than k, it means that the passenger has almost no relatively stable residence record in the preset study area and is classified as a non-local passenger who enters and visits the preset study area via high-speed rail.
[0098] The embodiment of the present invention determines the length of stay threshold by analyzing the distribution and inflection points of the number of days of stay of passengers, which can accurately identify local passengers and non-local passengers. Moreover, based on the data-driven classification method, classification errors caused by subjective judgment can be avoided, thereby more accurately identifying the travel characteristics of passengers.
[0099] In one embodiment, step S3, the station passenger group includes local passengers and non-local passengers, and based on the target residence information, the station passenger group whose residence position is within the preset area within the station range is determined to generate the first travel passenger category, including:
[0100] S31. For non-local passengers, if the current non-local passenger has no record of staying in the preset area before noon of the next day, the current non-local passenger is determined as an inbound passenger; if the current non-local passenger has a record of staying in the preset area before noon of the next day, the current non-local passenger is determined as an outbound passenger;
[0101] S32. For local passengers, if the current local passenger has no record of staying in the preset area on the previous day but has a record of staying in the preset area on the same evening, the current local passenger is determined as an outgoing passenger; if the current local passenger has a record of staying in the preset area on the previous day but has no record of staying in the preset area on the same evening, the current local passenger is determined as an incoming passenger.
[0102] The embodiment of the present invention identifies passengers' travel intentions by analyzing their spatiotemporal characteristics. For non-local passengers, by judging their stay records in a preset area, misjudgments caused by short stays can be effectively avoided; for local passengers, by analyzing their stay records in a preset area, their travel intentions can be more accurately identified.
[0103] See also Figure 2 , is a schematic diagram of the first travel passenger category determination process provided by an embodiment of the present invention.
[0104] In one embodiment, in step S4, the distance between the destination and the nearest station of each passenger in the first travel passenger category is calculated, and the average travel speed is determined based on the distance and travel duration. The passengers corresponding to the average travel speed within the preset threshold range are removed from the first travel passenger category to obtain the second travel passenger category. The distribution and mean of the average travel speed of all passengers are counted and compared with the average travel speed within the preset range to determine travel records with irregular travel attributes. For example, if the average travel speed is higher than the preset threshold, data anomalies may occur. If the average travel speed is 0, it is possible that passengers get on and off at the same station, etc., which are irregular travel records. The travel records corresponding to these travel speeds are determined as noise data, and the passengers corresponding to the noise data are removed from the first travel passenger category to update the travel passenger category to obtain the second travel passenger category.
[0105] In one embodiment, the misclassified passengers include first misclassified passengers, and step S5, identifying misclassified passengers in the second travel passenger category, includes:
[0106] S501: Convert the stay information of passengers in the second travel passenger category into corresponding travel records, where the travel records include stay duration, travel speed, and travel duration;
[0107] In this embodiment of the present invention, misclassified passengers are passengers who only pass through the target station or railway but are mistakenly identified as departing from the station. In other words, these misclassified passengers' trips are not departing from the station, but rather stop at a station and then continue on a high-speed rail journey, or they are single trips identified by base stations during the operation of high-speed rail within a city.
[0108] S502. For each passenger's destination in the second travel category, select the station with the shortest distance to the destination as the nearest station, and calculate the station distance between the destination and the nearest station;
[0109] S503, performing unsupervised cluster detection based on residence time, travel speed, travel time, and station distance to determine multiple first clusters;
[0110] In an embodiment of the present invention, each passenger travel record in the second travel passenger category can be used as a sample, and each sample can be regarded as a single cluster, and iterative merging, i.e., clustering, is performed based on the distance between different clusters until all data points form a large cluster.
[0111] In the clustering process, the normalized Manhattan distance can be used as the distance for calculation. The Manhattan distance calculation formula is as follows:
[0112]
[0113] in, is the distance between two samples, p and q are two samples (two data points), k is the number of each attribute, there are n attributes in total, pk and qk are the values of the k attribute of samples p and q.
[0114] In this embodiment of the present invention, a fully connected layer can be selected to calculate the distance between two clusters, which takes the distance between the most dissimilar samples in the two clusters as the distance between the clusters, that is, the longest distance. The formula is:
[0115]
[0116] x and y are sample points in categories Ci and Cj respectively, and Manhattan distance is used to measure the distance between sample points x and y.
[0117] In an embodiment of the present invention, the step of determining the number of clusters includes:
[0118] S51. Determine the quantity interval by observing the branch structure and node connections of the dendrogram;
[0119] In the embodiment of the present invention, when the branches of the dendrogram are relatively clear and the distances between different branches are relatively large, it may mean that there are obviously different clusters. On this basis, the appropriate number interval is determined according to actual needs;
[0120] S52. Based on the determined quantity interval, set different categories for clustering;
[0121] In the embodiment of the present invention, two indicators, Silhouette Coefficient and Within-Cluster Sum of Average Distance, can be selected as indicators for evaluating the classification effect.
[0122] In this embodiment of the present invention, SC scores are defined as the average of the silhouette coefficients for all samples in a set. SC scores comprehensively consider both intra-cluster compactness and inter-cluster separation, and range from -1 to 1. The closer to 1, the better the partitioning effect and the more obvious the differences between classes. Therefore, the local maximum point is the potential optimal number. WSD is the sum of the average distances between points in each cluster. As the number of clusters increases, WSD gradually decreases. More clusters mean that the data points within each cluster are closer together. The rate of decline then slows significantly after reaching a critical point, known as the "elbow." Numbers with smaller fluctuations at and after this point are the potential optimal number. This embodiment of the present invention can comprehensively determine the optimal number of categories based on the changing trends of SC scores and WSD.
[0123]
[0124] Where SC is the silhouette coefficient, N is the number of all samples, is the average distance from sample point i to the rest of the sample points in the category to which it belongs, It is the average distance from sample point i to the rest of the sample points in the category to which it belongs.
[0125]
[0126] Among them, WSD k is the intra-cluster distance, d manhattan (x, y) is the Manhattan distance between sample points x and y, k is the number of all categories, is one of the categories and has Sample point x,y.
[0127] S504: Determine passengers who have only passed through the target station by analyzing the box plot features of each first cluster, and determine the passengers who have only passed through the target station as first misclassified passengers.
[0128] In this embodiment of the present invention, the characteristics of the first misclassified passenger are: 1. Abnormal travel attributes; 2. Close proximity to railway facilities; 3. The number of this cluster is relatively small relative to the total number of clusters, and its proportion is below a preset threshold. In combination with these characteristics, this embodiment of the present invention identifies the first misclassified passenger by analyzing the box plot characteristics of each first cluster.
[0129] The embodiment of the present invention uses unsupervised cluster detection and box plot feature analysis to identify groups of passengers with similar travel characteristics, and screen out passengers who only pass through the target station as misclassified passengers. This fully utilizes the inherent structure and distribution characteristics of the data, avoids misjudgments that may be caused by a single feature (such as residence time or travel speed), and thus more accurately identifies the passenger travel category.
[0130] In one embodiment, the misclassified passengers further include a second misclassified passenger, and step S5, identifying the misclassified passengers in the second travel passenger category, further includes:
[0131] S511. After removing the first misclassified passenger from the second travel passenger category, for each passenger's destination in the second travel passenger category after removing the first misclassified passenger, select the rail line with the shortest distance to the destination, and calculate the line distance between the destination and the rail line.
[0132] S512, performing unsupervised cluster detection based on the dwell time, travel speed, travel time, route distance, and the building environment of the destination to determine a plurality of second clusters;
[0133] S513. Determine passengers who have only passed through the target station by analyzing the box plot features of each second cluster, and determine the passengers who have only passed through the target station as second misclassified passengers.
[0134] In an embodiment of the present invention, after removing the first misclassified passenger, based on the same technical concept as step S4, unsupervised cluster detection is performed according to the residence time, travel speed, travel time, route distance and the architectural environment of the destination to determine multiple second clusters, thereby determining the second misclassified passengers.
[0135] On the basis of removing the first misclassification, the embodiment of the present invention further performs unsupervised cluster detection based on the length of stay, travel speed, travel duration, route distance and the architectural environment of the destination to determine and remove the second misclassified passengers. It can further identify passengers who deviate from the normal travel pattern, thereby effectively improving the accuracy and reliability of passenger travel classification.
[0136] See also Figure 3 , which is a schematic diagram of the process of determining the third passenger travel category provided by the present invention. Figure 3 In the example, scenario 1 is a passenger whose next stop is near another station, representing the first misclassified passenger. Scenario 2 is a passenger whose next stop is near the inner-city railway tracks, representing the second misclassified passenger. This embodiment of the present invention sequentially identifies passengers in scenarios 1 and 2 and removes their corresponding misclassified passengers, resulting in the final result of departure trip extraction, representing the third passenger trip category.
[0137] In one embodiment, after step S5, the process further includes verifying the accuracy of the passenger travel classification at the station, including:
[0138] S6. Obtain the arrival times of trains passing through each station within the predefined study area on the same day, as well as the departure start times of high-speed rail passengers. Organize the arrival and departure time series according to different time windows (2, 3, 4, ... 15, 20, 30, 60 minutes), excluding departures that occurred during the early morning hours (those arriving the previous night and spending an extended period at the station).
[0139] S7. Use the DTW method for evaluation. The DTW method is a method for comparing the similarity of time series of different lengths or different time alignments. Specifically, it finds the optimal alignment path between two sequences to minimize their matching cost, and finally evaluates the similarity of the two sequences by calculating the normalized distance. When the Normalized Distance < 0.1, it indicates a high degree of consistency. The specific calculation process is:
[0140]
[0141] Where DTW(A, B) is the dynamic time warping distance between time series A and B, Indicates the time series A and B and The local distance of is set to Euclidean distance in this embodiment of the present invention, and w is an alignment path with constraints.
[0142] In an embodiment of the present invention, the cumulative distance matrix C is defined by dynamic programming:
[0143]
[0144] Among them, C[i,j] is the element in the cumulative distance matrix, and the final DTW is the last element of the cumulative matrix, that is, , N and M represent the lengths of time series A and time series B, respectively. In order to eliminate the influence of sequence length, the embodiment of the present invention uses Normalized Distance (ND) for evaluation;
[0145]
[0146] Among them, ND is the normalized distance, Represents the length of w.
[0147] S8. Calculate the ND index of the two sequences of train arrivals and departures in different time windows and compare them with 0.1. If the ND index is less than 0.1 in all windows, it means that the two sequences are highly similar, that is, the identified and extracted passengers and departures have a high degree of credibility.
[0148] In an embodiment of the present invention, after the accuracy verification is completed, in order to reduce the amount of data and match other research subjects, the extracted passengers and their departure trips can be aggregated according to stations and grids, and the average travel distance, speed, starting time of stay and other information can be calculated, where the grid can be defined according to research needs, such as 500 meters, 1 kilometer, etc.
[0149] After obtaining the third travel passenger category, the embodiment of the present invention constructs a time series of train arrival and departure based on a time series comparison method, and uses the DTW algorithm to compare similarities to verify the reliability of the classification results, thereby ensuring the accuracy and reliability of passenger travel classification.
[0150] See also Figure 4 , which is another flow chart of a station passenger travel classification method provided by an embodiment of the present invention. Figure 4In this paper, after data collection and preprocessing, heuristic rules are used to preliminarily determine the high-speed rail passengers and travel types. Then, heuristic rules and data-driven clustering are combined to remove noise and interference records. Finally, accuracy verification and data aggregation are performed to achieve passenger travel classification and verification.
[0151] The implementation of the embodiments of the present invention has the following beneficial effects:
[0152] The embodiment of the present invention preliminarily screens out the categories of traveling passengers by extracting their residence information, screening target residence information, and calculating the average travel speed. On this basis, it uses an unsupervised clustering detection method to identify and remove misclassified passengers, further optimizing the classification results. It can automatically discover hidden similarities based on the inherent structure and pattern of the data, thereby more accurately distinguishing inbound and outbound passengers. It can comprehensively cover various complex situations and effectively improve the accuracy of passenger travel classification.
[0153] Furthermore, the embodiments of the present invention identify passengers' travel intentions by analyzing their spatiotemporal characteristics. For non-local passengers, by judging their stay records in a preset area, misjudgments caused by short stays can be effectively avoided; for local passengers, by analyzing their stay records in a preset area, their travel intentions can be more accurately identified.
[0154] See also Figure 5 Based on the same inventive concept as the above embodiment, the present invention also provides a station passenger travel classification device, comprising:
[0155] The residence information extraction module 10 is used to extract the passenger's residence information;
[0156] The station passenger group determination module 20 is used to determine the station range of the target station, filter out the target residence information whose residence position is within the station range from the residence information, and determine the passengers corresponding to the target residence information as the station passenger group;
[0157] A first passenger classification module 30 is configured to determine, based on the target residence information, a group of station passengers whose residence locations are within a preset area within the station range, and generate a first passenger category; wherein the first passenger category includes inbound passengers and outbound passengers;
[0158] The second passenger classification module 40 is configured to calculate the distance between the destination and the nearest station for each passenger in the first passenger category, determine the average travel speed based on the distance and travel time, and remove passengers whose average travel speed falls within a preset threshold from the first passenger category to obtain a second passenger category.
[0159] The third travel passenger classification module 50 is configured to identify misclassified passengers in the second travel passenger category by using an unsupervised cluster detection method, remove the misclassified passengers from the second travel passenger category, and obtain a third travel passenger category.
[0160] In one embodiment, the first trip passenger classification module 30 is further configured to:
[0161] For non-local passengers, if the current non-local passenger has no record of staying in the preset area before noon of the next day, the current non-local passenger will be determined as an incoming passenger; if the current non-local passenger has a record of staying in the preset area before noon of the next day, the current non-local passenger will be determined as an outgoing passenger;
[0162] For local passengers, if the current local passenger had no record of staying in the preset area on the previous day, but had a record in the preset area on the same night, the current local passenger will be determined as an outgoing passenger; if the current local passenger had a record of staying in the preset area on the previous day, but had no record of staying in the preset area on the same night, the current local passenger will be determined as an incoming passenger.
[0163] In one embodiment, the system further includes a passenger segmentation module for:
[0164] Determine the dwelling location with the longest dwelling days for each passenger in the passenger group at the station;
[0165] Determine the residence days threshold based on the distribution and inflection point of the residence days at the residence location;
[0166] Passengers whose number of stay days corresponding to their stay locations is greater than or equal to the stay day threshold are determined as local passengers; passengers whose number of stay days corresponding to their stay locations is less than the stay day threshold are determined as non-local passengers.
[0167] In one embodiment, the third trip passenger classification module 50 is further configured to:
[0168] Converting the dwell information of passengers in the second travel passenger category into corresponding travel records, where the travel records include dwell time, travel speed, and travel time;
[0169] For each passenger's destination in the second travel passenger category, select the station with the shortest distance to the destination as the nearest station, and calculate the station distance between the destination and the nearest station;
[0170] Unsupervised cluster detection is performed based on residence time, travel speed, travel time and station distance to determine multiple first clusters;
[0171] By analyzing the box plot characteristics of each first cluster, passengers who only pass through the target station are determined, and the passengers who only pass through the target station are determined as the first misclassified passengers.
[0172] In one embodiment, the third trip passenger classification module 50 is further configured to:
[0173] After removing the first misclassified passenger from the second travel passenger category, for each passenger's destination in the second travel passenger category after removing the first misclassified passenger, select the rail line with the shortest distance to the destination, and calculate the line distance between the destination and the rail line;
[0174] Perform unsupervised cluster detection based on dwell time, travel speed, travel time, route distance, and the building environment of the destination to determine multiple second clusters;
[0175] By analyzing the box plot characteristics of each second cluster, passengers who only pass through the target station are determined, and the passengers who only pass through the target station are determined as second misclassified passengers.
[0176] In one embodiment, the resident information extraction module 10 is further configured to:
[0177] Obtain mobile phone signaling data provided by the operator;
[0178] Extract the dwell information from the mobile phone signaling data, which includes the user's unique number, dwell location and dwell duration.
[0179] In one embodiment, the station passenger group determination module 20 is further configured to:
[0180] Determine the usage status of the target station. When the usage status of the target station is normal, crawl the latitude and longitude information of the target station, convert the latitude and longitude information into corresponding polygon ranges, and determine the polygon range as the site range of the target station.
[0181] It can be understood that the above-mentioned device embodiment corresponds to the method embodiment of the present invention, and it can implement any one of the above-mentioned method embodiments of the present invention to provide a station passenger travel classification method.
[0182] It should be noted that the device embodiments described above are merely illustrative, and some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment. Furthermore, in the drawings of the device embodiments provided by the present invention, the connection relationship between modules indicates that they have a communication connection, which may be implemented as one or more communication buses or signal lines. Those skilled in the art can understand and implement the present invention without inventive effort.
[0183] Based on the above-mentioned embodiment of the station passenger travel classification method, another embodiment of the present invention provides a terminal device, which includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, the station passenger travel classification method of any embodiment of the present invention is implemented.
[0184] For example, in this embodiment, the computer program may be divided into one or more modules, which are stored in the memory and executed by the processor to implement the present invention. The one or more module elements may be a series of computer program instruction segments capable of performing specific functions, and the instruction segments are used to describe the execution process of the computer program in the terminal device.
[0185] The terminal device may be a computing device such as a desktop computer, a notebook computer, a PDA, a cloud server, etc. The terminal device may include, but is not limited to, a processor and a memory.
[0186] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the terminal device, connecting various parts of the entire terminal device using various interfaces and lines.
[0187] Based on the above-mentioned method embodiments, another embodiment of the present invention provides a computer-readable storage medium, including a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the station passenger travel classification method described in any one of the above-mentioned method embodiments of the present invention.
[0188] If the module / unit integrated into the device / terminal equipment is implemented as a software functional unit and sold or used as a standalone product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention can also implement all or part of the process steps in the above-mentioned method embodiments by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When executed by a processor, the computer program can implement the steps of each of the above-mentioned method embodiments. The computer program includes computer program code, which can be in source code form, object code form, executable file, or some intermediate form. The computer-readable medium can include any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunications signal, and a software distribution medium.
[0189] The above is a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications are also considered to be within the scope of protection of the present invention.
Claims
1. A method for classifying passenger trips at a station, characterized in that: include: Extract the passenger's stay information; Determining a station range of a target station, filtering target resident information whose resident positions are within the station range from the resident information, and determining passengers corresponding to the target resident information as a station passenger group; Determine, based on the target residence information, a station passenger group whose residence position is within a preset area within the station range, and generate a first travel passenger category; wherein the first travel passenger category includes inbound passengers and outbound passengers; Calculating the distance between the destination and the nearest station for each passenger in the first travel passenger category, determining an average travel speed based on the distance and travel duration, and removing passengers whose average travel speeds fall within a preset threshold range from the first travel passenger category to obtain a second travel passenger category; An unsupervised clustering detection method is used to identify misclassified passengers in the second travel passenger category, and the misclassified passengers are removed from the second travel passenger category to obtain a third travel passenger category; the misclassified passengers include first misclassified passengers and second misclassified passengers, and the identification of misclassified passengers in the second travel passenger category includes: converting the residence information of passengers in the second travel passenger category into corresponding travel records, and the travel records include residence time, travel speed and travel time; for the destination of each passenger in the second travel passenger category, selecting the station with the shortest distance to the destination as the nearest station, and calculating the station distance between the destination and the nearest station; performing unsupervised clustering detection based on the residence time, the travel speed, the travel time and the station distance , determine multiple first clusters; by analyzing the box plot characteristics of each first cluster, determine the passengers who only pass through the target station, and determine the passengers who only pass through the target station as the first misclassified passengers; after removing the first misclassified passengers from the second travel passenger category, for the destination of each passenger in the second travel passenger category after removing the first misclassified passengers, select the rail line with the shortest distance to the destination, and calculate the line distance between the destination and the rail line; perform unsupervised cluster detection according to the residence time, the travel speed, the travel time, the line distance and the building environment of the destination, and determine multiple second clusters; by analyzing the box plot characteristics of each second cluster, determine the passengers who only pass through the target station, and determine the passengers who only pass through the target station as the second misclassified passengers.
2. The method for classifying passenger trips at a station according to claim 1, wherein: The station passenger group includes local passengers and non-local passengers, and determining the station passenger group whose station location is within a preset area within the station range according to the target residence information to generate a first travel passenger category includes: For non-local passengers, if the current non-local passenger has no record of staying in the preset area before noon the next day, the current non-local passenger will be determined as an incoming passenger; if the current non-local passenger has a record of staying in the preset area before noon the next day, the current non-local passenger will be determined as an outgoing passenger; For local passengers, if the current local passenger had no record of staying in the preset area on the previous day, but had a record of staying in the preset area on the same night, the current local passenger will be determined as an outgoing passenger; if the current local passenger had a record of staying in the preset area on the previous day, but had no record of staying in the preset area on the same night, the current local passenger will be determined as an incoming passenger.
3. The method for classifying passengers at a station as claimed in claim 2, wherein: Before determining, based on the target residence information, a station passenger group whose residence position is within a preset area within the station range and generating a first travel passenger category, the method further includes: Determine the dwelling location with the longest dwelling days for each passenger in the passenger group at the station; Determining a residence days threshold value according to the distribution and inflection point of the residence days at the residence location; Passengers whose number of stay days corresponding to the stay location is greater than or equal to the stay day threshold are determined as local passengers; passengers whose number of stay days corresponding to the stay location is less than the stay day threshold are determined as non-local passengers.
4. The method for classifying passengers at a station according to claim 1, wherein: The step of extracting the passenger's residence information includes: Obtain mobile phone signaling data provided by the operator; Extract the residency information in the mobile phone signaling data, wherein the residency information includes a user unique number, a residency location, and a residency duration.
5. The method for classifying passengers at a station according to claim 1, wherein: Determining the site range of the target station includes: Determine the usage status of the target station. When the usage status of the target station is normal, crawl the latitude and longitude information of the target station, convert the latitude and longitude information into a corresponding polygon range, and determine the polygon range as the site range of the target station.
6. A passenger travel classification device at a station, characterized in that: include: A residence information extraction module is used to extract the passenger's residence information; a station passenger group determination module, configured to determine a station range of a target station, filter target resident information whose resident positions are within the station range from the resident information, and determine passengers corresponding to the target resident information as a station passenger group; A first passenger classification module is configured to determine, based on the target residence information, a group of station passengers whose residence positions are within a preset area within the station range, and generate a first passenger category; wherein the first passenger category includes inbound passengers and outbound passengers; a second passenger classification module configured to calculate the distance between the destination and the nearest station for each passenger in the first passenger category, determine an average travel speed based on the distance and travel duration, and remove passengers whose average travel speeds fall within a preset threshold from the first passenger category to obtain a second passenger category; The third travel passenger classification module is used to identify misclassified passengers in the second travel passenger category by using an unsupervised clustering detection method, remove the misclassified passengers from the second travel passenger category, and obtain a third travel passenger category; the misclassified passengers include first misclassified passengers and second misclassified passengers, and the identification of misclassified passengers in the second travel passenger category includes: converting the stay information of passengers in the second travel passenger category into corresponding travel records, and the travel records include stay time, travel speed and travel time; for the destination of each passenger in the second travel passenger category, select the station with the shortest distance to the destination as the nearest station, and calculate the station distance between the destination and the nearest station; perform Unsupervised cluster detection is performed to determine multiple first clusters; by analyzing the box plot characteristics of each first cluster, passengers who only pass through the target station are determined, and the passengers who only pass through the target station are determined as first misclassified passengers; after removing the first misclassified passengers from the second travel passenger category, for the destination of each passenger in the second travel passenger category after removing the first misclassified passengers, the rail line with the shortest distance to the destination is selected, and the line distance between the destination and the rail line is calculated; unsupervised cluster detection is performed based on the residence time, the travel speed, the travel time, the line distance and the architectural environment of the destination to determine multiple second clusters; by analyzing the box plot characteristics of each second cluster, passengers who only pass through the target station are determined, and the passengers who only pass through the target station are determined as second misclassified passengers.
7. A terminal device, characterized in that: The method comprises a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, the method for classifying station passenger travel according to any one of claims 1 to 5 is implemented.
8. A computer-readable storage medium, characterized in that include: A stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the station passenger travel classification method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Urban rail transit passenger travel behavior characteristic estimation method
CN119476688A
Method and apparatus for recognizing police emergency similarity, and device
WO2021136455A1