CN114820264A - Public transport vehicle transfer data processing method, device, equipment and storage medium - Google Patents

Public transport vehicle transfer data processing method, device, equipment and storage medium Download PDF

Info

Publication number
CN114820264A
CN114820264A CN202210329452.9A CN202210329452A CN114820264A CN 114820264 A CN114820264 A CN 114820264A CN 202210329452 A CN202210329452 A CN 202210329452A CN 114820264 A CN114820264 A CN 114820264A
Authority
CN
China
Prior art keywords
card swiping
card
records
station
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210329452.9A
Other languages
Chinese (zh)
Inventor
夏伟
黄巍
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alipay Hangzhou Information Technology Co Ltd
Original Assignee
Alipay Hangzhou Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alipay Hangzhou Information Technology Co Ltd filed Critical Alipay Hangzhou Information Technology Co Ltd
Priority to CN202210329452.9A priority Critical patent/CN114820264A/en
Publication of CN114820264A publication Critical patent/CN114820264A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/40Business processes related to the transportation industry
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/29Geographical information databases

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Business, Economics & Management (AREA)
  • Physics & Mathematics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Data Mining & Analysis (AREA)
  • Health & Medical Sciences (AREA)
  • Remote Sensing (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Resources & Organizations (AREA)
  • General Engineering & Computer Science (AREA)
  • Primary Health Care (AREA)
  • Strategic Management (AREA)
  • Tourism & Hospitality (AREA)
  • General Business, Economics & Management (AREA)
  • Traffic Control Systems (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Devices For Checking Fares Or Tickets At Control Points (AREA)

Abstract

The specification provides a public transport means transfer data processing method, a public transport means transfer data processing device, public transport means transfer data processing equipment and a public transport means transfer data processing storage medium. Based on the travel transfer behaviors of the users, complete user travel links can be macroscopically drawn, and transfer data of each travel of the users can be accurately determined, so that decision basis is provided for optimization of public transport network and adjustment of public transport lines.

Description

Public transport vehicle transfer data processing method, device, equipment and storage medium
Technical Field
The specification belongs to the technical field of computers, and particularly relates to a public transport vehicle transfer data processing method, device, equipment and storage medium.
Background
The proportion of urban public transport and subway trips in the total urban sunrise trip amount is increased day by day, and the popularization of a map website and a public trip information platform provides a convenient trip scheme selection for users at present. The transfer of public transport means such as buses and subways is the most common travel mode, and by analyzing the transfer data of the public transport means of users, the statistical transfer data of residents can provide theoretical basis for reasonable arrangement and application of public transport resources and optimize urban public transport resource distribution.
Disclosure of Invention
The embodiment of the specification aims to provide a method, a device, equipment and a storage medium for processing public transport transfer data, so that the extraction of the public transport transfer data is realized, the accuracy of transfer data determination is improved, and a theoretical basis is laid for the optimization design of urban public transport.
In one aspect, an embodiment of the present specification provides a public transportation vehicle transfer data processing method, including:
acquiring riding card swiping data of a user in a specified time range in a target area;
extracting riding card swiping data of the same card number on the same day from the riding card swiping data as data to be analyzed, wherein each piece of data to be analyzed comprises card swiping records of each card swiping, and the card swiping records comprise: the card swiping time, the card swiping vehicle line and the card swiping station;
if the number of the card swiping records in the same data to be analyzed is greater than or equal to two, and the card swiping vehicle lines in at least two card swiping records are different, calculating the card swiping time difference of every two adjacent card swiping records in the same data to be analyzed;
comparing the card swiping time difference of the two adjacent card swiping records with a transfer time threshold, if the card swiping time difference is smaller than the transfer time threshold, taking the corresponding two adjacent card swiping records as transfer card swiping, and storing the corresponding card swiping records to obtain transfer data of the target area within the specified time range; and the transfer time threshold is obtained by calculation according to the card swiping stations in the two adjacent card swiping records.
In another aspect, the present specification provides a public transportation transfer data processing apparatus including:
the card swiping data acquisition module is used for acquiring the card swiping data of a user in a specified time range in a target area;
the data statistics module is used for extracting bus card swiping data of the same card number on the same day from the bus card swiping data to serve as data to be analyzed, each piece of data to be analyzed comprises a card swiping record of card swiping each time, and the card swiping records comprise: the card swiping time, the card swiping vehicle line and the card swiping station;
the time difference processing module is used for calculating the card swiping time difference of every two adjacent card swiping records in the same data to be analyzed if the number of the card swiping records in the same data to be analyzed is greater than or equal to two and the card swiping vehicle lines in at least two card swiping records are different;
the transfer data screening module is used for comparing the card swiping time difference of the two adjacent card swiping records with a transfer time threshold, if the card swiping time difference is smaller than the transfer time threshold, the corresponding two adjacent card swiping records are used as transfer card swiping, and the corresponding card swiping records are stored to obtain the transfer data of the target area within the specified time range; and the transfer time threshold is obtained by calculation according to the card swiping stations in the two adjacent card swiping records.
In yet another aspect, embodiments of the present specification provide a public transportation transfer data processing apparatus, including at least one processor and a memory for storing processor-executable instructions, which when executed by the processor implement the above public transportation transfer data processing method.
In yet another aspect, the present specification embodiments provide a computer-readable storage medium having instructions that, when executed by a processor of a public transportation transfer data processing apparatus or an electronic device, enable the public transportation transfer data processing apparatus or the electronic device to perform the above public transportation transfer data processing method.
According to the public transport means transfer data processing method, device, equipment and storage medium provided by the specification, statistical analysis is carried out on the bus swiping data of a user in a specified time range in a target area, the bus swiping data of the same card number in the same day is used as data to be analyzed, transfer data in the data to be analyzed are screened by analyzing the swiping time difference in the swiping record in the data to be analyzed, the swiping record belonging to the transfer data is stored, and the transfer data in the specified time range in the target area are obtained. Based on the travel transfer behaviors of the users, complete user travel links can be macroscopically drawn, and transfer data of each travel of the users can be accurately determined, so that decision basis is provided for optimization of public transport network and adjustment of public transport lines.
Drawings
In order to more clearly illustrate the embodiments of the present specification or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only some embodiments described in the present specification, and for those skilled in the art, other drawings can be obtained according to the drawings without any creative effort.
FIG. 1 is a schematic flow chart diagram of an embodiment of a public transportation vehicle transfer data processing method provided by an embodiment of the present specification;
FIG. 2 is a schematic view of a scenario of mass transit transfer data processing in one example scenario herein;
FIG. 3 is a flow chart illustrating bus transfer data processing in one example scenario herein;
FIG. 4 is a block diagram of an embodiment of a public transportation vehicle transfer data processing apparatus provided herein;
fig. 5 is a block diagram of a hardware configuration of the public transportation transfer data processing server in one embodiment of the present specification.
Detailed Description
In order to make those skilled in the art better understand the technical solutions in the present specification, the technical solutions in the embodiments of the present specification will be clearly and completely described below with reference to the drawings in the embodiments of the present specification, and it is obvious that the described embodiments are only a part of the embodiments of the present specification, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present specification without making any creative effort shall fall within the protection scope of the present specification.
Low carbon travel is increasingly advocated, using public transportation such as: more and more users of buses and subways as daily travel tools are available, but the users usually cannot directly reach the destination by taking public transport tools, and may need to transfer the public transport tools, even for multiple times of transfers, which brings inconvenience to the users for traveling. Based on the method, transfer data of users in the city taking public transportation means can be counted, and then the public transportation in the city is optimized based on the transfer data, such as: two lines for multi-user transfer can be merged, direct public transportation is designed, and convenience is brought to users for going out.
In some embodiments of the present description, a public transportation transfer data processing method may be provided, where card swiping data of a user in a specified time range of a target area is counted, and a difference between two adjacent card swiping times and a transfer time threshold are compared to determine whether the user transfers, so as to realize fast counting of transfer data of the user, and further lay a data foundation for optimal design and planning of urban transportation.
Fig. 1 is a schematic flow chart of an embodiment of a public transportation vehicle transfer data processing method provided in an embodiment of the present specification. Although the present specification provides the method steps or apparatus structures as shown in the following examples or figures, more or less steps or modules may be included in the method or apparatus structures based on conventional or non-inventive efforts. In the case of steps or structures which do not logically have the necessary cause and effect relationship, the execution order of the steps or the block structure of the apparatus is not limited to the execution order or the block structure shown in the embodiments or the drawings of the present specification. When the described method or module structure is applied to a device, a server or an end product in practice, the method or module structure according to the embodiment or the figures may be executed sequentially or in parallel (for example, in a parallel processor or multi-thread processing environment, or even in an implementation environment including distributed processing and server clustering).
In a specific embodiment of the public transportation vehicle transfer data processing method provided in this specification, as shown in fig. 1, the method may be applied to a device terminal such as a computer, a tablet computer, a server, a smart phone, a server, and a smart wearable device, and the method may include the following steps:
and 102, obtaining riding card swiping data of a user in a specified time range in a target area.
In a specific implementation process, the target region may be understood as a region where public transportation transfer data analysis is required, and may be a city, a county city, or a certain region of the city and the county city, which may be specifically set according to an actual need, and the embodiment of the present specification is not specifically limited. The riding card swiping data of the user in the specified time range in the target area can be obtained, such as: the riding card swiping data of one day or one month or 5 continuous working days or 10 continuous rest days can be acquired, and the setting can be specifically performed according to actual needs, and the embodiment of the specification is not specifically limited. For example: the riding card swiping data of all the users riding the public transportation means in the target area within 3 months, 20 days 00:00-24:00 and a whole day can be obtained. The bus card swiping data can be obtained from the system of the operation unit of the public transport means, such as: the bus operation unit and the subway operation unit can provide bus taking and subway taking card swiping data of users, or can obtain the bus taking and subway taking card data from a bus card management system. With the development of science and technology, most users use bus cards to swipe cards to get on the bus when taking public transport means, and the embodiment of the present specification analyzes transfer data of the users by counting card swiping data of the buses, where the card swiping data of the buses may include card swiping time of the users, card swiping stations, vehicle lines corresponding to card swiping, card numbers, and the like, and may be specifically determined according to actual needs, and the embodiment of the present specification is not specifically limited.
In addition, in some embodiments of the present specification, the obtaining data of card swiping by a vehicle of a user in a specified time range in a target area includes:
and acquiring the riding card swiping data of the physical bus card and the mobile payment bus card of the user in the specified time range of the target area.
In a specific implementation process, the bus card swiping data in the embodiment of the present specification may be card swiping data of an entity bus card, or card swiping data of a mobile payment bus card. The physical bus card can be understood as a card sold by a bus operation unit and specially used for taking public transport means, and can also be a card provided by a designated unit cooperating with the bus operation unit and capable of being used for taking public transport means, such as: bank card, social security card, etc. with public transport means riding function. The mobile payment bus card can be understood as a bus card without an entity and attached to a client side, wherein the bus card can perform a public transport vehicle taking payment function, such as: some applications provide an applet that can be used for payment by public transport, which can implement the function of payment by public transport by providing a payment code for payment, and some mobile payment bus cards can be virtual cards in the client whose actual function is similar to that of a physical bus card, belonging to the virtual cards in the client, such as: virtual public transport cards can be integrated in the card package function of the smart phone, and the function of card swiping payment can be realized through the NFC (Near Field Communication) technology.
The embodiment of the specification can acquire the bus taking card swiping data of different types of bus cards through the bus operation units, realize the same analysis and management of the bus taking data of the bus cards of different operators, improve the accuracy of transfer data analysis, and lay an accurate data foundation for the optimization and planning of subsequent urban rail transit.
104, extracting the bus card swiping data of the same card number on the same day from the bus card swiping data as data to be analyzed, wherein each piece of data to be analyzed comprises a card swiping record of swiping the card at each time, and the card swiping records comprise: time of swiping a card, vehicle line of swiping a card, and station of swiping a card.
In a specific implementation process, after bus swiping data of a user within a specified time range of a target area is obtained, the bus swiping data can be sorted, each bus card corresponds to a card number with a unique identifier, and data of the same card number in the bus swiping data on the same day can be counted to serve as data to be analyzed. Generally speaking, the bus cards corresponding to the same card number are considered to be used by the same user, card swiping data of the same user on the same day is counted based on the card number, and whether the user is transferred or not in a trip in one day can be analyzed based on the card swiping data of one day. If the bus card swiping data is bus data of a target area for multiple days, each user can correspond to multiple pieces of data to be analyzed based on the card number, and if the bus card swiping data is bus data of the target area for one day, each user can correspond to one piece of data to be analyzed. In any case, a plurality of pieces of data to be analyzed can be obtained based on the card number, each piece of data to be analyzed corresponds to card swiping data of one user in one day, each piece of data to be analyzed can include a card swiping record of each card swiping, and the card swiping records can include: the card swiping time, the card swiping vehicle line, the card swiping vehicle category and the like, wherein the card swiping vehicle category can represent whether a current user swipes a card to take a bus, a subway or a tramcar, and can also comprise other public transport means according to actual needs. Other contents can be included in the card swiping record, such as: card number of card swiping, card swiping station, card type, and the like, and embodiments of the present specification are not particularly limited. The card swiping vehicle line can be understood as the line of public transportation vehicles where the user is currently taking a card swiping ride, which can include card swiping vehicle categories such as: 310 buses, 356 buses, subway No. 1 line, subway No. 2 line and the like belong to the card swiping vehicle line.
In addition, in some embodiments of the present specification, after extracting, from the vehicle card swiping data, vehicle card swiping data of the same card number on the same day as data to be analyzed, the method further includes:
sequencing the same data to be analyzed in an increasing manner according to the card swiping time;
and if the card swiping time difference of the two adjacent card swiping records is within the preset time range, deleting the next card swiping record in the two adjacent card swiping records.
In a specific real-time process, after the data of card swiping by bus of the same card number on the same day is counted, the counted data to be analyzed can be filtered, the same data to be analyzed can be sorted in an increasing manner according to the card swiping time, and then the card swiping time difference of the two adjacent card swiping records is calculated in sequence, if the card swiping time difference is within a preset time range, if the card swiping time difference is within the preset time range, the method comprises the following steps: and 60 seconds, the two adjacent card swiping records are considered to be the problems of repeated card swiping or error card swiping, at this time, the latter card swiping record in the two adjacent card swiping records can be deleted, and only the former card swiping record is reserved as the data of the subsequent transfer data analysis. The preset time range may be set according to actual needs, and embodiments of the present specification are not specifically limited.
By comparing the card swiping time difference recorded by two adjacent card swiping times, the card swiping time difference is very short, and data which may belong to error card swiping or repeated card swiping is eliminated, so that the accuracy of a subsequent transfer analysis result is ensured, the data processing amount is reduced, and the data processing rate is improved.
And 106, if the number of the card swiping records in the same data to be analyzed is greater than or equal to two and the card swiping vehicle lines in at least two card swiping records are different, calculating the card swiping time difference of every two adjacent card swiping records in the same data to be analyzed.
In a specific implementation process, after the card swiping data of the same card number on the same day is counted, whether the number of card swiping records in each piece of data to be analyzed is greater than or equal to two or not can be analyzed, if the card swiping record is equal to one, a specification user does not transfer, and the user only has one trip record in the whole day. If the number of the card swiping records in the same data to be analyzed is greater than or equal to two, the card swiping vehicle lines in the card swiping records in the data to be analyzed can be obtained again, whether the card swiping vehicle lines in the card swiping records of at least two times are different or not can be inquired, and if the card swiping vehicle lines in the card swiping records of at least two times are different, the user in the data to be analyzed can be generally considered to have the possibility of transfer. Such as: the card swiping vehicle line in the first card swiping record is 310, the card swiping vehicle line in the second card swiping record is 356, and the user may be the vehicle which is changed from the 310 line vehicle to the 356 line vehicle. By the method, the data to be analyzed with possible transfer can be inquired, and for the data to be analyzed with the possible transfer, the card swiping time difference of every two adjacent card swiping records in the same data to be analyzed can be calculated in sequence, namely the card swiping time of every two adjacent card swiping records is subtracted to obtain the card swiping time difference of the two adjacent card swiping records.
In some embodiments of this specification, the card-swiping record further includes a card-swiping getting-on/off class, and after calculating a card-swiping time difference between every two adjacent card-swiping records in the same piece of data to be analyzed, the method further includes:
and if the type of the card swiping to get on or off the vehicle in the previous card swiping record in the two adjacent card swiping records is to get on the vehicle, the type of the card swiping to get on or off the vehicle in the next card swiping record is to get off the vehicle, or the card swiping vehicle circuits in the two adjacent card swiping records are the same, deleting the card swiping time difference of the two adjacent card swiping records.
In a specific implementation process, in some scenarios, a user may swipe a card on the same vehicle and also swipe a card on the same vehicle when getting off the vehicle, and then there are two adjacent card swiping records that are the card swiping records of the user on the same vehicle. Such as: when a user takes a subway, the user generally needs to go in and out for swiping cards, even if the user only needs to transfer the subways of different lines at corresponding stations in the subway, the user does not need to swipe cards for transferring, and for the transfer of the subway lines, the user can consider that no transfer exists in the embodiment of the specification and does not take the transfer into consideration. Then in a subway trip, the user needs to swipe the card twice, and the card swiping vehicle lines in the two card swiping records may be different, but the trip belongs to a subway trip and does not need to analyze transfer data. For another example: some buses need to swipe cards for getting on the bus and swipe cards for getting off the bus, and the riding cost required by the bus is calculated based on the stations swiped twice, but the types of getting on and off the bus cannot be distinguished by general bus swiping cards for getting on and off the bus, but in this case, the card swiping vehicle lines of two adjacent card swiping times are the same, and belong to one trip, and the transfer data does not need to be analyzed.
In some embodiments of the present specification, it can be obtained through the card swiping record whether each card swiping belongs to an entering card swiping or an exiting card swiping, such as: when a user takes a subway, the card swiping equipment for the card swiping in the station and the card swiping equipment for the card swiping out of the station are different, if the card swiping type in the previous card swiping record in the two adjacent card swiping records is the entering of the train, and the card swiping type in the next card swiping record is the leaving of the train, the card swiping time difference of the two adjacent card swiping records is deleted, and the subsequent transfer data processing analysis is not performed. Meanwhile, whether the card swiping vehicle lines in the two adjacent card swiping records are the same or not can be judged, if yes, the card swiping time difference of the two adjacent card swiping records can be deleted, and subsequent transfer data processing analysis is not carried out, so that the data processing amount is reduced, and the data processing efficiency and the accuracy of the transfer data analysis are improved.
Step 108, comparing the card swiping time difference of the two adjacent card swiping records with a transfer time threshold, if the card swiping time difference is smaller than the transfer time threshold, taking the corresponding two adjacent card swiping records as transfer card swiping, and storing the corresponding card swiping records to obtain transfer data of the target area within the specified time range; and the transfer time threshold is obtained by calculation according to the card swiping stations in the two adjacent card swiping records.
In a specific implementation process, after calculating the card swiping time difference of the two adjacent card swiping records, the calculated card swiping time difference and the transfer time threshold value can be calculated, if the card swiping time difference is smaller than the transfer time threshold value, the user can be considered to take different public transportation within a certain time, the two adjacent card swiping records can be considered to belong to transfer card swiping, and the two adjacent card swiping records are stored. And continuously analyzing the next two adjacent card swiping records until the card swiping records in all the data to be analyzed are analyzed, and obtaining the transfer data of the target area within the specified time range. The obtained transfer data can be utilized to analyze the urban rail transit, so that the public transport lines are optimized, the transfer times are reduced, and the user can go out conveniently.
The transfer time threshold may represent the longest public transportation time required between the card swiping stations in the two adjacent card swiping records, and may be obtained by calculation according to the card swiping stations in the two adjacent card swiping records, such as: the average public transportation travel time required for reaching the card swiping station in the next card swiping record from the card swiping station in the previous card swiping record can be calculated according to the distance between the card swiping stations in the two adjacent card swiping records, and the transfer time threshold value is determined based on the calculated average public transportation travel time. Or, according to the distance between the card swiping stations in the two adjacent card swiping records, calculating the average public transportation running time required by the public transportation means (namely the card swiping vehicle category) in the previous card swiping record to reach the card swiping station in the next card swiping record from the card swiping station in the previous card swiping record, and further determining the transfer time threshold value based on the calculated average public transportation running time. Of course, the transfer time threshold may also be set in other manners according to actual needs, and the embodiments of this specification are not particularly limited.
In the method for processing transfer data of public transport vehicles provided in the embodiments of the present specification, statistical analysis is performed on the card swiping data of a user in a specified time range in a target area, the card swiping data of the user in the same day with the same card number is used as data to be analyzed, whether transfer data exists in the data to be analyzed is analyzed by analyzing the card swiping time difference in the card swiping record in the data to be analyzed, and the card swiping record belonging to the transfer data is stored to obtain the transfer data of the target area in the specified time range. Based on the travel transfer behaviors of the users, complete user travel links can be macroscopically drawn, and transfer data of each travel of the users can be accurately determined, so that decision basis is provided for optimization of public transport network and adjustment of public transport lines.
In some embodiments of the present specification, the transfer time threshold is calculated and obtained according to card swiping sites in two adjacent card swiping records, and includes:
inquiring the adjacent stations within the specified distance range of the card swiping station in the latter card swiping record in the two adjacent card swiping records;
matching the adjacent station with a card swiping station of a previous card swiping record in the two adjacent card swiping records, and if the matching is successful, taking the card swiping station of the previous card swiping record in the two adjacent card swiping records as a target station;
and determining the transfer time threshold according to the distance between the target station and the card swiping station in the next card swiping record.
In a particular implementation, the transfer of public transportation vehicles may include: the bus is changed to take a bus, the bus is changed to take a subway, a tram and other public transportation means which are not buses, and the subway is changed to take a bus and other public transportation means which are not subways. Generally, most buses only need to punch the card and get on the bus when getting on, get off and do not need to punch the card, but, subway generally need enter the station and punch the card, and the card is punched when going out of the station, nevertheless, in some scenes, the user also need to punch the card and get off the vehicle and punch the card when taking the bus. Then, when the user changes the card, the distance between the card swiping station in the next card swiping record and the card swiping station in the previous card swiping record may be far as: the user takes the bus to punch the card and get on the bus, gets off the bus at the subway station or bus station of the bus route of the subway or other lines, but gets off the bus without punching the card, gets on the bus at the subway station or bus station of the bus route of the subway or other lines, and at the moment, the stations for punching the card twice are far away. However, if the bus in which the user takes gets off needs to be swiped, the two-time card swiping station is close to each other. In this embodiment of the present description, after obtaining the card swiping time difference between two adjacent card swiping records, a neighboring station within a specified distance range of the card swiping station in the next card swiping record in the two adjacent card swiping records may be queried, for example: the specified distance range of the neighboring stations within 500 meters or 1000 meters can be adjusted according to actual needs, and generally can be set within a shorter distance range, and the neighboring stations can reach the distance within a short time by walking or cycling, and the embodiments of the present disclosure are not limited specifically. The card swiping station can be understood as a bus station or a subway station or a tram station where the user swipes the card. It should be noted that the neighboring stations may include stations of public transportation means such as bus stations, subway stations, and tram stations, and the neighboring stations may also include a card swiping station in the next card swiping record.
If one of the neighboring stations is found to be the same as the card swiping station in the previous card swiping record when the neighboring stations within the specified distance range of the card swiping station in the next card swiping record are inquired, the card swiping station in the previous card swiping record can be directly used as the target station. In this case, the card-swiping station of the user in the previous card-swiping record is likely to be a transfer station, and the next card-swiping station of the card-swiping record can be reached by walking or riding a bicycle without other vehicles. At this time, the transfer time threshold may be determined according to the distance between the target station and the card swiping station in the next card swiping record. Such as: the distance between the target station and the card swiping station in the next card swiping record can be divided by the walking speed or the speed of riding a bicycle, and the waiting time is increased by a proper amount, so that the transfer time threshold value can be obtained. In general, in this case, the distance between the target station and the card swiping station in the next card swiping record is short, and the transfer time threshold can be set in a short time such as: 10 minutes, 15 minutes, 20 minutes, etc. And comparing the card swiping time difference of the two adjacent card swiping records with a transfer time threshold value to judge whether the two adjacent card swiping records belong to transfer.
For example: in some scenes, when a user takes a bus, the user also needs to get on the bus and swipe the card and get off the bus and then goes to the stop of other public transport means such as a subway, and at the moment, the card swiping stop in the previous card swiping record in the two adjacent card swiping records is the stop for the user to transfer. If one station in the adjacent stations is found to be the same as the card swiping station in the previous card swiping record when the adjacent stations in the appointed distance range of the card swiping station in the next card swiping record are inquired, the card swiping station in the previous card swiping record can be directly used as the target station, the accuracy of determination of the transfer station is improved, and an accurate foundation is laid for screening and judging subsequent transfer data.
For another example: in some scenes, a user takes a subway to change a bus for traveling, and under a common condition, if the user takes the subway and then changes the bus, the user firstly takes the subway to get off a subway station near a bus station of a bus route, and then gets on the bus at the bus station near the bus station of the bus route. Under general conditions, the subway station where the user gets off is relatively close to the bus station to be transferred, the user can arrive by walking generally, the threshold value of the transfer time can be set to be 5 minutes, 10 minutes and the like, and the method can be adjusted according to actual conditions.
In the embodiment of the specification, the card swiping station in the previous card swiping record is compared with the station near the card swiping station in the next card swiping record to judge whether the user has the possibility of directly transferring the next line of public traffic after getting off the car by swiping the card, and then the transfer data is accurately screened out by accurately setting the transfer time threshold value, so that a data base is laid for the optimization and adjustment of urban rail transit.
Under more circumstances, general bus only need get on the bus and punch the card, get off and need not punch the card, and at this moment, the user can't learn the transfer station if take the bus to transfer the bus or the subway etc. of other circuits. For this situation, in some embodiments of the present specification, the transfer time threshold is calculated according to the card swiping station in the two adjacent card swiping records, and includes:
if the adjacent sites are not matched with the card swiping sites of the previous card swiping records in the two adjacent card swiping records successfully, one of the adjacent sites is selected as a target site;
and taking the sum of the running time between the card swiping station in the previous card swiping record in the two adjacent card swiping records and the target station and the preset transfer time as the threshold value of the transfer time.
In a specific implementation process, when a general bus is changed to a subway or a tramcar, a user takes the bus to a bus station near other public transport means such as a subway station or a tramcar station, and then takes the tramcar at the subway station or the tramcar station. Most buses only need get on the bus and swipe the card, get off and do not need to swipe the card, and at this moment, when the public transport means's of non-buses such as subway or tram were taken to the bus judgement, probably can't learn the user and take off at which bus stop after taking the bus, and then can't accurately learn transfer stop and transfer time threshold value. In this embodiment of the present description, neighboring sites within a specified distance range from a card swiping site in a subsequent card swiping record may be queried, and if none of the neighboring sites within the specified distance range from the subsequent card swiping record matches a card swiping site of a previous card swiping record in two adjacent card swiping records, it may be considered that a transfer site of the previous card swiping record cannot be accurately obtained. At this time, one site may be selected from neighboring sites as a target site, such as: in some embodiments of the present specification, the selecting one of the neighboring stations as the target station includes: and taking the nearest adjacent station to the card swiping station in the latter card swiping record in the two adjacent card swiping records as the target station. Generally, the user transfer selects the nearest station as the transfer station, so that the accuracy of selecting the target station is higher.
Or, in order to avoid the error of the site selection, a mode with smaller influence even if the site selection is wrong may be selected, such as: a station with a central distance from a card swiping station recorded after the latter card swiping is selected as a target station, or a station with the most approaches to a bus route can be selected as a target station, which can be specifically set according to actual needs, and embodiments of the present specification are not specifically limited.
After the target station is determined, calculating the running time between the target station and the card swiping station in the previous card swiping record in the two adjacent card swiping records, and adding the calculated running time and the preset transfer time to be used as a transfer time threshold value. And comparing the card swiping time difference of the two adjacent card swiping records with a transfer time threshold value to judge whether the two adjacent card swiping records belong to transfer. The preset transfer time can be set according to actual needs, for example, set to be 5 minutes, 15 minutes, 20 minutes and the like, and can be understood as reserved waiting time and time from a previous transfer station to a subsequent transfer station. Because the positions of two bus stops are different in public exchange taking, the transfer time threshold value of the bus in the process of transferring the bus can be accurately configured by reasonably setting the preset transfer time, and then transfer data can be accurately screened out, so that an accurate data base is established for planning and optimizing the design of subsequent urban rail transit.
In some embodiments of the present specification, the method for determining the travel time between the card swiping station in the previous card swiping record of the two adjacent card swiping records and the target station includes:
calculating the number of interval stations between the card swiping station in the previous card swiping record in the two adjacent card swiping records and the target station, and inquiring the average inter-station running time of the stations between the card swiping station in the previous card swiping record in the two adjacent card swiping records and the target station;
and obtaining the running time between the card swiping station in the previous card swiping record in the two adjacent card swiping records and the target station according to the average inter-station running time and the number of the interval stations.
In a specific implementation process, after the target station is determined, the number of spaced stations between the target station and the card swiping station in the previous card swiping record in the two adjacent card swiping records can be calculated, and then the average inter-station running time of each station between the target station and the card swiping station in the previous card swiping record in the two adjacent card swiping records is inquired. For example: 5 stations are arranged between the target station and the card swiping station in the previous card swiping record in the two adjacent card swiping records, the running time table of buses or subways passing through the 5 stations can be inquired, and the average inter-station running time between every two stations can be inquired. The average inter-station running time of the corresponding vehicle can be inquired according to the type of the vehicle swiping card in the previous card swiping record in the two adjacent card swiping records. Such as: if the type of the card swiping vehicle in the previous card swiping record in the two adjacent card swiping records is the bus, the average inter-station driving time of stations between the card swiping station in the previous card swiping record in the two adjacent card swiping records and the target station in the bus route can be inquired.
The bus of the station between the route target station and the card swiping station in the previous card swiping record in the two adjacent card swiping records may not be a bus of one line, for example: the bus 1 is connected to the first two stops, the bus 2 is connected to the second stop and the third stop, and the bus 3 is connected to the third stop to the target stop. There may be more buses passing through each station between two stations, such as: if there are 5 bus stations in the previous card swiping record and the first interval station, the average inter-station driving time between the stations can be inquired by inquiring the average inter-station driving time table of the buses, each bus line can correspond to one average inter-station driving time table, if there are multiple buses in the two stations, the average inter-station driving time of the multiple buses can be averaged, or the average inter-station driving time between the stations between the two target stations can be determined by selecting the modes of the maximum value, the minimum value or the median and the like. Of course, if the type of the card swiping vehicle in the previous card swiping record is the subway or other public transportation means, when the average inter-station driving time of the station between the card swiping station in the previous card swiping record in the two adjacent card swiping records in the path and the target station is calculated, the average inter-station driving time table of the subway or other public transportation means can be used, the processing mode is the same as that of the bus, and the description is omitted here.
The average inter-station travel schedule may be obtained by processing travel data of the public transportation by an operation unit of the public transportation.
After the average inter-station running time of the buses of the stations between the target stations is determined, the average inter-station running time between every two stations between the target stations can be added to obtain the running time from the card swiping station in the next card swiping record to the card swiping station in the previous card swiping record in the two adjacent card swiping records.
In the embodiment of the specification, the target station of the next card swiping record in the two adjacent card swiping records is determined, the average inter-station running time from the card swiping station of the previous card swiping record to each station between the target stations is inquired, the running time required by the card swiping station in the two adjacent card swiping records is further determined, and an accurate data base is laid for the subsequent judgment of whether the card is transferred or not.
In some embodiments of the present specification, the selecting one of the neighboring stations as the target station includes:
and selecting a station where the card swiping vehicle route passes in the previous card swiping record in the two adjacent card swiping records from the adjacent stations as the target station.
In a specific implementation process, after a neighboring station within a specified range of a card swiping station in a next card swiping record is inquired, which bus stations are stations where the card swiping vehicle line passes in a previous card swiping record in two adjacent card swiping records can be inquired from the neighboring stations, and the neighboring stations where the card swiping vehicle line passes in the previous card swiping record are taken as target stations. Certainly, the number of the adjacent stations where the card swiping vehicle line passes in the previous card swiping record can be one or more, and if the number of the adjacent stations is multiple, the station closest to the card swiping station in the next card swiping record in the two adjacent card swiping records can be selected from the adjacent stations where the card swiping vehicle line passes in the previous card swiping record as the target bus station. The possible getting-off station of the user can be accurately screened out through the card swiping riding line in the previous card swiping record, and an accurate data basis is provided for the judgment of the subway change of the follow-up bus.
In some embodiments of this specification, the neighboring sites include a card swiping site in the next card swiping record, and the selecting one site from the neighboring sites as a target site includes:
and if the types of the card swiping vehicles in the two adjacent card swiping records are buses, taking the card swiping station in the next card swiping record as the target station.
In a specific implementation process, when a bus is changed to another bus, and a card does not need to be swiped when a bus is taken for getting off in the previous time, when a neighboring station within a specified distance range of a card swiping station in a next card swiping record is inquired, the neighboring station can not be matched with the card swiping station in the previous card swiping record generally. At this time, the card swiping station in the next card swiping record can be directly used as the target station, and the running time between the target station and the card swiping station in the previous card swiping record in the two adjacent card swiping records is calculated, namely the running time between the two stations in the two adjacent card swiping records is calculated, so that the corresponding transfer time threshold value is accurately determined.
However, it should be noted that in some scenarios, one bus stop may have multiple positions, and different bus routes may stop at the same bus stop at different positions. Such as: one bus stop is named as a station A, but 3 bus stops named as the station A are respectively arranged at different positions. If the number of the card swiping stations recorded by the previous card swiping record or the number of the card swiping stations recorded by the next card swiping record is larger than 1, it is indicated that the number of at least one station in two stations in two adjacent card swiping records is larger than 1, and at this time, the two stations with the smallest distance between the card swiping station recorded by the previous card swiping record and the card swiping station recorded by the next card swiping record can be selected as the target bus station. For example: if the previous card swiping station has a card swiping station A, and the next card swiping station has two card swiping stations B, C, the distance between the AB and the distance between the AC can be calculated, and if the distance between the AB is smaller than the distance between the AC, the bus station A, B can be used as the target bus station. Generally, a user can select a station with a short distance for transfer, and the accuracy of the transfer station can be improved by selecting the station with the minimum distance as a target bus station, so that the accuracy of subsequent transfer data judgment is improved. If the number of the first card swiping station and the second card swiping station is 1, the distance between the two bus stations is the minimum, and the two stations can be used as target stations.
In addition, in some embodiments of the present specification, the card swiping record may include a card swiping vehicle category, and a possible transfer type of two adjacent card swiping records may be determined based on the card swiping vehicle category, where the possible transfer type includes: when the type of the card swiping vehicle of the previous card swiping record in the two adjacent card swiping records is determined to be a bus, and the type of the card swiping vehicle of the next card swiping record is different from that of the bus, the situation can be considered as a public transport means for the bus to transfer to the subway or other non-buses. For different transfer types, the transfer time threshold may be calculated in different ways, such as: when the subway changes the bus, the same neighboring station as the previous card swiping record station can be inquired in the specified distance range of the next card swiping record station, and the corresponding transfer time threshold value can be determined directly according to the mode recorded in the embodiment. The public exchange bus generally cannot inquire the adjacent station which is the same as the previous card swiping record station in the specified distance range of the next card swiping record station, and the corresponding transfer time threshold value can be determined directly according to the mode recorded in the embodiment. And comparing the card swiping time difference of the two adjacent card swiping records with the corresponding transfer time threshold, if the card swiping time difference is smaller than the transfer time threshold, determining that the bus belongs to a public transport means for transferring the bus to the subway or other non-buses, and storing the card swiping records as transfer data to provide a basis for the optimization design of subsequent urban rail transit.
In the embodiment of the present description, the time required for the user to reach the card swiping station of the next card swiping record from the card swiping station of the previous card swiping record can be queried through the card swiping station in the card swiping record and the adjacent station near the card swiping station of the next card swiping record, and then the time is compared with the card swiping time difference in the two adjacent card swiping records. Different transfer categories are distinguished through inquiry matching of card swiping stations, transfer time thresholds required by transfer judgment standards are calculated in different modes according to the different transfer categories, card swiping time differences of two adjacent card swiping records are compared with the transfer time thresholds, card swiping records belonging to transfer are screened out, transfer data of a target area within a specified time range are counted, a trip scheme service meeting diversified requirements of users under the time standard is provided, and a basis is provided for optimization design of subsequent urban rail transit.
Fig. 2 is a schematic view of a scene of processing public transportation transfer data in a scene example of the present specification, and as shown in fig. 2, a passenger starts from a starting point of a trip and transfers from a station k to a station k +1, where the two stations may be the same station or different stations, and the two stations should be relatively close to each other in spatial distance until reaching a terminal point of the trip, and one or more transfers may be performed for each trip, or certainly, no transfer may be performed. Fig. 3 is a schematic flow chart of bus transfer data processing in a scenario example of the present specification, and with reference to fig. 3, the following specifically describes a process of bus transfer data processing in a scenario example of the present specification:
step 1, extracting card swiping records belonging to the same card number on the same day, sorting the card swiping records according to a time increasing sequence, repeatedly swiping the data with a card swiping time difference of 60s, reserving the first card swiping record, deleting the following repeated data, and counting the card swiping times of the non-repeated trips on the same day.
Step 2, obtaining the times of card swiping records, namely the times of card swiping: if the card swiping times are equal to 1, the trip is a trip, the card swiping record of the trip is output, and the step 1 is carried out for data analysis of the next card number; if the card swiping times are equal to 2, calculating a card swiping time difference, and performing a step 3, wherein the card swiping time difference is equal to a second recorded card swiping time-a first recorded card swiping time; if the card swiping record is greater than 2, go to step 4.
And 3, judging a transfer trip according to the card swiping time difference: if the card swiping time difference is less than (avg +20min), wherein avg is the running time between the card swiping station recorded by the next card swiping and the card swiping station recorded by the previous card swiping, the second card swiping record is a transfer, two card swiping records are output, and then the step 1 is switched to perform data analysis on the next card number; otherwise, judging the trip for two times, and then turning to the step 1 to analyze the data of the next card number.
And 4, calculating the card swiping time difference between every two adjacent card swiping records, wherein the card swiping time difference is the card swiping time recorded by the next card swiping record-the card swiping time recorded by the previous card swiping record, and performing the step 5.
Step 5, judging transfer according to the card swiping time difference: judging any two adjacent card swiping records with the card swiping time difference of less than (avg +20min) as transfer, wherein avg is the running time between the card swiping station of the next card swiping record and the card swiping station of the previous card swiping record, and outputting two card swiping records; and (3) separating any two records of the card swiping time difference (avg +20min), taking the two records as two trip records, outputting the card swiping records, and then turning to the step 1 to analyze the data of the next card number.
And 6, repeating the steps 1-5 until the daily transfer data of each card number is counted.
In the foregoing method, reference may be made to the following method for obtaining the travel time avg between the card swiping station of the next card swiping record and the card swiping station of the previous card swiping record:
taking the station ID of the last station in the card swiping record, searching a bus station information table, finding the line station in the previous card swiping record, and taking the minimum distance station;
if the station is found successfully, calculating the number of the interval stations between the card-swiping boarding station and the station recorded by the previous card swiping, and adding the average travel time between every two stations in the average inter-station driving time table to obtain avg.
In the above scenario example, the bus only considers the card swiping for getting on the bus, and the card swiping for getting off the bus is not in the consideration range.
In the calculation process, the card swiping on the line is matched, the information of card swiping transaction time, getting-on sites, ascending and descending is fused, and the travel characteristics of the travel user can be accurately matched through multi-source fusion of travel transaction data. Based on the travel transfer behavior of the user, the complete user travel link can be macroscopically drawn by combining the initial boarding place, so that a decision basis can be provided for a transportation management department on the optimization of a public transport network and the adjustment of a public transport line.
In the present specification, each embodiment of the method is described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. The relevant points can be obtained by referring to the partial description of the method embodiment.
Based on the public transportation vehicle transfer data processing method, one or more embodiments of the specification further provide a system for public transportation vehicle transfer data processing. The system may include systems (including distributed systems), software (applications), modules, components, servers, clients, etc. that use the methods described in embodiments of the present specification in conjunction with any necessary hardware-implemented devices. Based on the same innovative conception, embodiments of the present specification provide an apparatus as described in the following embodiments. Since the implementation scheme of the apparatus for solving the problem is similar to that of the method, the specific apparatus implementation in the embodiment of the present specification may refer to the implementation of the foregoing method, and repeated details are not repeated. As used hereinafter, the term "unit" or "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Specifically, fig. 4 is a schematic block configuration diagram of an embodiment of the public transportation transfer data processing apparatus provided in the present specification, and as shown in fig. 4, the public transportation transfer data processing apparatus provided in the present specification may include:
the card swiping data acquiring module 41 is used for acquiring the card swiping data of the user in the specified time range in the target area;
the data statistics module 42 is configured to extract, from the data of swiping the card by bus, data of swiping the card by bus of the same card number on the same day as data to be analyzed, where each piece of data to be analyzed includes a card swiping record of swiping the card each time, where the card swiping record includes: the card swiping time, the card swiping vehicle line and the card swiping station;
the time difference processing module 43 is configured to calculate a card swiping time difference between every two adjacent card swiping records in the same piece of data to be analyzed if the number of the card swiping records in the same piece of data to be analyzed is greater than or equal to two and the card swiping vehicle lines in at least two card swiping records are different;
the transfer data screening module 44 is configured to compare a card swiping time difference between two adjacent card swiping records with a transfer time threshold, and if the card swiping time difference is smaller than the transfer time threshold, use the corresponding two adjacent card swiping records as transfer card swiping records, and store the corresponding card swiping records to obtain transfer data of the target area within the specified time range; and the transfer time threshold is obtained by calculation according to the card swiping stations in the two adjacent card swiping records.
The public transportation vehicle transfer data processing device provided in the embodiment of the present specification analyzes whether transfer data exists in data to be analyzed by analyzing a card swiping time difference in a card swiping record in the data to be analyzed, and stores the card swiping record belonging to the transfer data, so as to obtain the transfer data of a target area in a specified time range, by performing statistical analysis on the card swiping data of a user in the specified time range in the target area, taking the card swiping data of the same card number in the same day as the data to be analyzed. Based on the travel transfer behaviors of the users, complete user travel links can be macroscopically drawn, and transfer data of each travel of the users can be accurately determined, so that decision basis is provided for public transport network optimization and public transport line adjustment.
An embodiment of the present specification also provides a public transportation transfer data processing apparatus including: at least one processor and a memory for storing processor-executable instructions, the processor implementing the information recommendation data processing method of the above embodiment when executing the instructions, such as:
acquiring riding card swiping data of a user in a specified time range in a target area;
extracting riding card swiping data of the same card number on the same day from the riding card swiping data as data to be analyzed, wherein each piece of data to be analyzed comprises card swiping records of each card swiping, and the card swiping records comprise: the card swiping time, the card swiping vehicle line and the card swiping station;
if the number of the card swiping records in the same data to be analyzed is greater than or equal to two, and the card swiping vehicle lines in at least two card swiping records are different, calculating the card swiping time difference of every two adjacent card swiping records in the same data to be analyzed;
comparing the card swiping time difference of the two adjacent card swiping records with a transfer time threshold, if the card swiping time difference is smaller than the transfer time threshold, taking the corresponding two adjacent card swiping records as transfer card swiping, and storing the corresponding card swiping records to obtain transfer data of the target area within the specified time range; and the transfer time threshold is obtained by calculation according to the card swiping stations in the two adjacent card swiping records.
It should be noted that the above-mentioned description of the apparatus and device according to the method embodiments may also include other embodiments. The specific implementation manner may refer to the description of the related method embodiment, and is not described in detail herein.
The public transport vehicle transfer data processing device provided by the specification can also be applied to various data analysis processing systems. The system or server or terminal or device may be a single server, or may include a server cluster, a system (including a distributed system), software (applications), actual operating devices, logical gate devices, quantum computers, etc. using one or more of the methods described herein or one or more embodiments of the system or server or terminal or device, in combination with necessary end devices implementing hardware. The system for checking for discrepancies may comprise at least one processor and a memory storing computer-executable instructions that, when executed by the processor, implement the steps of the method of any one or more of the embodiments described above.
The method embodiments provided by the embodiments of the present specification can be executed in a mobile terminal, a computer terminal, a server or a similar computing device. Taking the example of running on a server, fig. 5 is a block diagram of the hardware configuration of the public transportation transfer data processing server in one embodiment of the present specification, and the computer terminal may be the public transportation transfer data processing server or the public transportation transfer data processing apparatus in the above-described embodiment. As shown in fig. 5, the server 10 may include one or more (only one shown) processors 100 (the processors 100 may include, but are not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA, etc.), 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 the structure shown in fig. 5 is only an illustration and is not intended to limit the structure of the electronic device. For example, the server 10 may also include more or fewer components than shown in FIG. 5, and may also include other processing hardware, such as a database or multi-level cache, a GPU, or have a different configuration than shown in FIG. 5, for example.
The nonvolatile memory 200 may be used to store software programs and modules of application software, such as program instructions/modules corresponding to the public transportation vehicle transfer data processing method in the embodiment of the present specification, and the processor 100 executes various functional applications and resource data updates by executing the software programs and modules stored in the nonvolatile memory 200. Non-volatile memory 200 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the non-volatile memory 200 may further include memory located remotely from the processor 100, which may be connected to a computer terminal through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission module 300 is used for receiving or transmitting data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the computer terminal. In one example, the transmission module 300 includes a Network adapter (NIC) that can be connected to other Network devices through a base station so as to communicate with the internet. In one example, the transmission module 300 may be a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
The foregoing description of specific embodiments has been presented for purposes of illustration and description. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
The method or apparatus provided in this specification and described in the foregoing embodiments may implement service logic through a computer program and record the service logic on a storage medium, where the storage medium may be read and executed by a computer, and implement the effects of the solutions described in the embodiments of this specification, such as:
obtaining riding card swiping data of a user in a specified time range in a target area;
extracting riding card swiping data of the same card number on the same day from the riding card swiping data as data to be analyzed, wherein each piece of data to be analyzed comprises card swiping records of each card swiping, and the card swiping records comprise: the card swiping time, the card swiping vehicle line and the card swiping station;
if the number of the card swiping records in the same data to be analyzed is greater than or equal to two, and the card swiping vehicle lines in at least two card swiping records are different, calculating the card swiping time difference of every two adjacent card swiping records in the same data to be analyzed;
comparing the card swiping time difference of the two adjacent card swiping records with a transfer time threshold, if the card swiping time difference is smaller than the transfer time threshold, taking the corresponding two adjacent card swiping records as transfer card swiping, and storing the corresponding card swiping records to obtain transfer data of the target area within the specified time range; and the transfer time threshold is obtained by calculation according to the card swiping stations in the two adjacent card swiping records.
The method or the device for processing the transfer data of the public transportation vehicle provided in the embodiments of the present specification may be implemented in a computer by executing corresponding program instructions by a processor, for example, implemented in a PC using a c + + language of a windows operating system, implemented in a linux system, or implemented in an intelligent terminal using android, an iOS system programming language, implemented in processing logic based on a quantum computer, or the like.
It should be noted that descriptions of the apparatus, the computer storage medium, and the system described above according to the related method embodiments may also include other embodiments, and specific implementations may refer to descriptions of corresponding method embodiments, which are not described in detail herein.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the hardware + program class embodiment, since it is substantially similar to the method embodiment, the description is simple, and the relevant points can be referred to only the partial description of the method embodiment.
The embodiments of the present description are not limited to what must be consistent with industry communications standards, standard computer resource data updating and data storage rules, or what is described in one or more embodiments of the present description. Certain industry standards or implementations modified slightly from those described using custom modes or examples can also achieve the same, equivalent or similar, or other expected implementation results after being modified. The embodiments using the modified or transformed data acquisition, storage, judgment, processing and the like can still fall within the scope of the alternative embodiments of the embodiments in this specification.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. One typical implementation device is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a vehicle-mounted human-computer interaction device, a cellular telephone, a camera phone, a smart phone, 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.
Although one or more embodiments of the present description provide method operational steps as described in the embodiments or flowcharts, more or fewer operational steps may be included based on conventional or non-inventive approaches. The order of steps recited in the embodiments is merely one manner of performing the steps in a multitude of sequences, and does not represent a unique order of performance. When the device or the end product in practice executes, it can execute sequentially or in parallel according to the method shown in the embodiment or the figures (for example, in the environment of parallel processors or multi-thread processing, even in the environment of distributed resource data update). The terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, the presence of additional identical or equivalent elements in a process, method, article, or apparatus that comprises the recited elements is not excluded. The terms first, second, etc. are used to denote names, but not any particular order.
For convenience of description, the above devices are described as being divided into various modules by functions, and are described separately. Of course, when implementing one or more of the present description, the functions of each module may be implemented in one or more software and/or hardware, or a module implementing the same function may be implemented by a combination of multiple sub-modules or sub-units, etc. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable resource data updating apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable resource data updating apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable resource data update apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable resource data update apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, 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 Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage, graphene storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
As will be appreciated by one skilled in the art, one or more embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, one or more embodiments of the present description may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, one or more embodiments of the present description may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
One or more embodiments of the present description may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. One or more embodiments of the present specification can also be practiced in distributed computing environments where tasks are performed by remote devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for system embodiments, since they are substantially similar to method embodiments, the description is relatively simple, and the relevant points can be referred to only part of the description of the method embodiments. In the description of the specification, reference to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the specification. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
The above description is merely exemplary of one or more embodiments of the present disclosure and is not intended to limit the scope of one or more embodiments of the present disclosure. Various modifications and alterations to one or more embodiments described herein will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement or the like made within the spirit and principle of the present specification should be included in the scope of the claims.

Claims (13)

1. A public transportation transfer data processing method, the method comprising:
acquiring riding card swiping data of a user in a specified time range in a target area;
extracting riding card swiping data of the same card number on the same day from the riding card swiping data as data to be analyzed, wherein each piece of data to be analyzed comprises card swiping records of each card swiping, and the card swiping records comprise: the method comprises the following steps of (1) card swiping time, card swiping vehicle lines and card swiping stations;
if the number of the card swiping records in the same data to be analyzed is greater than or equal to two, and the card swiping vehicle lines in at least two card swiping records are different, calculating the card swiping time difference of every two adjacent card swiping records in the same data to be analyzed;
comparing the card swiping time difference of the two adjacent card swiping records with a transfer time threshold, if the card swiping time difference is smaller than the transfer time threshold, taking the corresponding two adjacent card swiping records as transfer card swiping, and storing the corresponding card swiping records to obtain transfer data of the target area within the specified time range; and the transfer time threshold is obtained by calculation according to the card swiping stations in the two adjacent card swiping records.
2. The method of claim 1, wherein the card-swiping record further comprises a card-swiping getting-on/off category, and after calculating a card-swiping time difference between every two adjacent card-swiping records in the same piece of data to be analyzed, the method further comprises:
and if the type of the card swiping to get on or off the vehicle in the previous card swiping record in the two adjacent card swiping records is the vehicle getting on, the type of the card swiping to get on or off the vehicle in the next card swiping record is the vehicle getting off, or the card swiping vehicle lines in the two adjacent card swiping records are the same, deleting the card swiping time difference of the two adjacent card swiping records.
3. The method of claim 2, wherein the transfer time threshold is calculated from the card swiping stations in two adjacent card swiping records, and comprises the following steps:
inquiring the adjacent stations within the specified distance range of the card swiping station in the latter card swiping record in the two adjacent card swiping records;
matching the adjacent station with a card swiping station of a previous card swiping record in the two adjacent card swiping records, and if the matching is successful, taking the card swiping station of the previous card swiping record in the two adjacent card swiping records as a target station;
and determining the transfer time threshold according to the distance between the target station and the card swiping station in the next card swiping record.
4. The method of claim 3, wherein the transfer time threshold is calculated from the card swiping stations in two adjacent card swiping records, and comprises the following steps:
if the adjacent sites are not matched with the card swiping sites of the previous card swiping records in the two adjacent card swiping records successfully, selecting one site from the adjacent sites as a target site;
and taking the sum of the running time between the card swiping station in the previous card swiping record in the two adjacent card swiping records and the target station and the preset transfer time as the threshold value of the transfer time.
5. The method of claim 4, wherein selecting one of the neighboring stations as a target station comprises:
and selecting a station where the card swiping vehicle route passes in the previous card swiping record in the two adjacent card swiping records from the adjacent stations as the target station.
6. The method of claim 4, wherein selecting one of the neighboring stations as a target station comprises:
and taking the nearest adjacent station to the card swiping station in the latter card swiping record in the two adjacent card swiping records as the target station.
7. The method according to claim 4, wherein the neighboring sites include card swiping sites in the next card swiping record, and the selecting one site from the neighboring sites as a target site comprises:
and if the types of the card swiping vehicles in the two adjacent card swiping records are buses, taking the card swiping station in the next card swiping record as the target station.
8. The method according to any one of claims 4 to 7, wherein the method for determining the travel time between the card swiping station in the previous card swiping record in the two adjacent card swiping records and the target station comprises the following steps:
calculating the number of interval stations between the card swiping station in the previous card swiping record in the two adjacent card swiping records and the target station, and inquiring the average inter-station running time of the stations between the card swiping station in the previous card swiping record in the two adjacent card swiping records and the target station;
and obtaining the running time between the card swiping station in the previous card swiping record in the two adjacent card swiping records and the target station according to the average inter-station running time and the number of the interval stations.
9. The method of claim 1, after extracting, from the vehicle swiping card data, vehicle swiping card data of the same card number on the same day as data to be analyzed, the method further comprising:
sequencing the same data to be analyzed in an increasing manner according to the card swiping time;
and if the card swiping time difference of the two adjacent card swiping records is within the preset time range, deleting the next card swiping record in the two adjacent card swiping records.
10. The method of claim 1, wherein the obtaining of the card swiping data of the user in the specified time range in the target area comprises:
and acquiring the riding card swiping data of the physical bus card and the mobile payment bus card of the user in the specified time range of the target area.
11. A mass transit vehicle transfer data processing apparatus, the apparatus comprising:
the card swiping data acquisition module is used for acquiring the card swiping data of a user in a specified time range in a target area;
the data statistics module is used for extracting bus card swiping data of the same card number on the same day from the bus card swiping data to serve as data to be analyzed, each piece of data to be analyzed comprises a card swiping record of card swiping each time, and the card swiping records comprise: the card swiping time, the card swiping vehicle line and the card swiping station;
the time difference processing module is used for calculating the card swiping time difference of every two adjacent card swiping records in the same data to be analyzed if the number of the card swiping records in the same data to be analyzed is greater than or equal to two and the card swiping vehicle lines in at least two card swiping records are different;
the transfer data screening module is used for comparing the card swiping time difference of the two adjacent card swiping records with a transfer time threshold, if the card swiping time difference is smaller than the transfer time threshold, the corresponding two adjacent card swiping records are used as transfer card swiping, and the corresponding card swiping records are stored to obtain the transfer data of the target area within the specified time range; and the transfer time threshold is obtained by calculation according to the card swiping stations in the two adjacent card swiping records.
12. A public transportation transfer data processing apparatus comprising: at least one processor and a memory for storing processor-executable instructions, the processor implementing the method of any one of claims 1-10 when executing the instructions.
13. A computer-readable storage medium, comprising: the instructions in the computer readable storage medium, when executed by a processor of a public transportation transfer data processing apparatus or an electronic device, enable the public transportation transfer data processing apparatus or electronic device to perform the public transportation transfer data processing method of any one of claims 1 to 10.
CN202210329452.9A 2022-03-31 2022-03-31 Public transport vehicle transfer data processing method, device, equipment and storage medium Pending CN114820264A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210329452.9A CN114820264A (en) 2022-03-31 2022-03-31 Public transport vehicle transfer data processing method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210329452.9A CN114820264A (en) 2022-03-31 2022-03-31 Public transport vehicle transfer data processing method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114820264A true CN114820264A (en) 2022-07-29

Family

ID=82533558

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210329452.9A Pending CN114820264A (en) 2022-03-31 2022-03-31 Public transport vehicle transfer data processing method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114820264A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115376325A (en) * 2022-10-25 2022-11-22 中咨数据有限公司 Public transport transfer data screening system, method and application based on travel chain
CN116664370A (en) * 2023-07-28 2023-08-29 腾讯科技(深圳)有限公司 Data processing method and device, computer equipment and storage medium

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115376325A (en) * 2022-10-25 2022-11-22 中咨数据有限公司 Public transport transfer data screening system, method and application based on travel chain
CN115376325B (en) * 2022-10-25 2023-01-17 中咨数据有限公司 Public transport transfer data screening system, method and application based on travel chain
CN116664370A (en) * 2023-07-28 2023-08-29 腾讯科技(深圳)有限公司 Data processing method and device, computer equipment and storage medium
CN116664370B (en) * 2023-07-28 2024-01-19 腾讯科技(深圳)有限公司 Data processing method and device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
CN106875066B (en) Vehicle travel behavior prediction method, device, server and storage medium
Hussain et al. Transit OD matrix estimation using smartcard data: Recent developments and future research challenges
Nunes et al. Passenger journey destination estimation from automated fare collection system data using spatial validation
CN114820264A (en) Public transport vehicle transfer data processing method, device, equipment and storage medium
CN107204077B (en) Method for sharing mobile automobile battery
Chakirov et al. Use of public transport smart card fare payment data for travel behaviour analysis in Singapore
CN105825242A (en) Cluster communication terminal track real time anomaly detection method and system based on hybrid grid hierarchical clustering
CN105023437A (en) Method and system for establishing public transit OD matrix
CN109359682A (en) A kind of Shuttle Bus candidate's website screening technique based on F-DBSCAN iteration cluster
CN104303014A (en) Transportation route distribution ratio control system and transportation route distribution control method
CN110942198A (en) Passenger path identification method and system for rail transit operation
Hora et al. Estimation of Origin-Destination matrices under Automatic Fare Collection: the case study of Porto transportation system
CN107167151B (en) Bus route setting method, route planning method and device
CN112686466A (en) Subway passenger path confirmation method and device
US20120218150A1 (en) Management server, population information calculation management server, non-populated area management method, and population information calculation method
CN105303245A (en) Traffic analysis system and traffic analysis method
Fourie et al. Using smartcard data for agent-based transport simulation
CN110009124B (en) Data processing method, server and system for determining bus stop
KR20120068580A (en) Trip pattern analysis system of the public transportation using the transportation card data and the trip pattern analysis methods of the same
CN110555473A (en) Driving route planning method, server and system
CN111325436A (en) Network appointment vehicle co-operation passenger matching method and system, storage medium and server
CN110826943B (en) Method and related equipment for judging whether bus allocation is needed or not and determining bus allocation number
CN115376325B (en) Public transport transfer data screening system, method and application based on travel chain
CN111680707A (en) Card swiping data analysis method based on public transportation system, electronic terminal and storage device
CN107622467B (en) Commuting travel mode extraction method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination