Public transportation transfer data processing method, device, equipment, and storage medium

By analyzing the card swiping data of public transportation vehicles and calculating the card swiping time difference to screen the transfer data, the problem of unreasonable allocation of public transportation resources in the existing technology is solved, and accurate user travel link drawing and traffic optimization are achieved.

CN114820264BActive Publication Date: 2025-08-15ALIPAY (HANGZHOU) INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210329452.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-31
Publication Date
2025-08-15
Estimated Expiration
2042-03-31

AI Technical Summary

Technical Problem

It is difficult for the existing technology to accurately count and optimize the transfer data of public transportation tools, resulting in unreasonable allocation of urban public transportation resources.

Method used

By obtaining the card swiping data of users in the target area, analyzing the card swiping records of the same card number within the same day, calculating the time difference between the card swiping two adjacent times, and comparing it with the transfer time threshold, filtering out the transfer data, and drawing the user's travel link.

Benefits of technology

Accurately determine the transfer data for each trip of the user, provide decision-making basis for optimization of urban public transportation network and line adjustment, and improve the certainty of transfer data and the optimization design of urban transportation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114820264B_ABST
    Figure CN114820264B_ABST
Patent Text Reader

Abstract

This specification provides a method, device, equipment, and storage medium for processing public transportation transfer data. By statistically analyzing the card swiping data of users in a target area within a specified time range, the card swiping data for the same card number on the same day is used as a piece of data to be analyzed. By analyzing the card swiping time difference in the card swiping records in the data to be analyzed, the transfer data in the data to be analyzed is filtered, and the card swiping records belonging to the transfer data are saved to obtain the transfer data in the target area within the specified time range. Based on the user's travel and transfer behavior, a complete user travel link can be mapped at a macro level, and the transfer data of each user's trip can be accurately determined, thereby providing a decision-making basis for public transportation network optimization and public transportation route adjustment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This specification belongs to the field of computer technology, and in particular relates to a method, device, equipment, and storage medium for processing public transportation transfer data. Background Art

[0002] Urban buses and subways account for an increasing proportion of daily urban travel. The widespread availability of map websites and public travel information platforms provides users with convenient travel options. Transferring between buses and subways is the most common mode of transportation. Analyzing transfer data and collecting transfer statistics can provide a theoretical basis for the rational deployment and utilization of public transportation resources, optimizing their allocation. Summary of the Invention

[0003] The purpose of the embodiments of this specification is to provide a method, device, equipment, and storage medium for processing public transportation transfer data, which realizes the extraction of public transportation transfer data, improves the accuracy of transfer data determination, and lays a theoretical basis for the optimized design of urban public transportation.

[0004] In one aspect, an embodiment of this specification provides a method for processing public transportation transfer data, the method comprising:

[0005] Obtain the card swiping data of users in the target area within the specified time range;

[0006] Extract the card swiping data of the same card number on the same day from the boarding card swiping data as the data to be analyzed, each piece of data to be analyzed includes a card swiping record of each card swiping, and the card swiping record includes: card swiping time, card swiping vehicle route, and card swiping station;

[0007] If the number of card swiping records in the same piece of data to be analyzed is greater than or equal to two, and there are at least two card swiping records with different card swiping vehicle routes, then calculate the card swiping time difference between each two adjacent card swiping records in the same piece of data to be analyzed;

[0008] The time difference between two adjacent card swipe records is compared with a transfer time threshold. If the time difference is less than the transfer time threshold, the corresponding two adjacent card swipe records are regarded as transfer swipes, and the corresponding card swipe records are saved to obtain transfer data of the target area within the specified time range; wherein the transfer time threshold is calculated based on the card swipe sites in the two adjacent card swipe records.

[0009] In another aspect, this specification provides a public transportation transfer data processing device, comprising:

[0010] The card swiping data acquisition module is used to obtain the card swiping data of users in the target area within a specified time range;

[0011] A data statistics module is used to extract the card swiping data of the same card number on the same day from the card swiping data as data to be analyzed, each piece of data to be analyzed includes a card swiping record of each card swiping, and the card swiping record includes: card swiping time, card swiping vehicle route, and card swiping station;

[0012] A time difference processing module is configured to calculate the card swiping time difference between two adjacent card swiping records in the same piece of data to be analyzed, if the number of card swiping records in the same piece of data to be analyzed is greater than or equal to two, and there are at least two card swiping records with different vehicle routes;

[0013] The transfer data screening module is used to compare the time difference between two adjacent card swipe records with a transfer time threshold. If the time difference is less than the transfer time threshold, the corresponding two adjacent card swipe records are regarded as transfer swipes, and the corresponding card swipe records are saved to obtain the transfer data of the target area within the specified time range; wherein the transfer time threshold is calculated based on the card swipe stations in the two adjacent card swipe records.

[0014] On the other hand, an embodiment of the present specification provides a public transportation transfer data processing device, including at least one processor and a memory for storing processor-executable instructions, and the processor implements the above-mentioned public transportation transfer data processing method when executing the instructions.

[0015] On the other hand, an embodiment of the present specification provides a computer-readable storage medium, which, when the instructions in the computer-readable storage medium are executed by a processor of a public transportation transfer data processing device or an electronic device, enables the public transportation transfer data processing device or the electronic device to execute the above-mentioned public transportation transfer data processing method.

[0016] The public transportation transfer data processing method, device, equipment, and storage medium provided in this specification statistically analyzes the card swipe data of users in a target area within a specified time range. The card swipe data of users with the same card number on the same day is used as a piece of data to be analyzed. The transfer data in the data to be analyzed is filtered by analyzing the card swipe time difference in the card swipe records in the data to be analyzed. The card swipe records belonging to the transfer data are saved to obtain the transfer data in the target area within the specified time range. Based on the user's travel and transfer behavior, a complete user travel link can be mapped at a macro level, and the transfer data of each user's trip can be accurately determined, thereby providing a decision-making basis for public transportation network optimization and public transportation route adjustment. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the embodiments of this specification or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments recorded in this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0018] Figure 1 This is a flow chart of an embodiment of a method for processing public transportation transfer data provided by an embodiment of this specification;

[0019] Figure 2 This is a schematic diagram of a scenario for processing public transportation transfer data in a scenario example of this specification;

[0020] Figure 3 This is a flow chart of bus transfer data processing in a scenario example of this specification;

[0021] Figure 4 This is a schematic diagram of the module structure of an embodiment of a public transportation transfer data processing device provided in this specification;

[0022] Figure 5 This is a hardware structure block diagram of a public transportation transfer data processing server in one embodiment of this specification. DETAILED DESCRIPTION

[0023] To help those skilled in the art better understand the technical solutions in this specification, the following will provide a clear and complete description of the technical solutions in the embodiments of this specification, in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of this specification, not all of them. All other embodiments derived by those skilled in the art based on the embodiments in this specification without creative effort shall fall within the scope of protection of this specification.

[0024] Low-carbon travel is increasingly being advocated, and more and more people are using public transportation, such as buses and subways, for daily commutes. However, it's often difficult to reach your destination directly on public transportation, often requiring transfers, sometimes multiple times, which can be inconvenient. Based on this, we can compile transfer data for users within a city and optimize public transportation based on this data. For example, if two lines with multiple transfers are used, we can merge them and design a more direct public transportation system to facilitate travel.

