Research Article

Knowledge Graph-Based Enhanced Transformer for Metro Individual Travel Destination Prediction

Algorithm 1

Knowledge extraction.
Step 1: get the frequency of travel. The frequency of travel of an individual (ID) is the total number of travel records of the ID within a specified time frame in the data set.
 Step 2: get the travel date. In the individual travel card swiping record, the travel time is expressed as “year/month/day: hour: minute.” We only take the date information and ignore the hour information.
 Step 3: get the date attribute. For the travel date obtained in Step 2, we check the calendar to determine whether it is a working day. The working day is marked as 1, and the nonworking day is marked as 0.
 Step 4: get the origin-destination (OD) records. The storage format of one complete travel record is “ID, boarding time, boarding route, boarding station, boarding time, alighting route, and alighting station.” Then, we extract the travel OD as “boarding line boarding station - alighting line alighting station.”
 Step 5: get to the subway station. As shown in Step 4, the subway station is expressed in the form of “line station.”