User travel chain synthesis and labeling method based on NFC-SIM card

CN121723406BActive Publication Date: 2026-05-29深圳市名通科技股份有限公司
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
深圳市名通科技股份有限公司
Filing Date
2026-02-13
Publication Date
2026-05-29

Smart Images

  • Figure CN121723406B_ABST
    Figure CN121723406B_ABST
Patent Text Reader

Abstract

The application discloses a user travel chain synthesis and labeling method based on an NFC-SIM card, relates to the technical field of data processing, and comprises the following steps: in response to a selection operation on at least one target card swiping record in a labeling task set, determining candidate alignment points that are aligned in space and time with the target card swiping record from each track point of signaling track data corresponding to the target card swiping record; determining a travel OD section based on the candidate alignment points and the signaling track data; in response to a travel mode label carried by a travel mode labeling operation, associating a travel mode label with the travel OD section; in multiple travel OD sections of the same user, determining target OD sections that are continuous in space and time, synthesizing the target OD sections into a composite travel chain, and generating a combined label based on the travel mode labels of the target OD sections and associating the composite travel chain. The application improves the accuracy of user travel chain labeling.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology, and in particular to a method for synthesizing and annotating user travel chains based on NFC-SIM cards. Background Technology

[0002] With the deepening development of smart cities and transportation planning, high-precision individual travel chain data has become the core foundation for passenger flow analysis, network optimization, and intelligent travel services. Currently, travel behavior identification mainly relies on a single data source, which has significant drawbacks: on the one hand, pure signaling data analysis is limited by base station positioning accuracy and signal drift, making it difficult to accurately distinguish between transportation modes with similar speed characteristics, such as subways and buses, and unable to accurately locate pedestrian connection segments and actual origin and destination points; on the other hand, although NFC-SIM card swipe records have millisecond-level time accuracy, they only contain timestamps and lack geographic coordinate information, and there are complex time series patterns such as two swipes for entering and exiting stations, single swipes for buses, and mid-journey swipes, resulting in a systematic deviation between swipe time and actual boarding and alighting times. More importantly, existing methods mostly use fixed time windows (such as ±5 minutes) for simple matching, which cannot adapt to the spatiotemporal uncertainties of different urban areas and different transportation modes, making it difficult to accurately identify the segments of complex travel chains. Therefore, how to determine the actual origin and destination points and accurately label multimodal travel modes under complex swipe patterns has become the key to restricting the production of high-quality travel training data.

[0003] The above content is only used to help understand the technical solution of this application and does not represent an admission that the above content is prior art. Summary of the Invention

[0004] The main purpose of this application is to provide a method for synthesizing and annotating user travel chains based on NFC-SIM cards, aiming to solve the technical problem of how to improve the accuracy of annotating user composite travel chains.

[0005] To achieve the above objectives, this application proposes a method for synthesizing and labeling user travel chains based on NFC-SIM cards, the method comprising:

[0006] In response to the selection operation of at least one target card swipe record in the annotation task set, among each trajectory point of the signaling trajectory data corresponding to the target card swipe record, a candidate alignment point that is spatiotemporally aligned with the target card swipe record is determined, wherein the annotation task set includes multiple NFC-SIM card swipe records;

[0007] Based on the candidate alignment points and the signaling trajectory data, the travel origin-destination (OD) segment is determined;

[0008] In response to the travel mode label carried by the travel mode labeling operation, the travel OD segment is associated with the travel mode label;

[0009] Among the multiple travel origin segments of the same user, a spatiotemporally continuous target origin segment is identified, and the target origin segments are combined into a composite travel chain. A combined tag is generated based on the travel mode tag of each target origin segment and associated with the composite travel chain.

[0010] This application dynamically determines candidate alignment points that are spatiotemporally aligned with the card swipe records in response to the selection operation of target card swipe records in the labeled task set. This avoids the limitations of fixed time windows, enabling the system to adapt more flexibly to the time uncertainties of different modes of transportation and urban areas, and improving the accuracy of the association between card swipe behavior and signaling trajectory.

[0011] Based on candidate alignment points and signaling trajectory data, travel origin-destination (OD) segments are determined, and travel mode labels are associated in response to travel mode labeling operations. This allows the start and end points of OD segments to more accurately reflect real travel conditions and enables the labeling of multimodal travel modes. Compared to the difficulty in distinguishing between transportation modes with similar speed characteristics, such as subways and buses, by pure signaling data analysis, and the lack of geographic coordinates in card swipe data, this method effectively overcomes the limitations of a single data source by fusing the two types of data and introducing the flexibility of manual labeling.

[0012] Within multiple origin-destination (OD) segments of a single user's journey, spatiotemporally continuous target OD segments are identified and synthesized into composite travel chains. Combined tags are generated based on the travel mode labels of each target OD segment and associated with the composite travel chain. This mechanism solves the problem of accurately identifying segments in composite travel chains such as "walking-subway-walking" using existing technologies. By judging spatiotemporal continuity and intelligently synthesizing multiple OD segments, the complete user travel chain can be reconstructed, and combined tags can be provided. This provides high-quality and high-accuracy ground truth travel data for traffic planning, public management, and artificial intelligence model training, enhancing the commercial and public service value of data products. Attached Figure Description

[0013] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0014] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0015] Figure 1 This is a flowchart illustrating an embodiment of the user travel chain synthesis and annotation method based on NFC-SIM card provided in this application.

[0016] Figure 2 This is a flowchart illustrating Embodiment 2 of the user travel chain synthesis and annotation method based on NFC-SIM card provided in this application;

[0017] Figure 3 This is a flowchart illustrating Embodiment 3 of the method for synthesizing and annotating user travel chains based on NFC-SIM cards in this application;

[0018] Figure 4 This is a schematic diagram of the system architecture of a user travel chain synthesis and annotation method based on an NFC-SIM card provided in an embodiment of this application;

[0019] Figure 5 This is a simplified flowchart illustrating a user travel chain synthesis and annotation method based on an NFC-SIM card, as provided in an embodiment of this application.

[0020] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0021] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.

[0022] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.

[0023] With the deepening of smart city and new information infrastructure construction, refined perception of urban travel behavior has become a core data requirement in fields such as transportation planning, public management, and commercial operations. Travel chain analysis technology based on mobile communication big data can provide quantitative decision-making basis for urban bus route optimization, subway passenger flow prediction, traffic congestion management, and commercial site selection, highlighting the increasing commercial and public service value of its data products. Against this backdrop, the NFC-SIM card swiping data and mobile communication signaling data held by operators constitute a unique data resource advantage. As a smart card integrating near-field communication functionality, the NFC-SIM card can accurately record the timestamps of users in public transportation scenarios such as subways and buses; while mobile communication signaling data, through continuous interaction between user terminals and base stations, forms a trajectory chain with spatiotemporal continuity. These two types of data are naturally complementary in the spatiotemporal dimensions: card swiping data provides high-precision time anchors but lacks geographical coordinates, while signaling data provides spatial trajectories but suffers from base station positioning errors and time delays. How to effectively integrate these two heterogeneous data types has become a key technical path to achieve accurate identification of travel modes and complete travel chain reconstruction.

[0024] However, traditional methods often employ simple time matching or fixed time window rules. The former mechanically maps card-swiping time to the nearest signaling point, ignoring signaling acquisition delays, base station handover intervals, and pedestrian connection links; the latter sets fixed time intervals (e.g., ±5 minutes) before and after the card-swiping time to capture the trajectory, failing to adapt to the time uncertainties of different modes of transportation and different urban areas. These methods struggle to address the time deviation issues arising from complex time-series patterns such as card swiping mid-journey on buses and two card swipings at subway entrances and exits, and cannot accurately identify the precise segments of complex travel chains such as "walking-subway-walking," resulting in training data quality that fails to meet the accuracy requirements for training large models.

[0025] This application dynamically determines candidate alignment points that are spatiotemporally aligned with the card swipe records in response to the selection operation of target card swipe records in the labeled task set. This avoids the limitations of fixed time windows, enabling the system to adapt more flexibly to the time uncertainties of different modes of transportation and urban areas, and improving the accuracy of the association between card swipe behavior and signaling trajectory.

[0026] Based on candidate alignment points and signaling trajectory data, travel origin-destination (OD) segments are determined, and travel mode labels are associated in response to travel mode labeling operations. This allows the start and end points of OD segments to more accurately reflect real travel conditions and enables the labeling of multimodal travel modes. Compared to the difficulty in distinguishing between transportation modes with similar speed characteristics, such as subways and buses, by pure signaling data analysis, and the lack of geographic coordinates in card swipe data, this method effectively overcomes the limitations of a single data source by fusing the two types of data and introducing the flexibility of manual labeling.

[0027] Within multiple origin-destination (OD) segments of a single user's journey, spatiotemporally continuous target OD segments are identified and synthesized into composite travel chains. Combined tags are generated based on the travel mode labels of each target OD segment and associated with the composite travel chain. This mechanism solves the problem of accurately identifying segments in composite travel chains such as "walking-subway-walking" using existing technologies. By judging spatiotemporal continuity and intelligently synthesizing multiple OD segments, the complete user travel chain can be reconstructed, and combined tags can be provided. This provides high-quality and high-accuracy ground truth travel data for traffic planning, public management, and artificial intelligence model training, enhancing the commercial and public service value of data products.

[0028] It should be noted that the executing entity in this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, or mobile phone, or an electronic device capable of performing the above functions. The following description uses an electronic device as an example to illustrate this embodiment and the subsequent embodiments.

[0029] Based on this, embodiments of this application provide a method for synthesizing and annotating user travel chains based on NFC-SIM cards, referring to... Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the user travel chain synthesis and annotation method based on NFC-SIM card in this application.

[0030] In this embodiment, the method for synthesizing and labeling user travel chains based on NFC-SIM cards includes steps S10 to S40:

[0031] Step S10: In response to the selection operation of at least one target card swipe record in the annotation task set, among each trajectory point of the signaling trajectory data corresponding to the target card swipe record, a candidate alignment point that is spatiotemporally aligned with the target card swipe record is determined, wherein the annotation task set includes multiple NFC-SIM card swipe records.

[0032] An NFC-SIM card (Near Field Communication Subscriber Identity Module Card) is a smart card that integrates Near Field Communication (NFC) functionality. It is commonly used for mobile payments and public transportation card payments. Its transaction records provide timestamp information, which is highly accurate but typically does not include geolocation data. A transaction record refers to the data generated when an NFC-SIM card is used on public transportation (such as subways and buses). It includes information such as a timestamp and a transaction type identifier, which indicates the type of transaction, such as transportation type, access control type, or payment type. A tagging task set refers to a data set consisting of multiple NFC-SIM card transaction records selected for manual or semi-automatic travel chain tagging tasks.

[0033] Signaling trajectory data refers to the spatiotemporally continuous data generated by the interaction between user terminals and base stations in mobile communication networks. It records the user's geographical location information at different points in time and typically includes latitude and longitude, timestamps, etc. A trajectory point is a discrete data unit in the signaling trajectory data, representing the user's geographical location at a specific point in time.

[0034] Spatiotemporal alignment refers to the process of matching and associating data points from different data sources (such as card swipe records and signaling trajectory data) that have corresponding relationships in time and space. Candidate alignment points refer to trajectory points in signaling trajectory data that are temporally close to a specific card swipe record, serving as potential start or end points for further determining the origin-destination (OD) segment of a trip.

[0035] In response to the selection of at least one target card swipe record in the annotation task set, candidate alignment points that are spatiotemporally aligned with the target card swipe record are determined from among the trajectory points of the signaling trajectory data corresponding to the target card swipe record. The annotation task set consists of multiple NFC-SIM card swipe records. For example, a user can manually select one or more card swipe records as targets to be processed on the annotation interface. When determining candidate alignment points, one can simply search for the trajectory point closest to the timestamp in the signaling trajectory data as a candidate, or one can set a fixed time window, such as one minute before and after the card swipe time, and then select the trajectory point that is closest to the timestamp in time from all trajectory points within that window as a candidate alignment point.

[0036] Step S20: Based on the candidate alignment points and the signaling trajectory data, determine the travel OD segment;

[0037] A trip origin-destination (OD) segment refers to a trajectory between the origin and destination of a user's continuous trip, typically corresponding to a single mode of transportation or a single stage of travel. Based on the candidate alignment points and signaling trajectory data identified above, the trip OD segment is further determined. For example, after determining a candidate alignment point, the user can manually browse forward or backward in the signaling trajectory data based on experience and specify a trajectory point as the origin or destination of the trip OD segment. Alternatively, the system can preset a fixed time length, such as extending forward or backward five minutes from the candidate alignment point, and use the set of trajectory points within that time period as the initial trip OD segment.

[0038] Step S30: In response to the travel mode label carried by the travel mode labeling operation, associate the travel mode label with the travel OD segment;

[0039] Travel mode tags are classification labels for the modes of transportation (such as walking, subway, bus, driving, etc.) used in a travel origin-destination (OD) segment. In response to the travel mode tag carried by the travel mode labeling operation, travel mode tags are associated with the determined OD segments. Specifically, once a travel OD segment is determined, users can select a suitable tag from a preset list of travel modes (e.g., walking, subway, bus, driving, etc.) through an interactive interface and manually attach it to the travel OD segment. For example, if the user determines that the OD segment corresponds to subway travel, they will select the subway tag for association.

[0040] Step S40: Among the multiple travel OD segments of the same user, determine the spatiotemporally continuous target OD segments, and synthesize the target OD segments into a composite travel chain. Generate a combined tag based on the travel mode tag of each target OD segment and associate it with the composite travel chain.

[0041] Within multiple travel origin-destination (OD) segments of the same user, spatiotemporally continuous target OD segments are identified and synthesized into a composite travel chain. A composite travel chain refers to a complete travel process composed of multiple spatiotemporally continuous travel OD segments of the same user, reflecting situations where a user may switch between multiple modes of transportation during a single trip. Simultaneously, a combined tag is generated based on the travel mode tags of each target OD segment and associated with the composite travel chain. The combined tag is an overall tag generated by integrating the travel mode tags of each travel OD segment included in the composite travel chain, used to describe the travel mode composition of the entire composite travel chain.

[0042] For example, the system can simply arrange all the origin-destination (OD) segments of the same user's trips in chronological order, and then manually check whether there is temporal or spatial continuity between adjacent OD segments. If adjacent OD segments are closely connected in time and close in space, they can be considered to be spatiotemporally continuous. Once the spatiotemporally continuous target OD segments are determined, they will be logically connected to form a longer composite travel chain. Subsequently, the travel mode labels of each OD segment that constitutes the composite travel chain are simply spliced ​​or summarized to form a combined label describing the entire composite travel chain, such as walking-subway-walking.

[0043] The following example provides a more detailed explanation of the above technical solution: Suppose user A starts from location A on a certain morning, walks to subway station B, takes the subway to subway station C, and then walks to their final destination, location D. During this process, user A swipes their card to enter subway station B and swipes their card to exit subway station C. The system has already obtained user A's NFC-SIM card swipe records and corresponding signaling trajectory data. First, the system responds to the selection operation of user A's swipe records in the annotation task set. For example, the annotator selects user A's entry swipe record at subway station B and exit swipe record at subway station C on the interface. For the entry swipe record at subway station B, the system searches for the trajectory point in user A's signaling trajectory data that is closest to the timestamp of that swipe record and identifies it as the first candidate alignment point. Similarly, for the exit swipe record at subway station C, the system identifies the second candidate alignment point. These candidate alignment points are highlighted on the map interface, providing visual reference for subsequent operations. Next, based on these two candidate alignment points and user A's signaling trajectory data, the system determines the travel OD segment. Since multiple card swipe records are selected, the system uses the earliest card swipe record (entering station B) as the starting point of the first travel OD segment and the latest card swipe record (exiting station C) as the ending point. Thus, a preliminary subway travel OD segment is constructed, its trajectory containing user A's signaling trajectory from station B to station C. Subsequently, in response to the travel mode label carried by the travel mode labeling operation, the system associates the travel mode label with this preliminary travel OD segment. Labelers, based on experience, determine that this OD segment corresponds to subway travel, and therefore select the subway label through the interface and associate it with this OD segment. After completing the above operations, the system continues to process other travel OD segments for user A. For example, before swiping the card at station B, user A may have had a walking trajectory from location A to station B, which can be identified as a walking OD segment. Similarly, after swiping their card at subway station C, user A may have a walking trajectory from subway station C to location D, which can also be identified as a walking origin-destination (OD) segment. Finally, the system identifies spatiotemporally continuous target OD segments among multiple travel OD segments for the same user A and synthesizes these target OD segments into a composite travel chain. The system arranges all of user A's OD segments in chronological order: the first walking OD segment (location A to subway station B), the subway OD segment (subway station B to subway station C), and the second walking OD segment (subway station C to location D). The system checks the time interval and spatial distance between adjacent OD segments. If the end point of the first walking OD segment is sufficiently close to the start point of the subway OD segment in both time and space, they are considered spatiotemporally continuous. Similarly, if the end point of the subway OD segment is sufficiently close to the start point of the second walking OD segment in both time and space, they are also considered spatiotemporally continuous.Thus, these three spatiotemporally continuous destination (OD) segments are combined into a complete composite travel chain. Based on the travel mode labels (walking, subway, walking) of each of the three OD segments, the system generates a combined label walking-subway-walking and associates it with this composite travel chain. Through this method, user A's complete multimodal travel process from location A to location D is accurately identified, segmented, and labeled.

[0044] Based on the first embodiment of this application, in the second embodiment of this application, the content that is the same as or similar to that in the first embodiment described above can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 2 Step S10: The step of determining candidate alignment points that are spatiotemporally aligned with the target card swipe record among each trajectory point of the signaling trajectory data corresponding to the target card swipe record includes:

[0045] Step S101: Obtain the timestamp corresponding to the target card swipe record, and expand the time window according to a preset time range based on the timestamp of the target card swipe record.

[0046] When obtaining the timestamp corresponding to the target card swipe record, the timestamp field can be read directly from the NFC-SIM card transaction log or received from the backend system that processes the raw NFC-SIM card data. Using the timestamp as a benchmark, the time window is expanded according to a preset time range to define a search interval around the precise timestamp, addressing potential delays or discrepancies between the card swipe event and signaling data acquisition. This preset time range can be a fixed symmetrical window, such as ±30 seconds, ±60 seconds, or ±120 seconds set based on empirical analysis of typical signal delays; or it can be a dynamic window whose preset time range is adjusted based on factors such as public transportation type (e.g., subway delays may be shorter than bus delays), network congestion, or user activity patterns. For example, subways may use a shorter window (e.g., ±15 seconds), while buses may use a longer window (e.g., ±90 seconds).

[0047] Step S102: Determine whether there is a trajectory point within the time window;

[0048] Determining whether a trajectory point exists within the time window is to verify the availability of relevant signaling trajectory data within the defined search window before further processing, ensuring data validity. Specifically, this can be achieved by querying the trajectory database or data stream to check if the timestamps of any signaling trajectory points fall within the calculated time window; or by iterating through the user-preloaded signaling trajectory data to check if the timestamps of any points satisfy the time window condition.

[0049] Step S103: If it exists, extract the set of trajectory points within the time window from each trajectory point of the signaling trajectory data corresponding to the target card swipe record;

[0050] If trajectory points exist, the set of trajectory points within the time window is extracted. The purpose is to separate all signaling trajectory points that are temporally related to the card swipe event and filter out irrelevant noise data. This can be done by collecting all signaling trajectory points with timestamps greater than or equal to the window start time and less than or equal to the window end time; or by using a time series indexing mechanism to efficiently retrieve all points within a specified time window from the user's complete signaling trajectory data.

[0051] Step S104: Calculate the absolute value of the time difference between each trajectory point in the trajectory point set and the timestamp of the target card swipe record, determine the trajectory point with the smallest absolute value of the time difference in the trajectory point set as the candidate alignment point for spatiotemporal alignment with the target card swipe record, and highlight the candidate alignment point on the map interface;

[0052] The absolute time difference between each trajectory point in the trajectory point set and its timestamp is calculated to quantify the temporal proximity between each candidate signaling trajectory point and the precise timestamp. This can be achieved by subtracting the timestamps of each trajectory point in the set and taking the absolute value; or by utilizing a time difference function provided by a data processing library to ensure accurate calculations across different time units. The trajectory point with the smallest absolute time difference is identified as the candidate alignment point for spatiotemporal alignment with the target card swipe record. The aim is to select the signaling trajectory point that is most temporally aligned with the card swipe event, thereby minimizing the impact of time differences. After calculating all absolute time differences, the trajectory point with the smallest absolute difference can be identified. If multiple points have the same minimum difference, a tie-breaking rule can be applied, such as selecting an earlier point or a point with higher signal strength; or a sorting algorithm or a min-heap data structure can be used to efficiently find the trajectory point with the smallest absolute time difference. Candidate alignment points are highlighted on the map interface to provide visual feedback to users or operators for intuitive verification and possible manual correction of automatically determined candidate alignment points. Specifically, this can be achieved by using a Geographic Information System (GIS) library to render the map interface and drawing a unique marker (e.g., a flashing icon, a different color, or an enlarged symbol) at the geographic coordinates of the candidate alignment point; or by sending the coordinates of the candidate alignment point to a front-end map application, which then overlays a visual indicator on the map, possibly with additional information such as timestamps and trajectory point timestamps.

