Subway travel identification method, device, equipment and medium based on mobile phone signaling
By constructing a base station-subway station reference system and data preprocessing, combined with subway operation information, accurate subway travel identification is achieved that does not rely on training data and third-party APIs, solving the identification misjudgment and dependency problems in the existing technology, and achieving Low-cost, high-precision large-scale subway travel identification.
Patent Information
- Application Number
- CN202211359517.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-02
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2042-11-02
AI Technical Summary
Existing technology relies on training data and third-party APIs in large-scale urban subway identification, and misjudges the journey identification of transportation transfers, making it difficult to achieve timely and accurate identification of large-scale urban residents' subway travel trajectories.
By constructing a base station-subway station reference system, we obtain mobile phone signaling data, perform data preprocessing and segmentation processing, match the subway travel time and operation time, and use spatial similarity verification to achieve independence from training data and third-party APIs. Accurate subway travel trajectory identification.
It achieves timely and accurate identification of large-scale urban residents' subway travel modes without relying on training data and third-party APIs. It is suitable for users' transfer traffic conditions, reduces identification costs and computational complexity, and improves identification efficiency and Accuracy.
Smart Images

Figure CN115714957B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent transportation technology, and in particular to a subway travel identification method, device, equipment and medium based on mobile phone signaling. Background Art
[0002] As the most important means of transportation in large-scale urban public transportation systems, subways play an important role in urban operations. Understanding the use of subways by urban residents is helpful for analyzing the daily flow of urban residents, and has important applications in urban planning, road resource allocation, public transportation system optimization, subway line schedule optimization, schedule optimization, commercial site selection, user profiling, etc.
[0003] Traditional surveys on residents' subway travel are mostly based on subway payment data or manual surveys, such as questionnaires and telephone interviews. With the development of mobile Internet and the popularity of mobile devices, technical methods based on mobile phone sensor data, GPS data, mobile phone signaling data and other data have gradually attracted the attention of academia and industry. Since mobile phone signaling data has the advantages of wide group coverage, strong real-time data and low collection cost, it is more suitable for comprehensive and large-scale deduction of urban residents' transportation methods. At present, methods based on mobile phone signaling data are mainly divided into two categories: methods based on machine learning and methods based on navigation data matching.
[0004] Among the methods for identifying mobile phone signaling data, machine learning-based methods often rely on a large amount of training data, which requires a lot of manpower and time to collect and label data; while technologies based on navigation data require the use of third-party APIs, such as Amap and Baidu, which are limited in large-scale subway identification in cities. In addition, most existing technologies need to first divide the user's trajectory into different journeys, and assume that each user trajectory obtained contains only one mode of transportation. However, for journeys with transfers between transportation tools, these methods are prone to misjudgment and mistakenly identify the use of multiple transportation tools as one. Summary of the invention
[0005] The present invention provides a subway travel identification method based on mobile phone signaling, which is aimed at the needs of large-scale urban residents' subway travel identification and can realize timely and accurate large-scale urban residents' subway travel trajectory identification without relying on training data and third-party API.
[0006] To achieve the above object, an embodiment of the present invention provides a subway travel identification method based on mobile phone signaling, comprising:
[0007] Constructing a base station-subway station reference system; the base station-subway station reference system is to select a base station that a user of the subway station can connect to as a reference base station based on calculating the distance between the subway station and all base stations;
[0008] Get mobile phone signaling data and record the user's time Connected to base station , and stipulates , according to the base stations connected by the user and sorted in time series, a first base station trajectory sequence is obtained; wherein the first base station trajectory sequence is expressed as: ;in Represents a user Base stations that are always connected, Indicates the latitude and longitude coordinates of the base station;
[0009] Performing data preprocessing on the first base station trajectory sequence to obtain a second base station trajectory sequence;
[0010] The second base station trajectory sequence is converted into a first subway station trajectory sequence by using the base station-subway station reference system, and the first subway station trajectory sequence is segmented to obtain a plurality of user subway station trajectory sequences;
[0011] Matching each of the user subway station trajectory sequences according to the subway travel time and the subway operation time, and eliminating unreasonable user subway station trajectory sequences;
[0012] Obtaining the subway travel trajectory of the user according to each of the remaining subway station trajectory sequences of the user;
[0013] The user's journey is spatially matched according to the second base station trajectory sequence corresponding to each section of the user's subway travel trajectory, and the user's subway travel trajectory corresponding to the successfully matched journey is retained.
[0014] The construction of the base station-subway station reference system specifically includes:
[0015] A base station-subway station reference system is constructed based on the k-nearest neighbor algorithm, the distance between the subway station and all base stations is calculated, and the k closest base stations are selected as reference base stations;
[0016] A base station-subway station reference system is constructed based on the coverage algorithm, the distance between the subway station and all base stations is calculated, and the base stations within a distance of d meters are selected as reference base stations;
[0017] The results of the two algorithms are combined to obtain the following base station-subway station reference system:
[0018] ,
[0019] in, represents the index function, represents a base station, express The corresponding subway station is yes The reference base station; if If it is not a reference base station for any subway station, then define is an empty set; if If the reference base station belongs to multiple subway stations at the same time, For distance The nearest metro station.
[0020] Further, performing data preprocessing on the first base station trajectory sequence to obtain a second base station trajectory sequence specifically includes:
[0021] Eliminate the data generated by the ping-pong effect. When the data in the first base station trajectory sequence exists , ,and When the above conditions are met, The data is removed; is the time threshold;
[0022] Eliminate erroneous data and calculate the user's moving speed. When the data in the first base station trajectory sequence exists and When the above conditions are met, The data was removed; among them, is the distance between two base stations, is the speed threshold;
[0023] After removing the ping-pong effect and erroneous data, the user base station trajectory sequence is merged. and ,if , then merge the data into ,in Indicates the start time, Indicates the end time; if , the data is converted into and After the above data preprocessing, the data in the second base station trajectory sequence is expressed as ,in For the base station, Indicates the start time, Indicates the end time.
[0024] The method of converting the second base station trajectory sequence into a first subway station trajectory sequence by using the base station-subway station reference system, and segmenting the first subway station trajectory sequence to obtain a plurality of user subway station trajectory sequences, specifically includes:
[0025] The second base station trajectory sequence is converted into:
[0026] ,
[0027] Converted to the first subway station sequence:
[0028] ,
[0029] Among them, if If is an empty set, Remove it from the first subway station sequence, and finally express the first subway station trajectory sequence as:
[0030] ,
[0031] in Indicates a subway station. Indicates the start time, Indicates the end time;
[0032] The first subway station trajectory sequence is segmented. If , is the time threshold, then it is considered The end of the previous journey. It is the starting point of a new journey; in addition, if , then it is believed that It is both the end point of the previous journey and the starting point of a new journey, and finally several user subway station trajectory sequences are obtained.
[0033] Furthermore, matching each section of the user subway station trajectory sequence according to the subway travel time and the subway operation time to eliminate unreasonable user subway station trajectory sequences specifically includes:
[0034] A user subway station trajectory sequence is defined as:
[0035] },
[0036] The subway travel time is used to verify each user subway station trajectory sequence, and the actual travel time is , arrive The expected journey time is , if satisfied , If it is the time threshold, the journey corresponding to this user subway station trajectory sequence is considered reasonable; otherwise, this user subway station trajectory sequence is eliminated;
[0037] Use the subway operation time to verify the reasonable user subway station trajectory sequence for each journey, and retain the satisfactory and The user subway station trajectory sequences that are all within the subway's operating hours are selected; otherwise, the user subway station trajectory sequences of this section are removed.
[0038] Furthermore, obtaining the subway travel trajectory of the user according to each of the remaining subway station trajectory sequences of the user specifically includes:
[0039] According to each of the remaining user subway station trajectory sequences, the user's subway travel trajectory is expressed as:
[0040] { , },
[0041] in, is the departure time of the user's subway travel trajectory, is the end time of the user's subway travel trajectory. A subway track that a user has passed through;
[0042] By comparing the users' subway travel trajectories and the actual subway lines arrive Whether the stations correspond one to one, if so, the subway travel trajectory of the user in this section is obtained; otherwise, the subway travel trajectory of the user in this section is supplemented according to the actual subway line to obtain the subway travel trajectory of the user in this section.
[0043] Further, performing spatial similarity matching on the user's journey according to the second base station trajectory sequence corresponding to each section of the user's subway travel trajectory, and retaining the user's subway travel trajectory corresponding to the successfully matched journey, specifically includes:
[0044] The subway line spatial similarity is used to verify the subway travel trajectory of each user, and the corresponding base station trajectory in the subway station trajectory sequence of the user is compared with arrive Subway Lines The distance from the base station to the subway line is defined as the shortest distance from the base station to the subway station of the line:
[0045] ,
[0046] in, is the distance measurement method, express It's a subway line A station on the subway; the similarity between the base station trajectory and the subway is defined as the average distance between all base stations and the line; if the similarity exceeds the threshold , then the subway travel trajectory of the user will be eliminated, otherwise, the subway travel trajectory of the user corresponding to the successfully matched journey will be retained.
[0047] Accordingly, an embodiment of the present invention further provides a subway travel identification device based on mobile phone signaling, comprising:
[0048] A reference system construction module is used to construct a base station-subway station reference system; the base station-subway station reference system is to select a base station that a user of the subway station can connect to as a reference base station based on the calculated distance between the subway station and all base stations;
[0049] The module for obtaining the first base station trajectory sequence is used to obtain the mobile phone signaling data and record the user's time Connected to base station , and stipulates , obtaining a first base station trajectory sequence according to the base stations connected by the user and sorted in time series;
[0050] A second base station trajectory sequence acquisition module is used to perform data preprocessing on the first base station trajectory sequence to obtain a second base station trajectory sequence;
[0051] A segmentation module, configured to convert the second base station trajectory sequence into a first subway station trajectory sequence by using the base station-subway station reference system, and to obtain a plurality of user subway station trajectory sequences after segmenting the first subway station trajectory sequence;
[0052] A matching module, used to match each section of the user subway station trajectory sequence according to the subway travel time and the subway operation time, and eliminate unreasonable user subway station trajectory sequences;
[0053] A module for obtaining subway travel trajectory is used to obtain the subway travel trajectory of the user according to each remaining segment of the user's subway station trajectory sequence; spatial similarity matching of the user's journey is performed according to the second base station trajectory sequence corresponding to each segment of the user's subway travel trajectory, and the subway travel trajectory of the user corresponding to the successfully matched journey is retained.
[0054] Correspondingly, an embodiment of the present invention also provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned subway travel identification method based on mobile phone signaling when executing the program.
[0055] Correspondingly, an embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the steps of the above-mentioned subway travel identification method based on mobile phone signaling are implemented.
[0056] Compared with the prior art, the present invention has the following beneficial effects:
[0057] Based on mobile phone signaling data, the present invention proposes an accurate identification method that integrates both time and space, and realizes timely and accurate large-scale identification of urban residents' subway travel modes without relying on any training data and third-party navigation data. Among them, mobile phone signaling data has the advantages of wide group coverage, strong real-time data, and low collection cost. It is more suitable for comprehensive and large-scale deduction of urban residents' transportation modes. The present invention is conducive to realizing low-cost, large-scale, high-precision subway travel identification and rapid and stable deployment of solutions; in addition, the present invention does not need to segment the user's trajectory in advance, does not rely on other assumptions, can be better applied to the situation of users transferring transportation, and can more completely identify the user's subway transportation chain. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] Figure 1 It is a flowchart of a method for identifying subway travel based on mobile phone signaling provided by an embodiment of the present invention;
[0059] Figure 2 It is a structural schematic diagram of a subway travel identification device based on mobile phone signaling provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0060] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0061] See also Figure 1 , is a flow chart of an embodiment of a subway travel identification method based on mobile phone signaling provided by the present invention, the method includes steps S101 to S107, which are as follows:
[0062] S101, constructing a base station-subway station reference system; the base station-subway station reference system is to select a base station that a user of the subway station can connect to as a reference base station based on calculating the distance between the subway station and all base stations;
[0063] Specifically, the construction of the base station-subway station reference system specifically includes:
[0064] A base station-subway station reference system is constructed based on the k-nearest neighbor algorithm, the distance between the subway station and all base stations is calculated, and the k closest base stations are selected as reference base stations;
[0065] A base station-subway station reference system is constructed based on the coverage algorithm, the distance between the subway station and all base stations is calculated, and the base stations within a distance of d meters are selected as reference base stations;
[0066] The results of the two algorithms are combined to obtain the following base station-subway station reference system:
[0067] ,
[0068] in, represents the index function, represents a base station, express The corresponding subway station is yes The reference base station; if If it is not a reference base station for any subway station, then define ;if If the reference base station belongs to multiple subway stations at the same time, For distance The nearest metro station.
[0069] In a specific embodiment, since the coverage of different base stations overlaps, the same subway station may be covered by the signals of multiple base stations, resulting in users at the same subway station being connected to different base stations at the same time. Therefore, for each subway station, we first select the base station that the user of the subway station is most likely to connect to as the reference base station of the subway station. When it is necessary to determine the distance between the user and the subway station, we first verify whether the base station connected to the user is a reference base station of a subway station; if not, we skip it directly.
[0070] S102, obtain mobile phone signaling data, record the user's time Connected to base station , and stipulates , obtaining a first base station trajectory sequence according to the base stations connected by the user and sorted in time series;
[0071] Wherein, the first base station trajectory sequence is expressed as:
[0072] ;
[0073] in Represents a user Base stations that are always connected, Indicates the latitude and longitude coordinates of the base station.
[0074] Mobile phone signaling data is generated when a mobile phone user makes a call, sends a text message, or moves around, and the operator's communication base station captures and records the signaling trajectory of the same user.
[0075] In the embodiment of the present invention, the base station trajectory sequence of the user is obtained by connecting the base station in the user's mobile phone signaling data. For example, when the user takes a bus from Guangzhou Railway Station to Taojin, the base station trajectory sequence of the user is expressed as: {((113.256512, 23.148339), 9:00:00), ((113.282933, 23.145765), 9:03:00), ((113.293138, 23.142699), 9:06:00)};
[0076] S103, performing data preprocessing on the first base station trajectory sequence to obtain a second base station trajectory sequence;
[0077] Specifically, performing data preprocessing on the first base station trajectory sequence to obtain the second base station trajectory sequence specifically includes:
[0078] Eliminate the data generated by the ping-pong effect. When the data in the first base station trajectory sequence exists , ,and When the above conditions are met The data is removed; is the time threshold;
[0079] Eliminate erroneous data and calculate the user's moving speed. When the data in the first base station trajectory sequence exists and When the above conditions are met, The data was removed; among them, is the distance between two base stations, is the speed threshold;
[0080] After removing the ping-pong effect and erroneous data, the user base station trajectory sequence is merged. and ,if , then merge the data into ,in Indicates the start time, Indicates the end time; if , the data is converted into and After the above data preprocessing, the data in the second base station trajectory sequence is expressed as ,in For the base station, Indicates the start time, Indicates the end time.
[0081] In a specific embodiment, the data of the first user base station trajectory is cleaned by removing data generated by the ping-pong effect and erroneous data.
[0082] S104, using the base station-subway station reference system to convert the second base station trajectory sequence into a first subway station trajectory sequence, and segmenting the first subway station trajectory sequence to obtain a plurality of user subway station trajectory sequences;
[0083] The method of converting the second base station trajectory sequence into a first subway station trajectory sequence by using the base station-subway station reference system, and segmenting the first subway station trajectory sequence to obtain a plurality of user subway station trajectory sequences, specifically includes:
[0084] The second base station trajectory sequence is converted into:
[0085] ,
[0086] Converted to the first subway station sequence:
[0087] ,
[0088] Among them, if If is an empty set, Remove it from the first subway station sequence, and finally express the first subway station trajectory sequence as:
[0089] ,
[0090] in Indicates a subway station. Indicates the start time, Indicates the end time;
[0091] The first subway station trajectory sequence is segmented. If , is the time threshold, then it is considered The end of the previous journey. It is the starting point of a new journey; in addition, if , then it is believed that It is both the end point of the previous journey and the starting point of a new journey, and finally several user subway station trajectory sequences are obtained.
[0092] In the embodiment of the present invention, the trajectory of the user connecting to the base station is converted into a subway station trajectory sequence according to the pre-constructed base station-subway station reference system. It should be noted that the time span of the subway station trajectory sequence may be very large, that is, the user may have multiple subway journeys.
[0093] In a specific embodiment, at 8:30 in the morning, the user takes the subway from home to the company, and at 6:00 in the evening, the user takes the subway from the company to home after work. In this case, there should be two journeys in the user's subway station trajectory sequence. Therefore, it is necessary to divide the subway station trajectory sequence into several user subway station trajectory sequences by time segmentation. Each user subway station trajectory sequence represents a complete subway journey of the user.
[0094] S105, matching each of the user subway station trajectory sequences according to the subway travel time and the subway operation time, and eliminating unreasonable user subway station trajectory sequences;
[0095] Specifically, matching each section of the user subway station trajectory sequence according to the subway travel time and the subway operation time, and eliminating unreasonable user subway station trajectory sequences, specifically includes:
[0096] A user subway station trajectory sequence is defined as:
[0097] },
[0098] The subway travel time is used to verify each user subway station trajectory sequence, and the actual travel time is , arrive The expected journey time is , if satisfied , If it is the time threshold, the journey corresponding to this user subway station trajectory sequence is considered reasonable; otherwise, this user subway station trajectory sequence is eliminated;
[0099] Use the subway operation time to verify the reasonable user subway station trajectory sequence for each journey, and retain the satisfactory and The user subway station trajectory sequence is within the subway operation time, otherwise the user subway station trajectory sequence is eliminated;
[0100] In a specific embodiment, all unreasonable data are screened out and verified through the travel time and operation time of the subway, and the user subway station sequence finally obtained is the actual starting time and actual line of the user's subway ride.
[0101] S106, obtaining the subway travel trajectory of the user according to each of the remaining subway station trajectory sequences of the user.
[0102] Specifically, obtaining the subway travel trajectory of the user according to each of the remaining subway station trajectory sequences of the user specifically includes:
[0103] According to each of the remaining user subway station trajectory sequences, the user's subway travel trajectory is expressed as:
[0104] { , },
[0105] in, is the departure time of the user's subway travel trajectory, is the end time of the user's subway travel trajectory. A subway track that a user has passed through;
[0106] By comparing the users' subway travel trajectories and the actual subway lines arrive Whether the stations correspond one to one, if so, the subway travel trajectory of the user in this section is obtained; otherwise, the subway travel trajectory of the user in this section is supplemented according to the actual subway line to obtain the subway travel trajectory of the user in this section.
[0107] In a specific embodiment, since the sampling interval of the base station data may be large, and may not be adjacent subway stations in the subway line; therefore, for the subway travel trajectory obtained through the above steps, for example, the user departs from Guangzhou Railway Station to Taojin, the subway trajectory in the user's subway trajectory sequence is: {Guangzhou Railway Station, Taojin}, it should be compared with the actual subway line stations from Guangzhou Railway Station to Taojin. According to the subway line, the station should be {Guangzhou Railway Station, Xiaobei, Taojin}, so it should be completed to obtain the correct subway travel trajectory of the user.
[0108] S107, performing spatial similarity matching on the user's journeys according to the second base station trajectory sequence corresponding to each section of the user's subway travel trajectory, and retaining the user's subway travel trajectory corresponding to the successfully matched journey.
[0109] Specifically, the spatial similarity of subway lines is used to verify the subway travel trajectory of each user, and the corresponding base station trajectory in the subway station trajectory sequence of the user is compared with arrive Subway Lines The distance from the base station to the subway line is defined as the shortest distance from the base station to the subway station of the line:
[0110] ,
[0111] in, is the distance measurement method, express It's a subway line A station on the subway; the similarity between the base station trajectory and the subway is defined as the average distance between all base stations and the line; if the similarity exceeds the threshold , then the subway travel trajectory of the user will be eliminated, otherwise, the subway travel trajectory of the user corresponding to the successfully matched journey will be retained.
[0112] Specifically, given the longitude and latitude coordinates of two locations A and B, The calculation of is as follows:
[0113] ,
[0114] Among them, (lat1, lon1) represents the longitude and latitude coordinates of A; (lat2, lon2) represents the longitude and latitude coordinates of B; a = lat1–lat2 represents the difference in latitude between two points, and b = lon1–lon2 represents the difference in longitude between two points; 6378.137 is the radius of the earth in kilometers.
[0115] In summary, the subway travel identification method based on mobile phone signaling provided by the embodiment of the present invention integrates time and space for accurate identification, and can realize timely and accurate large-scale identification of urban residents' subway travel modes without relying on any training data and third-party navigation data. Among them, mobile phone signaling data has the advantages of wide group coverage, strong real-time data, and low collection cost, and is more suitable for comprehensive and large-scale deduction of urban residents' transportation modes. The present invention is conducive to realizing low-cost, large-scale, high-precision subway travel identification and rapid and stable deployment of solutions; in addition, the present invention uses the base station-subway station reference system, which can help reduce a large number of unnecessary calculations and greatly improve the efficiency of the identification system; and there is no need to segment the user's trajectory in advance, and it does not rely on other assumptions. It can be better applied to the situation where the user transfers transportation, and can more completely identify the user's subway transportation chain.
[0116] See also Figure 2 , is a structural diagram of a subway travel identification device based on mobile phone signaling provided in an embodiment of the present invention.
[0117] The embodiment of the present invention provides a subway travel identification device based on mobile phone signaling, comprising:
[0118] A reference system construction module 1 is used to construct a base station-subway station reference system; the base station-subway station reference system is to select a base station that a user of the subway station can connect to as a reference base station based on the calculated distance between the subway station and all base stations;
[0119] Obtaining the first base station trajectory sequence module 2, used to obtain mobile phone signaling data, record the user at time Connected to base station , and stipulates , obtaining a first base station trajectory sequence according to the base stations connected by the user and sorted in time series;
[0120] A second base station trajectory sequence acquisition module 3 is used to perform data preprocessing on the first base station trajectory sequence to obtain a second base station trajectory sequence;
[0121] Segmentation module 4, used to convert the second base station trajectory sequence into a first subway station trajectory sequence by using the base station-subway station reference system, and to obtain a plurality of user subway station trajectory sequences after segmenting the first subway station trajectory sequence;
[0122] A matching module 5 is used to match each section of the user subway station trajectory sequence according to the subway travel time and the subway operation time, and eliminate unreasonable user subway station trajectory sequences;
[0123] The subway travel trajectory acquisition module 6 is used to obtain the subway travel trajectory of the user according to each of the remaining subway station trajectory sequences of the user; perform spatial similarity matching on the user's journey according to the second base station trajectory sequence corresponding to each of the subway travel trajectory of the user, and retain the user's subway travel trajectory corresponding to the successfully matched journey.
[0124] An embodiment of the present invention also provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned subway travel identification method based on mobile phone signaling when executing the program.
[0125] In addition, an embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps of the above-mentioned subway travel identification method based on mobile phone signaling are implemented.
[0126] Through the description of the above implementation methods, those skilled in the art can clearly understand that the present invention can be implemented by means of software plus a necessary hardware platform, and of course can also be implemented entirely by hardware. Based on such an understanding, all or part of the contribution of the technical solution of the present invention to the background technology can be embodied in the form of a software product, and the computer software product can be stored in a storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., including a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in the various embodiments of the present invention or certain parts of the embodiments.
[0127] 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 skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A method for identifying subway trips based on mobile phone signaling, characterized in that: include: Construct base station-subway station reference system; The base station-subway station reference system selects a base station to which users of the subway station can connect as a reference base station based on the calculated distances between the subway station and all base stations; Get mobile phone signaling data and record the user's time Connected to base station , and stipulates , according to the base stations connected by the user and sorted in time series, a first base station trajectory sequence is obtained; wherein the first base station trajectory sequence is expressed as: ;in Represents a user Base stations that are always connected, Indicates the latitude and longitude coordinates of the base station; Performing data preprocessing on the first base station trajectory sequence to obtain a second base station trajectory sequence; The second base station trajectory sequence is converted into a first subway station trajectory sequence by using the base station-subway station reference system, and the first subway station trajectory sequence is segmented to obtain a plurality of user subway station trajectory sequences; Matching each of the user subway station trajectory sequences according to the subway travel time and the subway operation time, and eliminating unreasonable user subway station trajectory sequences; Obtaining the subway travel trajectory of the user according to each of the remaining subway station trajectory sequences of the user; Performing spatial similarity matching on the user's journeys according to the second base station trajectory sequence corresponding to each section of the user's subway travel trajectory, and retaining the user's subway travel trajectory corresponding to the successfully matched journey; The performing data preprocessing on the first base station trajectory sequence to obtain the second base station trajectory sequence specifically includes: Eliminate the data generated by the ping-pong effect. When the data in the first base station trajectory sequence exists , ,and When the above conditions are met The data is removed; is the time threshold; Eliminate erroneous data and calculate the user's moving speed. When the data in the first base station trajectory sequence exists and When the above conditions are met The data was removed; among them, is the distance between two base stations, is the speed threshold; After removing the ping-pong effect and erroneous data, the user base station trajectory sequence is merged. and ,if , then merge the data into ,in Indicates the start time, Indicates the end time; if , the data is converted into and After the above data preprocessing, the data in the second base station trajectory sequence is expressed as ,in For the base station, Indicates the start time, Indicates the end time.
2. The method for identifying subway travel based on mobile phone signaling as claimed in claim 1, characterized in that: The construction of the base station-subway station reference system specifically includes: A base station-subway station reference system is constructed based on the k-nearest neighbor algorithm, the distance between the subway station and all base stations is calculated, and the k closest base stations are selected as reference base stations; A base station-subway station reference system is constructed based on the coverage algorithm, the distance between the subway station and all base stations is calculated, and the base stations within a distance of d meters are selected as reference base stations; The results of the two algorithms are combined to obtain the following base station-subway station reference system: , in, represents the index function, represents a base station, express The corresponding subway station is yes The reference base station; if If it is not a reference base station for any subway station, then define is an empty set; if If the reference base station belongs to multiple subway stations at the same time, For distance The nearest metro station.
3. The method for identifying subway trips based on mobile phone signaling according to claim 1, characterized in that: The method of converting the second base station trajectory sequence into a first subway station trajectory sequence by using the base station-subway station reference system, and segmenting the first subway station trajectory sequence to obtain a plurality of user subway station trajectory sequences specifically includes: The second base station trajectory sequence is converted into: , Converted to the first subway station sequence: , Among them, if If is an empty set, Remove it from the first subway station sequence, and finally express the first subway station trajectory sequence as: , in Indicates a subway station. Indicates the start time, Indicates the end time; The first subway station trajectory sequence is segmented. If , is the time threshold, then it is considered The end of the previous journey. It is the starting point of a new journey; in addition, if , then it is believed that It is both the end point of the previous journey and the starting point of a new journey, and finally several user subway station trajectory sequences are obtained.
4. The method for identifying subway trips based on mobile phone signaling according to claim 1, characterized in that: The matching of each user subway station trajectory sequence according to the subway travel time and the subway operation time to eliminate unreasonable user subway station trajectory sequences specifically includes: A user subway station trajectory sequence is defined as: }, The subway travel time is used to verify each user subway station trajectory sequence, and the actual travel time is , arrive The expected journey time is , if satisfied , If it is the time threshold, the journey corresponding to this user subway station trajectory sequence is considered reasonable; otherwise, this user subway station trajectory sequence is eliminated; Use the subway operation time to verify the reasonable user subway station trajectory sequence for each journey, and retain the satisfactory and The user subway station trajectory sequences that are all within the subway's operating hours are selected; otherwise, the user subway station trajectory sequences of this section are removed.
5. The method for identifying subway trips based on mobile phone signaling according to claim 1, characterized in that: The obtaining of the subway travel trajectory of the user according to each of the remaining subway station trajectory sequences of the user specifically includes: According to each of the remaining user subway station trajectory sequences, the user's subway travel trajectory is expressed as: { , }, in, is the departure time of the user's subway travel trajectory, is the end time of the user's subway travel trajectory. A subway track that a user has passed through; By comparing the users' subway travel trajectories and the actual subway lines arrive Whether the stations correspond one to one, if so, the subway travel trajectory of the user in this section is obtained; otherwise, the subway travel trajectory of the user in this section is supplemented according to the actual subway line to obtain the subway travel trajectory of the user in this section.
6. The method for identifying subway trips based on mobile phone signaling according to claim 1, characterized in that: The performing spatial similarity matching on the user's journey according to the second base station trajectory sequence corresponding to each section of the user's subway travel trajectory, and retaining the user's subway travel trajectory corresponding to the successfully matched journey specifically includes: The subway line spatial similarity is used to verify the subway travel trajectory of each user, and the corresponding base station trajectory in the subway station trajectory sequence of the user is compared with arrive Subway Lines The distance from the base station to the subway line is defined as the shortest distance from the base station to the subway station of the line: , in, is the distance measurement method, express It's a subway line A station on the subway; the similarity between the base station trajectory and the subway is defined as the average distance between all base stations and the line; if the similarity exceeds the threshold , then the subway travel trajectory of the user will be eliminated, otherwise, the subway travel trajectory of the user corresponding to the successfully matched journey will be retained.
7. A subway travel identification device based on mobile phone signaling, characterized in that: include: Build a reference system module, used to build a base station-subway station reference system; The base station-subway station reference system selects a base station to which users of the subway station can connect as a reference base station based on the calculated distances between the subway station and all base stations; The module for obtaining the first base station trajectory sequence is used to obtain the mobile phone signaling data and record the user's time Connected to base station , and stipulates , obtaining a first base station trajectory sequence according to the base stations connected by the user and sorted in time series; A second base station trajectory sequence acquisition module is used to perform data preprocessing on the first base station trajectory sequence to obtain a second base station trajectory sequence; A segmentation module, configured to convert the second base station trajectory sequence into a first subway station trajectory sequence by using the base station-subway station reference system, and to obtain a plurality of user subway station trajectory sequences after segmenting the first subway station trajectory sequence; A matching module, used to match each section of the user subway station trajectory sequence according to the subway travel time and the subway operation time, and eliminate unreasonable user subway station trajectory sequences; A module for obtaining subway travel trajectory is used to obtain the subway travel trajectory of the user according to each of the remaining subway station trajectory sequences of the user; spatial similarity matching is performed on the user's journey according to the second base station trajectory sequence corresponding to each of the subway travel trajectory of the user, and the subway travel trajectory of the user corresponding to the successfully matched journey is retained; The module for obtaining the second base station trajectory sequence is specifically used for: Eliminate the data generated by the ping-pong effect. When the data in the first base station trajectory sequence exists , ,and When the above conditions are met The data is removed; is the time threshold; Eliminate erroneous data and calculate the user's moving speed. When the data in the first base station trajectory sequence exists and When the above conditions are met The data was removed; among them, is the distance between two base stations, is the speed threshold; After removing the ping-pong effect and erroneous data, the user base station trajectory sequence is merged. and ,if , then merge the data into ,in Indicates the start time, Indicates the end time; if , the data is converted into and After the above data preprocessing, the data in the second base station trajectory sequence is expressed as ,in For the base station, Indicates the start time, Indicates the end time.
8. A terminal device, characterized in that: It comprises a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, and when the processor executes the computer program, it implements a subway travel identification method based on mobile phone signaling as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes 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 a subway travel identification method based on mobile phone signaling as described in any one of claims 1 to 6.