[0025] In some embodiments of the present specification, a method for processing public transportation transfer data can be provided. By collecting statistics on user card swiping data within a specified time range in a target area and comparing the time difference between two adjacent card swiping times with a transfer time threshold, it is determined whether the user is transferring, thereby achieving rapid statistics of the user's transfer data and laying a data foundation for the optimized design and planning of urban transportation.

[0026] Figure 1 It is a flow chart of an embodiment of the public transportation transfer data processing method provided in the embodiment of this specification. Although this specification provides the method operation steps or device structure as shown in the following embodiments or drawings, more or fewer operation steps or module units may be included in the method or device based on routine or no creative labor. In the steps or structures where there is no necessary causal relationship logically, the execution order of these steps or the module structure of the device is not limited to the execution order or module structure shown in the embodiments or drawings of this specification. When the method or module structure is applied to an actual device, server or terminal product, it can be executed sequentially or in parallel according to the method or module structure shown in the embodiment or drawings (for example, a parallel processor or multi-threaded processing environment, or even a distributed processing, server cluster implementation environment).

[0027] A specific implementation example Figure 1 As shown, in one embodiment of the method for processing public transportation transfer data provided in this specification, the method can be applied to a device terminal such as a computer, a tablet computer, a server, a smart phone, a server, a smart wearable device, etc., and the method may include the following steps:

[0028] Step 102: Obtain the card swiping data of users in the target area within a specified time range.

[0029] In the specific implementation process, the target area can be understood as the area where public transportation transfer data analysis is required, which can be a city, a county town, or a certain area of a city or a county town. It can be set according to actual needs, and the embodiments of this specification do not make specific limitations. The card swiping data of users in the target area within a specified time range can be obtained, such as: the card swiping data of one day or one month or five consecutive working days or ten consecutive rest days can be obtained. It can be set according to actual needs, and the embodiments of this specification do not make specific limitations. For example: the card swiping data of all users who take public transportation in the target area from 00:00 to 24:00 on March 20 can be obtained. The card swiping data can be obtained from the system of the operating unit of the public transportation, such as: the card swiping data of users who take the bus and the subway can be provided by the bus operating unit and the subway operating unit, or it can be obtained from the bus card management system. With the development of technology, most users use bus cards to swipe when taking public transportation. The embodiments of this specification analyze the user's transfer data by collecting statistics on card swiping data. The card swiping data may include the time when the user swipes the card, the station where the card is swiped, the vehicle route corresponding to the swipe, and the card number, etc. The specific details can be determined according to actual needs, and the embodiments of this specification do not make specific limitations.

[0030] In addition, in some embodiments of this specification, obtaining the card swiping data of users in the target area within a specified time range includes:

[0031] Obtain the boarding card swiping data of physical bus cards and mobile payment bus cards of users in the target area within a specified time range.

[0032] In the specific implementation process, the card swiping data in the embodiments of this specification can be the card swiping data of a physical bus card, or the card swiping data of a mobile payment bus card. Among them, the physical bus card can be understood as a card sold by a bus operating unit specifically for riding public transportation, or it can be a card provided by a designated unit cooperating with a bus operating unit that can be used for riding public transportation, such as a bank card or social security card with the function of riding public transportation. The mobile payment bus card can be understood as a bus card that has no entity and is attached to the client and can perform the payment function for riding public transportation, such as some applications provide a small program that can be used to pay for riding public transportation, and the small program can realize the function of paying for riding public transportation by providing a payment code for payment. There are also some mobile payment bus cards that can be virtual cards in the client, and their actual functions are similar to those of a physical bus card, and they are virtual cards in the client, such as a virtual bus card can be integrated into the card bag function of a smart phone, and the card payment function can be realized through NFC (Near Field Communication, short-range wireless communication technology) technology.

[0033] The embodiments of this specification can obtain the boarding card swiping data of different types of bus cards through bus operating units, realize the unified analysis and management of the boarding data of bus cards of different operators, improve the accuracy of transfer data analysis, and lay an accurate data foundation for the subsequent optimization and planning of urban rail transit.

[0034] Step 104: extract the card swiping data of the same card number on the same day from the card swiping data as data to be analyzed. Each piece of data to be analyzed includes a card swiping record of each card swiping. The card swiping record includes: card swiping time, card swiping vehicle route, and card swiping station.

[0035] In the specific implementation process, after obtaining the bus card swiping data of users within the specified time range in the target area, the bus card swiping data can be sorted out. Each bus card corresponds to a uniquely identified card number, and the data of the same card number in the bus card swiping data on the same day can be counted as data to be analyzed. Generally speaking, we believe that the bus card corresponding to the same card number is used by the same user. This application counts the bus card swiping data of the same user on the same day based on the card number. Based on the card swiping data of one day, it can be analyzed whether the user transfers during the trip within one day. If the bus card swiping data is the bus data of multiple days in the target area, then based on the card number, each user may correspond to multiple data to be analyzed. If the bus card swiping data is the bus card swiping data of the target area within one day, then each user may correspond to one data to be analyzed. In any case, based on the card number, multiple pieces of data to be analyzed can be obtained. Each piece of data to be analyzed corresponds to a user's card swiping data within a day. Each piece of data to be analyzed can include a card swiping record for each card swipe. The card swiping record can include: card swiping time, card swiping vehicle line, card swiping vehicle type, etc. The card swiping vehicle type can indicate whether the current user swipes the card to ride a bus, subway, or tram. Of course, according to actual needs, the card swiping vehicle type can also include other public transportation. The card swiping record can also include other content, such as: card swiping number, card swiping station, card type, etc., which are not specifically limited in the embodiments of this specification. The card swiping vehicle line can be understood as the line of the public transportation that the user currently swipes the card to ride, which can include the card swiping vehicle type, such as: Bus No. 310, Bus No. 356, Metro Line 1, Metro Line 2, etc. are all card swiping vehicle lines.

[0036] In addition, in some embodiments of this specification, after extracting the boarding card swiping data with the same card number on the same day as the data to be analyzed from the boarding card swiping data, the method further includes:

[0037] Sort the same data to be analyzed in ascending order of card swiping time;

[0038] If the time difference between two adjacent card swiping records is within a preset time range, the latter of the two adjacent card swiping records will be deleted.

[0039] In a specific real-time process, after collecting statistics on ride swipe data for the same card number on the same day, the collected data to be analyzed can be filtered. The same data to be analyzed can be sorted in ascending order of swipe time, and the time difference between two adjacent swipe records can be calculated. If the time difference is within a preset time range, such as 60 seconds, it can be considered that the two adjacent swipe records are likely duplicate swipes or an incorrect swipe. In this case, the latter of the two adjacent swipe records can be deleted, and only the former swipe record can be retained as data for subsequent transfer data analysis. The preset time range can be set according to actual needs and is not specifically limited in this embodiment of the present invention.

[0040] By comparing the time difference between two adjacent card swipe records, data with a very short time difference, which may be due to incorrect or repeated card swipes, is eliminated, ensuring the accuracy of subsequent transfer analysis results, reducing data processing volume, and improving data processing speed.

[0041] Step 106: If the number of card swiping records in the same piece of data to be analyzed is greater than or equal to two, and there are at least two card swiping records with different card swiping vehicle routes, calculate the card swiping time difference between each two adjacent card swiping records in the same piece of data to be analyzed.

[0042] In the specific implementation process, after counting the card swiping data of the same card number on the same day, it is possible to analyze whether the number of card swiping records in each piece of data to be analyzed is greater than or equal to two. If the card swiping record is equal to one, it indicates that the user did not transfer and the user only had one travel record for the whole day. If the number of card swiping records in the same piece of data to be analyzed is greater than or equal to two, the card swiping vehicle line in the card swiping record in the data to be analyzed can be obtained again to query whether there are at least two card swiping records with different card swiping vehicle lines. If there are at least two card swiping records with different card swiping vehicle lines, it can generally be considered that the user in the data to be analyzed has the possibility of transferring. For example: the card swiping vehicle line in the first card swiping record is 310, and the card swiping vehicle line in the second card swiping record is 356, then the user may have transferred from the vehicle on line 310 to the vehicle on line 356. In this way, the data to be analyzed with the possibility of transfer can be queried. For the data to be analyzed with the possibility of transfer, the card swiping time difference between each two adjacent card swiping records in the same data to be analyzed can be calculated in sequence, that is, the card swiping time of each two adjacent card swiping records can be subtracted to obtain the card swiping time difference between the two adjacent card swiping records.

[0043] In some embodiments of this specification, the card swiping record further includes a card swiping boarding and alighting category. After calculating the card swiping time difference between two adjacent card swiping records in the same piece of data to be analyzed, the method further includes:

[0044] If the card swiping type in the first card swiping record of two adjacent card swiping records is boarding, and the card swiping type in the second card swiping record is getting off, or the card swiping vehicle routes in the two adjacent card swiping records are the same, then the card swiping time difference between the two adjacent card swiping records will be deleted.

[0045] During specific implementations, in some scenarios, a user may swipe their card to board and exit the same bus. This creates two consecutive card swipe records for the same bus. For example, when riding the subway, users typically swipe their card to enter and exit a station. Even if a user transfers to a different subway line within the subway, they only need to transfer at the corresponding station and do not need to swipe their card to transfer. For this type of subway line transfer, this embodiment of the specification considers it as a non-transfer and does not consider it. Thus, during a single subway trip, a user may need to swipe their card twice, and the bus lines used in these two swipe records may be different. However, this trip is considered a single subway trip, and transfer data analysis is not required. Another example is that some buses require swiping their card to board and exit the bus, and the fare is calculated based on the stations used for both swiping. However, in general, bus swiping cannot distinguish between boarding and exiting types. In this case, the two consecutive swipes are for the same bus line, and thus constitute a single trip, and transfer data analysis is not required.

[0046] In some embodiments of this specification, it is possible to determine whether each card swipe is for boarding or getting off a train through card swipe records. For example, when a user takes the subway, different card swipe devices are used for entering and exiting a station. If the card swipe and get-off category in the first card swipe record of two adjacent card swipe records is boarding, and the card swipe and get-off category in the second card swipe record is getting off a train, then the card swipe time difference between the two adjacent card swipe records is deleted, and subsequent transfer data processing and analysis is not performed. At the same time, it is possible to determine whether the card swipe vehicle routes in the two adjacent card swipe records are the same. If they are the same, the card swipe time difference between the two adjacent card swipe records can also be deleted, and subsequent transfer data processing and analysis is not performed, thereby reducing the amount of data processing, improving data processing efficiency, and improving the accuracy of transfer data analysis.

[0047] Step 108: Compare the time difference between two adjacent card swipe records with a transfer time threshold. If the time difference is less than the transfer time threshold, treat the corresponding two adjacent card swipe records as transfer swipes, save the corresponding card swipe records, and obtain transfer data for the target area within the specified time range; wherein the transfer time threshold is calculated based on the card swipe stations in the two adjacent card swipe records.

[0048] In the specific implementation process, after calculating the time difference between two adjacent card swipe records, the calculated time difference can be compared with the transfer time threshold. If the time difference is less than the transfer time threshold, it can be considered that the user has taken different public transportation within a certain period of time. The two adjacent card swipe records can be considered as transfer swipes, and the two adjacent card swipe records are saved. Continue to analyze the next two adjacent card swipe records until all card swipe records in the data to be analyzed are analyzed. Transfer data for the target area within the specified time range can be obtained. The obtained transfer data can be used to analyze the city's rail transit, and then optimize public transportation routes, reduce the number of transfers, and make it more convenient for users to go out.

[0049] Among them, the transfer time threshold can represent the longest public transportation time required between the card swiping sites in two adjacent card swiping records, and can be calculated based on the card swiping sites in the two adjacent card swiping records. For example, the average public transportation travel time required to reach the card swiping site in the next card swiping record from the card swiping site in the previous card swiping record can be calculated based on the distance between the card swiping sites in the two adjacent card swiping records, and then the transfer time threshold is determined based on the calculated average public transportation travel time. Or, based on the distance between the card swiping sites in the two adjacent card swiping records, the average public transportation travel time required to reach the card swiping site in the next card swiping record using the public transportation vehicle (i.e., the card swiping vehicle category) in the previous card swiping record is calculated, and then the transfer time threshold is determined based on the calculated average public transportation travel time. Of course, according to actual needs, other methods can also be used to set the transfer time threshold, and the embodiments of this specification do not make specific limitations.

[0050] The public transportation transfer data processing method provided in the embodiments of this specification performs statistical analysis on the card swipe data of users in a target area within a specified time range. The card swipe data of users with the same card number on the same day is used as a piece of data to be analyzed. By analyzing the card swipe time difference in the card swipe records in the data to be analyzed, it is determined whether the data to be analyzed contains transfer data. The card swipe records that belong to transfer data are saved to obtain the transfer data of the target area within the specified time range. Based on the travel and transfer behavior of users, a complete user travel chain can be mapped at a macro level, and the transfer data of each user's trip can be accurately determined, thereby providing a decision-making basis for optimizing the public transportation network and adjusting public transportation routes.

[0051] In some embodiments of this specification, the transfer time threshold is calculated based on the card swiping stations in two adjacent card swiping records, including:

[0052] Query the neighboring sites within the specified distance range of the card swiping site in the latter of two adjacent card swiping records;

[0053] Matching the adjacent site with the site of the previous card swiping record in the two adjacent card swiping records, and if the match is successful, taking the site of the previous card swiping record in the two adjacent card swiping records as the target site;

[0054] The transfer time threshold is determined according to the distance between the target site and the card swiping site in the next card swiping record.

[0055] In specific implementations, public transportation transfers can include: bus-to-bus transfers, bus-to-subway transfers, subway transfers, tram transfers, and subway-to-bus transfers. Generally, most buses only require a card swipe upon boarding; no swipe is required upon disembarking. However, subways generally require swipes upon entry and exit. In some scenarios, users also need to swipe their card upon boarding and disembarking. Therefore, when transferring, the swipe point recorded in the last swipe may be far from the swipe point recorded in the previous swipe. For example, if a user swipes their card to board a bus, gets off at a stop on the subway or other bus route without swiping their card, and then gets on at a subway stop or bus stop on the subway or other bus route, the two swipe points will be far apart. However, if the user also needs to swipe their card upon disembarking from the bus, the two swipe points will be closer. In the embodiments of this specification, after obtaining the time difference between two adjacent card swipe records, you can first query the neighboring sites within the specified distance range of the card swipe site in the latter of the two adjacent card swipe records, such as: neighboring sites within 500 meters or 1000 meters. Of course, the specified distance range can be adjusted according to actual needs. It can generally be set within a shorter distance range, which can be reached in a short time by walking or riding a bicycle. This embodiment of this specification does not make specific limitations. The card swipe site can be understood as a bus stop, subway station, or tram stop where the user swipes the card. It should be noted that the neighboring sites can include bus stops, subway stations, tram stops, and other public transportation sites. The neighboring sites can also include the card swipe site in the latter card swipe record.

[0056] If, when querying the neighboring sites within a specified distance range of the swipe site in the subsequent swipe record, one of the neighboring sites is found to be the same as the site in the previous swipe record, the site in the previous swipe record can be directly used as the target site. In this case, the site in the previous swipe record is likely a transfer site, and the user can reach the site in the next swipe record by walking or cycling without the need for other means of transportation. In this case, the transfer time threshold can be determined based on the distance between the target site and the site in the subsequent swipe record. For example, the distance between the target site and the site in the subsequent swipe record can be divided by walking or cycling speed, and the waiting time can be appropriately increased to obtain the transfer time threshold. Generally speaking, in this case, the distance between the target site and the site in the subsequent swipe record is relatively short, so the transfer time threshold can be set to a shorter time, such as 10 minutes, 15 minutes, or 20 minutes. The difference in the swipe time between the two adjacent swipe records is compared with the transfer time threshold to determine whether the two adjacent swipe records represent a transfer.

[0057] For example, in some scenarios, when riding a bus, users also need to swipe their cards when getting on and off the bus, and then proceed to other public transportation stations such as the subway. In this case, the swipe station in the previous swipe record between the two adjacent swipe records is the station where the user transferred. If, when querying the neighboring stations within a specified distance range of the swipe station in the subsequent swipe record, one of the neighboring stations is found to be the same as the swipe station in the previous swipe record, the swipe station in the previous swipe record can be directly used as the target station, improving the accuracy of transfer station determination and laying an accurate foundation for the screening and judgment of subsequent transfer data.

[0058] For example, in some scenarios, users take the subway and then transfer to a bus. Typically, if users transfer to a bus after taking the subway, they first take the subway to a subway station near a bus stop on the bus route, then board the bus at a bus stop near the subway station. Typically, the subway station where users get off the bus and the bus stop they transfer to are close together and can usually be reached on foot. The transfer time threshold can be set to 5 minutes, 10 minutes, or other times, and can be adjusted based on actual circumstances.

[0059] The embodiments of this specification compare the card swiping site in the previous card swiping record with the site near the card swiping site in the next card swiping record to determine whether the user has the possibility of directly transferring to the next line of public transportation after swiping the card and getting off the bus. Then, by accurately setting the transfer time threshold, the transfer data is accurately screened, laying a data foundation for the optimization and adjustment of urban rail transit.

[0060] In most cases, a bus only requires a card swipe when boarding, but not when getting off. In this case, if a user transfers from a bus to another bus line or subway, they will not know the transfer station. To address this situation, in some embodiments of this specification, the transfer time threshold is calculated based on the card swipe stations in two adjacent card swipe records, including:

[0061] If the adjacent site fails to match the card swiping site of the previous card swiping record in the two adjacent card swiping records, selecting one of the adjacent sites as the target site;

[0062] The sum of the travel time between the card swiping site in the previous card swiping record of the two adjacent card swiping records and the target site and the preset transfer time is used as the transfer time threshold.

[0063] In the specific implementation process, when transferring from a bus to a subway or tram, the user first takes the bus to a bus stop near other public transportation such as a subway station or tram station, and then goes to the subway station to take the subway or tram station to take the tram. Most buses only require swiping a card when getting on the bus, and do not require swiping a card when getting off the bus. At this time, when judging whether the bus transfers to a non-bus public transportation such as a subway or tram, it may not be possible to know which bus stop the user got off at after taking the bus, and thus it is impossible to accurately know the transfer stop and transfer time threshold. In the embodiment of this specification, the neighboring stops within the specified distance range of the card swiping stop in the next card swiping record can be queried. If there is no stop matching the card swiping stop of the previous card swiping record in the two adjacent card swiping records among the neighboring stops within the specified distance range of the next card swiping record, it can be considered that the transfer stop of the previous card swiping record cannot be accurately known. At this point, a station can be selected from the neighboring stations as the target station. For example, in some embodiments of this specification, selecting a station from the neighboring stations as the target station includes selecting the neighboring station closest to the station in the second of the two adjacent card swipe records as the target station. Generally, when transferring, users will select the nearest station as the transfer station, which increases the accuracy of the target station selection.

[0064] Alternatively, in order to avoid incorrect site selection, you can also choose a method that has a relatively small impact even if the site selection is incorrect, such as: selecting a site that is halfway between the distance to the card swiping site of the next card swiping record as the target site, or you can select the site with the most bus lines as the target site. The specific settings can be made according to actual needs, and the embodiments of this manual do not make specific limitations.

[0065] After determining the target site, calculate the travel time between the target site and the swiping site in the previous card swiping record in the two adjacent card swiping records, and add the calculated travel time to the preset transfer time as the transfer time threshold. Compare the swiping time difference between the two adjacent card swiping records with the transfer time threshold to determine whether the two adjacent card swiping records belong to a transfer. Among them, the preset transfer time can be set according to actual needs, such as 5 minutes, 15 minutes, 20 minutes, etc., which can be understood as the reserved waiting time and the time to reach the next transfer site from the previous transfer site. Because the locations of the two bus stops are different in many cases when transferring buses, the preset transfer time can be reasonably set to accurately configure the transfer time threshold when transferring from bus to bus, and then accurately filter out the transfer data, laying an accurate data foundation for the subsequent planning and optimization design of urban rail transit.

[0066] In some embodiments of this specification, a method for determining the travel time between the card swiping station in the first card swiping record of two adjacent card swiping records and the target station includes:

[0067] Calculate the number of stations between the card swiping station in the previous card swiping record and the target station in two adjacent card swiping records, and query the average inter-station travel time between the card swiping station in the previous card swiping record and the target station in the two adjacent card swiping records;

[0068] The travel time between the card swiping station in the previous card swiping record and the target station is obtained according to the average inter-station travel time and the number of interval stations.