[0053] Understandably, if no trajectory point exists, the target card swipe record can be determined as an invalid record.

[0054] In this embodiment, a precise timestamp is obtained as a time reference, and the time window is dynamically expanded around this reference, thus flexibly adapting to the delay in signaling data collection and the time uncertainty of different modes of transportation. Within the defined time window, the system can intelligently filter all relevant signaling trajectory points and accurately identify the trajectory point that is closest in time to the card-swiping event as a candidate alignment point by calculating the absolute value of the time difference. This avoids the limitations of traditional fixed time window matching and can more accurately capture the correspondence between the card-swiping event and the actual signaling trajectory point. In addition, by highlighting the identified candidate alignment points on the map interface, intuitive visual assistance is provided for manual review and correction, further improving the accuracy and reliability of alignment. The refined alignment mechanism provides a more solid and accurate foundation for the subsequent determination of travel origin-destination segments, thereby significantly improving the overall accuracy and data quality of the entire travel chain synthesis and annotation method.

[0055] In one feasible embodiment, if a target card swipe record is selected for operation, step S20: determining the travel OD segment based on candidate alignment points and signaling trajectory data includes:

[0056] Step S201: Using the candidate alignment point as a reference point, respond to the step playback command, wherein the step playback command includes time step granularity and playback direction;

[0057] The selection operation refers to the user or system selecting multiple records from a series of NFC-SIM card swipe records to be labeled as objects for processing at once on the labeling task interface. Selection can be completed through multi-selection functions in the graphical user interface (GUI) (e.g., by clicking, dragging, or using checkboxes), or automatically identified and selected in batches by the system based on preset business rules (e.g., within a specific time window or belonging to the same travel event). The target swipe record refers to the NFC-SIM card swipe data selected from the labeling task set that requires travel OD segment determination. Each target swipe record typically includes a timestamp, swipe type identifier, and other relevant transaction information.

[0058] Using the candidate alignment point as a reference point, which serves as the starting point for subsequent trajectory traversal and annotation operations, ensures the accuracy of the operation. For example, the system can highlight the candidate alignment point on the map interface and use it as the center point for user interaction. Alternatively, the system can automatically load a segment of signaling trajectory data centered on this point for the user to conduct a preliminary review.

[0059] In response to a step-by-step playback command, this command allows the user to browse signaling trajectory data in a controlled manner, thereby accurately identifying the start and end points of the travel origin-destination (OD) segment. This step-by-step playback command can be issued by the user via buttons on the graphical user interface (GUI) (e.g., forward play, backward play), keyboard shortcuts (e.g., arrow keys), or voice commands.

[0060] The step playback command includes the time step granularity and playback direction. The time step granularity defines the time interval for each playback operation, either forward or backward. For example, the time step granularity can be preset to a fixed value such as 1 second, 5 seconds, 10 seconds, or 1 minute, or it can be customized by the user according to actual needs, such as by adjusting it through a slider or text box. The playback direction indicates the time order of the trajectory traversal, which can be forward (time ascending) or backward (time descending).

[0061] Step S202: If the playback direction is forward stepping, then starting from the reference point, traverse each trajectory point of the signaling trajectory data frame by frame according to the time sequence and the time stepping granularity until the endpoint confirmation instruction is received. Then, determine the trajectory point specified by the endpoint confirmation instruction of the travel OD segment as the endpoint of the travel OD segment, and use the timestamp of the trajectory point specified by the endpoint confirmation instruction of the travel OD segment as the end time of the travel OD segment.

[0062] If the playback direction is forward stepping, the system will traverse the signaling trajectory data frame by frame, starting from the reference point, according to the set time step granularity. Frame-by-frame traversal means that the system displays each trajectory point in the signaling trajectory data sequentially or in segments according to the time step granularity, so that the user can observe and judge. This process continues until the system receives an endpoint confirmation command. This endpoint confirmation command is an explicit signal sent by the user to the system when a suitable trajectory point is observed, used to designate the currently displayed trajectory point as the endpoint of the travel OD segment. Once the command is received, the system determines the trajectory point specified by the command as the endpoint of the travel OD segment and uses its timestamp as the end time of the travel OD segment.

[0063] Step S203: If the playback direction is backward stepping, then starting from the reference point, traverse each trajectory point of the signaling trajectory data frame by frame in reverse time order and according to the time stepping granularity, responding to the starting point marking operation in the backward stepping playback process, until a starting point confirmation instruction is received, the trajectory point specified by the starting point confirmation instruction is determined as the starting point of the travel OD segment, and the timestamp of the trajectory point specified by the starting point confirmation instruction is used as the start time of the travel OD segment.

[0064] If the playback direction is backward stepping, starting from the reference point, the system will traverse each trajectory point frame by frame in reverse chronological order and with the set time stepping granularity. During this backward stepping playback, the system responds to the user's start point marking operation. This start point marking operation is similar to the end point confirmation command; it is an explicit signal sent by the user to the system when a suitable trajectory point is observed. This process continues until the system receives the start point confirmation command. Once this command is received, the system determines the trajectory point specified by the command as the start point of the travel OD segment and uses its timestamp as the start time of the travel OD segment.

[0065] The following is a concrete example. Suppose a user swipes their card to enter a subway station at 8:30 AM. Based on this card swipe record and the user's signaling trajectory data, the system has identified a candidate alignment point for spatiotemporal alignment. This point is located inside the subway station, and the time is approximately 8:29:50 AM. The user wants to accurately mark the origin-destination (OD) segment of this subway trip. First, the system highlights this candidate alignment point on the map interface and uses it as a reference point. The user selects to step forward and sets the time step granularity to 5 seconds. Starting from the reference point, the system displays the next point of the signaling trajectory on the map every 5 seconds and updates the current time. The user observes the trajectory point gradually moving away from the subway station and along the subway line. When the trajectory point reaches a subway station exit near the destination, the user determines this to be the end point of the trip and clicks the "Confirm End Point" button. The system records the location and time of this trajectory point (e.g., 8:55:30 AM) as the end point and end time of the OD segment of the trip. Next, the user selects to step backward and sets the time step granularity to 10 seconds. Starting from a reference point, the system displays the previous point of the signaling trajectory on the map every 10 seconds. The user observes the trajectory point starting from home, walking to the subway station entrance, and clicking the "Confirm Start Point" button near the entrance. The system records the location and time of this trajectory point (e.g., 8:20:00) as the start and end points of the travel OD segment. Through interactive operation, users can accurately define the complete travel OD segment from home to the subway station entrance and then to the destination subway station exit, based on their actual geographical environment and travel experience.

[0066] This embodiment addresses the problem that traditional methods struggle to accurately determine the start and end points of a travel origin-destination (OD) segment when only one target card swipe record is specified. Specifically, this embodiment introduces an interactive, step-by-step playback mechanism, allowing users to flexibly traverse the signaling trajectory forward or backward based on actual trajectory data and their understanding of the travel scenario, precisely specifying the start and end points of the travel OD segment. This overcomes the limitations of traditional fixed-time-window matching and can adapt to complex time-series patterns such as mid-journey card swiping on public transport, double card swiping at subway stations, and walking connections, thus avoiding deviations in start and end points caused by signaling acquisition delays and base station handover intervals. Ultimately, this embodiment generates more accurate and high-quality travel OD segment data, providing a solid foundation for subsequent travel mode labeling and composite travel chain synthesis, significantly improving the accuracy and reliability of travel chain analysis.

[0067] In one feasible embodiment, if multiple target card swipe records are selected for the operation; step S20: determining the travel OD segment based on the candidate alignment points and the signaling trajectory data includes:

[0068] Step S204: Take the candidate alignment point corresponding to the earliest target card swipe record among the multiple target card swipe records as the starting point of the travel OD segment, and take the timestamp of the earliest target card swipe record as the start time of the travel OD segment.

[0069] Among the selected multiple target card swipe records, the earliest target card swipe record refers to the one with the earliest timestamp. It has a starting significance in the entire sequence of multiple card swipe events, usually corresponding to the beginning of a user's trip or a significant link in the trip chain.

[0070] Step S205: The candidate alignment point corresponding to the latest target card swipe record among the multiple target card swipe records is used as the endpoint of the travel OD segment, and the timestamp of the latest target card swipe record is used as the end time of the travel OD segment.

[0071] The latest target swipe record refers to the swipe record with the latest timestamp. It has a final meaning in the entire multi-swipe event sequence, usually corresponding to the end of a user's trip or a significant link in the trip chain. The candidate alignment point corresponding to the latest target swipe record among the multiple target swipe records is taken as the end point of the trip OD segment, and the timestamp of the latest target swipe record is taken as the end time of the trip OD segment.

[0072] Furthermore, if at least three of the multiple target card swipe records are card swipe records, the candidate alignment point corresponding to the intermediate card swipe record is used as the intermediate trajectory point of the travel OD segment. The intermediate card swipe record refers to all card swipe records other than the earliest and latest target card swipe records among the multiple target card swipe records. Intermediate card swipe records refer to all card swipe records other than the earliest and latest target card swipe records. These records represent possible transfers, intermediate card swipes, and other behaviors that may occur during a trip, providing additional spatiotemporal anchor points within the travel OD segment. In this embodiment, the candidate alignment point corresponding to the intermediate card swipe record is used as the intermediate trajectory point of the travel OD segment.

[0073] This embodiment efficiently solves the problem of determining the start, end, and intermediate trajectory points of a trip's origin-destination (OD) segment when a user selects multiple records by directly utilizing the temporal sequence characteristics of multiple target card swipe records. Specifically, the earliest candidate alignment point corresponding to the target card swipe record is used as the start point, and its timestamp is used as the start time, ensuring the spatiotemporal accuracy of the start point, as the earliest record naturally corresponds to the start time of the trip, eliminating the need for additional time window matching. The latest candidate alignment point corresponding to the target card swipe record is used as the end point, and its timestamp is used as the end time, similarly ensuring the accuracy of the end point and eliminating errors caused by fixed time ranges. The candidate alignment points corresponding to intermediate card swipe records are used as intermediate trajectory points, simplifying the trajectory point filling process. By automatically identifying intermediate points by excluding the first and last records, the amount of data processing is reduced while maintaining trajectory continuity. Thus, this embodiment can improve the automation and accuracy of trip OD segment determination, reduce the complexity of manual intervention, and effectively avoid spatiotemporal alignment errors that may be introduced in scenarios involving multiple card swipe records, thereby providing high-quality basic data for subsequent travel mode labeling and composite travel chain synthesis.

[0074] Based on the first and / or second embodiments of this application, in the third embodiment of this application, the content that is the same as or similar to the first and / or second embodiments described above can be referred to the above description and will not be repeated hereafter. Based on this, please refer to... Figure 3 Step S30: Following the step of associating the travel mode tag with the travel OD segment in response to the travel mode tagging operation, the following is also included:

[0075] Step S50: Perform spatiotemporal consistency verification on the travel OD segment, and / or perform geofencing verification on the travel OD segment;

[0076] Spatiotemporal consistency verification of travel origin-destination (OD) segments involves checking the spatial and temporal characteristics of identified OD segments to ensure logical consistency with their associated mode of transport (MO) labels. This helps identify discrepancies between OD segments and actual travel modes caused by data errors. One possible approach is to calculate the straight-line distance (OD distance) between the start and end points of the OD segment, calculate the cumulative distance of the corresponding signaling trajectory (signaling distance), and simultaneously calculate the average speed of the OD segment, which is the ratio of the OD distance to the duration from the start to the end time of the OD segment.

[0077] Spatiotemporal consistency is assessed by comparing the difference between signaling distance and origin-destination (OD) distance, and by determining whether the average speed is within the preset speed range of the corresponding travel mode label. For example, if the average speed of an OD segment marked as walking far exceeds the walking speed range, it is considered to be spatiotemporal inconsistent. Another approach is to analyze the continuity and smoothness of signaling trajectory points within the travel OD segment. For example, for an OD segment marked as subway, if its trajectory frequently pauses or deviates significantly in non-station areas, spatiotemporal inconsistency may exist.

[0078] Geofencing of origin-destination (OD) segments involves checking whether the geographic location information (such as the start, end, or intermediate trajectory points) of the OD segment matches a pre-defined geographic area or transportation route. This helps identify geographic location errors caused by inaccurate positioning. One possible approach is to use a geographic information database to verify whether the start and end points of the OD segment are within a pre-defined geofence of a specific transportation station. For example, for an OD segment marked as a bus stop, its start and end points should fall within the geofence of the bus stop. Another approach is to verify whether the trajectory points within the OD segment match pre-defined transportation routes (such as bus routes or subway lines). For example, a map matching algorithm can be used to determine whether the trajectory of an OD segment marked as a subway closely follows a known subway line.

[0079] In step S60, if the spatiotemporal consistency verification or geofence verification fails, the travel OD segment is corrected and updated in response to the correction operation.

[0080] When verification fails, the system provides a mechanism allowing users or automated programs to adjust and correct the attributes of the travel OD segment and generate a composite travel chain based on the updated travel OD segment. This embodiment ensures the accuracy and availability of the data. As one possible implementation, an interactive map interface can be provided, allowing users to intuitively drag the start or end point of the travel OD segment or adjust its timestamp to correct errors caused by positioning deviations or time delays. Another implementation is that the system can automatically recommend or prompt possible correction options based on the verification results. For example, when the average speed of a bus OD segment is too high, the system may prompt the user to correct it to a taxi or private car, and the update will be performed after user confirmation.

[0081] If the spatiotemporal consistency verification and the geofencing verification pass, then the following steps are performed: in multiple travel OD segments of the same user, determine the spatiotemporally continuous target OD segments, synthesize the target OD segments into a composite travel chain, generate a combined tag based on the travel mode tag of each target OD segment, and associate it with the composite travel chain.

[0082] This embodiment addresses the issue of inaccurate or inconsistent travel origin (OD) segment labels caused by errors in card swipe records and signaling data. By adding spatiotemporal consistency verification and / or geofencing verification steps after associating travel OD segments with travel mode tags, OD segments that do not match actual travel information can be promptly identified and processed. When verification fails, a correction operation is initiated, allowing for the correction and updating of the travel OD segment, thereby ensuring the reliability and consistency of each travel OD segment. This significantly improves the quality of travel OD segment data, providing more accurate and reliable foundational data for subsequent composite travel chain synthesis, and ultimately enhancing the overall accuracy of user travel chain synthesis and labeling.

[0083] In one feasible embodiment, step S50: the step of performing spatiotemporal consistency verification on the travel OD segment includes:

[0084] Step S501: Calculate the spatial straight-line distance between the start and end points of the OD segment and determine the spatial straight-line distance as the OD distance;

[0085] The spatial straight-line distance between the start and end points of a travel OD segment is calculated and defined as the OD distance. The OD distance is the Euclidean distance between the start and end points of the travel OD segment, representing the theoretical shortest path. Its function is to provide a benchmark value to measure the curvature or detour of the actual trajectory. The distance can be calculated using the formula for the distance between two points on the Earth's surface in a geographic coordinate system (such as the Haversine formula or the law of cosines of the sphere), or directly using the Pythagorean theorem in a planar projected coordinate system.

[0086] Step S502: Calculate the cumulative distance of the signaling trajectory corresponding to the travel OD segment, and determine the cumulative distance of the signaling trajectory as the signaling distance, wherein the cumulative distance of the signaling trajectory is the sum of the distances between each adjacent trajectory point in the travel OD segment;

[0087] The cumulative distance of the signaling trajectory corresponding to the origin-destination (OD) segment is calculated and defined as the signaling distance. The cumulative signaling distance is the sum of the distances between all adjacent trajectory points within the OD segment. The signaling distance refers to the sum of the distances between all consecutive signaling trajectory points within the OD segment, reflecting the actual path length of the user's movement. Its purpose is to provide a quantitative value of the actual path, which is compared with the OD distance to evaluate the path's rationality. This distance can be obtained by traversing all signaling trajectory points within the OD segment, calculating the distance between adjacent points sequentially, and then summing these distances; alternatively, it can be calculated using the timestamps and location information of the trajectory points through path integration or piecewise linear approximation.

[0088] Step S503: Calculate the absolute difference between the signaling distance and the OD distance, and calculate the ratio of the absolute difference to the OD distance as the difference ratio;

[0089] The absolute difference between the signaling distance and the OD distance is calculated, and the ratio of this absolute difference to the OD distance is used as the difference ratio. The difference ratio is the proportion of the absolute difference between the signaling distance and the OD distance relative to the OD distance, used to quantify the deviation between the actual path and the theoretical shortest path. Its purpose is to provide a normalized indicator, allowing for effective comparison of OD segments of different lengths. This difference ratio can be obtained by first calculating the absolute value of the signaling distance minus the OD distance, and then dividing that absolute value by the OD distance; alternatively, a small constant can be set as the denominator to avoid division by zero when the OD distance is zero, or other processing methods can be used when the OD distance is extremely small.

[0090] Step S504: Calculate the average speed of the OD segment of the trip. The average speed is the ratio of the OD distance to the OD segment duration.

[0091] The average speed of a trip's origin-destination (OD) segment is calculated as the ratio of the OD distance to the duration of that OD segment. It reflects the user's average movement efficiency within the entire OD segment. Its purpose is to provide a speed indicator to assess the rationality of the travel mode. This average speed can be obtained by obtaining the start and end timestamps of the OD segment, calculating the time difference as the duration, and then dividing the OD distance by the duration. Alternatively, a more complex algorithm could be used, such as excluding user dwell time when calculating the duration, to obtain a more accurate travel time.

[0092] Step S505: Determine whether the difference ratio is less than a preset ratio threshold, and / or determine whether the average speed is within the preset speed range corresponding to the travel mode label;

[0093] The core logic for spatiotemporal consistency verification in this embodiment involves determining whether the difference ratio is less than a preset ratio threshold and / or whether the average speed is within the preset speed range corresponding to the travel mode label. This is achieved by comparing the calculated difference ratio and average speed with preset thresholds and ranges to assess the rationality of the travel origin-destination (OD) segment data. Its function is to perform preliminary screening of travel OD segments based on quantitative indicators. The system can preset a ratio threshold (e.g., 0.5 or 1.0) and preset different speed ranges for different travel modes (e.g., walking, bus, subway) (e.g., walking 0-6 km / h, bus 5-40 km / h, subway 20-80 km / h). The calculated results are then compared with these preset values. The preset thresholds and speed ranges can be dynamically adjusted and optimized based on historical data or expert experience to adapt to the characteristics of different urban environments and traffic modes.

[0094] Step S506: If the difference ratio is greater than or equal to the preset ratio threshold or the average speed is not within the speed range, then the spatiotemporal consistency verification is determined to be unsuccessful.

[0095] If the difference ratio is greater than or equal to a preset threshold or the average speed is outside the speed range, the spatiotemporal consistency verification fails. When the difference ratio is too large (the actual path far exceeds the theoretical shortest path) or the average speed does not meet expectations (too fast or too slow), it indicates that the trip OD segment may have data anomalies or labeling errors. Its function is to identify trip OD segments that do not meet the spatiotemporal consistency conditions. Based on the logical judgment result, the system can mark the trip OD segment as failing verification and may trigger subsequent correction operations; or it can classify the failing trip OD segments into a specific abnormal dataset for manual review or further analysis.

[0096] Step S507: If the difference ratio is less than the preset threshold and the average speed is within the speed range, then the spatiotemporal consistency verification is confirmed to be successful.

[0097] If the difference ratio is less than a preset threshold and the average speed is within the speed range, the spatiotemporal consistency verification is considered successful. When the deviation between the actual path and the theoretical shortest path is within an acceptable range, and the average speed conforms to the travel mode characteristics it is labeled with, the travel OD segment data is considered reliable. Its function is to confirm the validity of the travel OD segment data. The system can mark the travel OD segment as verified and allow it to enter the subsequent travel chain synthesis and labeling process; or the verified travel OD segment can be directly used to construct the training sample library.

[0098] This embodiment provides a quantitative and adaptive method for verifying the spatiotemporal consistency of travel OD segments. This method calculates the OD distance, signaling distance, discrepancy ratio, and average speed of a travel OD segment, and combines this with a preset ratio threshold and the speed range corresponding to the travel mode for judgment. This enables accurate detection of path deviations and speed anomalies in travel OD segments. This effectively solves the problem of traditional verification methods lacking specific quantitative standards and adaptive judgment mechanisms, avoiding missed errors or triggering invalid correction operations due to inaccurate verification. Specifically, by introducing the OD distance as the theoretical shortest path benchmark and calculating the signaling distance as the actual path length, the curvature of the path can be accurately quantified. The introduction of the discrepancy ratio allows the verification process to adapt to travel OD segments of different lengths, avoiding the limitations of fixed thresholds. Simultaneously, combining the average speed judgment with the speed range corresponding to the travel mode label further improves the accuracy of verification, effectively identifying speed anomalies inconsistent with the travel mode. This refined spatiotemporal consistency verification mechanism significantly improves the quality and reliability of travel OD segment data, providing a solid foundation for subsequent travel chain synthesis and labeling. This embodiment ensures that the travel origin-destination (OD) segments associated with travel mode tags are rigorously verified, thus providing a key guarantee for building a high-quality, high-precision travel truth data sample library, and supporting the training needs of artificial intelligence models in the travel field.

