A method, device and storage medium for identifying railway travel trajectories within a city
By preprocessing mobile signaling data and classifying railway location information, the problem of identifying railway travel trajectories within the city is solved, and the accurate identification and output of railway travel trajectories is achieved, which improves the accuracy and robustness of the recognition.
Patent Information
- Application Number
- CN202111156766.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-30
- Publication Date
- 2025-04-29
- Estimated Expiration
- 2041-09-30
AI Technical Summary
The prior art is difficult to effectively identify and track the trajectory of railway travel within the city, especially when data collection costs are high, timeliness and small sample sizes.
By preprocessing mobile signaling data, including preprocessing of base station data and mobile signaling data, a railway line segment combination is generated, and through railway position information classification and trajectory identification, the station location information of users' railway travel is output.
It realizes accurate identification of railway travel trajectories within the city, overcomes the difficulties of data oscillation, non-rail travel exclusion and stay identification in traditional methods, and improves the accuracy and robustness of the identification.
Smart Images

Figure CN113887617B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of mobile phone signaling big data mining, and in particular to a method, device and storage medium for identifying urban railway travel trajectories based on mobile phone signaling data. Background Art
[0002] As China's urbanization enters a new stage of urban cluster development, the connections between cities are more frequent. As the main mode of inter-city travel, the passenger flow data of railways is of great significance to the operation and management of urban transportation. Accurate passenger flow data is collected and managed by the railway operation department, which is difficult to obtain. The questionnaire survey method used in traditional transportation planning obtains small sample size of railway travel information, poor timeliness and high collection cost. As a new type of data resource, mobile phone signaling data has the characteristics of large data volume, wide coverage, strong timeliness and low collection cost. It can realize the long-term trajectory tracking of individuals, not only effectively identifying users' long-distance railway travel, but also tracking the user's subsequent activity trajectory in the city, which can provide quantitative reference for urban planning and transportation management.
[0003] Mobile phone signaling data uses the base station (BS) determined by the location area code (LAC) and cell identity (CI) as a fixed-point detector to collect the longitude and latitude position and time information of anonymous mobile phone users (MS) when communication events (including sending and receiving text messages, making and receiving calls, etc.), roaming events (including power on and off, location update, etc.) and switching events occur, thereby characterizing the continuous travel trajectory of individual mobile phone users in the time and space dimensions.
[0004] Domestic and foreign research on transportation mode identification based on mobile phone data mainly involves three steps: data cleaning, trip identification and mode detection. Rule-based methods and map matching are the more commonly used methods in transportation mode identification. Map data can generally be obtained from open source maps in map processing software, such as OpenStreetMap. Using mobile phone signaling data to identify railway travel is relatively complex, and the following four characteristics of the data need to be focused on during the processing process:
[0005] 1) Low sampling rate: Due to the high-speed movement of trains, low density of base stations in suburban areas, and damage to base stations, the amount of data for an individual inter-city trip is small;
[0006] 2) Position oscillation: Due to the noise caused by ping-pong switching, the signal is captured by more than two base stations at close distances in a short period of time, which may appear in the data as the phenomenon of advancing and retreating along the railway line;
[0007] 3) Exclusion of non-railway trips: Due to ignoring the unmatched railway base stations that are too far away from the railway, road trips parallel to the railway are mistakenly judged as railway trips, or urban road or subway trips with lower speeds are mistakenly judged as railway trips;
[0008] 4) Stops: The train may stop at an intermediate station on the railway line. If it stops outside the intermediate station or the terminal station, it is not a railway travel mode. Summary of the invention
[0009] The purpose of the present invention is to overcome the defects of the above-mentioned prior art and to provide a method, device and storage medium for identifying urban railway travel trajectories based on mobile phone signaling data.
[0010] The purpose of the present invention can be achieved by the following technical solutions:
[0011] A method for identifying a railway travel trajectory within a city, the method comprising the following steps:
[0012] S1. Preprocess the base station data, select base stations within the coverage of the station according to the map data, calculate the mileage coordinates of the base stations adjacent to the railway projected on the railway line, and then generate a line section combination;
[0013] S2, pre-processing the mobile phone signaling data, dividing the user's trip segments in and out of the city according to the missing interval threshold and the intra-city and inter-city travel time threshold, and performing base station matching to obtain the matching base station location information;
[0014] S3, classifying railway location information according to base station location information;
[0015] S4. Perform trajectory recognition on data of different railway location information, and output station location information of the user's railway travel.
[0016] In step S1, the process of preprocessing the base station data specifically includes the following steps:
[0017] S101, using the online map OpenStreetMap in ArcGIS software to generate a railway line feature layer {city_railway} in the city, where the direction of the railway line is the direction in which the train enters the city, so as to determine the direction in which the user enters and exits the city;
[0018] S102, a buffer is set according to the railway line and a buffer surface feature layer is generated, the width of the buffer is set to buffer meters, the base station point feature layer {bs_city} obtained based on the base station data is intersected with the buffer surface feature layer to obtain the base station point feature layer {bs_railway1} along the railway line;
[0019] S103, obtain the base stations covering the actual area where the city terminal is located, obtain the station base station point element layer {bs_station}, exclude the base stations near the terminal station on the railway line base station point element layer {bs_railway1}, obtain the railway line base station point element layer {bs_railway} excluding the terminal station base station, and obtain the longitude and latitude lon of the center position of the station covering each railway line in the city according to the map data station ,lat station With coverage radius Range station , the stations include intermediate stations and terminal stations, and the stop point feature layer {bs_stop} where the train may stop is obtained;
[0020] S104, converting the railway line feature layer {city_railway} into feature points to generate a line feature layer {city_railway_points}, setting the mileage coordinates of the starting point of each railway line to 0, and accumulating the length of the broken line to obtain the mileage coordinates of the breakpoints on each railway line;
[0021] S105, find the projection points bs_railway_i (i=1, 2, ..., N) of the railway base stations along the railway in the railway base station point element layer {bs_railway} on each railway line of the railway line route element layer {city_railway}, and merge these projection points to generate a projection point element layer {bs_railway_project}, by calculating the distance between the projection point and the starting point of the railway line polyline where the projection point is located, and adding the mileage coordinates of the starting point of the polyline obtained in step S104, and then obtaining the mileage coordinates of the base stations along the railway;
[0022] S106, partition the base station feature layer {bs_railway} along the railway, add a section label ZONE to each section, convert the sections into nodes, simplify the railway lines into paths between nodes, and form a topological map of urban railway lines. According to the section sequence of the user's railway travel in and out of the city, the terminal station of the user's arrival and departure is inferred. There is a mapping relationship between the section sequence, the railway line and the terminal station, and the mapping relationship is expressed as:
[0023] Line = f1(List)
[0024] Station=f2(Line)
[0025] Among them, Line is the railway line, List is the section sequence, Station is the terminal station, and f1 and f2 represent the mapping relationship respectively.
[0026] In step S2, the process of preprocessing the mobile phone signaling data specifically includes the following steps:
[0027] S201: Match the location area code LAC and cell identification CI fields in the mobile phone signaling data table with the base station location information table, filter out the non-repetitive and valid user time and location information, and generate the user valid signaling data table T1. The fields in T1 include<MSID,DATETIME,LAC,CI,LON,LAT> , where MSID is the user's unique identification number, DATETIME is the time in timestamp format, LON is the base station longitude, and LAT is the base station latitude;
[0028] S202: Sort all valid user signaling data records in the valid user signaling data table T1 by DATETIME, add a signaling segmentation mark VISIT to the first data record and mark it as 1, calculate the time difference between the first data record and the next data record and record it as INTERVAL, if INTERVAL is less than the set missing interval threshold loss_interval, then the VISIT of the next data record is the same as the previous data record, indicating that this data record is the user's VISITth time in the city, if INTERVAL is not less than the missing interval threshold loss_interval, then the VISIT of the next data record is accumulated by 1 to the VISIT of the previous data record, so as to calculate the time difference INTERVAL between the previous and next data records until all data records are marked, and obtain the user signaling segmentation data table T2, the fields in T2 include<MSID,DATETIME,LAC,CI,LON,LAT,VISIT> ;
[0029] S203: The same signaling segment in T2 is marked as VISIT as a signaling segment, the minimum time and maximum time in each signaling segment of the user are obtained, and the user segment time table T3 is generated. The fields in T3 include<MSID,VISIT,STIME,ETIME> , STIME is the start time of each signaling segment, i.e., the minimum time, and ETIME is the end time of each signaling segment, i.e., the maximum time;
[0030] S204: T2 matches the corresponding MSID and VISIT fields in T3, adds STIME and ETIME after each record, and selects the travel segments of entering and leaving the city in each signaling segment of the user in T2 according to the set intra-city and inter-city travel time threshold travel_threshold and direction mark formula, and adds the direction DIRECTION mark, thereby generating the user travel signaling data table T4. The fields in T4 include<MSID,DATETIME,LAC,CI,LON,LAT,VISIT,STIME,ETIME,DIRECTION> , DIRECTION is the direction, and the direction marking formula is:
[0031]
[0032] Among them, DIRECTION=in means entering the city, and DIRECTION=out means leaving the city;
[0033] S205: Merge the station base station data in the station base station feature layer {bs_station} and the railway base station data in the railway base station feature layer {bs_railway} into a new table, and add the base station location information GROUP. If it is a station base station, GROUP is the station name. If it is a railway base station, GROUP is railway. If no base station is matched, GROUP is none. Group T4 according to each trip segment of each signaling segment of the user, match the LAC and CI of each group of data to the base station, and generate the user base station location information table T5. The fields in T5 include<MSID,DATETIME,LAC,CI,LON,LAT,VISIT,STIME,ETIME,DIRECTION,GROUP> .
[0034] In step S3, the specific operation of classifying the railway location information is as follows:
[0035] Add a segment category tag CLASS to each data record of T5. If the user's trip only matches the station base station, it is marked as stationonly, indicating that there is only station information. If the user's trip only matches the base station along the railway, it is marked as railonly, indicating that there is only railway information. If the user's trip matches both the station base station and the base station along the railway, it is marked as railstation, indicating that there is both station and railway information. If GROUP is none, the CLASS is marked as none, and the user railway location information classification T6 is generated. The fields in T6 include<MSID,DATETIME,LAC,CI,LON,LAT,VISIT,STIME,ETIME,DIRECTION,GROUP,CLASS> .
[0036] In step S4, the process of performing track identification on data with only station information specifically includes the following steps:
[0037] S401: extract the data with CLASS of stationonly in T6, and generate a temporary table TEMP1 of user railway travel data. The fields of TEMP1 are consistent with those of T6.
[0038] S402: Extract the data with DIRECTION in TEMP1, sort them in the order of DATETIME, select the first data with GROUP not none, generate the user entry station table R1, and modify the GROUP field name to STATION_ONLY1. The fields in R1 include<MSID,VISIT,DIRECTION,STATION_ONLY1> ;
[0039] S403: Extract the data with direction DIRECTION out in TEMP1, sort them in reverse order of DATETIME, select the first data with GROUP not none, generate the user departure station table R2, and modify the GROUP field name to STATION_ONLY2. The fields in R2 include<MSID,VISIT,DIRECTION,STATION_ONLY2> .
[0040] In step S4, the process of performing track identification on the data having only railway information and the data having both station railway information specifically includes the following steps:
[0041] S411: Matching railway line sections: Select the data with CLASS of railonly or railstation in T6, and generate the user railway travel section table T7 according to the railway base station feature layer {bs_railway} with the section label ZONE. The fields in T7 are<MSID,DATETIME,LAC,CI,LON,LAT,VISIT,STIME,ETIME,DIRECTION,GROUP,CLASS,ZONE> , ZONE indicates the zone number of the base station along the railway. When ZONE is -1, it means that the base station is not along the railway.
[0042] S412: Estimated routes and stations: Generate a LIST of the section number sequences of the base stations along the railways whose ZONE is not -1 in different itinerary segments of the user according to T7, adjust the LIST order according to the direction DRECTION to obtain temp1, and then obtain a non-repeated section number sequence temp2 according to temp1, record all the railway routes that meet the judgment conditions of the itinerary segment as estimated route lines and summarize them into estimated route result LINE1, obtain the station station corresponding to each estimated route line and summarize them into STATION1, and then generate the user's railway travel estimated station table T8. The fields in T8 include<MSID,VISIT,DIRECTION,LINE1,STATION1,CLASS> :
[0043]
[0044] temp2=Fromkeys(temp1)
[0045]
[0046] station = f2(line)
[0047] Among them, Reverse(·) is a function that outputs a sequence in reverse order, Fromkeys(·) is a function that outputs a sequence of non-repeating elements in sequence, and Index(temp2 p ,List i ) is to find the sequence List i temp2 p Function of element index, {·} is a set of non-repeating elements in the sequence, |·| is the number of elements in the sequence or set, List i is the segment sequence of base stations along railway line i, temp2 p The pth element in the non-repeating section number sequence after matching the base stations along the railway and adjusting the direction in a certain travel segment of the user, temp2 qThe qth element in the non-repeating section number sequence after matching the base stations along the railway and adjusting the direction in a certain travel segment of the user;
[0048] S413: Eliminate the estimated routes and stations with outliers: Match the estimated route result LINE1 of T8 with T7, calculate the projection distance of the base station with ZONE of -1 in T7 to each estimated route, and if the projection distance is greater than the set outlier threshold outliers_threshold, delete the estimated route, and then generate the user railway travel station table T9. The fields in T9 include<MSID,VISIT,DIRECTION,LINE2,STATION2,CLASS> , LINE2 and STATION2 are the estimated line results and stations after excluding abnormal points;
[0049] S414: Calculate speed: Match the estimated route result LINE2 of T9 with T8, select one of the estimated routes and record it as LINE3, obtain the mileage of the base station whose ZONE is not -1 according to the base station projection point with mileage coordinates in the projection point feature layer {bs_railway_project}, and then calculate the mileage difference DIST1, time difference DIFF1 and average speed SPEED1 between adjacent matching base stations, and generate the user railway travel speed table T10. The fields in T10 include <MSID,VISIT,DIRECTION,TIME1,TIME2,LON1,LAT1,LON2,LAT2,P1,P2,DIST1,DIFF1,SPEED1,LINE3> , the formulas for calculating the mileage difference DIST1, time difference DIFF1 and average vehicle speed SPEED1 between adjacent matching base stations are:
[0050]
[0051] DIFF1=TIME2-TIME1
[0052]
[0053] Among them, TIME1 is the timestamp of the previous matching base station, TIME2 is the timestamp of the next matching base station, P1 is the mileage of the previous matching base station, P2 is the mileage of the next matching base station, DIST1 is the difference in mileage between adjacent matching base stations, DIFF1 is the difference in timestamps between adjacent matching base stations, SPEED1 is the speed between adjacent matching base stations, and LINE3 is the estimated route that provides mileage data;
[0054] S415: Generate characteristic indicators: The characteristic indicators include direction, distance, average speed, number of valid records and travel data validity. Generate the data validity LABEL of each data record of the user's railway travel based on T10, and then calculate the number of valid characteristic indicator records NUM, the travel data validity STOP_INFO of all data records of the user's railway travel, distance DIST2, time difference DIFF2 and average speed SPEED2 based on the set {Label} composed of all LABELs and the correlation coefficient R(TIME,P) between time and mileage, and generate the user's railway travel characteristic table T11. The fields in T11 include<MSID,VISIT,DIRECTION,NUM,STOP_INFO,DIST2,DIFF2,SPEED2> ;
[0055] S416: Screening reasonable trips: According to the characteristic indicators obtained in T11, the data records of user railway trips are screened based on the set identification rules, and the MSID, VISIT and DIRECTION fields are matched according to T9 to generate the user railway trip table T12. The fields in T12 include<MSID,VISIT,DIRECTION,STATION2,CLASS> , the identification rules are as follows:
[0056]
[0057] Among them, TLL is the lower limit of the distance, SLL is the lower limit of the average speed, RLL is the lower limit of the validity of the travel data, and NLL is the lower limit of the number of valid records;
[0058] S417: Output the recognition result with only railway information: Select the record with CLASS of railonly in T12, and change the name of STATION2 field to RAIL_ONLY, and output the user station table R3 with only railway information. The fields in R3 include<MSID,VISIT,DIRECTION,RAIL_ONLY> ;
[0059] S418: Output the recognition results of the station and railway information: select the records with CLASS "railstation" in T12, match the MSID, VISIT and DIRECTION fields of T12 and T7, if there is only one identical station in STATION2 and GROUP, the recognized station information is STATION2, otherwise take the intersection of STATION2 and GROUP, and use RAIL_STATION to represent the final station result, and output the user station table R4 with station and railway information. The fields in R4 include<MSID,VISIT,DIRECTION,RAIL_STATION> ;
[0060] S419: R1, R2, R3 and R4 are merged to generate the final user railway station result table R5. The fields in R5 include<MSID,VISIT,DIRECTION,RESULT> , RESULT is the final identified station information.
[0061] In step S415, the formula for calculating the data validity LABEL of each data record of the user is:
[0062]
[0063] Among them, LABEL indicates the data validity of each data record of the user. When the value is 0, it means invalid. When the value is 1, it means low-speed forward movement. When the value is 2, it means high-speed movement. When the value is 3, it means reverse movement. When the value is 4, it means staying within the station range. When the value is 5, it means staying outside the station range. diff1_threshold is the time interval threshold for valid data. dist1_threshold is the distance threshold for judging whether the train is moving. speed1_threshold is the speed threshold for high-speed movement. CalDist(LON,LAT,lon station ,lat station ) is the function for calculating the latitude and longitude distance between the base station and the station center, lon station ,lat station and Range station They are the longitude of the center of the station, the latitude of the center of the station and the coverage radius of the station, LON is the longitude of the base station, LAT is the latitude of the base station, and stop_threshold is the threshold of the length of time the train stays at the station;
[0064] The formula for calculating the trip data validity STOP_INFO is:
[0065]
[0066] Among them, STOP_INFO is the validity of the user's travel data for this railway trip. A value of -2 indicates invalidity. A value ranging from -1 to 1 indicates the correlation coefficient R between time and mileage. A value of 2 indicates high-speed movement, that is, railway travel. A value of 3 indicates that there are only two valid records and the mileage increases. A value of -3 indicates that there are only two valid records and the mileage decreases. A value of 4 indicates that the correlation coefficient R does not exist. {Label} is a set consisting of each row of LABEL in each trip segment, |·| is the number of elements in the set, and R(TIME,P) is a function that calculates the correlation coefficient of the two variables TIME and mileage P that meet the data validity time difference threshold. It represents the correlation coefficient between time and mileage, and its value range is [-1, 1]. R greater than 0 indicates the direction of entry, and R less than 0 indicates the direction of departure.
[0067] In step S415, the formulas for calculating the distance DIST2, the time difference DIFF2 and the average vehicle speed SPEED2 are respectively:
[0068] DIST2=max(P)-min(P)
[0069]
[0070]
[0071] Among them, DIST2 represents the distance, DIFF2 represents the time difference, max(·) represents the maximum value, min(·) represents the minimum value, TIME represents the time when the data valid time difference threshold is met, P represents the mileage, SPEED2 represents the average speed, TIME max(P) and TIME min(P) They are the time corresponding to the maximum mileage value and the time corresponding to the minimum mileage value respectively.
[0072] A device for identifying travel trajectories of railways within a city comprises a memory and a processor; the memory is used to store a computer program; the processor is used to implement a method for identifying travel trajectories of railways within a city when executing the computer program.
[0073] A storage medium stores a program, which, when executed by a processor, implements a method for identifying railway travel trajectories within a city.
[0074] Compared with the prior art, the present invention has the following advantages:
[0075] (1) Simplify the two-dimensional railway network in the city into a one-dimensional railway line, and calculate travel distance, travel speed and other related indicators based on the railway mileage coordinates of the line, which is more accurate than directly calculating based on the latitude and longitude of the base station;
[0076] (2) Through the identification of railway travel trajectories, even if station data is missing, the station location can still be inferred based on the sequence of railway sections that the trajectory passes through;
[0077] (3) The data oscillation caused by the ping-pong switching of mobile phone signaling data is taken into account when calculating the distance, which enhances the robustness of the algorithm;
[0078] (4) Non-rail trips that deviate far from the railway line or do not stop at intermediate or terminal stations are excluded. BRIEF DESCRIPTION OF THE DRAWINGS
[0079] Figure 1 The present invention is a flowchart of a method for identifying railway travel trajectories within a city based on mobile phone signaling data.
[0080] Figure 2 This is a schematic diagram of the section numbering of base stations along the main railways in Shanghai in an embodiment of the present invention.
[0081] Figure 3 This is a topological diagram of the main railway lines in Shanghai in an embodiment of the present invention.
[0082] Figure 4 It is a distribution diagram of characteristic indicators obtained in an embodiment of the present invention, wherein Figure (4a) is a distribution diagram of distance, Figure (4b) is a distribution diagram of average speed, Figure (4c) is a distribution diagram of travel data validity, and Figure (4d) is a distribution diagram of the number of valid records. DETAILED DESCRIPTION
[0083] The present invention is described in detail below with reference to the accompanying drawings and specific embodiments.
[0084] Example
[0085] In this embodiment, the mobile phone signaling data of Shanghai is used as the data basis for explanation. Since visitors in the city's instantaneous population travel between cities more frequently than residents, this example identifies the locations of visitors entering and leaving the railway stations in Shanghai.
[0086] The mobile phone signaling data table and base station location information table are shown in Table 1 and Table 2:
[0087] Table 1 Mobile phone signaling data table
[0088]
[0089] Table 2 Base station location information table
[0090]
[0091] like Figure 1 As shown, a method for identifying railway travel trajectories within a city based on mobile phone signaling data comprises the following steps:
[0092] S1: Preprocess the base station data, select base stations within the station coverage area according to the map data, calculate the mileage coordinates of the base stations adjacent to the railway projected on the railway line, and then generate the line section combination;
[0093] S2: Preprocess the mobile phone signaling data, divide the user's trip segments in and out of the city according to the missing interval threshold and the intra-city and inter-city travel time threshold, and perform base station matching to obtain the matching base station location information;
[0094] S3: classify railway location information according to base station location information;
[0095] S4: Perform trajectory recognition on data of different railway location information, and output station location information of the user's railway travel.
[0096] Step S1 specifically includes the following steps:
[0097] S101: Use the online map OpenStreetMap in ArcGIS software to generate the route feature layer {sh_railway} of the main railway lines in Shanghai, including the existing Beijing-Shanghai line from Shanghai Station, the Shanghai-Nanjing intercity line from Shanghai Station, the Beijing-Shanghai high-speed railway line from Shanghai Hongqiao Station, the Shanghai-Kunming high-speed railway line from Shanghai Hongqiao Station, the Shanghai-Hangzhou high-speed railway line from Shanghai Station (including the Shanghai-Kunming line and the Shanghai-Kunming high-speed railway line between Shanghai Station and Shanghai Hongqiao Station), the existing Shanghai-Kunming line from Shanghai South Station to Hangzhou, and the existing Shanghai-Kunming line from Shanghai South Station to Nanjing, a total of 7 lines. When drawing the lines, draw them according to the direction of the train entering the city to determine the direction of the user entering and leaving the city;
[0098] S102: a buffer is set according to the railway line and a buffer surface feature layer is generated. The width of the buffer is set to buffer meters and the value of buffer is 500. The base station feature layer {bs_shanghai} obtained based on the base station data is intersected with the buffer surface feature layer to obtain the base station feature layer {bs_railway1} along the railway line.
[0099] S103: Find the base stations covering the actual areas where the railway terminals Shanghai Station, Shanghai South Station and Shanghai Hongqiao Station in Shanghai are located, obtain the station base station layer element {bs_station}, exclude the base stations near the terminal station in the railway line base station element layer {bs_railway1}, obtain the railway line base station element layer {bs_railway} excluding the terminal station base station, and obtain the station center position latitude and longitude lon covering the intermediate stations (Anting North Station, Nanxiang North Station, Shanghai West Station, Songjiang South Station, Jinshan North Station, Songjiang Station) and terminal stations (Shanghai Station, Shanghai South Station, Shanghai Hongqiao Station) of the main railway lines in Shanghai according to the map data station ,lat station With coverage radius Range station , get the stop point feature layer {bs_stop} where the train may stop at the terminal and intermediate stations;
[0100] S104: Perform the "element vertex conversion point" operation on the railway line feature layer {sh_railway}, select "ALL" for the point type, and perform the "add XY coordinates" operation to obtain the line vertex point feature layer {sh_railway_points}, set the mileage coordinates of the starting point of each railway line to 0, and accumulate the length of the broken line to obtain the mileage coordinates of the breakpoints on each railway line;
[0101] S105: Generate a neighbor table for the railway base station feature layer {bs_railway} and the railway line feature layer {sh_railway}, and check "Location" to find the projection points bs_railway_i (i=1, 2, ..., N) of the railway base stations along the railway in the railway base station feature layer {bs_railway} on each railway line of the railway line feature layer {sh_railway}, and merge these projection points to generate a projection point feature layer {bs_railway_project}, and calculate the distance between the projection point and the starting point of the railway line polyline where the projection point is located, and add the mileage coordinates of the starting point of the polyline obtained in step S104 to obtain the mileage coordinates of the railway base station;
[0102] S106: Divide the railway base station feature layer {bs_railway} into zones, and add a zone label ZONE to each zone, such as Figure 2 As shown in Figure 2, according to the conversion of sections into nodes, the railway lines are simplified into paths between nodes, forming a topological map of the main railway lines in Shanghai, as shown in Figure 2. Figure 3 As shown in Table 3, according to the segment sequence of the user's railway travel in and out of the city, the terminal station of the user's arrival and departure can be inferred. There is a mapping relationship between the segment sequence, railway line and terminal station, as shown in Table 3, and it can be expressed by the formula:
[0103] Line=f1(List) (1)
[0104] Station=f2(Line) (2)
[0105] Among them, Line is the railway line, List is the section sequence, Station is the terminal station, and f1 and f2 represent the mapping relationship respectively.
[0106] Table 3 Correspondence between lines, section sequences (entering Shanghai direction) and stations
[0107]
[0108] Step S2 specifically includes the following steps:
[0109] S201: Match the location area code LAC and cell identification CI fields in the mobile phone signaling data table with the base station location information table, filter out the non-repetitive and valid user time and location information, and generate the user valid signaling data table T1. The fields in T1 include<MSID,DATETIME,LAC,CI,LON,LAT> , where MSID is the user's unique identification number, DATETIME is the time in timestamp format, LON is the base station longitude, and LAT is the base station latitude;
[0110] S202: Identify the visitor group in Shanghai by a city visitor identification method based on mobile phone signaling data, and obtain a pre-processing intermediate process data table T2 and a user classification table T3. The specific method is:
[0111] The valid signaling data table T1 is grouped according to the user's unique identification number MSID, and the valid signaling data of each user is binned. Each valid signaling data is grouped according to the bin length bin_length, and each group generates weighted time-space signaling data with a weighted time of TIME and weighted longitude and latitude coordinates (LON1, LAT1); the spatial coordinates are grid-divided, and the grid side length is raster_length. The longitude and latitude coordinates (LON1, LAT1) in all weighted time-space signaling data are matched to the corresponding grid, and the grid label is (LONID, LATID); then the travel generation algorithm is processed to generate the user preprocessing intermediate process data table T2, and the signaling segment VISIT including the missing records is marked. The fields in T2 include <MSID,START_TIME,START_LONID,START_LATID,END_TIME,END_LONID,END_LATID,DURA,STOP,VISIT> , START_TIME is the time when the user leaves the grid (START_LONID, START_LATID), END_TIME is the time when the user enters the grid (END_LONID, END_LATID), (START_LONID, START_LATID) and (END_LONID, END_LATID) are both grid labels, DURA is the time difference between END_TIME and START_TIME, STOP=1 means that the grid labels before and after are the same, and the user is active in this grid, STOP=0 means that the grid labels before and after are different, and the user is active in this grid. If movement occurs, if DURA is greater than the missing interval threshold loss_interval, STOP = -1, indicating that there is a loss of signaling data during this period, VISIT is marked as loss, indicating that the user is not in the city within the time range of this message, if DURA is less than or equal to loss_interval, V1SIT is marked as a number, indicating that this message belongs to the user's V1SITth time in the city, bin_length is 10 minutes, raster_length is 500 meters, and loss_interval is 1800 minutes; the fields in T3 include<MSID,TYPE> TYPE takes the value of RESIDENT, VISITOR or UNKNOWN. Select VISITOR in T3, and then match T2 by MSID to obtain visitor signaling segment data table T4. The fields in T4 include<VISITOR_ID,START_TIME,END_TIME,VISIT> ;
[0112] S203: Calculate the start time STIME and end time ETIME of each signaling segment of the visitor according to the signaling segment mark VISIT in T4, and generate the visitor segment start and end time table T5. The fields in T5 include<VISITOR_ID,VISIT,STIME,ETIME> , STIME is the start time of each signaling segment, and ETIME is the end time of each signaling segment;
[0113] STIME=min(START_TIME)-bin_length / 2 (3)
[0114] ETIME=max(END_TIME)-bin_length / 2 (4)
[0115] S204: T1 matches the corresponding VISITOR_ID and VISIT fields in T5, adds STIME and ETIME after each record, and then filters the travel segments of visitors entering and leaving the city in each signaling segment in T1 according to the intra-city and inter-city travel time threshold travel_threshold and the direction mark formula. The travel_threshold value is 60 minutes, and the direction DIRECTION mark (enter or leave) is added to generate the visitor travel signaling data table T6. The fields in T6 include<VISITOR_ID,DATETIME,LAC,CI,LON,LAT,VISIT,STIME,ETIME,DIRECTION> , DIRECTION is the direction, and the direction marking formula is:
[0116]
[0117] S205: Merge the station base station data in the station base station feature layer {bs_station} and the railway base station data in the railway base station feature layer {bs_railway} into a new table, and add the base station location information GROUP. If it is a station base station, GROUP is the station name. If it is a railway base station, GROUP is railway. If no base station is matched, GROUP is none. Then group T6 according to each trip segment of each signaling segment of the visitor, match LAC and CI for each group of data, and generate the base station location information table T7. The fields in T7 include<MSID,DATETIME,LAC,CI,LON,LAT,VISIT,STIME,ETIME,DIRECTION,GROUP> .
[0118] In step S3, the specific operation of classifying the railway location information is as follows:
[0119] Add a segment category tag CLASS to each data record of T7. If the user's trip only matches the station base station, it is marked as stationonly, indicating that there is only station information. If the user's trip only matches the base station along the railway, it is marked as railonly, indicating that there is only railway information. If the user's trip matches both the station base station and the base station along the railway, it is marked as railstation, indicating that there is both station and railway information. If GROUP is none, CLASS is marked as none, and the visitor railway location information classification T8 is generated. The fields in T8 include<VISITOR_ID,DATETIME,LAC,CI,LON,LAT,VISIT,STIME,ETIME,DIRECTION,GROUP,CLASS> .
[0120] In step S4, the process of performing track recognition on data with only station information specifically includes the following steps:
[0121] S401: Select the data with CLASS of stationonly in T8, and generate a temporary table TEMP1 for visitor railway travel data. The fields in TEMP1 are consistent with those in T8.
[0122] S402: Select the data with DIRECTION in TEMP1, sort them in the order of visitor DATETIME, select the first data with GROUP not none, generate visitor entry station table R1, and modify the GROUP field name to STATION_ONLY1. The fields in R1 include<VISITOR_ID,VISIT,DIRECTION,STATION_ONLY1> ;
[0123] S403: Select the data with DIRECTION out in TEMP1, sort it in reverse order according to the visitor's DATETIME, select the first data with GROUP not none, generate the visitor leaving station table R2, modify the GROUP field name to STATION_ONLY2, and the fields in R2 include<VISITOR_ID,VISIT,DIRECTION,STATION_ONLY2> .
[0124] In step S4, the process of performing track identification on the data with only railway information and the data with both station railway information specifically includes the following steps:
[0125] S411: Matching railway line sections: Select the data with CLASS of railonly or railstation in T8, and generate the visitor railway travel section table T9 according to the railway base station feature layer {bs_railway} with the section label ZONE. The fields in T9 include <VISITOR_ID,DATETIME,LAC,CI,LON,LAT,VISIT,STIME,ETIME,DIRECTION,GROUP,CLASS,ZONE> , ZONE indicates the zone number of the base station along the railway. When ZONE is -1, it means that the base station is not along the railway.
[0126] S412: Estimated routes and stations: Generate a LIST of the section number sequences of the base stations along the railway whose ZONE is not -1 in different itinerary segments of the visitor according to T9, adjust the LIST order according to the visitor's intercity travel direction DRECTION by formula (6), obtain temp1, and then obtain the non-repeating sequence temp2 of the LIST according to formula (7), and then determine that the set of LIST elements is a subset of the section sequence of each route by formula (8), verify that the index of each element of temp2 in the route section sequence is monotonically increasing, and then record all the railway lines that meet the judgment conditions for the visitor's intercity travel and summarize them into the estimated route result LINE1, and generate all the stations corresponding to the railway lines that meet the judgment conditions according to formula (9), and summarize them into STATION1, and then generate the visitor's railway travel estimated station table T10, the fields in T10 include<VISITOR_ID,VISIT,DIRECTION,LINE1,STATION1,CLASS> , the formula for adjusting the LIST order is:
[0127]
[0128] Among them, Reverse(·) is a function that outputs a sequence in reverse order;
[0129] The formula for obtaining the non-repeating segment label sequence temp2 of temp1 is:
[0130] temp2=Fromkeys(temp1) (7)
[0131] Among them, Fromkeys(·) is a function that sequentially outputs a sequence of non-repeating elements of a sequence;
[0132] The formula for generating all railway lines that meet the judgment conditions is:
[0133]
[0134] Among them, Index(a, b) is a function that finds the index of element a in sequence b, {·} is a set of non-repeating elements in the sequence, |·| is the number of elements in the sequence or set, List i is the segment sequence of base stations along railway line i, temp2 p The pth element in the non-repeating segment number sequence after a user's trip segment is matched to a base station along the railway and the direction is adjusted, temp2 q The qth element in the non-repeating segment number sequence after matching a certain segment of the user's journey with a base station along the railway and adjusting the direction;
[0135] The formula for generating the stations corresponding to all railway lines that meet the judgment conditions is:
[0136] station=f2(line) (9)
[0137] Among them, station means station, including intermediate station and terminal station;
[0138] S413: Exclude the estimated routes and stations with outliers: Match the estimated route result LINE1 of T10 with T9, calculate the projection distance of the base station with ZONE of -1 in T9 to each estimated route, if the projection distance is greater than the outlier threshold outliers_threshold, the outliers_threshold value is 3 kilometers, then delete the estimated route, and then generate the visitor railway travel station table T11, the fields in T11 include<VISITOR_ID,VISIT、DIRECTION,LINE2,STATION2,CLASS> , where LINE2 and STATION2 are the estimated lines and stations after excluding abnormal points;
[0139] S414: Calculate speed: Match the estimated line result LINE2 of T11 with T9, select one of the estimated lines and record it as LINE3, obtain the mileage of the base station whose ZONE is not -1 according to the base station projection point with mileage coordinates in the projection point feature layer {bs_railway_project}, and then calculate the mileage difference DIST1, time difference DIFF1 and average speed SPEED1 between adjacent matching base stations, and generate the visitor railway travel speed table T12. The fields in T12 include <VISITOR_ID,VISIT,DIRECTION,TIME1,TIME2,LON1,LAT1,LON2,LAT2,P1,P2,DIST1,DIFF1,SPEED1,LINE3> , the formulas for calculating the mileage difference DIST1, time difference DIFF1 and average vehicle speed SPEED1 between adjacent matching base stations are:
[0140]
[0141] DIFF1=TIME2-TIME1 (11)
[0142]
[0143] Among them, TIME1 is the timestamp of the previous matching base station, TIME2 is the timestamp of the next matching base station, P1 is the mileage of the previous matching base station, P2 is the mileage of the next matching base station, DIST1 is the difference in mileage between adjacent matching base stations, DIFF1 is the difference in timestamps between adjacent matching base stations, SPEED1 is the speed between adjacent matching base stations, and LINE3 is the estimated route that provides mileage data;
[0144] S415: Generate characteristic index: Generate the data validity LABEL of each data record of the visitor's railway trip according to T12 and formula (13), and then calculate the number of characteristic index valid records NUM, the travel data validity STOP_INFO of all data records of the visitor's railway trip, the distance DIST2 (the difference between the maximum mileage and the minimum mileage), the time difference DIFF2 and the average speed SPEED2 according to the set {Label} composed of all LABELs and the correlation coefficient R(TIME,P) between time and mileage, and generate the visitor's railway trip characteristic table T13. The fields in T13 include<VISITOR_ID,VISIT,DIRECTION,NUM,STOP_INFO,DIST2,DIFF2,SPEED2> , the formula for generating the data validity LABEL for each data record of a visitor's railway trip is:
[0145]
[0146] Among them, LABEL indicates the data validity of each visitor data record. When the value is 0, it means invalid. When the value is 1, it means forward low-speed movement. When the value is 2, it means high-speed movement. When the value is 3, it means reverse movement. When the value is 4, it means staying within the station range. When the value is 5, it means staying outside the station range. diff1_threshold is the time interval threshold for valid data, which is set to 3 seconds. dist1_threshold is the distance threshold for judging whether a train is moving, which is set to 3 kilometers. speed1_threshold is the speed threshold for high-speed movement, which is set to 120 kilometers / hour. CalDist(LON,LAT,lon station ,lat station ) is the function for calculating the latitude and longitude distance between the base station and the station center, lon station ,lat stationand Range station are the longitude and latitude of the center of the station and the coverage radius of the station, LON is the longitude of the base station, LAT is the latitude of the base station, and stop_threshold is the time threshold for the train to stay at the station, which is set to 2 minutes;
[0147] The formula for calculating the trip data validity STOP_INFO is:
[0148]
[0149] Among them, STOP_INFO is the validity of the visitor's travel data for this railway trip. A value of -2 indicates invalidity. A value ranging from -1 to 1 indicates the correlation coefficient R between time and mileage. A value of 2 indicates high-speed movement, that is, railway travel. A value of 3 indicates that there are only two valid records and the mileage increases. A value of -3 indicates that there are only two valid records and the mileage decreases. A value of 4 indicates that the correlation coefficient R does not exist. {Label} is a set consisting of each row of LABEL in each itinerary segment of the visitor. |·| is the number of elements in the set. R(TIME,P) is a function that calculates the correlation coefficient of the two variables TIME and mileage P that meet the data validity time difference threshold. It indicates the correlation coefficient between time and mileage. The value range is [-1, 1]. R greater than 0 indicates the direction of entry, and R less than 0 indicates the direction of departure.
[0150] The formulas for calculating distance DIST2, time difference DIFF2 and average speed SPEED2 are:
[0151] DIST2=max(P)-min(P) (15)
[0152]
[0153]
[0154] Among them, DIST2 represents the distance, DIFF2 represents the time difference, max(·) represents the maximum value, min(·) represents the minimum value, TIME represents the time when the data valid time difference threshold is met, P represents the mileage, SPEED2 represents the average speed, TIME max(P) and TIME min(P) They are the time corresponding to the maximum mileage value and the time corresponding to the minimum mileage value respectively;
[0155] S416: Screening reasonable travel: Calculate the distribution of characteristic indicators according to T13, such as Figure 4As shown in Table 4, the lower limit of the distance TLL is set to 10 kilometers, the lower limit of the average speed SLL is set to 80 kilometers per hour, the lower limit of the travel data validity RLL is set to 0.95, and the lower limit of the number of valid records NLL is set to 5. Then, the identification rules for visitors' reasonable railway travel are defined, that is, if the travel is a long-distance high-speed travel, the time and mileage are in an obvious linear relationship, or there is instantaneous high-speed movement, it is considered to be a railway travel, as shown in Table 4:
[0156] Table 4 Visitor rail travel identification rules
[0157]
[0158] Filter T13 according to the identification rule, then match the VISITOR_ID, VISIT, and DIRECTION fields according to T11, and generate the visitor rail travel table T14. The fields in T14 include<VISITOR_ID,VISIT,DIRECTION,STATION2,CLASS> ;
[0159] S417: Output the identification result with only railway information: Select the record with CLASS of railonly in T14, change the name of STATION2 field to RAIL_ONLY, and output the visitor station table R3 with only railway information. The fields in R3 include<VISITOR_ID,VISIT,DIRECTION,RAIL_ONLY> ;
[0160] S418: Output the recognition results of the station and railway information: Select the records with CLASS of railstation in T14, match the VISITOR_ID, VISIT and DIRECTION fields of T14 and T9, if there is only one station in STATION2 and GROUP, the recognized station information is STATION2, otherwise take the intersection of STATION2 and GROUP values, and use RAIL_STATION to represent the final station result, and output the visitor station table R4 with both station and railway information. The fields in R4 include<VISITOR_ID,VISIT,DIRECTION,RAIL_STATION> ;
[0161] S419: Merge R1, R2, R3 and R4 to generate the final visitor railway station result table R5. The fields in R5 include<VISITOR_ID,VISIT,DIRECTION,RESULT> , RESULT is the final identified station information.
[0162] The visitor arrival and departure volumes of stations with different location information categories are summarized according to travel directions, as shown in Table 5:
[0163] Table 5 Visitor railway station recognition results
[0164]
[0165] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person familiar with the technical field can easily think of various equivalent modifications or substitutions within the technical scope disclosed by the present invention, and these modifications or substitutions 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 identifying railway travel trajectories within a city, characterized in that: The method comprises the following steps: S1. Preprocess the base station data, select base stations within the coverage of the station according to the map data, calculate the mileage coordinates of the base stations adjacent to the railway projected on the railway line, and then generate a line section combination; S2, pre-processing the mobile phone signaling data, dividing the user's trip segments in and out of the city according to the missing interval threshold and the intra-city and inter-city travel time threshold, and performing base station matching to obtain the matching base station location information; S3, classifying railway location information according to base station location information; S4, performing track recognition on data of different railway location information, and outputting station location information of the user's railway travel; In step S2, the process of preprocessing the mobile phone signaling data specifically includes the following steps: S201: Match the location area code LAC and cell identification CI fields in the mobile phone signaling data table with the base station location information table, filter out the non-repetitive and valid user time and location information, and generate the user valid signaling data table T1. The fields in T1 include<MSID,DATETIME,LAC,CI,LON,LAT> , where MSID is the user's unique identification number, DATETIME is the time in timestamp format, LON is the base station longitude, and LAT is the base station latitude; S202: Sort all valid user signaling data records in the valid user signaling data table T1 by DATETIME, add a signaling segmentation mark VISIT to the first data record and mark it as 1, calculate the time difference between the first data record and the next data record and record it as INTERVAL, if INTERVAL is less than the set missing interval threshold loss_interval, then the VISIT of the next data record is the same as the previous data record, indicating that this data record is the user's VISITth time in the city, if INTERVAL is not less than the missing interval threshold loss_interval, then the VISIT of the next data record is accumulated by 1 to the VISIT of the previous data record, so as to calculate the time difference INTERVAL between the previous and next data records until all data records are marked, and obtain the user signaling segmentation data table T2, the fields in T2 include<MSID,DATETIME,LAC,CI,LON,LAT,VISIT> ; S203: The same signaling segment in T2 is marked as VISIT as a signaling segment, the minimum time and maximum time in each signaling segment of the user are obtained, and the user segment time table T3 is generated. The fields in T3 include<MSID,VISIT,STIME,ETIME> , STIME is the start time of each signaling segment, i.e., the minimum time, and ETIME is the end time of each signaling segment, i.e., the maximum time; S204: T2 matches the corresponding MSID and VISIT fields in T3, adds STIME and ETIME after each record, and selects the travel segments of entering and leaving the city in each signaling segment of the user in T2 according to the set intra-city and inter-city travel time threshold travel_threshold and direction mark formula, and adds the direction DIRECTION mark, thereby generating the user travel signaling data table T4. The fields in T4 include<MSID,DATETIME,LAC,CI,LON,LAT,VISIT,STIME,ETIME,DIRECTION> , DIRECTION is the direction, and the direction marking formula is: Among them, DIRECTION=in means entering the city, and DIRECTION=out means leaving the city; S205: Merge the station base station data in the station base station feature layer {bs_station} and the railway base station data in the railway base station feature layer {bs_railway} into a new table, and add the base station location information GROUP. If it is a station base station, GROUP is the station name. If it is a railway base station, GROUP is railway. If no base station is matched, GROUP is none. Group T4 according to each trip segment of each signaling segment of the user, match the LAC and CI of each group of data to the base station, and generate the user base station location information table T5. The fields in T5 include<MSID,DATETIME,LAC,CI,LON,LAT,VISIT,STIME,ETIME,DIRECTION,GROUP> ; In step S3, the specific operation of classifying the railway location information is as follows: Add a segment category tag CLASS to each data record of T5. If the user's trip only matches the station base station, it is marked as stationonly, indicating that there is only station information. If the user's trip only matches the base station along the railway, it is marked as railonly, indicating that there is only railway information. If the user's trip matches both the station base station and the base station along the railway, it is marked as railstation, indicating that there is both station and railway information. If GROUP is none, the CLASS is marked as none, and the user railway location information classification T6 is generated. The fields in T6 include<MSID,DATETIME,LAC,CI,LON,LAT,VISIT,STIME,ETIME,DIRECTION,GROUP,CLASS> .
2. A method for identifying railway travel trajectories within a city according to claim 1, characterized in that: In step S1, the process of preprocessing the base station data specifically includes the following steps: S101, using the online map OpenStreetMap in ArcGIS software to generate a railway line feature layer {city_railway} in the city, where the direction of the railway line is the direction in which the train enters the city, so as to determine the direction in which the user enters and exits the city; S102, a buffer is set according to the railway line and a buffer surface feature layer is generated, the width of the buffer is set to buffer meters, the base station point feature layer {bs_city} obtained based on the base station data is intersected with the buffer surface feature layer to obtain the base station point feature layer {bs_railway1} along the railway line; S103, obtain the base stations covering the actual area where the city terminal is located, obtain the station base station point element layer {bs_station}, exclude the base stations near the terminal station on the railway line base station point element layer {bs_railway1}, obtain the railway line base station point element layer {bs_railway} excluding the terminal station base station, and obtain the longitude and latitude lon of the center position of the station covering each railway line in the city according to the map data station ,lat station With coverage radius Range station , the stations include intermediate stations and terminal stations, and the stop point feature layer {bs_stop} where the train may stop is obtained; S104, converting the railway line feature layer {city_railway} into feature points to generate a line feature layer {city_railway_points}, setting the mileage coordinates of the starting point of each railway line to 0, and accumulating the length of the broken line to obtain the mileage coordinates of the breakpoints on each railway line; S105, find the projection points bs_railway_i (i=1, 2, ..., N) of the railway base stations along the railway in the railway base station point element layer {bs_railway} on each railway line of the railway line route element layer {city_railway}, and merge these projection points to generate a projection point element layer {bs_railway_project}, by calculating the distance between the projection point and the starting point of the railway line polyline where the projection point is located, and adding the mileage coordinates of the starting point of the polyline obtained in step S104, and then obtaining the mileage coordinates of the base stations along the railway; S106, partition the base station feature layer {bs_railway} along the railway, add a section label ZONE to each section, convert the sections into nodes, simplify the railway lines into paths between nodes, and form a topological map of urban railway lines. According to the section sequence of the user's railway travel in and out of the city, the terminal station of the user's arrival and departure is inferred. There is a mapping relationship between the section sequence, the railway line and the terminal station, and the mapping relationship is expressed as: Line = f1(List) Station=f2(Line) Among them, Line is the railway line, List is the section sequence, Station is the terminal station, and f1 and f2 represent the mapping relationship respectively.
3. The method for identifying railway travel trajectories within a city according to claim 1, characterized in that: In step S4, the process of performing track identification on data with only station information specifically includes the following steps: S401: extract the data with CLASS of stationonly in T6, and generate a temporary table TEMP1 of user railway travel data. The fields of TEMP1 are consistent with those of T6. S402: Extract the data with DIRECTION in TEMP1, sort them in the order of DATETIME, select the first data with GROUP not none, generate the user entry station table R1, and modify the GROUP field name to STATION_ONLY1. The fields in R1 include<MSID,VISIT,DIRECTION,STATION_ONLY1> ; S403: Extract the data with direction DIRECTION out in TEMP1, sort them in reverse order of DATETIME, select the first data with GROUP not none, generate the user departure station table R2, and modify the GROUP field name to STATION_ONLY2. The fields in R2 include<MSID,VISIT,DIRECTION,STATION_ONLY2> .
4. A method for identifying railway travel trajectories within a city according to claim 3, characterized in that: In step S4, the process of performing track identification on the data having only railway information and the data having both station railway information specifically includes the following steps: S411: Matching railway line sections: Select the data with CLASS of railonly or railstation in T6, and generate the user railway travel section table T7 according to the railway base station feature layer {bs_railway} with the section label ZONE. The fields in T7 are<MSID,DATETIME,LAC,CI,LON,LAT,VISIT,STIME,ETIME,DIRECTION,GROUP,CLASS,ZONE> , ZONE indicates the zone number of the base station along the railway. When ZONE is -1, it means that the base station is not along the railway. S412: Estimated routes and stations: Generate a LIST of the section number sequences of the base stations along the railways whose ZONE is not -1 in different itinerary segments of the user according to T7, adjust the LIST order according to the direction DRECTION to obtain temp1, and then obtain a non-repeated section number sequence temp2 according to temp1, record all the railway routes that meet the judgment conditions of the itinerary segment as estimated route lines and summarize them into estimated route result LINE1, obtain the station station corresponding to each estimated route line and summarize them into STATION1, and then generate the user's railway travel estimated station table T8. The fields in T8 include<MSID,VISIT,DIRECTION,LINE1,STATION1,CLASS> : temp2=Fromkeys(temp1) station = f2(line) Among them, Reverse(·) is a function that outputs a sequence in reverse order, Fromkeys(·) is a function that outputs a sequence of non-repeating elements in sequence, and Index(temp2 p ,List i ) is to find the sequence List i temp2 p Function of element index, {·} is a set of non-repeating elements in the sequence, |·| is the number of elements in the sequence or set, List i is the segment sequence of base stations along railway line i, temp2 p The pth element in the non-repeating section number sequence after matching the base stations along the railway and adjusting the direction in a certain travel segment of the user, temp2 q The qth element in the non-repeating section number sequence after matching the base stations along the railway and adjusting the direction in a certain travel segment of the user; S413: Eliminate the estimated routes and stations with outliers: Match the estimated route result LINE1 of T8 with T7, calculate the projection distance of the base station with ZONE of -1 in T7 to each estimated route, and if the projection distance is greater than the set outlier threshold outliers_threshold, delete the estimated route, and then generate the user railway travel station table T9. The fields in T9 include<MSID,VISIT,DIRECTION,LINE2,STATION2,CLASS> , LINE2 and STATION2 are the estimated line results and stations after excluding abnormal points; S414: Calculate speed: Match the estimated route result LINE2 of T9 with T8, select one of the estimated routes and record it as LINE3, obtain the mileage of the base station whose ZONE is not -1 according to the base station projection point with mileage coordinates in the projection point feature layer {bs_railway_project}, and then calculate the mileage difference DIST1, time difference DIFF1 and average speed SPEED1 between adjacent matching base stations, and generate the user railway travel speed table T10. The fields in T10 include <MSID,VISIT,DIRECTION,TIME1,TIME2,LON1,LAT1,LON2,LAT2,P1,P2,DIST1,DIFF1,SPEED1,LINE3> , the formulas for calculating the mileage difference DIST1, time difference DIFF1 and average vehicle speed SPEED1 between adjacent matching base stations are: DIFF1=TIME2-TIME1 Among them, TIME1 is the timestamp of the previous matching base station, TIME2 is the timestamp of the next matching base station, P1 is the mileage of the previous matching base station, P2 is the mileage of the next matching base station, DIST1 is the difference in mileage between adjacent matching base stations, DIFF1 is the difference in timestamps between adjacent matching base stations, SPEED1 is the speed between adjacent matching base stations, and LINE3 is the estimated route that provides mileage data; S415: Generate characteristic indicators: The characteristic indicators include direction, distance, average speed, number of valid records and travel data validity. Generate the data validity LABEL of each data record of the user's railway travel based on T10, and then calculate the number of valid characteristic indicator records NUM, the travel data validity STOP_INFO of all data records of the user's railway travel, distance DIST2, time difference DIFF2 and average speed SPEED2 based on the set {Label} composed of all LABELs and the correlation coefficient R(TIME,P) between time and mileage, and generate the user's railway travel characteristic table T11. The fields in T11 include<MSID,VISIT,DIRECTION,NUM,STOP_INFO,DIST2,DIFF2,SPEED2> ; S416: Screening reasonable trips: According to the characteristic indicators obtained in T11, the data records of user railway trips are screened based on the set identification rules, and the MSID, VISIT and DIRECTION fields are matched according to T9 to generate the user railway trip table T12. The fields in T12 include<MSID,VISIT,DIRECTION,STATION2,CLASS> , the identification rules are as follows: Among them, TLL is the lower limit of the distance, SLL is the lower limit of the average speed, RLL is the lower limit of the validity of the travel data, and NLL is the lower limit of the number of valid records; S417: Output the recognition result with only railway information: Select the record with CLASS of railonly in T12, and change the name of STATION2 field to RAIL_ONLY, and output the user station table R3 with only railway information. The fields in R3 include<MSID,VISIT,DIRECTION,RAIL_ONLY> ; S418: Output the recognition results of the station and railway information: select the records with CLASS "railstation" in T12, match the MSID, VISIT and DIRECTION fields of T12 and T7, if there is only one identical station in STATION2 and GROUP, the recognized station information is STATION2, otherwise take the intersection of STATION2 and GROUP, and use RAIL_STATION to represent the final station result, and output the user station table R4 with station and railway information. The fields in R4 include<MSID,VISIT,DIRECTION,RAIL_STATION> ; S419: R1, R2, R3 and R4 are merged to generate the final user railway station result table R5. The fields in R5 include<MSID,VISIT,DIRECTION,RESULT> , RESULT is the final identified station information.
5. A method for identifying railway travel trajectories within a city according to claim 4, characterized in that: In step S415, the formula for calculating the data validity LABEL of each data record of the user is: Among them, LABEL indicates the data validity of each data record of the user. When the value is 0, it means invalid. When the value is 1, it means low-speed forward movement. When the value is 2, it means high-speed movement. When the value is 3, it means reverse movement. When the value is 4, it means staying within the station range. When the value is 5, it means staying outside the station range. diff1_threshold is the time interval threshold for valid data. dist1_threshold is the distance threshold for judging whether the train is moving. speed1_threshold is the speed threshold for high-speed movement. CalDist(LON,LAT,lon station ,lat station ) is the function for calculating the longitude and latitude distance between the base station and the station center, lon station ,lat station and Range station They are the center longitude of the station, the center latitude of the station and the coverage radius of the station, LON is the longitude of the base station, LAT is the latitude of the base station, and stop_threshold is the threshold time for the train to stay at the station; The formula for calculating the trip data validity STOP_INFO is: Among them, STOP_INFO is the validity of the user's travel data for this railway trip. A value of -2 indicates invalidity. A value ranging from -1 to 1 indicates the correlation coefficient R between time and mileage. A value of 2 indicates high-speed movement, that is, railway travel. A value of 3 indicates that there are only two valid records and the mileage increases. A value of -3 indicates that there are only two valid records and the mileage decreases. A value of 4 indicates that the correlation coefficient R does not exist. {Label} is a set consisting of each row of LABEL in each trip segment, |·| is the number of elements in the set, and R(TIME,P) is a function that calculates the correlation coefficient of the two variables TIME and mileage P that meet the data validity time difference threshold. It represents the correlation coefficient between time and mileage, and its value range is [-1, 1]. R greater than 0 indicates the direction of entry, and R less than 0 indicates the direction of departure.
6. A method for identifying railway travel trajectories within a city according to claim 5, characterized in that: In step S415, the formulas for calculating distance DIST2, time difference DIFF2 and average vehicle speed SPEED2 are: DIST2=max(P)-min(P) Among them, DIST2 represents the distance, DIFF2 represents the time difference, max(·) represents the maximum value, min(·) represents the minimum value, TIME represents the time when the data valid time difference threshold is met, P represents the mileage, SPEED2 represents the average speed, TIME max(P) and TIME min(P) They are the time corresponding to the maximum mileage value and the time corresponding to the minimum mileage value respectively.
7. A device for identifying railway travel trajectories within a city, characterized in that: The invention comprises a memory and a processor; the memory is used to store a computer program; the processor is used to implement the method according to any one of claims 1 to 6 when executing the computer program.
8. A storage medium having a program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.