[0069] In the specific implementation process, after determining the target site, the number of stations between the target site and the swiping site in the previous card swiping record in two adjacent card swiping records can be calculated, and then the average inter-station travel time of each station between the target site and the swiping site in the previous card swiping record in two adjacent card swiping records can be queried. For example: there are 5 stations between the target site and the swiping site in the previous card swiping record in two adjacent card swiping records. The travel timetable of buses or subways passing through these 5 stations can be queried to inquire about the average inter-station travel time between each station. Specifically, the average inter-station travel time of the corresponding vehicle can be queried based on the type of the swiping vehicle in the previous card swiping record in two adjacent card swiping records. For example: if the type of the swiping vehicle in the previous card swiping record in two adjacent card swiping records is a bus, the average inter-station travel time of the bus passing through the stations between the swiping site in the previous card swiping record in two adjacent card swiping records and the target site can be queried.

[0070] The buses that pass through the target station and the station in the previous card swipe record between two adjacent card swipe records may not belong to the same bus route. For example, bus 1 passes through the first two stations, bus 2 passes through the second and third stations, and bus 3 passes through the third station to the target station. It can be seen that a bus route does not need to pass through all the bus stops between the station in the previous card swipe record and the target station. There can also be multiple buses passing through each station between two stations. For example, there are five buses passing through the station in the previous card swipe record and the first interval station. The average inter-station travel time between each station can be queried by querying the average inter-station travel time table of buses. Each bus route can have a corresponding average inter-station travel time table. If there are multiple buses passing through two stations, the average inter-station travel time of multiple buses can be averaged, or the maximum, minimum, or median value can be selected to determine the average inter-station travel time between each station between the two target stations. Of course, if the card swiping vehicle category in the previous card swiping record is the subway or other public transportation, then when calculating the average inter-station travel time between the card swiping station in the previous card swiping record and the target station in two adjacent card swiping records, the average inter-station travel timetable of the subway or other public transportation can be used. The processing method is the same as that of the bus, and will not be repeated here.

[0071] The average inter-station travel timetable can be obtained by the operating unit of the public transportation means by processing the travel data of the public transportation means.

[0072] After determining the average inter-station travel time of buses between the target stations, the average inter-station travel time between every two stations between the target stations can be added to obtain the travel time between the card swiping station in the latter card swiping record and the card swiping station in the previous card swiping record in two adjacent card swiping records.

[0073] The embodiment of this specification determines the target station of the latter of two adjacent card swiping records, queries the average inter-station travel time between the card swiping station of the previous card swiping record and the target station, and then determines the travel time required to travel to the card swiping stations in the two adjacent card swiping records, laying an accurate data foundation for subsequent judgment on whether to transfer.

[0074] In some embodiments of this specification, selecting a site from the neighboring sites as a target site includes:

[0075] The station that the card swiping vehicle route passes through in the first card swiping record of the two adjacent card swiping records is selected from the adjacent stations as the target station.

[0076] In the specific implementation process, after querying the neighboring stations within the specified range of the swiping station in the latter card swiping record, you can query from the neighboring stations which bus stations are the stations that the swiping vehicle route in the previous card swiping record passes through in the two adjacent card swiping records, and use the neighboring stations that the swiping vehicle route in the previous card swiping record passes through as the target station. Of course, the neighboring stations that the swiping vehicle route in the previous card swiping record passes through can be one or more. If there are multiple, you can select the one that is closest to the swiping station in the latter of the two adjacent card swiping records from the neighboring stations that the swiping vehicle route passes through in the previous card swiping record as the target bus station. The swiping route in the previous card swiping record can accurately screen out the user's possible get-off stations, providing an accurate data basis for subsequent judgments on bus to subway transfers.

[0077] In some embodiments of this specification, the neighboring sites include the card swiping site in the subsequent card swiping record, and selecting a site from the neighboring sites as a target site includes:

[0078] If the card swiping vehicle type in two adjacent card swiping records is both buses, the card swiping site in the latter card swiping record is used as the target site.

[0079] In practice, when transferring between buses and the previous bus ride did not require a card swipe, the next swipe record's adjacent stops within a specified distance of the previous swipe stop will generally not match the previous swipe stop. In this case, the swipe stop in the next swipe record can be used as the target stop, and the travel time between the target stop and the stop in the previous swipe record can be calculated. This is equivalent to calculating the travel time between the two stops in the previous swipe record, thereby accurately determining the corresponding transfer time threshold.

[0080] However, it should be noted that in some scenarios, a bus stop may have multiple locations, and different bus routes may stop at the same bus stop at different locations. For example, a bus stop may be named "Stop A," but there are three bus stops named "Stop A" at different locations. If the number of swipe stops in either the previous or next swipe record is greater than one, it means that at least one of the two stops in the two adjacent swipe records has a number greater than one. In this case, the two stops with the smallest distance between the swipe stops in the previous and next swipe records can be selected as target bus stops. For example, if there is one swipe stop A in the previous swipe record and two swipe stops B and C in the next swipe record, the distance between AB and AC can be calculated. If the distance between AB is less than the distance between AC, bus stops A and B can be selected as target bus stops. Generally, users transfer to stops that are closer to each other. By selecting stops with the smallest distance as target bus stops, the accuracy of transfer stops can be improved, thereby improving the accuracy of subsequent transfer data judgment. If the number of the first card swiping station and the second card swiping station is both 1, then the distance between the two bus stations is the smallest, and these two stations can be used as target stations.

[0081] In addition, in some embodiments of the present specification, the card swiping record may include the card swiping vehicle category, and the possible transfer types of two adjacent card swiping records can be determined based on the card swiping vehicle category. For example, if the card swiping vehicle category of the first card swiping record in two adjacent card swiping records is determined to be a bus, and the card swiping vehicle category of the second card swiping record is different from the bus, it can be considered that this situation is likely to be a bus transfer to the subway or to other non-bus public transportation. For different transfer types, the calculation method of the transfer time threshold may be different. For example, when changing from subway to bus, it is generally possible to query the same adjacent station as the station of the previous card swiping record within the specified distance range of the station of the second card swiping record, and the corresponding transfer time threshold can be determined directly according to the method described in the above embodiment. When changing from bus to bus, it is generally not possible to query the same adjacent station as the station of the previous card swiping record within the specified distance range of the station of the second card swiping record, and the corresponding transfer time threshold can also be determined directly according to the method described in the above embodiment. The time difference between the two adjacent card swiping records is then compared with the corresponding transfer time threshold. If it is less than the transfer time threshold, it is determined that the transfer is from a bus to the subway or to other non-bus public transportation. The card swiping record can be saved as transfer data to provide a basis for the subsequent optimization design of urban rail transit.

[0082] In the embodiments of this specification, the time required for the user to travel from the swipe station in the previous swipe record to the swipe station in the next swipe record can be queried by looking at the adjacent stations near the swipe station in the next swipe record, and then compared with the swipe time difference between the two adjacent swipe records. Furthermore, by matching the swipe station query, different transfer categories can be distinguished. For different transfer categories, different methods are used to calculate the transfer time threshold required for the transfer judgment standard. The swipe time difference between the two adjacent swipe records is then compared with the transfer time threshold to screen out transfer records. Transfer data within a specified time range in the target area can be statistically calculated to provide travel plan services that meet the diverse needs of users under time standards, providing a basis for the subsequent optimization design of urban rail transit.