[0099] In one feasible embodiment, step S50: the step of geofencing verification for the travel OD segment includes:

[0100] Step S508: Based on the geographic information database, verify whether the start and end points of the travel OD segment are within the preset geofence of the transportation station, and / or verify whether the trajectory points within the travel OD segment match the preset transportation route.

[0101] Based on a geographic information database, this refers to using a system that stores and manages geospatial data, including information such as urban transportation networks, station locations, and geofence boundaries. This database provides an authoritative and accurate geospatial data foundation for subsequent geofence verification. For example, this database could be a locally deployed Geographic Information System (GIS) pre-loaded with the precise geographic coordinates of all urban public transportation stations (such as bus stops and subway stations), preset service radii (as geofences), and vector path data for each route (such as bus lines and subway lines). Furthermore, real-time or updated geographic data can be obtained by calling the application programming interfaces (APIs) of external geographic information service platforms (such as geocoding services and route planning services provided by Amap or Baidu Maps) to ensure the accuracy and timeliness of verification.

[0102] The system verifies whether the start and end points of a travel OD segment are located within a preset geofence of a transportation station. A preset geofence is a predefined geographical boundary used to define the effective spatial range of a specific location (e.g., a transportation station). This verification step aims to ensure that the identified start and end points of the travel OD segment spatially match the actual transportation station, thereby eliminating invalid data caused by positioning errors or travel outside of transportation stations. For example, the system can pre-store the geographic coordinates of each transportation station (e.g., bus stops, subway stations) and their corresponding circular or polygonal geofences, and then determine this by calculating whether the coordinates of the start and end points of the travel OD segment fall within these preset geofences. Alternatively, it can query a geographic information database of predefined transportation hub areas to determine whether the start and end points of the travel OD segment are within these areas.

[0103] The system verifies whether trajectory points within the origin-destination (OD) segment match preset transportation routes. These preset routes refer to the established operating routes of public transportation (e.g., buses, subways). This verification step checks whether the sequence of intermediate trajectory points within the OD segment conforms to the path characteristics of a specific transportation mode, further confirming the rationality of the travel mode. Specifically, the system can acquire vector data of bus or subway lines and then use spatial analysis algorithms (e.g., point-to-line distance calculation, topological matching of trajectory point sequences with routes) to determine whether the trajectory points within the OD segment closely adhere to the preset routes. Alternatively, the system can perform map matching on the trajectory point sequences onto a preset transportation network and determine whether the matching degree reaches a preset threshold to confirm the degree of matching between the trajectory and the route.

[0104] Step S509: If the starting point of the travel OD segment is not within the preset geofence, the ending point is not within the preset geofence, or the trajectory point within the travel OD segment does not match the preset traffic route, then the geofence verification is determined to fail.

[0105] If the starting point or ending point of a travel OD segment is not within a preset geofence, or if the trajectory points within the travel OD segment do not match the preset traffic route, then the geofence verification is deemed unsuccessful. This embodiment clarifies the conditions for geofence verification failure to identify travel OD segments that do not conform to traffic travel characteristics. The system can be configured with a logic judgment module that outputs a verification failure result when any of the above conditions (i.e., the starting point is not within a preset geofence, the ending point is not within a preset geofence, or the trajectory points within the travel OD segment do not match the preset traffic route) are true. As another implementation, a confidence score can be set for each verification item. When the overall score is lower than a certain preset threshold, the verification is deemed unsuccessful.

[0106] Step S510: If the starting point of the travel OD segment is within the preset geofence range, the ending point is within the preset geofence range, and the trajectory points within the travel OD segment match the preset traffic route, then the geofence verification is confirmed to be successful.

[0107] If the starting point and ending point of a travel OD segment are both within a preset geofence, and the trajectory points within the travel OD segment match a preset traffic route, then the geofence verification is considered successful. This embodiment clarifies the conditions for successful geofence verification, used to confirm travel OD segments that meet the characteristics of travel. The system can be configured with a logic judgment module that outputs a successful verification result when all the above conditions (i.e., the starting point and ending point are both within a preset geofence, and the trajectory points within the travel OD segment match a preset traffic route) are simultaneously true. Alternatively, a confidence score can be set for each verification item; when the overall score exceeds a certain preset threshold, the verification is considered successful.

[0108] This embodiment addresses the problem in traditional solutions where the specific implementation of geofencing verification is unclear, potentially leading to inaccurate verification or an inability to effectively identify whether a travel origin-destination (OD) segment matches actual transportation stops and routes. Specifically, by using a geographic information database to perform transportation stop geofencing matching on the start and end points of the travel OD segment, and by performing pre-defined transportation route matching on trajectory points within the travel OD segment, this embodiment can rigorously verify the rationality of the travel OD segment from a spatial dimension. This dual verification mechanism effectively eliminates invalid OD segments caused by positioning errors, data noise, or non-traffic-related travel, significantly improving the geospatial accuracy and reliability of travel OD segments. Furthermore, this geofencing verification, combined with the step of performing spatiotemporal consistency verification on the travel OD segment, jointly constructs a comprehensive and robust quality control system for travel OD segments. Spatiotemporal consistency verification ensures the self-consistency of temporal and spatial logic within the OD segment, while geofencing verification ensures the accurate matching of the OD segment with the external real traffic environment. Multi-dimensional verification ensures that the generated travel origin-destination (OD) segments are not only logically sound but also geographically authentic and reliable. This provides higher-quality and more accurate foundational data for subsequent travel mode label association and composite travel chain synthesis. Ultimately, it helps to build a more accurate travel truth dataset, providing strong data support for urban traffic planning, public management, and the training of artificial intelligence models.

[0109] In one feasible embodiment, step S60: updating the travel OD segment in response to the correction operation includes:

[0110] Step S601: In response to the time editing operation, update the start and end times of the travel OD segment according to the time specified in the time editing operation;

[0111] This embodiment further provides various interactive and management functions. Specifically, in response to a time editing operation, this embodiment updates the start and end times of the travel OD segment according to the time specified in the time editing operation. The time editing operation allows users to manually adjust and correct the determined start or end times of the travel OD segment. This is crucial for correcting potential deviations in automatic matching, such as inaccurate start and end times caused by signaling data delays, base station switching, or incomplete synchronization between the user's actual behavior and the card swipe time. As one implementation, the system can display the determined travel OD segment and its start and end points on a graphical user interface (GUI). Users can precisely adjust the start or end time of the travel OD segment by dragging the start and end point markers, directly modifying the timestamp in the time input box, or using step buttons (such as moving forward 1 minute or backward 30 seconds). After receiving the user's editing operation, the system updates the start and end times of the travel OD segment in real time and recalculates the relevant attributes. Another approach is to provide command-line tools or programming interfaces (APIs) for batch processing or advanced users, allowing users to update the start and end times of travel OD segments in batches or programmatically by entering specific commands or calling functions and specifying a unique identifier for the travel OD segment as well as a new start timestamp and / or end timestamp.

[0112] Alternatively, in step S602, in response to the cancellation command, the travel OD segment is reset, and the process returns to the step of determining the candidate alignment point that is spatiotemporally aligned with the target card swipe record among the trajectory points of the signaling trajectory data corresponding to the target card swipe record, so as to update the travel OD segment.

[0113] Furthermore, this embodiment also responds to the cancellation command by resetting the travel OD segment and returning to the step of determining the candidate alignment point that is spatiotemporally aligned with the target card swipe record among the various trajectory points of the signaling trajectory data corresponding to the target card swipe record. This cancellation command provides a backtracking mechanism, allowing users to cancel the current determination operation of the travel OD segment and return to an earlier step for re-matching or correction, avoiding starting the entire annotation process from scratch. For example, a cancellation button can be set on the annotation interface. When the user clicks this button, the system clears the currently determined travel OD segment data and automatically jumps back to the step of determining the candidate alignment point that is spatiotemporally aligned with the target card swipe record, reloading the target card swipe record, and waiting for the user to select or confirm the candidate alignment point again. Alternatively, the system can maintain an operation history stack to record the key operations performed by the user during the determination of the travel OD segment. When a cancellation command is received, the system pops the most recent operation from the stack and restores the data state to the state before that operation, directly backtracking to the state before the candidate alignment point was determined.

[0114] Alternatively, in response to an invalidation marking instruction, the travel OD segment is marked as invalid data and stored in the invalid dataset. This embodiment responds to an invalidation marking instruction by marking travel OD segments as invalid data and storing them in the invalid dataset. This invalidation marking instruction allows users to explicitly mark travel OD segments identified as inaccurate, incomplete, or not meeting annotation requirements as invalid and store them in isolation. This helps improve the quality of the final dataset, ensuring that subsequent model training or analysis uses only high-quality valid data, while retaining invalid data for subsequent review or analysis. As one implementation, a "Mark as Invalid" button can be provided in the travel OD segment display or editing interface. After the user clicks it, the system updates the validity status field of the travel OD segment to invalid, logically removes it from the valid dataset, and adds its record to a dedicated invalid dataset table. Another implementation is that the system can provide batch selection and invalidation functionality. Users can select multiple travel OD segments and then perform batch invalidation operations. The system will iterate through all selected OD segments, update their status, and store them in the invalid dataset.

[0115] This embodiment enhances the flexibility, accuracy, and data quality management capabilities of the travel OD segment annotation process. Specifically, the introduction of time editing operations allows users to fine-tune the automatically determined start and end times of travel OD segments based on actual conditions, effectively solving the problem of start and end time deviations caused by signaling data delays, base station switching, or complex card-swiping patterns, thereby ensuring the accuracy of OD segment time information. The setting of the undo command provides users with an efficient error backtracking mechanism, avoiding the hassle of having to start the entire annotation process from scratch due to misoperation or poor initial matching, greatly improving annotation efficiency and user experience. In addition, the introduction of the invalid marking command allows users to actively identify and isolate low-quality or non-compliant travel OD segments, ensuring the purity and reliability of the final dataset, and providing high-quality ground truth data support for subsequent travel chain synthesis, model training, and data analysis. These improvements work together to make the travel OD segment determination process based on NFC-SIM cards and signaling data more intelligent and controllable, ultimately producing higher-quality travel chain data, effectively solving the technical problems of insufficient operational flexibility, low error handling efficiency, and difficulty in guaranteeing data quality in traditional methods.

[0116] Based on the first, second, and / or third embodiments of this application, in the fourth embodiment of this application, the content that is the same as or similar to the first, second, and / or third embodiments described above can be referred to the above description and will not be repeated hereafter. Based on this, step S40: the step of determining a spatiotemporally continuous target OD segment among multiple travel OD segments of the same user, includes:

[0117] Step S401: Determine the time sequence of multiple trip OD segments for the same user, and calculate the time interval and spatial distance between two adjacent trip OD segments;

[0118] By sorting multiple identified origin-destination (OD) segments for the same user in chronological order, the sequence of the user's trips can be clearly understood. This lays the foundation for calculating the time intervals and spatial distances between adjacent OD segments. For example, the start or end timestamp of each OD segment can be extracted and arranged in ascending or descending order of timestamps to ensure that subsequent processing involves OD segments that are temporally adjacent. Alternatively, an OD segment can be assigned a sequence number when it is generated, reflecting its order of occurrence during the user's trip, thus directly obtaining the chronological order.

[0119] This embodiment quantifies the spatiotemporal correlation between adjacent travel OD segments when calculating the time interval and spatial distance between them. The time interval reflects the length of time a user spends or transitions between two travel OD segments, while the spatial distance reflects the geographical proximity of the start and end points of the two OD segments. These two indicators are key criteria for determining whether OD segments constitute a continuous travel chain. For example, the time interval can be obtained by calculating the difference between the end timestamp of the previous OD segment and the start timestamp of the next OD segment.

[0120] Spatial distance can be obtained by calculating the geographic distance between the end point of the previous OD segment and the start point of the next OD segment. For example, methods such as Haversey distance or geodesic distance can be used to calculate the distance between two geographic coordinate points. Alternatively, the difference between the center time points of two OD segments can be considered as the time interval, or the actual travel distance calculated based on the road network can be used as the spatial distance.

[0121] Step S402: If the time interval is less than a preset time threshold and the spatial distance is less than a preset distance threshold, then two adjacent travel OD segments are determined to be spatiotemporally continuous target OD segments.

[0122] Preset time and distance thresholds are manually set standards that define the extent to which two travel origin-destination (OD) segments can be considered closely connected, thus avoiding errors from subjective judgment. For example, preset time thresholds can be set based on experience, such as 5 minutes, 10 minutes, or 15 minutes, which typically represent a reasonable time range for users to transfer or make short stops between different modes of transportation. Preset distance thresholds can be set to 100 meters, 200 meters, or 500 meters, which typically represent a reasonable spatial range for users to walk to transfer or engage in activities near the same location. These thresholds can also be dynamically adjusted according to specific application scenarios, transportation modes, or geographical areas.

[0123] When the time interval is less than a preset time threshold and the spatial distance is less than a preset distance threshold, two adjacent travel OD segments are determined to be spatiotemporally continuous target OD segments. The target OD segments will serve as the basic units for constructing composite travel chains. This can be achieved by assigning a common chain ID or session ID to these determined continuous OD segments, or by adding a continuity flag or intra-chain sequence number to each OD segment in the data model to indicate that each target OD segment belongs to the same composite travel chain.

[0124] This embodiment addresses the lack of objective standards in traditional methods for determining the continuity of origin-destination (OD) segments. By introducing preset time and distance thresholds as objective criteria, it avoids erroneous connections caused by subjective judgments or simple matching rules, thus significantly improving the accuracy of composite travel chain synthesis. Based on quantitative indicators for continuity judgment, the system can more accurately identify users' actual travel patterns of transferring or making short stops between different modes of transportation, ensuring the integrity and logical rationality of the synthesized travel chain. Ultimately, this helps generate high-quality, high-precision ground truth travel data, providing a reliable sample library for subsequent accurate travel mode identification and artificial intelligence model training.

[0125] In one feasible embodiment, step S10: in response to the selection operation of at least one target card swipe record in the annotation task set, before the step of determining the candidate alignment point that is spatiotemporally aligned with the target card swipe record among each trajectory point of the signaling trajectory data corresponding to the target card swipe record, the method further includes:

[0126] Step S01: Obtain NFC-SIM card swipe records and corresponding signaling trajectory data for different users; wherein, the swipe records include timestamps and swipe type identifiers;

[0127] Acquiring NFC-SIM card swipe records and corresponding signaling trajectory data from different users aims to collect raw data to provide a foundation for subsequent travel chain analysis. NFC-SIM card swipe records can include user identification, timestamps, and swipe type identifiers indicating the transaction type. Signaling trajectory data can be obtained from mobile operators' signaling data platforms, containing user identification, timestamps, and base station location information, which, after processing, can form the user's spatiotemporal trajectory. This data can be acquired either through real-time retrieval via an application programming interface (API) or through batch import from a data warehouse via periodic data synchronization tasks.

[0128] Step S02: From the NFC-SIM card swipe records, identify the swipe records with the swipe type identifier as travel type, and form basic data units based on the travel type swipe records and the corresponding signaling trajectory data;

[0129] The system identifies travel-related card swipes from NFC-SIM card transaction records and performs initial screening to ensure that subsequent data is highly relevant to travel behavior. The card swipe type identifier can be a predefined code; for example, public transportation swipes (such as subways and buses) might correspond to a specific identifier, while non-travel swipes like shopping and access control might correspond to other identifiers. The system can maintain a whitelist or blacklist of travel type identifiers. By comparing the type identifiers in the transaction records with the predefined list, travel-related swipe records can be identified and filtered out. Alternatively, machine learning models can be used to classify swipe types and filter out records identified as travel-related.

[0130] Based on travel type-based card swipe records and corresponding signaling trajectory data, basic data units are formed. Filtered travel card swipe records are effectively associated and integrated with the user's signaling trajectory data to construct a unified data structure. A basic data unit can be a composite data object containing a user identifier, timestamp, card swipe type, and a signaling trajectory fragment that is temporally close to that timestamp. Association can be performed using user identifiers and timestamps. For example, card swipe records of a specific user within a specific time period can be bound to the user's signaling trajectory data within the same time period, forming a logical data unit for easier subsequent unified processing.

[0131] Step S03: In response to the task creation instruction, a preset number of card swipe records are randomly selected from the basic data unit to generate a labeled task set.

[0132] Based on actual needs, a subset for manual or semi-automatic annotation is generated from a massive amount of basic data units. The task creation command can be issued by the system administrator through the management interface, specifying parameters such as the number of users to be annotated, the time range, or the number of card swipe records. Upon receiving the command, the system can use a pseudo-random number generator to randomly select a specified number of card swipe records and their associated signaling trajectory data from the basic data units, ensuring the representativeness and diversity of the annotation task set. This random sampling mechanism helps avoid data bias and controls the scale and efficiency of the annotation work.

[0133] Before generating the annotation task set, this embodiment preprocesses and filters the raw data to ensure that all card-swiping records in the annotation task set are of the travel type and are effectively correlated with signaling trajectory data. This avoids interference from non-travel type card-swiping records in the subsequent spatiotemporal alignment process, significantly improving the accuracy of candidate alignment point determination. Because the data quality of the annotation task set is improved, the accuracy of subsequent travel OD segment determination, travel mode annotation, and composite travel chain synthesis based on this data also increases. This effectively solves the problem in traditional methods where the inclusion of non-travel type card-swiping records in the annotation task set leads to inaccurate spatiotemporal alignment, thus affecting the accuracy of travel chain synthesis. Furthermore, by forming basic data units and randomly sampling to generate the annotation task set, data management and annotation efficiency are optimized, providing a solid foundation for building a high-quality, high-precision travel truth data sample library.

[0134] For example, to aid in understanding this embodiment in conjunction with the above embodiments, please refer to... Figure 4 The architecture shown is as follows:

[0135] The data storage layer is responsible for the persistent storage and caching of all data, including: MySQL, which stores core business data, including task, user, authorization metadata, annotation data, and final result sets; Redis, which serves as a cache and mainly stores hot data such as mapping relationships to improve access performance; HBase, which is used to store massive amounts of signaling trajectory data and annotation process data, suitable for high-concurrency queries; and HDFS, which is used for long-term archiving and storage of massive amounts of raw signaling data, final result sets, and raw annotation data files, providing highly reliable and large-capacity storage.

[0136] The support and operations layer provides public technical support and operational assurance capabilities to ensure system stability, observability, and configurability. This includes: a log collection system to collect interface and operation logs; a monitoring and alarm platform to track system performance and errors; a configuration center for dynamic configuration management; and a message queue for asynchronous task processing, decoupling system components.

[0137] The application service layer is the core business logic layer of the system, containing all services that implement specific business functions. Core business services include: annotation management service, responsible for the state machine transitions of annotation tasks, task allocation, and core annotation and review processes; trajectory analysis service, providing trajectory visualization, anomaly handling, and other analysis functions; user management service and authorization center service, implementing RBAC access control and DES encrypted approval processes; and supporting services including: file processing service, task scheduling service, and data push service, supporting data import / export, scheduled tasks, and data statistics push.

[0138] The gateway access layer and the external system integration layer together constitute the system's external boundary and entry point, ensuring secure, controllable, and efficient access. The gateway access layer includes: an API gateway, the core entry point responsible for routing, authentication, and traffic limiting; and an Nginx proxy, which implements load balancing and distributes requests to the backend service cluster. The external system integration layer includes: a 4A authentication platform providing unified identity authentication; and Single Sign-On (SSO), integrating 4A authentication for convenient login. Following an arrow relationship, external requests first reach the external system integration layer (4A / SSO) for authentication, then are routed and load-balanced through the gateway access layer (API gateway / Nginx), ultimately forwarding legitimate requests to the specific services in the application service layer.

[0139] The front-end interaction layer is the system's user interface layer, providing a visual operating interface for users with different roles. This includes: management interfaces (user management, authorization center, task management, tag management); analysis interfaces (data statistics push, trajectory analysis, geographic data visualization, state machine display); and access control, with RBAC (Restricted Access Control) permeating the front-end and determining the display of interface elements.

[0140] Based on the above architecture, please refer to Figure 5 , Figure 5 A simplified flowchart illustrating a method for synthesizing and annotating user travel chains based on NFC-SIM cards is provided, specifically:

[0141] Step 1: Data Preprocessing (i.e., acquiring NFC-SIM card swipe records and corresponding signaling trajectory data from different users; wherein, the NFC-SIM card swipe records include timestamps and swipe type identifiers; from the NFC-SIM card swipe records, determining the swipe records with the swipe type identifier as travel type, and forming basic data units based on the travel type swipe records and corresponding signaling trajectory data; in response to the task creation instruction, randomly selecting a preset number of swipe records from the basic data units to generate a labeled task set):

[0142] The system acquires the user's SIM card swipe records and signaling trajectory data for the day. The SIM card swipe records include the swipe time and swipe type. The signaling trajectory data includes the timestamp, longitude, latitude, and base station information of the trajectory points, arranged in chronological order.

[0143] Step 2: Preliminary alignment of card swipe records and trajectories (i.e., in response to the selection operation of at least one target card swipe record in the annotation task set, among the trajectory points of the signaling trajectory data corresponding to the target card swipe record, candidate alignment points that are spatiotemporally aligned with the target card swipe record are determined, wherein the annotation task set includes multiple NFC-SIM card swipe records):

