Bus stop level summary detail generation method, device, medium and apparatus
Patent Information
- Application Number
- CN202611161231.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-31
- Publication Date
- 2026-10-13
AI Technical Summary
该做法的缺陷在于:当车辆发生方向或跑法切换时,现有技术仍沿用上一段切换前的在车人数作为下一段切换后首站的基线在车人数
[0009]本申请的技术方案可以达到的有益效果是:本申请的技术方案在应用时,通过检测方向或跑法的变化,并在变化时将下一段首站的基线在车人数重置为0,有效避免了上一段在车人数被错误地继承到切换后的首站。由此,切换后的首站在车人数从真实的零值开始递推,后续所有站点的在车人数统计不再携带上一段的残余误差,从而消除了方向或跑法切换导致的跨段错误继承问题,保证了整段在车人数统计的准确性。
Smart Images

Figure CN122906898A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of bus stop summary technology, and in particular to a method, apparatus, medium and equipment for generating bus stop-level summary details. Background Technology
[0002] Public transport passenger flow systems typically receive a large number of passenger boarding and alighting events reported on a per-event basis, such as each time a door opens or closes. Operational analysis and reporting usually require station-level summary results, i.e., the total number of passengers boarding and alighting at each station within a certain time period, as well as the number of passengers remaining on the vehicle after that station. In actual operation, the same vehicle may change direction or route within a day; for example, the destination of an upward journey may become the starting point of a downward journey, or a full-route bus may be switched to a short-route bus or a detour.
[0003] Current technology typically aggregates raw data directly at each station and simply extrapolates the number of passengers on board, meaning the baseline number of passengers on board at the next station equals the number at the previous station. The drawback of this approach is that when a vehicle changes direction or mode, the current technology still uses the number of passengers on board before the previous switch as the baseline number of passengers on board at the first station after the switch. This results in the number of passengers on board at the first station after the switch being incorrectly assigned a non-zero initial value. This error propagates to all subsequent stations, causing an overall offset in the passenger count for the entire segment. Summary of the Invention
[0004] Existing technologies suffer from the problem of incorrectly inheriting the number of passengers on board from the previous segment when switching directions / running methods. To address this issue, this application provides a method, apparatus, medium, and device for generating detailed summary data at the bus stop level.
[0005] To achieve the above objectives, the first technical solution adopted in this application is: a method for generating bus stop-level summary details, comprising: obtaining a list of original passenger flow details for a target vehicle within a target time period, wherein each original passenger flow detail in the list includes the occurrence time, number of passengers boarding, number of passengers alighting, stop number, direction, and route; taking the original passenger flow detail with the earliest occurrence time in the list as the initial original passenger flow detail, and traversing the list in ascending order according to the occurrence time to perform the following traversal and aggregation steps: aggregating all original passenger flow details that are consecutively in the same direction, route, and stop number as the initial original passenger flow detail to obtain the number of passengers on board at the stop, the number of stops, and the route number. The total number of passengers boarding and the total number of passengers alighting at each stop are used as a station-level summary detail for the target vehicle. Specifically, if the direction and route of the initial passenger flow original detail are consistent with the previous station-level summary detail, the base number of passengers on board in the initial passenger flow original detail is the same as the number of passengers on board at the previous station-level summary detail. If the direction or route of the initial passenger flow original detail is inconsistent with the previous station-level summary detail, the base number of passengers on board in the initial passenger flow original detail is 0. If any direction, route, or station number included in any passenger flow original detail is inconsistent with the direction, route, or station number included in the initial passenger flow original detail, that passenger flow original detail is used as the initial passenger flow original detail, and the traversal and aggregation step is executed again.
[0006] The second technical solution adopted in this application is: a bus stop-level summary detail generation device, comprising: an acquisition module, which acquires a list of original passenger flow details for a target vehicle within a target time period, wherein each original passenger flow detail in the list includes the occurrence time, number of passengers boarding, number of passengers alighting, stop number, direction, and route; and a traversal aggregation module, which takes the original passenger flow detail with the earliest occurrence time in the list as the initial original passenger flow detail, and traverses the list in ascending order according to the occurrence time to perform the following traversal aggregation steps: aggregating all original passenger flow details that are consecutively in the same direction, route, and stop number as the initial original passenger flow detail to obtain the number of passengers on board at the stop. The total number of passengers boarding and alighting at each station is used as a station-level summary detail for the target vehicle. Specifically, if the direction and route of the initial passenger flow original detail are consistent with the previous station-level summary detail, the base number of passengers on board in the initial passenger flow original detail is the same as the number of passengers on board at the previous station-level summary detail. If the direction or route of the initial passenger flow original detail is inconsistent with the previous station-level summary detail, the base number of passengers on board in the initial passenger flow original detail is 0. If any direction, route, or station number included in any passenger flow original detail is inconsistent with the direction, route, or station number included in the initial passenger flow original detail, that passenger flow original detail is used as the initial passenger flow original detail, and the traversal and aggregation step is executed again.
[0007] The third technical solution adopted in this application is: a computer-readable storage medium storing computer instructions, wherein the computer instructions are operated to execute the bus stop-level summary detail generation method in Solution 1.
[0008] The fourth technical solution adopted in this application is: a computer device, including a memory, a processor, and a computer program stored in the memory, characterized in that the processor executes the computer program to implement the bus stop-level summary detail generation method in Solution 1.
[0009] The beneficial effects of the technical solution of this application are as follows: When applied, this technical solution detects changes in direction or running style and resets the baseline number of passengers at the first station of the next segment to 0 upon change, effectively preventing the incorrect inheritance of the number of passengers from the previous segment to the first station after the switch. Therefore, the number of passengers at the first station after the switch is recursively calculated from the true zero value, and the passenger statistics for all subsequent stations no longer carry residual errors from the previous segment, thus eliminating the problem of cross-segment error inheritance caused by changes in direction or running style and ensuring the accuracy of the passenger statistics for the entire segment. Attached Figure Description
[0010] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0011] Figure 1 This is a flowchart illustrating a specific implementation of a method for generating bus stop-level summary details according to this application. Figure 2 This is a schematic diagram of a specific embodiment of a bus stop-level summary detail generation device according to this application.
[0012] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0013] The preferred embodiments of this application will now be described in detail with reference to the accompanying drawings, so that the advantages and features of this application can be more easily understood by those skilled in the art, thereby providing a clearer and more definite definition of the scope of protection of this application.
[0014] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes the element.
[0015] The technical solution of this application and how it solves the above-mentioned technical problems will be described in detail below with specific embodiments. The specific embodiments described below can be combined with each other to form new embodiments. The same or similar ideas or processes described in one embodiment may not be repeated in other embodiments.
[0016] like Figure 1 As shown, in a specific embodiment of a bus stop-level summary detail generation method of this application, the bus stop-level summary detail generation method includes: step S101, obtaining the original passenger flow detail list of the target vehicle within the target time period.
[0017] In one specific embodiment of this application, each passenger flow detail in the passenger flow original detail list may include the occurrence time, number of passengers boarding, number of passengers alighting, station number, direction, and route.
[0018] As an example, each passenger flow record can correspond to a single boarding or alighting event, including fields such as the time of occurrence, station number, number of passengers boarding or alighting, direction, and route.
[0019] As an example, the target time period can specify a statistical time range, such as a certain day or a time interval divided according to a specific settlement time.
[0020] As an example, the station number can be the station's sequential position on the line, used to identify the station's uniqueness and the train's running order.
[0021] As an example, the direction can be up or down, indicating the direction the vehicle is traveling.
[0022] As an example, the running method can refer to the vehicle's operating mode, such as full-distance bus, short-distance bus, express line, detour, etc.
[0023] like Figure 1As shown, in a specific embodiment of a bus stop-level summary detail generation method of this application, the bus stop-level summary detail generation method includes: step S102, taking the earliest occurrence time of the original passenger flow detail in the original passenger flow detail list as the initial original passenger flow detail, and traversing the original passenger flow detail list in ascending order according to the occurrence time to perform the following traversal aggregation steps: As an example, each passenger flow detail in the passenger flow original details list can be sorted in ascending order by occurrence time, and then traversed sequentially.
[0024] like Figure 1 As shown, in a specific embodiment of a bus stop-level summary detail generation method of this application, the bus stop-level summary detail generation method includes: step S1021, aggregating all passenger flow original details that are continuous with the initial passenger flow original details in the same direction, with the same running method and the same stop number, to obtain the number of passengers on the bus at the stop, the total number of passengers boarding at the stop and the total number of passengers alighting at the stop, as a stop-level summary detail of the target vehicle.
[0025] Therefore, the original passenger flow details list is traversed in ascending order of occurrence time to ensure the consistency of the recursive causal relationship.
[0026] In one specific embodiment of this application, when the direction and route of the initial passenger flow original details are consistent with the previous station-level summary details, the base number of passengers in the initial passenger flow original details can be the number of passengers in the previous station-level summary details.
[0027] As an example, the baseline number of passengers on board can be the initial number of passengers used when calculating the number of passengers on board at the current station, that is, the number of passengers already on board when the vehicle arrives at the station.
[0028] As an example, when the direction and route of the initial passenger flow original details have not changed from the direction and route of the previous station-level summary details, the base number of passengers on board in the initial passenger flow original details will continue to use the number of passengers on board in the previous station-level summary details, that is, the recursive baseline number of passengers on board will continue to be used.
[0029] In one specific embodiment of this application, when the direction or route of the initial passenger flow original details is inconsistent with the previous station-level summary details, the base number of passengers in the initial passenger flow original details can be 0.
[0030] As an example, when the direction / runway of the initial passenger flow original details changes with the direction / runway of the previous station-level summary details, the base number of passengers on board in the initial passenger flow original details will no longer use the station-level summary details of the previous station-level summary details, but will be set to 0.
[0031] Therefore, when switching directions / driving patterns, the number of passengers on board at the recursive baseline, i.e., the base number of passengers on board in the initial passenger flow details, should be set to 0 in a timely manner. This avoids mis-inheritance across segments that could cause the entire segment to shift.
[0032] In one specific embodiment of this application, all passenger flow original details that are consecutively in the same direction, with the same running method, and with the same station number as the initial passenger flow original details are aggregated to obtain the number of passengers on board at the station, the total number of passengers boarding at the station, and the total number of passengers alighting at the station, which are used as a station-level summary detail for the target vehicle. This may include: determining the total number of passengers boarding at the station for the bus station-level summary detail by summing the number of passengers boarding at all passenger flow original details that are consecutively in the same direction, with the same running method, and with the same station number as the initial passenger flow original details.
[0033] As an example, when the station number corresponding to the initial passenger flow details is not the last station, the sum of the number of passengers boarding in all passenger flow details that are in the same direction, have the same running method, and have the same station number as the initial passenger flow details is determined as the total number of passengers boarding at the station-level summary details.
[0034] In one specific embodiment of this application, all passenger flow original details that are consecutively in the same direction, with the same running method, and with the same station number as the initial passenger flow original details are aggregated to obtain the number of passengers on board at the station, the total number of passengers boarding at the station, and the total number of passengers alighting at the station, which are used as a station-level summary detail for the target vehicle. This may include: determining the total number of passengers alighting at the station in the bus station-level summary detail by summing the number of passengers alighting from all passenger flow original details that are consecutively in the same direction, with the same running method, and with the same station number as the initial passenger flow original details.
[0035] As an example, when the station number corresponding to the initial passenger flow details is not the last station, the sum of the number of passengers getting off the bus in all passenger flow details that are in the same direction, have the same running method, and have the same station number as the initial passenger flow details is determined as the total number of passengers getting off the bus in the bus station-level summary details.
[0036] In one specific embodiment of this application, all passenger flow original details that are consecutive with the initial passenger flow original details in the same direction, running method and station number are aggregated to obtain the number of passengers on board at the station, the total number of passengers boarding at the station and the total number of passengers alighting at the station, which are used as a station-level summary detail for the target vehicle. This may include: generating the number of passengers on board at the station based on the base number of passengers on board, the total number of passengers boarding at the station and the total number of passengers alighting at the station in the initial passenger flow original details.
[0037] As an example, the number of passengers on board at a station can be the sum of the base number of passengers on board and the total number of passengers boarding at the station, minus the total number of passengers alighting at the station.
[0038] As an example, the number of passengers on board at a station must be greater than or equal to 0. When the calculated number of passengers on board at a station is negative, the number of passengers on board at the station is taken as 0, that is, the number of passengers on board at the station = max(baseline number of passengers on board + total number of passengers boarding at the station - total number of passengers alighting at the station, 0).
[0039] Therefore, the number of passengers at the station is not negative, and the report is more in line with common sense.
[0040] In one specific embodiment of this application, generating the number of passengers on board at a station based on the base number of passengers on board, the total number of passengers boarding at a station, and the total number of passengers alighting at a station in the initial passenger flow original details may include: when the initial passenger flow original details are the first passenger flow original details of the statistical day, if the direction and route of the initial passenger flow original details are consistent with the last station-level summary details of the target vehicle of the previous day, and the time difference between the two is less than a preset time difference threshold, the number of passengers on board at the station in the last station-level summary details is determined as the base number of passengers on board in the initial passenger flow original details.
[0041] As an example, the first passenger flow record on a statistical day can be the earliest passenger flow record within a statistical day divided by a specific settlement time. For instance, if a statistical day is divided at 03:00, the first passenger flow record after 03:00 on each day is the first passenger flow record on the statistical day.
[0042] As an example, if the first passenger flow detail on the statistical day is in the same direction, uses the same route, and has a time difference less than the preset time difference threshold with the last station-level summary detail of the target vehicle on the previous day, then the number of passengers on board at the station in the last station-level summary detail can be inherited as the base number of passengers on board in the initial passenger flow detail.
[0043] As an example, the preset time difference threshold can be 30 minutes. Setting the preset time difference threshold is to determine whether the first detail of the current statistical day and the summary detail of the last station of the previous day belong to the same consecutive trip, thereby deciding whether to inherit the number of passengers at the last station of the previous day.
[0044] In one specific embodiment of this application, generating the number of passengers on board at a station based on the base number of passengers in the initial passenger flow original details, the total number of passengers boarding at a station, and the total number of passengers alighting at a station may include: when the direction or route of the initial passenger flow original details is inconsistent with the last station-level summary details of the target vehicle of the previous day, or when the time difference between the two is greater than a preset time difference threshold, 0 is determined as the base number of passengers in the initial passenger flow original details.
[0045] As an example, if the first passenger flow detail on the statistical day is different in direction, different in route, or has a time difference greater than or equal to the preset time difference threshold from the last station-level summary detail of the target vehicle on the previous day, then the base number of passengers in the initial passenger flow detail will be set to 0.
[0046] Therefore, the "same direction and same running method + 30-minute threshold" is used to determine whether to inherit the number of passengers in the last entry of the previous day. Only when the passengers are in the same direction and running method and the time difference is less than 30 minutes, the number of passengers in the last entry of the previous day is inherited. This ensures that when crossing the boundary of the statistical day, the number of passengers in the same consecutive trip can be correctly continued, avoiding gaps or incorrect inheritance.
[0047] In one specific embodiment of this application, generating the number of passengers on board at a station based on the initial passenger flow details, the total number of passengers boarding at a station, and the total number of passengers alighting at a station may include: generating the number of passengers on board at a station based on the initial passenger flow details, the total number of passengers boarding at a station, and the total number of passengers alighting at a station.
[0048] As an example, the specific steps for generating the number of people in the car at the station are the same as those described above.
[0049] In one specific embodiment of this application, all passenger flow original details that are consecutively in the same direction, with the same running method and the same station number as the initial passenger flow original details are aggregated to obtain the number of passengers on the bus at the station, the total number of passengers boarding at the station, and the total number of passengers alighting at the station, which are used as a station-level summary detail for the target vehicle. This may include: when the station corresponding to the initial passenger flow original details is the last station, determining the last station's last station entry time.
[0050] As an example, when the station number corresponding to the initial passenger flow details represents the final station for that route, the final station's arrival time is determined.
[0051] In one specific embodiment of this application, all original passenger flow details that are continuous and follow the same direction, route, and station number as the initial original passenger flow details are aggregated to obtain the number of passengers on board at the station, the total number of passengers boarding at the station, and the total number of passengers alighting at the station. This is used as a station-level summary detail for the target vehicle. This may include: taking the final station entry time as the center, determining the sum of the number of passengers alighting within a preset boundary time threshold before and after the final station entry time as the total number of passengers alighting at the station in the bus station-level summary detail.
[0052] As an example, the preset boundary time threshold can be 5 minutes.
[0053] As an example, taking the final station entry time as the center, the number of passengers getting off within the final station entry time ± preset boundary time threshold is determined as the total number of passengers getting off at each station in the bus station-level summary details.
[0054] As an example, each person who gets off the bus by swiping their card has an exit time. The total number of people who get off the bus at the bus stop level is determined by summing up the number of people whose exit time is within the range of the final station entry time ± a preset boundary time threshold.
[0055] As an example, the number of passengers alighting within a time limit of ± preset boundary time threshold at the last station is reset to zero.
[0056] In one specific embodiment of this application, determining the final station's arrival time may include retrieving the final station's arrival time from the trip's station records.
[0057] As an example, trip-stop records can be the physical time records of a vehicle's arrival at each stop during each trip, usually obtained from the vehicle's GPS (Global Positioning System) or arrival check-in system.
[0058] As an example, based on the vehicle identifier, trip identifier, and final station number of the target vehicle, the corresponding arrival time field is queried in the trip station record table.
[0059] In one specific embodiment of this application, determining the final station arrival time may include: in the event of retrieval failure, determining the occurrence time of the last passenger flow original detail among all passenger flow original details that are in the same direction, have the same running method, and have the same station number as the initial passenger flow original details as the final station arrival time.
[0060] As an example, if the arrival time is not retrieved, the latest arrival time of any passenger flow original detail that is in the same direction, uses the same route, and has the same station number as the initial passenger flow original detail is determined as the arrival time of the final station.
[0061] Therefore, the data is split into first and last stations based on a 5-minute time boundary, and the baseline is cleared between the two segments, which significantly reduces the probability of mixing passengers getting off at the last station and passengers getting on at the first station.
[0062] In one specific embodiment of this application, generating the number of passengers on board at a station based on the base number of passengers on board, the total number of passengers boarding at a station, and the total number of passengers alighting at a station in the initial passenger flow original details may include: when the station corresponding to the initial passenger flow original details is the first station, determining 0 as the base number of passengers on board in the initial passenger flow original details.
[0063] As an example, when the station corresponding to the initial passenger flow original details is the first station, the baseline between the station-level summary details and the previous station-level summary details is cleared. At this time, the base number of the initial passenger flow original details of the first station is 0.
[0064] Therefore, by splitting the first and last stations by a 5-minute boundary and clearing the intervals between segments, the problems of ambiguous passenger attribution at the last station and erroneous inheritance between trips are solved: based on the arrival time at the last station, passenger attribution records within a preset threshold are assigned to the last station, while passenger attribution records exceeding the threshold are stripped and trigger the clearing of the baseline at the first station of the next trip, thereby ensuring accurate statistics of the number of passengers alighting at the last station, and the next trip is recursively calculated from an empty train state, avoiding cross-trip data pollution and error propagation.
[0065] In one specific embodiment of this application, generating the number of passengers on board at a station based on the initial passenger flow details, the total number of passengers boarding at a station, and the total number of passengers alighting at a station may include: generating the number of passengers on board at a station based on the initial passenger flow details, the total number of passengers boarding at a station, and the total number of passengers alighting at a station.
[0066] As an example, the specific steps for generating the number of people in the car at the station are the same as those described above.
[0067] In one specific embodiment of this application, the method for generating bus station-level summary details may further include: for each station-level summary detail, determining whether the occurrence time of the first original passenger flow detail within each station-level summary detail is greater than or equal to a preset segmentation time point.
[0068] As an example, the first original passenger flow detail can be the earliest original passenger flow detail within each station-level summary detail.
[0069] As an example, the preset splitting time point can be 03:00.
[0070] In one specific embodiment of this application, the method for generating bus station-level summary details may further include: if the occurrence time of each station-level summary detail is greater than or equal to a preset segmentation time point, determining the date of occurrence of each station-level summary detail as the statistical date of each station-level summary detail.
[0071] As an example, if the occurrence time of the first original passenger flow detail in each station-level summary detail is greater than or equal to the preset segmentation time point, the date of occurrence of the first original passenger flow detail in each station-level summary detail can be determined as the statistical date of each station-level summary detail.
[0072] As an example, the occurrence time of the first original passenger flow detail in each site-level summary detail can be 03:06 on March 2, 2020. Therefore, March 2, 2020 can be determined as the statistical date of that site-level summary detail.
[0073] In one specific embodiment of this application, the method for generating bus station-level summary details may further include: if the time is less than the preset segmentation time, determining the day before the occurrence time corresponding to each station-level summary detail as the statistical day of each station-level summary detail.
[0074] As an example, if the occurrence time of the first original passenger flow detail in each station-level summary detail is less than the preset segmentation time point, the day before the occurrence time of the first original passenger flow detail in each station-level summary detail can be determined as the statistical day of each station-level summary detail.
[0075] As an example, the occurrence time of the first original passenger flow detail in each site-level summary detail can be 01:10 on March 2, 2020. Then, March 1, 2020 can be determined as the statistical day of that site-level summary detail.
[0076] Therefore, the statistical days are settled according to the preset time points with a unified standard, which facilitates operation and verification.
[0077] like Figure 1 As shown, in a specific embodiment of a bus stop-level summary detail generation method of this application, the bus stop-level summary detail generation method includes: step S1022, when any direction, route or station number included in any original passenger flow detail is inconsistent with the direction, route or station number included in the initial original passenger flow detail, the original passenger flow detail is taken as the initial original passenger flow detail, and the traversal aggregation step is executed again.
[0078] In one specific embodiment of this application, when the original passenger flow details traversed are inconsistent with the current initial passenger flow details in terms of direction, running method, or station number, it indicates that the original passenger flow details and the current initial passenger flow details do not belong to the same station-level summary details. Therefore, it is necessary to divide the original passenger flow details and the current initial passenger flow details into different segments. At this time, the original passenger flow details are used as the initial passenger flow details, and the traversal aggregation step is executed again to establish an aggregation segment belonging to the original passenger flow details, thus forming a station-level summary detail belonging to the original passenger flow details.
[0079] The beneficial effects of the technical solution of this application are as follows: When applied, this technical solution detects changes in direction or running style and resets the baseline number of passengers at the first station of the next segment to 0 upon change, effectively preventing the incorrect inheritance of the number of passengers from the previous segment to the first station after the switch. Therefore, the number of passengers at the first station after the switch is recursively calculated from the true zero value, and the passenger statistics for all subsequent stations no longer carry residual errors from the previous segment, thus eliminating the problem of cross-segment error inheritance caused by changes in direction or running style and ensuring the accuracy of the passenger statistics for the entire segment.
[0080] Figure 2 This is a schematic diagram of a specific embodiment of a bus stop-level summary detail generation device according to this application.
[0081] exist Figure 2In the specific implementation shown, the bus stop-level summary detail generation device may include: an acquisition module 201, which acquires a list of original passenger flow details for the target vehicle within a target time period, wherein each original passenger flow detail in the list includes the occurrence time, number of passengers boarding, number of passengers alighting, stop number, direction, and route; and a traversal aggregation module 202, which takes the original passenger flow detail with the earliest occurrence time in the list as the initial original passenger flow detail, and traverses the list in ascending order according to the occurrence time to perform the following traversal aggregation steps: aggregating all original passenger flow details that are consecutively in the same direction, route, and stop number as the initial original passenger flow detail to obtain the number of passengers on board at the stop. The total number of passengers boarding at each station and the total number of passengers alighting at each station are used as a station-level summary detail for the target vehicle. Specifically, if the direction and route of the initial passenger flow original detail are consistent with the previous station-level summary detail, the base number of passengers on board in the initial passenger flow original detail is the same as the number of passengers on board at the previous station-level summary detail. If the direction or route of the initial passenger flow original detail is inconsistent with the previous station-level summary detail, the base number of passengers on board in the initial passenger flow original detail is 0. If any direction, route, or station number included in any passenger flow original detail is inconsistent with the direction, route, or station number included in the initial passenger flow original detail, that passenger flow original detail is used as the initial passenger flow original detail, and the traversal and aggregation step is executed again.
[0082] The bus stop-level summary detail generation device provided in this application can be used to execute the bus stop-level summary detail generation method described in any of the above embodiments. Its implementation principle and technical effect are similar, and will not be repeated here.
[0083] In one specific embodiment of this application, a computer-readable storage medium stores computer instructions that are operated to perform the bus stop-level summary detail generation method described in any embodiment.
[0084] Software modules may reside in RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, hard disks, removable disks, CD-ROMs, or any other form of storage medium known in this art. An exemplary storage medium is coupled to the processor, enabling the processor to read information from and write information to the storage medium.
[0085] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic, discrete hardware components, or any combination thereof. A general-purpose processor can be a microprocessor, but alternatively, it can be any conventional processor, controller, microcontroller, or state machine. The processor can also be implemented as a combination of computing devices, such as a combination of a DSP and a microprocessor, multiple microprocessors, one or more microprocessors incorporating a DSP core, or any other such configuration. Alternatively, the storage medium can be integrated with the processor. The processor and storage medium can reside in an ASIC. The ASIC can reside in the user terminal. Alternatively, the processor and storage medium can reside as discrete components in the user terminal.
[0086] In another specific embodiment of this application, a computer device includes a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the bus stop-level summary detail generation method described in any of the above embodiments.
[0087] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0088] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0089] The above description is merely an embodiment of this application and does not limit the patent scope of this application. Any equivalent structural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.
Claims
1. A method for generating detailed summary data at the bus stop level, characterized in that, include: Obtain the original passenger flow details list of the target vehicle within the target time period, wherein each original passenger flow detail in the original passenger flow details list includes the occurrence time, number of passengers boarding, number of passengers alighting, station number, direction, and route. The earliest passenger flow record in the original passenger flow details list is used as the initial passenger flow details. The original passenger flow details list is then traversed in ascending order of occurrence time to perform the following traversal and aggregation steps: Aggregate all passenger flow original details that are in the same direction, have the same route, and have the same station number as the initial passenger flow original details to obtain the number of passengers on board at the station, the total number of passengers boarding at the station, and the total number of passengers alighting at the station. This will be used as a station-level summary detail for the target vehicle. When the direction and route of the initial passenger flow original details are the same as those of the previous station-level summary detail, the base number of passengers on board in the initial passenger flow original details is the same as the base number of passengers on board in the previous station-level summary detail. When the direction or route of the initial passenger flow original details is different from those of the previous station-level summary detail, the base number of passengers on board in the initial passenger flow original details is 0. If any of the directions, routes, or station numbers included in any original passenger flow detail are inconsistent with the directions, routes, or station numbers included in the initial original passenger flow detail, then that original passenger flow detail is taken as the initial original passenger flow detail, and the traversal aggregation step is executed again.
2. The method according to claim 1, characterized in that, The process involves aggregating all original passenger flow details that are consecutive with the initial original passenger flow details in the same direction, using the same route, and having the same station number, to obtain the number of passengers on board at each station, the total number of passengers boarding at each station, and the total number of passengers alighting at each station. This aggregated data is then used as a station-level summary detail for the target vehicle, including: The sum of the number of passengers boarding in all original passenger flow details that are in the same direction, run the same way, and have the same station number as the initial original passenger flow details is determined as the total number of passengers boarding at the bus station level summary details. The sum of the number of passengers alighting from all original passenger flow details that are in the same direction, use the same route, and have the same station number as the initial original passenger flow details is determined as the total number of passengers alighting from the station in the bus station-level summary details. The number of passengers on board at each station is generated based on the initial passenger flow details, the total number of passengers boarding at each station, and the total number of passengers alighting at each station.
3. The method according to claim 2, characterized in that, The system generates the number of passengers on board at each station based on the initial passenger flow details, the total number of passengers boarding at each station, and the total number of passengers alighting at each station. This includes: When the initial passenger flow original details are the first passenger flow original details of the statistical day, if the direction and running method of the initial passenger flow original details are consistent with the last station-level summary details of the target vehicle of the previous day, and the time difference between the two is less than the preset time difference threshold, the number of passengers in the station of the last station-level summary details will be determined as the base number of passengers in the initial passenger flow original details. When the direction or route of the initial passenger flow original details is inconsistent with the last station-level summary details of the target vehicle mentioned the previous day, or when the time difference between the two is greater than the preset time difference threshold, 0 will be determined as the base number of the number of people on the vehicle in the initial passenger flow original details. The number of passengers on board at each station is generated based on the initial passenger flow details, the total number of passengers boarding at each station, and the total number of passengers alighting at each station.
4. The method according to claim 2, characterized in that, The process involves aggregating all original passenger flow details that are consecutive with the initial original passenger flow details in the same direction, using the same route, and having the same station number, to obtain the number of passengers on board at each station, the total number of passengers boarding at each station, and the total number of passengers alighting at each station. This aggregated data is then used as a station-level summary detail for the target vehicle, including: When the station corresponding to the initial passenger flow details is the last station, determine the last station's entry time; Taking the final station arrival time as the center, the number of passengers alighting within a preset boundary time threshold before and after the final station arrival time is determined as the total number of passengers alighting at the bus station level summary details.
5. The method according to claim 4, characterized in that, Determining the arrival time of the final station includes: Retrieve the final station arrival time from the trip station records; In the event of a failure to retrieve the data, the time of occurrence of the last passenger flow record among all passenger flow records that are in the same direction, follow the same route, and have the same station number as the initial passenger flow record will be determined as the final station entry time.
6. The method according to claim 4, characterized in that, The system generates the number of passengers on board at each station based on the initial passenger flow details, the total number of passengers boarding at each station, and the total number of passengers alighting at each station. This includes: When the station corresponding to the initial passenger flow details is the first station, 0 is set as the base number of passengers in the initial passenger flow details. The number of passengers on board at each station is generated based on the initial passenger flow details, the total number of passengers boarding at each station, and the total number of passengers alighting at each station.
7. The method according to claim 6, characterized in that, The method further includes: For each site-level summary detail, determine whether the occurrence time of the first original passenger flow detail within each site-level summary detail is greater than or equal to the preset segmentation time point; If the occurrence time is greater than or equal to the preset segmentation time point, the date of occurrence corresponding to each site-level summary detail is determined as the statistical date of each site-level summary detail; If the time is less than the preset segmentation time, the day before the occurrence time corresponding to each site-level summary detail is determined as the statistical day of each site-level summary detail.
8. A device for generating detailed summary data at the bus stop level, comprising: The acquisition module acquires a list of original passenger flow details for the target vehicle within a target time period. Each original passenger flow detail in the list includes the occurrence time, number of passengers boarding, number of passengers alighting, station number, direction, and route. The aggregation module iterates through the passenger flow data, taking the earliest occurring passenger flow data from the original passenger flow data list as the initial passenger flow data. It then iterates through the passenger flow data list in ascending order of occurrence time, performing the following aggregation steps: It aggregates all passenger flow data that are consecutively in the same direction, have the same route, and share the same station number as the initial passenger flow data, obtaining the number of passengers on board at the station, the total number of passengers boarding at the station, and the total number of passengers alighting at the station. This is used as a station-level summary detail for the target vehicle. Specifically, the initial passenger flow data's direction and route are consistent with the previous station... When the point-level summary details are consistent, the base number of passengers in the initial passenger flow original details is the number of passengers in the previous station-level summary details. When the direction or route of the initial passenger flow original details is inconsistent with the previous station-level summary details, the base number of passengers in the initial passenger flow original details is 0. When any direction, route, or station number included in any passenger flow original detail is inconsistent with the direction, route, or station number included in the initial passenger flow original detail, the aforementioned passenger flow original detail is taken as the initial passenger flow original detail, and the traversal aggregation step is executed again.
9. A computer-readable storage medium storing computer instructions, wherein the computer instructions are operated to perform the bus stop-level summary detail generation method according to any one of claims 1-7.
10. A computer device comprising a memory, a processor, and a computer program stored in the memory, characterized in that, The processor executes the computer program to implement the bus stop-level summary detail generation method as described in any one of claims 1-7.