[0083] Figure 2 This is a schematic diagram of a scenario in which public transportation transfer data is processed in a scenario example of this specification. Figure 2 As shown, passengers start from the starting point of the trip and transfer from station k to station k+1. The two stations can be the same station or different stations. The two stations should be relatively close in spatial distance until they reach the destination of the trip. Each trip can have one or more transfers. Of course, there is no need to transfer. Figure 3 This is a flow chart of bus transfer data processing in a scenario example of this manual, combined with Figure 3 The following describes in detail the process of bus transfer data processing in a scenario example of this manual:

[0084] Step 1: Extract the card swipe records for the same card number on the same day and sort them in ascending time order. Treat the data with a swipe time difference of <= 60s as duplicate swipes, retain the first swipe record, delete the subsequent duplicate data, and count the number of non-duplicate swipes for travel on that day.

[0085] Step 2. Obtain the number of card swipe records, i.e., the number of card swipes: If the number of card swipes = 1, then the trip is one trip, output the card swipe record of the trip, and go to step 1 to perform data analysis on the next card number; if the number of card swipes = 2, calculate the card swipe time difference, and go to step 3, where the card swipe time difference = the card swipe time of the second record - the card swipe time of the first record; if the card swipe record > 2, go to step 4.

[0086] Step 3. Determine transfer travel based on the card swipe time difference: If the card swipe time difference is less than (avg + 20min), where avg is the travel time between the card swipe station of the latter card swipe record and the card swipe station of the previous card swipe record, then the second card swipe record is a transfer, output two card swipe records, and then go to step 1 to perform data analysis on the next card number; otherwise, it is determined to be two trips, and then go to step 1 to perform data analysis on the next card number.

[0087] Step 4: Calculate the card swiping time difference between each two adjacent card swiping records, where the card swiping time difference = the card swiping time of the latter card swiping record - the card swiping time of the former card swiping record, and proceed to step 5.

[0088] Step 5. Determine transfers based on the time difference between swiping the card: Determine any two adjacent swiping records with a time difference of < (avg + 20min) as transfers, where avg is the travel time between the swiping station of the latter swiping record and the swiping station of the previous swiping record, and output the two swiping records; Separate any two records with a time difference of >= (avg + 20min) as two travel records, output the swiping records, and then go to step 1 to perform data analysis on the next card number.

[0089] Step 6: Repeat steps 1-5 above until the daily transfer data for each card number is calculated.

[0090] In the above method, the method for obtaining the travel time avg between the card swiping site of the latter card swiping record and the card swiping site of the previous card swiping record can be referred to as follows:

[0091] Get the station ID of the next card swipe record, check the bus stop information table, find the route station of the previous card swipe record, and take the station with the shortest distance;

[0092] If it is found successfully, the number of stations between the previous card swiping record and the current station is calculated, and the average travel time between each two stations in the average station travel timetable is added to obtain avg.

[0093] In the above scenario example, the bus only considers swiping the card when boarding, and swiping the card when getting off the bus is not considered.

[0094] The calculation process in this specification matches card swipes along the route, integrating information such as card transaction time, boarding station, and up and down routes. By integrating multi-source travel transaction data, it can accurately match the travel characteristics of travelers. Based on the user's travel transfer behavior and the initial boarding location, a complete user travel chain can be mapped at a macro level, providing a decision-making basis for transportation management departments in optimizing bus networks and adjusting bus routes.

[0095] In this specification, the various embodiments of the above method are described in a progressive manner. The same or similar parts between the various embodiments can be referenced to each other. Each embodiment focuses on the differences from other embodiments. For relevant parts, refer to the partial description of the method embodiment.

[0096] Based on the public transportation transfer data processing method described above, one or more embodiments of this specification also provide a system for public transportation transfer data processing. The system may include a system (including a distributed system), software (application), modules, components, servers, clients, etc. using the method described in the embodiments of this specification and combined with necessary implementation hardware. Based on the same innovative concept, the devices in one or more embodiments provided in the embodiments of this specification are as described in the following embodiments. Since the implementation scheme and method for solving the problem of the device are similar, the implementation of the specific device in the embodiments of this specification can refer to the implementation of the aforementioned method, and the repetitions will not be repeated. As used below, the term "unit" or "module" can implement a combination of software and / or hardware for a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceived.

[0097] Specifically, Figure 4 This is a schematic diagram of the module structure of an embodiment of the public transportation transfer data processing device provided in this specification. Figure 4 As shown, the public transportation transfer data processing device provided in this specification may include:

[0098] The card swiping data acquisition module 41 is used to obtain the card swiping data of users in the target area within a specified time range;

[0099] A data statistics module 42 is configured to extract the card swiping data of the same card number on the same day from the card swiping data as data to be analyzed, wherein each piece of data to be analyzed includes a card swiping record of each card swiping, and the card swiping record includes: card swiping time, card swiping vehicle route, and card swiping station;

[0100] The time difference processing module 43 is configured to calculate the time difference between two adjacent card swipe records in the same piece of data to be analyzed, if the number of card swipe records in the same piece of data to be analyzed is greater than or equal to two, and there are at least two card swipe records with different vehicle routes;

[0101] The transfer data screening module 44 is configured to compare the time difference between two adjacent card swipe records with a transfer time threshold. If the time difference is less than the transfer time threshold, the corresponding two adjacent card swipe records are treated as transfer swipes, and the corresponding card swipe records are saved to obtain transfer data for the target area within the specified time range. The transfer time threshold is calculated based on the card swipe stations in the two adjacent card swipe records.

[0102] The public transportation transfer data processing device provided in the embodiments of this specification performs statistical analysis on the card swiping data of users in a target area within a specified time range. The card swiping data of users with the same card number on the same day is used as a piece of data to be analyzed. By analyzing the card swiping time difference in the card swiping records in the data to be analyzed, it is determined whether the data to be analyzed contains transfer data. The card swiping records belonging to transfer data are saved to obtain the transfer data of the target area within the specified time range. Based on the user's travel and transfer behavior, a complete user travel link can be mapped at a macro level, and the transfer data of each user's trip can be accurately determined, thereby providing a decision-making basis for optimizing the public transportation network and adjusting public transportation routes.

[0103] The embodiments of this specification also provide a public transportation transfer data processing device, comprising: at least one processor and a memory for storing processor-executable instructions, wherein the processor executes the instructions to implement the information recommendation data processing method of the above embodiment, such as:

[0104] Obtain the card swiping data of users in the target area within the specified time range;

[0105] Extract the card swiping data of the same card number on the same day from the boarding card swiping data as the data to be analyzed, each piece of data to be analyzed includes a card swiping record of each card swiping, and the card swiping record includes: card swiping time, card swiping vehicle route, and card swiping station;

[0106] If the number of card swiping records in the same piece of data to be analyzed is greater than or equal to two, and there are at least two card swiping records with different card swiping vehicle routes, then calculate the card swiping time difference between each two adjacent card swiping records in the same piece of data to be analyzed;

[0107] The time difference between two adjacent card swipe records is compared with a transfer time threshold. If the time difference is less than the transfer time threshold, the corresponding two adjacent card swipe records are regarded as transfer swipes, and the corresponding card swipe records are saved to obtain transfer data of the target area within the specified time range; wherein the transfer time threshold is calculated based on the card swipe sites in the two adjacent card swipe records.