[0144] For each card swipe record, find the trajectory point closest to the card swipe time in the signaling trajectory to determine the initial alignment position: within a 15-minute time window before and after the card swipe time, find the trajectory point closest to the card swipe time as the candidate alignment point; highlight the candidate alignment point on the map and mark it as the start or end point of the initial OD segment.

[0145] Step 3: OD Segment Synthesis (i.e., determining the travel OD segment based on the candidate alignment points and the signaling trajectory data): 3.1 For situations such as buses where only one card swipe is required, the actual boarding and alighting points are determined by combining the step playback, and the OD segment is synthesized; 3.2 For situations such as subways where two card swipes are required to enter and exit the station, the trajectory segment between the two card swipes is synthesized into a complete OD segment; Batch processing of multiple card swipe records: Supports selecting multiple card swipe records simultaneously for batch OD segment synthesis; The system automatically fills in the start and end times, and the annotator can manually correct them.

[0146] Specifically, section 3.1: Employing a step-by-step playback mechanism to precisely adjust the initial alignment result includes:

[0147] 3.1.1 Forward Stepping Mode: Set the time stepping granularity (e.g., 1 minute); start from the initial alignment point and play the trajectory points frame by frame in chronological order; observe the geographical distribution characteristics of the trajectory points (e.g., whether they reach subway stations, bus stops, destinations, etc.) to determine the actual endpoint location; record the timestamp of the trajectory point corresponding to the endpoint as the end time of the OD segment (that is, if the playback direction is forward stepping, then starting from the reference point, traverse each trajectory point of the signaling trajectory data frame by frame in chronological order and according to the time stepping granularity until the endpoint confirmation instruction is received, determine the trajectory point specified by the endpoint confirmation instruction of the travel OD segment as the endpoint of the travel OD segment, and use the timestamp of the trajectory point specified by the endpoint confirmation instruction of the travel OD segment as the end time of the travel OD segment).

[0148] 3.1.2 Backward Stepping Mode (used to determine the starting point of the OD segment): When the initial alignment point (which is of different types) is inaccurate, the backward stepping mode is selected; starting from the initial alignment point, the trajectory points are played frame by frame in reverse time order; the geographical distribution characteristics of the trajectory points are observed to determine the true starting point position; the timestamp of the trajectory point corresponding to the starting point is recorded as the start time of the OD segment (that is, if the playback direction is backward stepping, then starting from the reference point, the trajectory points of the signaling trajectory data are traversed frame by frame in reverse time order and according to the time stepping granularity, responding to the starting point marking operation in the backward stepping playback process, until the starting point confirmation instruction is received, the trajectory point specified by the starting point confirmation instruction is determined as the starting point of the travel OD segment, and the timestamp of the trajectory point specified by the starting point confirmation instruction is used as the start time of the travel OD segment).

[0149] Step 4: OD segment synthesis and labeling (i.e., in response to the travel mode labeling operation, associate the travel mode label with the travel OD segment): Combine the trajectory characteristics (speed, distance, path) of the OD segment, card swiping type (subway entry / exit, bus card swiping) and traffic station information on the map to label each OD segment with a travel mode label (such as subway travel, bus travel, subway + walking and other composite travel modes).

[0150] Step 5: OD segment verification and correction (i.e., performing spatiotemporal consistency verification on the travel OD segment, and / or performing geofencing verification on the travel OD segment; if the spatiotemporal consistency verification fails or the geofencing verification fails, in response to the correction operation, the travel OD segment is updated, and a composite travel chain is generated based on the updated travel OD segment):

[0151] 5.1 Spatiotemporal Consistency Verification: Calculate the spatial distance between the start and end points of the OD segment (OD distance); calculate the cumulative distance of the signaling trajectories (signaling distance); calculate the OD speed (OD distance / time difference) and the signaling speed (signaling distance / time difference); when the difference between the signaling distance and the OD distance exceeds a threshold (e.g., 15%), or the speed characteristics do not match the labeled travel mode, it is marked as abnormal and needs to be corrected (i.e., calculate the spatial straight-line distance between the start and end points of the travel OD segment and determine the spatial straight-line distance as the OD distance; calculate the cumulative distance of the signaling trajectories corresponding to the travel OD segment and determine the cumulative distance of the signaling trajectories as the signaling distance, wherein the cumulative distance of the signaling trajectories is the distance between each adjacent trajectory in the travel OD segment). The calculation includes: summing the distances between points; calculating the absolute difference between the signaling distance and the OD distance, and calculating the ratio of the absolute difference to the OD distance as the difference ratio; calculating the average speed of the travel OD segment, where the average speed is the ratio of the OD distance to the duration corresponding to the travel OD segment; determining whether the difference ratio is less than a preset ratio threshold, and / or determining whether the average speed is within a preset speed range corresponding to the travel mode tag; if the difference ratio is greater than or equal to the preset ratio threshold or the average speed is not within the speed range, then the spatiotemporal consistency verification fails; if the difference ratio is less than the preset ratio threshold and the average speed is within the speed range, then the spatiotemporal consistency verification passes.

[0152] 5.2 Geofencing Verification: Internal network maps, changes to bus stops, verification and correction, subjective judgment, and mutual corroboration; combining map data to verify whether the start and end points of the OD segment are located near the corresponding transportation stations (e.g., subway stations, bus stops); verifying whether the trajectory of the OD segment follows the corresponding transportation routes (e.g., subway lines, bus lines) (i.e., based on the geographic information database, verifying whether the start and end points of the travel OD segment are within the preset geofence range of the transportation stations, and / or verifying whether the trajectory points within the travel OD segment match the preset transportation routes; if the start point of the travel OD segment is not within the preset geofence range, the end point of the travel OD segment is not within the preset geofence range, or the trajectory points within the travel OD segment do not match the preset transportation routes, then the geofencing verification fails; if the start point of the travel OD segment is within the preset geofence range, the end point of the travel OD segment is within the preset geofence range, and the trajectory points within the travel OD segment match the preset transportation routes, then the geofencing verification passes).

[0153] 5.3 Correction Mechanism: Supports direct editing of the start and end times of the OD segment for correction; supports undoing the synthesized OD segment and re-aligning and synthesizing; for card swipe records that cannot be effectively aligned, they are marked as invalid data (that is, in response to the time editing operation, the start and end times of the travel OD segment are updated according to the time specified by the time editing operation; or, in response to the undo command, the travel OD segment is reset, and the step of determining the candidate alignment point that is spatiotemporally aligned with the target card swipe record among the various trajectory points of the signaling trajectory data corresponding to the target card swipe record is returned to be executed, so as to update the travel OD segment).

[0154] Step 6: Composite Trip Chain Labeling (i.e., among multiple trip OD segments of the same user, determine the spatiotemporally continuous target OD segments, synthesize the target OD segments into a composite trip chain, generate a combined label based on the travel mode label of each target OD segment, and associate it with the composite trip chain):

[0155] 6.1 Multimodal travel chain identification: Identify multiple consecutive origin-destination (OD) segments for a user on the same day and analyze the spatiotemporal relationship between the OD segments; for adjacent OD segments with short time intervals and close spatial distances, determine whether they are different stages of the same travel purpose (e.g., walking to the subway station → taking the subway → walking to the destination), and mark them as composite travel chains.

[0156] 6.2 Hierarchical labeling: Label the main travel modes (e.g., subway, bus, walking) for each OD segment; label combined tags (e.g., subway + walking, bus + walking) for complex travel chains.

[0157] Step 7: Result Storage and Output:

[0158] The labeled OD segment data is stored in the database, including: user identifier (anonymized UID); start and end time of the OD segment; latitude and longitude coordinates of the start and end points; labeled travel mode tags; key indicators (OD distance, signaling distance, OD speed, signaling speed, etc.); and the labeling results can be pushed to the HDFS cluster and stored in a regular manner according to tag type and date for subsequent model training and algorithm analysis.

[0159] The present invention will now be described in detail with reference to specific embodiments. In this embodiment, a user uses an NFC SIM card to ride the subway, entering from station A and exiting from station B. The card swipe record includes the entry and exit times, and the complete subway travel OD segment needs to be marked. Specific steps include:

[0160] 1. Data Acquisition: Acquire two card swipe records of the user on the same day: Record 1: Entry time 08:30:00, Station A; Record 2: Exit time 08:50:00, Station B; Acquire signaling trajectory data of the user from 08:00:00 to 09:00:00 on the same day, including approximately 60 trajectory points.

[0161] 2. Preliminary Alignment: For the entry card swipe record (08:30:00), search the signaling trajectory for the trajectory point closest to 08:30:00 within the time window [08:15:00, 08:45:00]. The trajectory point P1 (longitude 116.XXX, latitude 39.XXX) with timestamp 08:29:45 is found. This point is approximately 200 meters from Metro Station A, which is as expected. For the exit card swipe record (08:50:00), search the signaling trajectory for the trajectory point closest to 08:50:00 within the time window [08:35:00, 09:05:00]. The trajectory point P2 (longitude 116.YYY, latitude 39.YYY) with timestamp 08:49:52 is found. This point is approximately 150 meters from Metro Station B, which is as expected.

[0162] 3. Precise Positioning with Step-by-Step Playback: Select the two card swipe records for entry and exit, click the OD button, and the system will automatically generate an initial OD segment (start time 08:29:45, end time 08:49:52); select the forward step-by-step mode, set the step granularity to 1 minute, and start playing the trajectory from point P1. By observation, determine that the actual start time should be 08:31:00 (the time the user enters the subway platform) and the end time should be 08:51:00 (the time the user leaves the subway platform); manually correct the start and end times of the OD segment to: start time 08:31:00, end time 08:51:00.

[0163] 4. Spatiotemporal Verification: Calculate OD distance: The straight-line distance between subway station A and station B is 12.5km; Calculate signaling distance: The cumulative distance of the trajectory from the starting point to the ending point is 13.2km; Calculate OD speed: 12.5km / (20 / 60)h=37.5km / h; Calculate signaling speed: 13.2km / (20 / 60)h=39.6km / h; The difference between the signaling distance and the OD distance is (13.2-12.5) / 12.5=5.6%, which is less than the 15% threshold. The speed is consistent with the characteristics of subway (40-60km / h), and the verification is passed.

[0164] 5. Mark travel mode: Based on card swipe type (entering / exiting the subway), trajectory characteristics (along the subway route, speed of approximately 40km / h), and geographical verification (origin and destination are located near the subway station), mark the travel mode as subway travel.

[0165] 6. Result Storage: Store the labeled results, including: user UID, start time 08:31:00, end time 08:51:00, origin coordinates, destination coordinates, mode of transportation (subway), OD distance 12.5km, signaling distance 13.2km, etc.

[0166] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the user travel chain synthesis and annotation method based on NFC-SIM card in this application. Any simple modifications based on this technical concept are within the protection scope of this application.

[0167] This application also provides a user travel chain synthesis and annotation device based on an NFC-SIM card. This device, employing the NFC-SIM card-based user travel chain synthesis and annotation method described in the above embodiments, solves the technical problem of improving the accuracy of annotating user composite travel chains. Compared with the prior art, the beneficial effects of the NFC-SIM card-based user travel chain synthesis and annotation device provided in this application are the same as those of the NFC-SIM card-based user travel chain synthesis and annotation method described in the above embodiments. Furthermore, other technical features in the NFC-SIM card-based user travel chain synthesis and annotation device are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.

[0168] This application provides an electronic device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to execute the NFC-SIM card-based user travel chain synthesis and annotation method described in Embodiment 1 above.

[0169] The following is for reference. Figure 5 The diagram illustrates a structural schematic of an electronic device suitable for implementing embodiments of this application. The electronic devices in these embodiments may include, but are not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Description), and fixed terminals such as digital desktop computers. Figure 5 The electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.

[0170] like Figure 5 As shown, the electronic device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory 1002 or a program loaded from a storage device 1003 into a random access memory 1004. The random access memory 1004 also stores various programs and data required for the operation of the electronic device. The processing unit 1001, the read-only memory 1002, and the random access memory 1004 are interconnected via a bus 1005. An input / output interface 1006 is also connected to the bus. Typically, the following systems can be connected to the input / output interface 1006: input devices 1007 including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 1008 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 1003 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1009. The communication device 1009 allows the electronic device to communicate wirelessly or wiredly with other devices to exchange data. Although the diagrams show electronic devices with various systems, it should be understood that it is not required to implement or have all of the systems shown. More or fewer systems may be implemented alternatively.

[0171] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from read-only memory 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.

[0172] The electronic device provided in this application employs the NFC-SIM card-based user travel chain synthesis and annotation method described in the above embodiments, which solves the technical problem of how to improve the accuracy of annotating user composite travel chains. Compared with the prior art, the beneficial effects of the electronic device provided in this application are the same as those of the NFC-SIM card-based user travel chain synthesis and annotation method provided in the above embodiments, and other technical features of this electronic device are the same as those disclosed in the previous embodiment method, and will not be repeated here.

[0173] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.

[0174] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0175] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, which are used to execute the user travel chain synthesis and annotation method based on NFC-SIM card in the above embodiments.

[0176] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.

[0177] The aforementioned computer-readable storage medium may be included in an electronic device or may exist independently without being assembled into an electronic device.

[0178] The aforementioned computer-readable storage medium carries one or more programs, which, when executed by an electronic device, enable the electronic device to implement the NFC-SIM card-based user travel chain synthesis and annotation method in the various embodiments described above.

[0179] Computer program code for performing the operations of this application can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0180] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0181] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.

[0182] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-described method for synthesizing and annotating user travel chains based on NFC-SIM cards. This method can solve the technical problem of how to improve the accuracy of annotating user composite travel chains. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the NFC-SIM card-based user travel chain synthesis and annotation method provided in the above embodiments, and will not be repeated here.

[0183] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the above-described method for synthesizing and labeling user travel chains based on NFC-SIM cards.

[0184] The computer program product provided in this application solves the technical problem of how to improve the accuracy of annotating user composite travel chains. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as those of the user travel chain synthesis and annotation method based on NFC-SIM card provided in the above embodiments, and will not be repeated here.

[0185] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.

Claims

1. A method for synthesizing and labeling user travel chains based on NFC-SIM cards, characterized in that, The method includes: In response to the selection operation of at least one target card swipe record in the annotation task set, among each trajectory point of the signaling trajectory data corresponding to the target card swipe record, a candidate alignment point that is spatiotemporally aligned with the target card swipe record is determined, wherein the annotation task set includes multiple NFC-SIM card swipe records; Based on the candidate alignment points and the signaling trajectory data, the travel origin-destination (OD) segment is determined; In response to the travel mode label carried by the travel mode labeling operation, the travel OD segment is associated with the travel mode label; In multiple travel origin segments of the same user, a spatiotemporally continuous target origin segment is identified, and the target origin segments are combined into a composite travel chain. A combined tag is generated based on the travel mode tag of each target origin segment and associated with the composite travel chain. Wherein, if the selection operation specifies a target card swipe record; the step of determining the travel OD segment based on the candidate alignment point and the signaling trajectory data includes: Using the candidate alignment point as a reference point, the system responds to a step playback command, wherein the step playback command includes time step granularity and playback direction. If the playback direction is forward stepping, then starting from the reference point, the signaling trajectory data is traversed frame by frame in ascending time order and according to the time stepping granularity until the endpoint confirmation instruction is received. The trajectory point specified by the endpoint confirmation instruction of the travel OD segment is determined as the endpoint of the travel OD segment, and the timestamp of the trajectory point specified by the endpoint confirmation instruction of the travel OD segment is used as the end time of the travel OD segment. If the playback direction is backward stepping, then starting from the reference point, the signaling trajectory data is traversed frame by frame in reverse time order and according to the time stepping granularity. In response to the starting point marking operation during the backward stepping playback process, until a starting point confirmation instruction is received, the trajectory point specified by the starting point confirmation instruction is determined as the starting point of the travel OD segment, and the timestamp of the trajectory point specified by the starting point confirmation instruction is used as the start time of the travel OD segment.

2. The method as described in claim 1, characterized in that, The step of determining candidate alignment points that are spatiotemporally aligned with the target card swipe record from each trajectory point of the signaling trajectory data corresponding to the target card swipe record includes: Obtain the timestamp corresponding to the target card swipe record, and expand the time window according to a preset time range based on the timestamp of the target card swipe record. Determine whether a trajectory point exists within the time window; If it exists, then extract the set of trajectory points within the time window from each trajectory point of the signaling trajectory data corresponding to the target card swipe record; Calculate the absolute value of the time difference between each trajectory point in the trajectory point set and the timestamp of the target card swipe record, determine the trajectory point with the smallest absolute value of the time difference in the trajectory point set as the candidate alignment point for spatiotemporal alignment with the target card swipe record, and highlight the candidate alignment point on the map interface.

3. The method as described in claim 1, characterized in that, If the selection operation specifies multiple target card swipe records; the step of determining the travel OD segment based on the candidate alignment point and the signaling trajectory data includes: The candidate alignment point corresponding to the earliest target card swipe record among the multiple target card swipe records is used as the starting point of the travel OD segment, and the timestamp of the earliest target card swipe record is used as the start time of the travel OD segment. The candidate alignment point corresponding to the latest target card swipe record among the multiple target card swipe records is taken as the endpoint of the travel OD segment, and the timestamp of the latest target card swipe record is taken as the end time of the travel OD segment.

4. The method as described in claim 1, characterized in that, Following the step of associating the travel mode tag with the travel OD segment in response to the travel mode labeling operation, the method further includes: Perform spatiotemporal consistency verification on the travel OD segment, and / or perform geofencing verification on the travel OD segment; If the spatiotemporal consistency verification fails or the geofencing verification fails, in response to the correction operation, the travel OD segment is updated, and a composite travel chain is generated based on the updated travel OD segment.

5. The method as described in claim 4, characterized in that, The step of performing spatiotemporal consistency verification on the travel OD segment includes: Calculate the straight-line distance between the start and end points of the travel OD segment, and determine the straight-line distance as the OD distance; Calculate the cumulative distance of the signaling trajectory corresponding to the travel OD segment, and determine the cumulative distance of the signaling trajectory as the signaling distance, wherein the cumulative distance of the signaling trajectory is the sum of the distances between each adjacent trajectory point in the travel OD segment; Calculate the absolute difference between the signaling distance and the OD distance, and calculate the ratio of the absolute difference to the OD distance as the difference ratio; Calculate the average speed of the travel OD segment, wherein the average speed is the ratio of the OD distance to the duration corresponding to the travel OD segment; Determine whether the difference ratio is less than a preset ratio threshold, and / or determine whether the average speed is within a preset speed range corresponding to the travel mode label; If the difference ratio is greater than or equal to the preset ratio threshold or the average speed is not within the speed range, then the spatiotemporal consistency verification is determined to fail. If the difference ratio is less than the preset ratio threshold and the average speed is within the speed range, then the spatiotemporal consistency verification is determined to be successful.

6. The method as described in claim 4, characterized in that, The step of geofencing verification for the travel origin-destination (OD) segment includes: Based on a geographic information database, verify whether the start and end points of the travel OD segment are within the preset geofence of the transportation station, and / or verify whether the trajectory points within the travel OD segment match the preset transportation route. If the starting point of the travel OD segment is not located within the preset geofence, the ending point of the travel OD segment is not located within the preset geofence, or the trajectory points within the travel OD segment do not match the preset traffic route, then the geofence verification is determined to fail. If the starting point of the travel OD segment is located within the preset geofence, the ending point of the travel OD segment is located within the preset geofence, and the trajectory points within the travel OD segment match the preset traffic route, then the geofence verification is confirmed to be successful.

7. The method as described in claim 4, characterized in that, The step of updating the travel OD segment in response to the correction operation includes: In response to a time editing operation, update the start and end times of the travel OD segment according to the time specified in the time editing operation; or, In response to the cancellation command, the travel OD segment is reset, and the process returns to the step of determining the candidate alignment point that is spatiotemporally aligned with the target card swipe record among the various trajectory points of the signaling trajectory data corresponding to the target card swipe record, so as to update the travel OD segment.

8. The method as described in claim 1, characterized in that, The step of determining a spatiotemporally continuous target OD segment among multiple travel OD segments of the same user includes: Determine the time sequence of multiple travel OD segments for the same user, and calculate the time interval and spatial distance between two adjacent travel OD segments; If the time interval is less than a preset time threshold and the spatial distance is less than a preset distance threshold, then two adjacent travel OD segments are determined to be spatiotemporally continuous target OD segments.

9. The method according to any one of claims 1 to 8, characterized in that, Before the step of determining, in response to the selection operation of at least one target card swipe record in the annotation task set, a candidate alignment point that is spatiotemporally aligned with the target card swipe record is determined from each trajectory point of the signaling trajectory data corresponding to the target card swipe record, the method further includes: Acquire NFC-SIM card swipe records and corresponding signaling trajectory data for different users; wherein, the NFC-SIM card swipe records include timestamps and swipe type identifiers; From the NFC-SIM card swipe records, determine the swipe records with the swipe type identifier as travel type, and form basic data units based on the swipe records of travel type and the corresponding signaling trajectory data; In response to the task creation instruction, a preset number of card swipe records are randomly selected from the basic data unit to generate a labeled task set.