[0108] It should be noted that the above-mentioned devices and apparatuses may also include other implementations according to the description of the method embodiments. Specific implementations may refer to the description of the relevant method embodiments and will not be described in detail here.

[0109] The public transportation transfer data processing device provided in this specification can also be applied to a variety of data analysis and processing systems. The system or server or terminal or device can be a separate server, or it can include a server cluster, system (including distributed system), software (application), actual operation device, logic gate circuit device, quantum computer, etc. that uses one or more of the methods or one or more embodiments of the system or server or terminal or device of this specification and is combined with a terminal device of necessary implementation hardware. The detection system for checking the difference data may include at least one processor and a memory storing computer executable instructions, and the processor implements the steps of the method described in any one or more of the above embodiments when executing the instructions.

[0110] The method embodiments provided in the embodiments of this specification can be executed in a mobile terminal, a computer terminal, a server or a similar computing device. Taking running on a server as an example, Figure 5 This is a hardware structure block diagram of a public transportation transfer data processing server in one embodiment of this specification. The computer terminal can be the public transportation transfer data processing server or public transportation transfer data processing device in the above embodiment. Figure 5 The server 10 shown may include one or more (only one is shown in the figure) processors 100 (the processor 100 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a non-volatile memory 200 for storing data, and a transmission module 300 for communication functions. It will be understood by those skilled in the art that Figure 5 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 5 More or fewer components shown in the figure may also include other processing hardware, such as a database or multi-level cache, GPU, or other hardware with Figure 5 Different configurations shown.

[0111] The non-volatile memory 200 can be used to store software programs and modules of application software, such as the program instructions / modules corresponding to the public transportation transfer data processing method in the embodiment of this specification. The processor 100 executes various functional applications and resource data updates by running the software programs and modules stored in the non-volatile memory 200. The non-volatile memory 200 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the non-volatile memory 200 may further include a memory remotely located relative to the processor 100, and these remote memories can be connected to the computer terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0112] The transmission module 300 is used to receive or send data via a network. Specific examples of the aforementioned network may include a wireless network provided by a communications provider of a computer terminal. In one embodiment, the transmission module 300 includes a network interface controller (NIC), which can be connected to other network devices via a base station to enable communication with the Internet. In another embodiment, the transmission module 300 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0113] The foregoing description of this specification describes specific embodiments. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in an order different from that described in the embodiments and still achieve the desired results. Furthermore, the processes depicted in the accompanying drawings do not necessarily require the specific order shown or the sequential order to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0114] The methods or devices described in the above embodiments of this specification can implement business logic through computer programs and record them on storage media. The storage media can be read and executed by a computer to achieve the effects of the solutions described in the embodiments of this specification, such as:

[0115] Obtain the card swiping data of users in the target area within the specified time range;

[0116] Extract the card swiping data of the same card number on the same day from the boarding card swiping data as the data to be analyzed, each piece of data to be analyzed includes a card swiping record of each card swiping, and the card swiping record includes: card swiping time, card swiping vehicle route, and card swiping station;

[0117] If the number of card swiping records in the same piece of data to be analyzed is greater than or equal to two, and there are at least two card swiping records with different card swiping vehicle routes, then calculate the card swiping time difference between each two adjacent card swiping records in the same piece of data to be analyzed;

[0118] The time difference between two adjacent card swipe records is compared with a transfer time threshold. If the time difference is less than the transfer time threshold, the corresponding two adjacent card swipe records are regarded as transfer swipes, and the corresponding card swipe records are saved to obtain transfer data of the target area within the specified time range; wherein the transfer time threshold is calculated based on the card swipe sites in the two adjacent card swipe records.

[0119] The above-mentioned public transportation transfer data processing method or device provided in the embodiments of this specification can be implemented by a processor in a computer executing corresponding program instructions, such as using the C++ language of the Windows operating system on a PC, a Linux system, or other systems such as Android and iOS system programming languages on a smart terminal, as well as processing logic based on a quantum computer.

[0120] It should be noted that the device, computer storage medium, and system described above in the specification may also include other implementation methods according to the description of the relevant method embodiments. The specific implementation methods can refer to the description of the corresponding method embodiments and will not be described one by one here.

[0121] The various embodiments in this specification are described in a progressive manner. Similar portions between the various embodiments can be referenced to each other. Each embodiment focuses on the differences between the other embodiments. In particular, the hardware + program embodiments are generally similar to the method embodiments, so their description is relatively simple. For relevant portions, reference can be made to the description of the method embodiments.

[0122] The embodiments of this specification are not limited to those that must comply with industry communication standards, standard computer resource data update and data storage rules, or the situations described in one or more embodiments of this specification. Certain industry standards or slightly modified implementation plans based on the implementation described in the embodiments using custom methods or embodiments can also achieve the same, equivalent, or similar implementation effects as the above embodiments, or the expected implementation effects after deformation. The embodiments obtained by applying these modified or deformed data acquisition, storage, judgment, processing methods, etc. can still fall within the scope of the optional implementation plans of the embodiments of this specification.

[0123] The systems, devices, modules, or units described in the above embodiments may be implemented by computer chips or entities, or by products having certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, an in-vehicle human-computer interaction device, a cellular phone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0124] Although one or more embodiments of this specification provide method operation steps as described in the embodiments or flow charts, more or fewer operation steps may be included based on conventional or non-creative means. The order of steps listed in the embodiments is only one way of executing the order of many steps and does not represent the only execution order. When the device or terminal product in practice is executed, it can be executed in sequence or in parallel according to the method shown in the embodiments or the drawings (for example, a parallel processor or a multi-threaded processing environment, or even a distributed resource data update environment). The term "comprise", "include" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, product or equipment including a series of elements includes not only those elements, but also includes other elements that are not clearly listed, or also includes elements inherent to such process, method, product or equipment. In the absence of more restrictions, it is not excluded that there are other identical or equivalent elements in the process, method, product or equipment including the elements. Words such as first and second are used to represent names and do not represent any particular order.

[0125] For the convenience of description, the above devices are described in terms of functions divided into various modules. Of course, when implementing one or more of the present specifications, the functions of each module can be implemented in the same or multiple software and / or hardware, or the module that implements the same function can be implemented by a combination of multiple sub-modules or sub-units, etc. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0126] The present invention is described with reference to flowcharts and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable resource data update device to produce a machine, so that the instructions executed by the processor of the computer or other programmable resource data update device generate instructions for implementing the process in the flowchart. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0127] These computer program instructions can also be stored in a computer readable memory that can guide a computer or other programmable resource data update device to work in a specific manner, so that the instructions stored in the computer readable memory produce a product including an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0128] These computer program instructions can also be loaded onto a computer or other programmable resource data updating device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable device to implement the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0129] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.

[0130] Memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.

[0131] Computer-readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage, graphene storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory media such as modulated data signals and carrier waves.

[0132] Those skilled in the art will appreciate that one or more embodiments of this specification may be provided as a method, system, or computer program product. Thus, one or more embodiments of this specification may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, one or more embodiments of this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0133] One or more embodiments of this specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, and the like that perform specific tasks or implement specific abstract data types. One or more embodiments of this specification may also be practiced in distributed computing environments where tasks are performed by remote devices connected via a communications network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.

[0134] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from the other embodiments. In particular, since the system embodiments are generally similar to the method embodiments, their description is relatively simple, and relevant parts can be referenced to the partial description of the method embodiments. Throughout this specification, reference to the terms "one embodiment," "some embodiments," "example," "specific example," or "some examples" means that the specific features, structures, materials, or characteristics described in conjunction with that embodiment or example are included in at least one embodiment or example of this specification. In this specification, the schematic representations of these terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, those skilled in the art may combine and integrate the different embodiments or examples, and features of different embodiments or examples, described in this specification, without conflict.

[0135] The foregoing description is merely an example of one or more embodiments of this specification and is not intended to limit the one or more embodiments of this specification. Those skilled in the art will appreciate that various modifications and variations of one or more embodiments of this specification are possible. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of this specification are intended to be included within the scope of the claims.

Claims

1. A method for processing public transportation transfer data, the method comprising: Obtain the card swiping data of users in the target area within the specified time range; Extract the card swiping data of the same card number on the same day from the boarding card swiping data as the data to be analyzed, each piece of data to be analyzed includes a card swiping record of each card swiping, and the card swiping record includes: card swiping time, card swiping vehicle route, and card swiping station; If the number of card swiping records in the same piece of data to be analyzed is greater than or equal to two, and there are at least two card swiping records with different card swiping vehicle routes, then calculate the card swiping time difference between each two adjacent card swiping records in the same piece of data to be analyzed; Comparing the time difference between two adjacent card swipe records with a transfer time threshold; if the time difference is less than the transfer time threshold, treating the two adjacent card swipe records as transfer swipes, saving the corresponding card swipe records, and obtaining transfer data for the target area within the specified time range; The transfer time threshold is calculated based on the card swiping stations in two adjacent card swiping records in the following manner: Query the neighboring sites within the specified distance range of the card swiping site in the latter of two adjacent card swiping records; Matching the adjacent site with the site of the previous card swiping record in the two adjacent card swiping records, and if the match is successful, taking the site of the previous card swiping record in the two adjacent card swiping records as the target site; Determining the transfer time threshold according to the distance between the target site and the card swiping site in the next card swiping record; If the adjacent site fails to match the card swiping site of the first of the two adjacent card swiping records, the site with the most passing lines is selected from the adjacent sites as the target site; The sum of the travel time between the card swiping site in the previous card swiping record of the two adjacent card swiping records and the target site and the preset transfer time is used as the transfer time threshold.

2. The method according to claim 1, wherein the card swiping record further includes a card swiping boarding / disembarking category, and after calculating the card swiping time difference between two adjacent card swiping records in the same piece of data to be analyzed, the method further includes: If the card swiping type in the first card swiping record of two adjacent card swiping records is boarding, and the card swiping type in the second card swiping record is getting off, or the card swiping vehicle routes in the two adjacent card swiping records are the same, then the card swiping time difference between the two adjacent card swiping records will be deleted.

3. The method according to claim 2, wherein selecting a site from the neighboring sites as a target site comprises: The station that the card swiping vehicle route passes through in the first card swiping record of the two adjacent card swiping records is selected from the adjacent stations as the target station.

4. The method according to claim 3, wherein selecting a site from the neighboring sites as a target site comprises: The neighboring site closest to the card swiping site in the latter of the two adjacent card swiping records is used as the target site.

5. The method according to claim 4, wherein the adjacent sites include the card swiping site in the subsequent card swiping record, and the step of selecting a site from the adjacent sites as the target site comprises: If the card swiping vehicle type in two adjacent card swiping records is both buses, the card swiping site in the latter card swiping record is used as the target site.

6. The method according to any one of claims 1 to 5, wherein the method for determining the travel time between the card swiping station in the first of the two adjacent card swiping records and the target station comprises: Calculate the number of stations between the card swiping station in the previous card swiping record and the target station in two adjacent card swiping records, and query the average inter-station travel time between the card swiping station in the previous card swiping record and the target station in the two adjacent card swiping records; The travel time between the card swiping station in the previous card swiping record and the target station is obtained according to the average inter-station travel time and the number of interval stations.

7. The method according to claim 1, wherein after extracting the card swiping data for the same card number on the same day as the data to be analyzed, the method further comprises: Sort the same data to be analyzed in ascending order of card swiping time; If the time difference between two adjacent card swiping records is within a preset time range, the latter of the two adjacent card swiping records will be deleted.

8. The method according to claim 1, wherein obtaining the card swiping data of users in the target area within a specified time range comprises: Obtain the boarding card swiping data of physical bus cards and mobile payment bus cards of users in the target area within a specified time range.

9. A public transportation transfer data processing device, comprising: The card swiping data acquisition module is used to obtain the card swiping data of users in the target area within a specified time range; A data statistics module is used to extract the card swiping data of the same card number on the same day from the card swiping data as data to be analyzed, each piece of data to be analyzed includes a card swiping record of each card swiping, and the card swiping record includes: card swiping time, card swiping vehicle route, and card swiping station; A time difference processing module is configured to calculate the card swiping time difference between two adjacent card swiping records in the same piece of data to be analyzed, if the number of card swiping records in the same piece of data to be analyzed is greater than or equal to two, and there are at least two card swiping records with different vehicle routes; a transfer data screening module, configured to compare the time difference between two adjacent card swipe records with a transfer time threshold; if the time difference is less than the transfer time threshold, the corresponding two adjacent card swipe records are treated as transfer swipes, and the corresponding card swipe records are saved to obtain transfer data for the target area within the specified time range; The transfer time threshold is calculated based on the card swiping stations in two adjacent card swiping records in the following manner: A site query module is used to query adjacent sites within a specified distance range of the card swiping site in the latter of two adjacent card swiping records; a first target determination module, configured to match the adjacent site with the card swiping site of the previous card swiping record in the two adjacent card swiping records, and if a match is successful, use the card swiping site of the previous card swiping record in the two adjacent card swiping records as the target site; A first threshold determination module is configured to determine the transfer time threshold according to the distance between the target station and the card swiping station in the next card swiping record; a second target determination module configured to select a site with the most passing routes from the neighboring sites as a target site if the neighboring site fails to match the site of the first of the two adjacent card swiping records; The second threshold determination module is configured to use the sum of the travel time between the card swiping site in the previous card swiping record of the two adjacent card swiping records and the target site and the preset transfer time as the transfer time threshold.

10. A public transportation transfer data processing device, comprising: At least one processor and a memory for storing processor-executable instructions, wherein when the processor executes the instructions, the method according to any one of claims 1 to 8 is implemented.

11. A computer-readable storage medium comprising: When the instructions in the computer-readable storage medium are executed by a processor of a public transportation transfer data processing device or electronic device, the public transportation transfer data processing device or electronic device is enabled to execute the public transportation transfer data processing method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Bus IC card passenger transfer station judgment method combining intelligent dispatching data

    CN103280100A

  • Bus transfer information extracting method and system based on IC (integrated circuit) cards

    CN106776736A