Segmented bus fare calculation method and device, electronic equipment and storage medium
By monitoring the status of the onboard unit on segmented buses and generating fault registration codes, combined with matching queries from the trip data pool, the problem of fare calculation errors caused by onboard unit malfunctions was solved, achieving accurate correlation of passenger trip data and accurate fare calculation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-08
- Publication Date
- 2026-03-24
AI Technical Summary
In the event of a malfunction in the onboard unit, segmented bus fare calculations are prone to one-sided transactions, resulting in passengers being overcharged or undercharged.
By monitoring the status of the onboard units of the target segment buses, generating fault registration codes, and receiving trip registration data uploaded by the passenger registration client, the system uses a preset trip data pool for matching and querying to achieve accurate association of passenger trip data and ultimately calculate the fare.
This improves the accuracy of segmented bus fare calculation in the event of onboard unit failure, preventing passengers from incurring excessive charges due to one-sided transactions.
Smart Images

Figure CN121482879B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of public transportation fare calculation, in particular to a segmented bus fare calculation method and device, an electronic device and a storage medium. BACKGROUND
[0002] Segmented bus fare calculation is used to calculate the fare of a passenger riding a segmented bus according to the boarding and alighting station information of the passenger. For example, in a vehicle-mounted machine failure scenario, the passenger successfully scans the code when boarding at station 1 and fails to scan the code when alighting at station 2 due to vehicle-mounted machine failure. Through segmented bus fare calculation, the fare of the passenger between station 1 and station 2 can be calculated, avoiding the situation of overcharging or undercharging the passenger.
[0003] Currently, segmented bus fare calculation relies on a vehicle-mounted machine installed on the segmented bus. When the vehicle-mounted machine fails, one-sided transactions are prone to occur, resulting in incorrect segmented bus fare calculation and thus overcharging or undercharging the passenger. Therefore, how to improve the accuracy of segmented bus fare calculation in the case of vehicle-mounted machine failure has become a technical problem to be solved. SUMMARY
[0004] The main purpose of the embodiments of the present application is to provide a segmented bus fare calculation method and device, an electronic device and a storage medium, aiming to improve the accuracy of segmented bus fare calculation in the case of vehicle-mounted machine failure.
[0005] To achieve the above purpose, a first aspect of the embodiments of the present application provides a segmented bus fare calculation method applied to a public transportation service side, the method comprising:
[0006] Performing vehicle-mounted machine state monitoring on a target segmented bus to obtain a vehicle-mounted machine running state, wherein the vehicle-mounted machine running state includes a vehicle-mounted machine failure state;
[0007] Based on the vehicle-mounted machine failure state, generating a fault registration code for the target segmented bus;
[0008] Receiving journey registration data uploaded by a ride registration client based on the fault registration code;
[0009] Based on a preset journey data pool, performing matching query on the journey registration data to obtain a journey matching result, wherein the journey matching result includes journey matching success information;
[0010] Based on the journey matching success information and the journey registration data, performing ride fare calculation.
[0011] In some embodiments, the step of generating a fault code for the target segment of the bus based on the fault status of the onboard unit, to obtain a fault registration code, includes:
[0012] Based on the fault status of the vehicle-mounted unit, a fault identification identifier for the vehicle-mounted unit is generated;
[0013] The target segment of the bus is subjected to operation parameter reading to obtain bus operation information, wherein the bus operation information includes the current operating time of the bus;
[0014] Based on a preset bus key, the bus operation information is encrypted to obtain encrypted bus operation information;
[0015] Based on the vehicle-mounted unit's fault identification identifier and the bus's current operating time, the encrypted bus operation information is signed to obtain the target digital signature;
[0016] Based on the encrypted bus operation information and the target digital signature, the format is converted to obtain the fault registration code.
[0017] In some embodiments, the step of matching and querying the trip registration data based on a preset trip data pool to obtain trip matching results includes:
[0018] The trip registration data is validated to obtain trip validation information, which includes trip abnormality information or trip normal information.
[0019] Based on the trip anomaly information, the passenger registration client is processed to generate a trip registration error feedback, and the trip matching result is generated based on the trip registration error feedback.
[0020] Based on the normal trip information and the trip registration data, the trip data pool is matched to obtain the trip matching result.
[0021] In some embodiments, the trip registration data includes bus identification parameters and passenger identity data;
[0022] The process of verifying the itinerary registration data to obtain itinerary verification information includes:
[0023] Based on the bus identification parameters, the authenticity of the vehicle is verified to obtain vehicle verification information;
[0024] Based on the passenger identity data, a passenger status query is performed to obtain passenger status information;
[0025] The trip verification information is generated based on the vehicle verification information and the passenger status information.
[0026] In some embodiments, the step of matching the trip data pool based on the trip normal information and the trip registration data to obtain the trip matching result includes:
[0027] Based on the normal trip information, the trip registration data is stored in the trip data pool to obtain fault single-trip registration data;
[0028] Based on the fault registration data, the trip data pool is compared to obtain the comparison results, wherein the comparison information includes unmatched data results or matched data results.
[0029] The trip matching result is generated based on the unmatched data.
[0030] Based on the data pairing results and the fault single registration data, the trip data pool is used to extract pairing data to obtain trip pairing data.
[0031] Based on the data pairing results and the trip pairing data, data encapsulation is performed to obtain the trip matching results.
[0032] In some embodiments, the fault registration data includes the bus identification parameters, the passenger identity data, and the data registration time;
[0033] Based on the data pairing results and the fault single-time registration data, the trip data pool is used to extract paired data to obtain trip pairing data, including:
[0034] Based on the data pairing results and the bus identification parameters, the trip data pool is initially screened to obtain a candidate set of bus trip data.
[0035] Based on the passenger identity data, the candidate set of data for the same bus trip is further filtered to obtain the candidate set of data for the same passenger's bus trip.
[0036] Based on the data registration time, the candidate set of bus trip data for the same passenger is matched to obtain the trip matching data.
[0037] In some embodiments, the trip matching success information includes the trip pairing data;
[0038] Based on the successful trip matching information and the trip registration data, the fare is calculated, including:
[0039] The station information is extracted from the trip matching data to obtain the passenger boarding station;
[0040] The station information is extracted from the trip registration data to obtain the passenger's drop-off station;
[0041] Based on the passenger boarding station and the passenger alighting station, the passenger fare for the target segment of the bus is generated.
[0042] To achieve the above objectives, a second aspect of this application provides a segmented bus fare calculation device, the device comprising:
[0043] The status monitoring module is used to monitor the status of the onboard unit of the target segment bus to obtain the onboard unit's operating status, which includes the onboard unit's fault status.
[0044] The fault code generation module is used to generate fault codes for the target segment of the bus based on the fault status of the on-board unit, and obtain fault registration codes.
[0045] The trip recording module is used to receive trip registration data uploaded by the passenger registration client based on the fault registration code;
[0046] The trip matching module is used to perform matching queries on the trip registration data based on a preset trip data pool to obtain trip matching results, wherein the trip matching results include trip matching success information;
[0047] The fare calculation module is used to calculate the fare based on the trip matching success information and the trip registration data.
[0048] To achieve the above objectives, a third aspect of the present application provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the method of the first aspect described above.
[0049] To achieve the above objectives, a fourth aspect of the present application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method of the first aspect described above.
[0050] The segmented bus fare calculation method, device, electronic equipment, and storage medium proposed in this application monitor the onboard unit status of the target segmented bus, enabling timely acquisition of the onboard unit's operating status. In the event of an onboard unit malfunction, a fault registration code is generated, providing a travel registration carrier for passengers in onboard unit malfunction scenarios. This facilitates the clarification of passenger travel itineraries during onboard unit malfunctions. Furthermore, the method receives travel registration data uploaded by the passenger registration client and performs matching queries based on a travel data pool, achieving precise correlation between passenger travel data in onboard unit malfunction scenarios. This avoids one-sided transactions caused by onboard unit malfunctions. Finally, based on successful travel matching information and travel registration data, the method calculates the passenger's fare, preventing passengers from incurring excessive charges due to one-sided transactions, thereby improving the accuracy of segmented bus fare calculation. Attached Figure Description
[0051] Figure 1 This is a flowchart of the segmented bus fare calculation method provided in the embodiments of this application;
[0052] Figure 2 yes Figure 1 The flowchart of step S102 in the document;
[0053] Figure 3 yes Figure 1 The flowchart of step S104 in the process;
[0054] Figure 4 yes Figure 3 The flowchart of step S301 in the process;
[0055] Figure 5 yes Figure 3 The flowchart of step S303 in the process;
[0056] Figure 6 yes Figure 5 The flowchart of step S504 in the process;
[0057] Figure 7 yes Figure 1 The flowchart of step S105 in the process;
[0058] Figure 8 This is a schematic diagram of the structure of the segmented bus fare calculation device provided in the embodiments of this application;
[0059] Figure 9 This is a schematic diagram of the hardware structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0060] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0061] It should be noted that although functional modules are divided in the device schematic diagram and a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first," "second," etc., in the specification, claims, and the aforementioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.
[0062] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.
[0063] First, let's analyze some of the terms used in this application:
[0064] Segmented bus service: Segmented bus service is a mainstream bus operation mode in the urban public transportation sector. Segmented bus service refers to buses that travel along fixed routes and pass through a series of pre-set stops. The fare is not based on a uniform standard price, but rather on the actual number of stops or the distance traveled, with corresponding fare levels determined by the passenger. The core fare calculation logic of segmented bus service is to determine the travel range based on the passenger's boarding and alighting stops, and then match the fare standard for the corresponding range to calculate the fare. Passengers need to complete two trip registrations during the ride, one upon boarding and one upon alighting, so that the bus operator can complete accurate fare calculation based on complete travel stop information. In actual operation, the fare of segmented bus service usually increases gradually with the increase of the number of stops or the distance traveled, which can fit the cost law of bus operation and the travel consumption needs of passengers. It is an important form of transportation in the urban public transportation system that takes into account both operational rationality and universal accessibility.
[0065] Onboard Unit: The onboard unit is a dedicated intelligent terminal device installed on segmented buses. It is the core carrier for establishing data interaction between the bus and the bus operation service terminal and the passenger registration client. The onboard unit integrates core functions such as trip registration, information verification, data collection and transmission, and fault status feedback. It can complete operations such as passenger boarding and alighting QR code registration, real-time uploading of ride data, and generation and display of fault registration codes. In the normal operation scenario of segmented buses, the onboard unit can recognize passenger boarding passes and complete the collection and uploading of trip data. In the scenario where the onboard unit malfunctions and cannot complete QR code registration, it can trigger fault status reporting and generate corresponding fault registration codes to support passengers in completing trip registration in fault scenarios. At the same time, it can simultaneously transmit vehicle operation status and passenger ride data to the bus operation service terminal. The onboard unit is a key hardware facility to ensure trip registration and data interaction of segmented buses.
[0066] The segmented bus fare calculation is used to calculate the fare for a passenger based on the boarding and alighting station information of a passenger taking a segmented bus. For example, in the case of a malfunction in the onboard unit, a passenger may successfully scan the code when boarding at station 1, but fail to scan the code when alighting at station 2 due to the malfunction. The segmented bus fare calculation can calculate the fare for the passenger between station 1 and station 2, thus avoiding situations where the passenger is overcharged or undercharged.
[0067] Currently, the calculation of fares for segmented buses relies mainly on the onboard machines installed on the buses. When the onboard machines malfunction, one-sided transactions can easily occur, leading to errors in the calculation of segmented bus fares. This can result in passengers being overcharged or undercharged. Therefore, improving the accuracy of segmented bus fare calculation in the event of onboard machine malfunction has become an urgent technical problem to be solved.
[0068] Based on this, embodiments of this application provide a method and apparatus for calculating segmented bus fares, an electronic device, and a storage medium, aiming to improve the accuracy of segmented bus fare calculation in the event of a malfunction of the onboard unit.
[0069] The segmented bus fare calculation method, apparatus, electronic device, and storage medium provided in this application are specifically illustrated through the following embodiments. First, the segmented bus fare calculation method in this application embodiment is described.
[0070] The embodiments of this application can acquire and process relevant data based on artificial intelligence technology. Artificial intelligence (AI) refers to the theories, methods, technologies, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to obtain optimal results.
[0071] Foundational technologies for artificial intelligence generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interactive systems, and mechatronics. AI software technologies mainly encompass computer vision, robotics, biometrics, speech processing, natural language processing, and machine learning / deep learning.
[0072] The segmented bus fare calculation method provided in this application relates to the field of public transportation fare calculation technology. This method can be applied to a terminal, a server, or software running on either a terminal or a server. In some embodiments, the terminal can be a smartphone, tablet, laptop, desktop computer, etc.; the server can be configured as an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application implementing the segmented bus fare calculation method, but is not limited to the above forms.
[0073] This application can be used in a wide variety of general-purpose or special-purpose computer system environments or configurations. Examples include: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, and distributed computing environments including any of the above systems or devices. This application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform specific tasks or implement specific abstract data types. This application can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.
[0074] Figure 1 This is an optional flowchart of the segmented bus fare calculation method provided in this application embodiment. The segmented bus fare calculation method can be applied to the bus operation server. Figure 1 The method may include, but is not limited to, steps S101 to S105.
[0075] Step S101: Monitor the status of the onboard unit of the target segment bus to obtain the onboard unit's operating status, which includes the onboard unit's fault status.
[0076] Step S102: Based on the fault status of the on-board unit, generate fault codes for the target segment of the bus to obtain fault registration codes;
[0077] Step S103: Receive the trip registration data uploaded by the passenger registration client based on the fault registration code;
[0078] Step S104: Based on the preset trip data pool, perform a matching query on the trip registration data to obtain the trip matching result, wherein the trip matching result includes trip matching success information;
[0079] Step S105: Calculate the travel fare based on the successful trip matching information and trip registration data.
[0080] Steps S101 to S105 as illustrated in this embodiment of the application monitor the onboard unit status of the target segment bus, enabling timely acquisition of the onboard unit's operating status. In the event of an onboard unit malfunction, a fault registration code is generated, providing a travel registration carrier for passengers in onboard unit malfunction scenarios. This facilitates the clarification of passenger travel itineraries in such scenarios. Furthermore, the system receives travel registration data uploaded by the passenger registration client and performs matching queries based on the travel data pool. This enables precise correlation between passenger travel data in onboard unit malfunction scenarios, avoiding one-sided transactions caused by onboard unit malfunctions. Finally, based on successful travel matching information and travel registration data, the system calculates passenger fares, preventing passengers from incurring excessive charges due to one-sided transactions and thus improving the accuracy of fare calculation for segmented buses.
[0081] In step S101 of some embodiments, the target segmented bus refers to a bus that is in operation at the current time point and adopts a segmented fare calculation mode.
[0082] The onboard unit's operating status refers to the working condition of the onboard unit of the target segment bus during operation. The onboard unit's operating status usually includes the onboard unit's fault status or the onboard unit's normal status. Among them, the onboard unit's fault status refers to the onboard unit's working status that is unable to properly recognize passenger QR code information due to hardware damage, communication abnormalities, or other reasons.
[0083] In this embodiment, the on-board unit, as a bus card reader that monitors the on-board unit's operating status, periodically uploads its own working status data to the bus operation server. However, to improve the stability of obtaining the on-board unit's operating status, the bus operation server can monitor the on-board unit's operating status through a real-time communication link with the on-board unit of the target segment bus.
[0084] It is important to know that when the bus operation service detects that the scanning module of the on-board unit is unresponsive, unable to recognize the boarding code, or that the communication module is interrupted, causing passenger boarding data to be unable to be uploaded, it can determine that the on-board unit is in a fault state, and thus generate a signal indicating that the on-board unit is in a fault state.
[0085] In step S102 of some embodiments, the fault registration code refers to a visual identifier generated by the target segment bus when the on-board unit malfunctions, containing information such as bus operation information. This bus operation information includes, but is not limited to, bus route number, bus license plate number, on-board unit number, the bus's current station location at the current time point, and the timestamp of the current time point. It should be noted that the fault registration code can be in the form of a QR code, a dynamic digital code, a barcode, or other similar codes.
[0086] This application embodiment can generate an event identifier for a vehicle-mounted unit malfunction based on the signal generated by the malfunction status of the vehicle-mounted unit. Further, it can obtain the operation information of the target segment of the bus and encrypt the operation information using a key pre-designed by the bus company to obtain encrypted operation information. Then, it can sign the encrypted operation information with the aforementioned event identifier for the vehicle-mounted unit malfunction and the time information in the operation information to prevent forgery. Finally, it can obtain the fault registration code by converting the signed encrypted operation information into a data form of a code.
[0087] For details, please refer to Figure 2 In some embodiments, step S102 may include, but is not limited to, steps S201 to S205:
[0088] Step S201: Generate a fault identification identifier for the on-board unit based on its fault status;
[0089] Step S202: Read the operating parameters of the target segment bus to obtain bus operation information, including the current operating time of the bus.
[0090] Step S203: Based on the preset bus key, encrypt the bus operation information to obtain encrypted bus operation information;
[0091] Step S204: Based on the fault identification of the on-board unit and the current operating time of the bus, sign the encrypted bus operation information to obtain the target digital signature;
[0092] Step S205: Based on the encrypted bus operation information and the target digital signature, perform format conversion to obtain the fault registration code.
[0093] In step S201 of some embodiments, the vehicle-mounted unit fault identification identifier refers to a unique identifier for a vehicle-mounted unit fault event.
[0094] In this embodiment of the application, when the bus operation server confirms that the on-board unit of the target segment bus cannot scan the code normally due to hardware damage, communication abnormality or other reasons, it can generate a unique identifier consisting of letters, numbers or combinations thereof through a pre-set algorithm, namely the on-board unit fault identification identifier. It should be noted that the on-board unit fault identification identifier is strongly correlated with the events in the on-board unit fault state.
[0095] In step S202 of some embodiments, bus operation information refers to the relevant data set of the target segment bus during operation. Bus operation information includes, but is not limited to, bus route number, bus license plate number, on-board equipment number, bus station information at the current time node, and timestamp of the current time node.
[0096] The current operating time of the bus refers to the real-time time when the onboard unit of the target segment bus is triggered.
[0097] In this embodiment, the on-board unit can extract information such as bus route number, bus license plate number, and on-board unit equipment number pre-stored in the basic bus information database to obtain partial bus operation information. Then, it can obtain the real-time operation data of the target segment bus through the GPS positioning module on the target segment bus. The real-time operation data includes the bus's current station information and the timestamp of the current time node. It should be noted that the bus's current station information includes the target segment bus's up and down directions. Finally, by summarizing the above bus route number, bus license plate number, on-board unit equipment number, bus's current station information, and the timestamp of the current time node, the bus operation information of the target segment bus can be obtained.
[0098] In step S203 of some embodiments, the encrypted bus operation information refers to the unreadable data obtained after encrypting the original bus operation information using a preset bus key.
[0099] In this embodiment, the bus key pre-configured by the bus company can be used to encrypt all bus operation information of the target segment bus. The plaintext bus operation information can be converted into encrypted data that cannot be directly read, i.e., encrypted bus operation information. It should be noted that the bus key can be stored in the bus operation server, so the bus operation server can directly call it.
[0100] In step S204 of some embodiments, the target digital signature refers to verification data that prevents the forgery of public transport operation encrypted information. The target digital signature is bound to the public transport operation encrypted information. In the scenario of trip registration data verification, the server can use the signature to confirm the legality of the fault registration code and the integrity of the data.
[0101] In this embodiment, the vehicle-mounted unit can use the vehicle-mounted unit fault identification identifier and the current bus operating time in the bus operation information as signature parameters, and combine them with a pre-set signature algorithm to perform a hash operation on the encrypted bus operation information to generate a hash value of fixed length. Then, the hash value is signed using the bus key to obtain the target digital signature.
[0102] In step S205 of some embodiments, the complete data to be converted can be obtained by merging the encrypted bus operation information and the target digital signature. Furthermore, a code of a certain form can be selected for conversion according to the fault status of the on-board unit. For example, if the display screen of the on-board unit is not faulty, the complete data to be converted can be converted into a fault registration code in the form of a QR code and displayed on the display screen of the on-board unit. If the display screen of the on-board unit is faulty, the complete data to be converted can be converted into a fault registration code in the form of a digital dynamic code and displayed on the large screen of the target segment bus.
[0103] Steps S201 to S205 of this embodiment, based on the fault status of the on-board unit, generate an on-board unit fault identification identifier, establishing a unique data association link for the on-board unit fault event. Further, the operation parameters of the target segment of the bus are read to obtain bus operation information, providing data support for the generation of the fault registration code. Next, based on a preset bus key, the bus operation information is encrypted to obtain encrypted bus operation information. Then, based on the on-board unit fault identification identifier and the current bus operating time, the encrypted bus operation information is signed to obtain a target digital signature. This prevents unauthorized access to and reading of bus operation information, thereby preventing the forgery of the fault registration code and improving the security of fault registration code generation. Finally, based on the encrypted bus operation information and the target digital signature, a format conversion is performed to obtain the fault registration code, accelerating the passenger scanning speed and improving the efficiency of passenger trip registration.
[0104] In step S103 of some embodiments, the ride registration client refers to a mobile terminal application used by passengers to register their trips. The ride registration client can be a dedicated APP for public transportation or a third-party application that supports public transportation trip registration.
[0105] Trip registration data refers to the collection of information related to the current trip uploaded by passengers through the ride registration client after seeing the fault registration code. Trip registration data includes, but is not limited to, passenger identification, vehicle operating parameters, trip registration time, etc.
[0106] In this embodiment, when the target segment bus generates a fault registration code and displays it to passengers, passengers can open the scanning function of the passenger registration client to scan the fault registration code in the form of a QR code displayed on the in-vehicle device, or enter the fault registration code in the form of a dynamic digital code displayed on the target segment bus display screen in the input box of the passenger registration client. Furthermore, the passenger registration client can parse the encrypted information in the fault registration code to obtain the bus operation information of the target segment bus. It should be noted that if the passenger registration client finds that the fault registration code has expired, has an incorrect signature, or has a mismatched key during the parsing process, resulting in the fault registration code being unable to be decrypted, the passenger registration client can display a pop-up prompt. The "Invalid fault registration code, please contact the driver" message helps passengers complete their trip registration more quickly. It's also important to know that if the ride registration client successfully parses the fault registration code, it will retrieve the bus operation information from the code, as well as the passenger identity information linked to the currently logged-in account. This passenger identity information typically includes the user ID, bus card number, and registered mobile phone number. The ride registration client then integrates the bus operation information, passenger identity information, and the current timestamp to form trip registration data. Finally, the bus operation server can receive this trip registration data when the ride registration client uploads it.
[0107] In step S104 of some embodiments, the trip data pool refers to the database built by the bus operation server to store various types of passenger trip data. The trip data pool can be divided into a fault trip pool and a normal trip pool. The fault trip pool is the database that stores the trip registration data uploaded by passengers when the on-board unit is faulty, and the normal trip pool is the database that stores passenger trip information when the on-board unit is normal.
[0108] Trip matching result refers to the determination of whether there is a related trip in the trip registration data. Trip matching result can include trip matching success information or trip matching failure information. Trip matching success information means that the trip data pool shows that there is a ride-on / ride-off related record corresponding to the trip registration data. Trip matching failure information means that the trip data pool shows that there is no ride-on / ride-off related record corresponding to the trip registration data.
[0109] This application embodiment can distinguish between abnormal and normal trip information by performing data verification on the received trip registration data. For abnormal trip information, an error is reported to the ride registration client and the trip registration error result is fed back. If the verification result of the trip registration data is normal trip information, the trip registration data is matched in the pre-built trip data pool to finally obtain the trip matching result.
[0110] For details, please refer toFigure 3 In some embodiments, step S104 may include, but is not limited to, steps S301 to S303:
[0111] Step S301: Perform data verification on the trip registration data to obtain trip verification information, which includes trip abnormal information or trip normal information.
[0112] Step S302: Based on the trip abnormality information, perform error processing on the passenger registration client to obtain trip registration error feedback;
[0113] Step S303: Based on the normal trip information and trip registration data, perform data matching on the trip data pool to obtain the trip matching result.
[0114] In step S301 of some embodiments, the trip verification information refers to the result set formed by the bus operation service terminal after verifying the legality of the trip registration data uploaded by the passenger. The trip verification information usually includes trip abnormal information or trip normal information. Trip abnormal information indicates that the trip registration data is abnormal and fails the verification, while trip normal information indicates that the trip registration data is normal and has passed the verification.
[0115] In this embodiment, vehicle authenticity is verified based on bus identification parameters in the trip registration data to obtain vehicle verification information, and passenger status is queried based on passenger identity data in the trip registration data to obtain passenger status information. The corresponding trip verification information is then generated by combining the above two pieces of information.
[0116] For details, please refer to Figure 4 In some embodiments, the trip registration data includes bus identification parameters and passenger identity data, and step S301 may include, but is not limited to, steps S401 to S403:
[0117] Step S401: Based on the bus identification parameters, verify the authenticity of the vehicle to obtain vehicle verification information;
[0118] Step S402: Based on passenger identity data, perform a passenger status query to obtain passenger status information;
[0119] Step S403: Generate trip verification information based on vehicle verification information and passenger status information.
[0120] In step S401 of some embodiments, the basic parameters of the bus refer to the fixed information of the target segment bus itself, such as the bus route number, bus license plate number, and on-board equipment number.
[0121] Passenger identity data refers to information that can identify a passenger, such as a transit card number, an application's user ID, or an application's registered mobile phone number.
[0122] Vehicle verification information is used to characterize whether a target segment of public transport is qualified to operate. Commonly, vehicle verification information can include information such as whether the public transport is registered and operating normally, whether the public transport is unregistered, or whether the public transport has been suspended.
[0123] In this embodiment, the bus operation server can compare the bus identification parameters in the trip registration data with the pre-stored bus operation registration directory one by one to verify whether the segmented buses in the trip registration data are compliant operating buses. It should be noted that the bus operation registration directory is a list that records the basic information and current operating status of all compliant segmented buses. The current operating status can be normal operation, out of service, maintenance, etc. Simultaneously, the bus operation server can compare the bus identification parameters in the trip registration data with the bus information of the same dimension in the fault registration code to verify whether the segmented buses in the trip registration data are faulty. Finally, by combining the results of comparing the bus identification parameters with the bus operation registration directory and the results of comparing the bus identification parameters with the bus information in the same dimension in the fault registration code, vehicle verification information can be obtained. Specifically, vehicle verification information can be generated only when the result of comparing the bus identification parameters with the bus operation registration directory indicates that the bus in the trip registration data is a normally operating bus, and the result of comparing the bus identification parameters with the bus information in the same dimension in the fault registration code indicates that the bus in the trip registration data is the target segment bus in the fault registration code. In other cases, vehicle verification information indicates that vehicle verification has failed.
[0124] In step S402 of some embodiments, passenger status information is used to characterize whether a passenger is qualified to register for travel. Commonly, passenger status information may be passenger application account normal information, passenger application account frozen information, or passenger application account cancelled information, etc.
[0125] In this embodiment of the application, the bus operation server can compare passenger identity data with a pre-stored list of registered users to determine whether the passenger corresponding to the passenger identity data has completed account registration and whether the account is valid. It should be noted that the list of registered users includes information such as the user number, bus card number and registered mobile phone number of all passengers with registered accounts.
[0126] In step S403 of some embodiments, the compliance of the trip registration data can be verified by combining vehicle verification information and passenger status information. Specifically, when the vehicle verification information indicates that the bus sign parameter verification is passed and the passenger status information indicates that the passenger identity data verification is passed, trip verification information indicating that the trip registration data verification is passed can be generated. When the vehicle verification information indicates that the bus sign parameter verification is failed, or the passenger status information indicates that the passenger identity data verification is failed, trip verification information indicating that the trip registration data verification is failed can be generated. When the vehicle verification information indicates that the bus sign parameter verification is failed and the passenger status information indicates that the passenger identity data verification is failed, trip verification information indicating that the trip registration data verification is failed can be generated.
[0127] Steps S401 to S403, as shown in this embodiment, verify the authenticity of the vehicle based on the bus identification parameters to obtain vehicle verification information, which can prevent false trip registration related to illegal buses. At the same time, passenger status is queried based on passenger identity data to obtain passenger status information, which can prevent malicious identity forgery for false trip registration. Finally, trip verification information is generated based on vehicle verification information and passenger status information, which can ensure the accuracy of trip registration data from both the bus and passenger dimensions, thereby improving the fare calculation accuracy of segmented buses.
[0128] In step S302 of some embodiments, trip registration error feedback refers to the specific prompt information returned by the bus operation server to the passenger registration client after the trip registration data error processing.
[0129] In this embodiment, when the trip verification information is trip abnormal information, it indicates that there may be situations in the trip registration data such as the vehicle not being registered on the server, the passenger identity being invalid, the fault registration code being expired, or the signature being incorrect. At this time, the bus operation server can generate corresponding error message content according to the abnormality type of the trip abnormal information, and then push the error message content to the passenger's ride registration client through the API interface to form trip registration error feedback. Furthermore, the bus operation server can determine from the trip abnormal information that the trip registration data cannot be matched with the corresponding data in the trip data pool. Therefore, it can generate a trip matching result that represents the failure of trip level data matching.
[0130] In step S303 of some embodiments, trip registration data can be stored in the trip data pool based on the trip normal information to form fault single registration data. Then, the fault single registration data is compared with the trip data in the trip data pool to obtain a data mismatch result or a data matching result. For the data mismatch result, a trip matching result representing a trip matching failure can be generated. For the data matching result, trip matching data can be extracted from the trip data pool by combining the fault single registration data, and then the trip matching data is encapsulated to obtain a trip matching result representing a successful trip matching.
[0131] For details, please refer to Figure 5 In some embodiments, step S303 may include, but is not limited to, steps S501 to S505:
[0132] Step S501: Based on the normal trip information, store the trip registration data in the trip data pool to obtain the fault single registration data;
[0133] Step S502: Based on the fault single registration data, perform data comparison on the trip data pool to obtain data comparison results, wherein the data comparison information includes data unmatched results or data matched results;
[0134] Step S503: Generate trip matching results based on the unmatched data results;
[0135] Step S504: Based on the data pairing results and fault single registration data, perform pairing data extraction from the trip data pool to obtain trip pairing data;
[0136] Step S505: Based on the data pairing results and trip pairing data, perform data encapsulation to obtain trip matching results.
[0137] In step S501 of some embodiments, fault single registration data refers to the trip record formed by storing the verified trip registration data into the trip data pool. Fault single registration data usually includes bus identification parameters, passenger identity data and data registration time in the trip registration data.
[0138] In this embodiment of the application, when the trip registration data passes the verification and the trip normal information is generated, the trip registration data can be stored in the fault trip pool in the trip data pool to obtain fault single registration data, so as to realize the storage of passenger trip data under the fault state of the vehicle-mounted machine, which can reduce one-sided transactions when the vehicle-mounted machine is faulty.
[0139] In step S502 of some embodiments, the data comparison result refers to the set of trip association judgment conclusions formed after comparing the fault single registration data with each data in the trip data pool. The data comparison results can usually be divided into two categories: data unmatched results and data matched results.
[0140] The data mismatch result indicates that the faulty single registration data has no corresponding associated trip in the trip data pool.
[0141] The data pairing results indicate that there are corresponding associated trips in the fault registration data.
[0142] In this embodiment, the trip data pool includes a normal trip pool and a fault trip pool. Therefore, the fault trip registration data can be compared with the trip data in the normal trip pool and the fault trip pool by comparing bus identification parameters, passenger identity data, and data registration time. Specifically, when a first trip dataset with the same bus identification parameters as the fault trip registration data exists in the normal trip pool and the fault trip pool, the passenger identity data of the fault trip registration data is further compared with the first trip dataset. If a second trip dataset with the same passenger identity data as the fault trip registration data exists in the first trip dataset, the data registration time in the second trip dataset is compared with the data registration time of the fault trip registration data. If the time interval between the registration time of existing data and the registration time of faulty single-trip data is less than a preset time interval, a data comparison result indicating that the faulty single-trip registration data has a corresponding associated trip can be generated. If there is no trip data in the normal trip pool or faulty trip pool with the same bus identification parameters as the faulty single-trip registration data, or no trip data in the first trip dataset with the same passenger identity data as the faulty single-trip registration data, or no trip data in the second trip dataset whose registration time is less than a preset time interval, a data comparison result indicating that the faulty single-trip registration data has no corresponding associated trip in the trip data pool can be generated. It should be noted that the aforementioned preset time interval can be set by the bus company's backend; this time interval is typically 4 hours and can be adjusted according to actual circumstances.
[0143] In step S503 of some embodiments, when the data comparison result is a data mismatch result, a trip matching result representing a trip matching failure can be generated based on the information that the fault single registration data represented by the data mismatch result has no corresponding associated trip in the trip data pool.
[0144] In step S504 of some embodiments, trip pairing data refers to trip record data associated with fault single registration data in the trip data pool. It should be noted that trip pairing data and fault single registration data can form a complete passenger trip link.
[0145] In this embodiment, the trip data pool can be initially screened based on the data pairing results and the bus identification parameters in the fault registration data to obtain a candidate set of trip data under the same bus. Further, the candidate set of trip data under the same bus can be screened a second time based on the passenger identity data in the fault registration data to obtain a candidate set of bus trip data for the same passenger. Finally, the candidate set of bus trip data for the same passenger can be screened based on the data registration time in the fault registration data to extract accurate trip pairing data.
[0146] For details, please refer to Figure 6 In some embodiments, the fault registration data includes bus identification parameters, passenger identity data, and data registration time. Step S504 may include, but is not limited to, steps S601 to S603:
[0147] Step S601: Based on the data pairing results and bus identification parameters, perform preliminary screening of the trip data pool to obtain a candidate set of bus trip data.
[0148] Step S602: Based on passenger identity data, perform secondary data filtering on the candidate set of bus trip data for the same passenger to obtain the candidate set of bus trip data for the same passenger.
[0149] Step S603: Based on the data registration time, perform data matching on the candidate set of bus trip data for the same passenger to obtain trip matching data.
[0150] In step S601 of some embodiments, the candidate set of bus trip data refers to the set of trip data of all passengers on the same route and in the same vehicle.
[0151] In this embodiment of the application, when the data comparison result is a data pairing result, the bus identification parameters in the faulty single registration data can be compared with the bus information of the trip data in the normal trip pool and the faulty trip pool respectively. All trip data of the same route and the same vehicle can be filtered out from the normal trip pool and the faulty trip pool. Finally, all trip data of the same route and the same vehicle can be aggregated to obtain a candidate set of the same bus trip data.
[0152] In step S602 of some embodiments, the candidate set of passenger bus trip data refers to the set of trip data of the same route, the same vehicle, and the same passenger.
[0153] In this embodiment of the application, the passenger identity data in the fault registration data can be used to extract the travel data of passengers with the same passenger identity data from the same bus travel data candidate set, so as to obtain the same passenger bus travel data candidate set.
[0154] In step S603 of some embodiments, the trip data of the same passenger in the same vehicle may have multiple time nodes. In order to ensure that a complete passenger boarding and alighting trip link can be formed with the fault single registration data, it is necessary to ensure that the time interval between the recording time node of the passenger bus trip data in the candidate set of passenger bus trip data and the data registration time of the fault single registration data will not be greater than the time length of a segmented bus from the starting station to the terminal station. Therefore, in the embodiments of this application, the trip matching data that matches the fault single registration data can be filtered out from the candidate set of passenger bus trip data by viewing the time interval between the recording time node and the data registration time of each passenger bus trip data in the candidate set of passenger bus trip data.
[0155] Steps S601 to S603, as illustrated in this embodiment, involve initial screening of the trip data pool based on the data pairing results and bus identification parameters to obtain a candidate set of trip data for the same bus. Then, based on passenger identity data, a second screening is performed on this candidate set to obtain a candidate set of trip data for the same passenger. Finally, based on the data registration time, the candidate set of trip data for the same passenger is paired to obtain trip pairing data. This process effectively narrows the search scope for trip matching, reducing redundant workload from comparing a large amount of invalid trip data. Furthermore, multi-dimensional data filtering improves the accuracy of the extracted trip pairing data, ensuring accurate reconstruction of passenger boarding and alighting trips, thus avoiding billing errors caused by matching deviations. It also reduces the occurrence of one-sided transactions when the onboard unit malfunctions.
[0156] In step S505 of some embodiments, after obtaining the trip pairing data associated with the fault single registration data, the data pairing result can be encapsulated together with the trip pairing data into a trip matching result that represents a successful trip matching.
[0157] Steps S501 to S505 of this embodiment involve storing legitimate trip registration data in a standardized trip data pool based on normal trip information, forming structured fault single-trip registration data. This provides accurate and complete data support for trip matching. Then, the trip data pool is compared against this fault single-trip registration data, clearly distinguishing between unmatched and matched results. This enables accurate filtering of passenger-related trips, thereby improving the accuracy of segmented bus fare calculation. Subsequently, trip matching results representing trip matching failures are generated for unmatched data results, ensuring the standardized presentation of trip matching failure information. Next, based on the data matching results and fault single-trip registration data, matching data is extracted from the trip data pool to obtain trip matching data. This allows for a complete reconstruction of the passenger boarding and alighting trip, providing an information foundation for segmented bus fare calculation and ensuring the accuracy of segmented bus fare calculation. Finally, based on the data matching results and trip matching data, data encapsulation is performed to obtain trip matching results, improving the completeness of the passenger boarding and alighting trip and avoiding the problem of one-sided transactions when the onboard unit malfunctions.
[0158] Steps S301 to S303, as illustrated in this embodiment, involve verifying the trip registration data to obtain trip verification information, including trip abnormality information or trip normal information. This allows invalid trip registration data to be excluded from the data source, thereby reducing data matching time and improving billing efficiency. Furthermore, based on the trip abnormal information, error processing is performed on the ride registration client to obtain trip registration error feedback. A trip matching result is generated based on the trip registration error feedback. Based on the trip normal information and trip registration data, data matching is performed on the trip data pool to obtain the trip matching result. This avoids matching erroneous data with data in the trip data pool, improving the accuracy of trip matching and thus improving the accuracy of segmented bus fare calculation.
[0159] In step S105 of some embodiments, complete trip link information can be extracted based on the trip matching data and trip registration data in the trip matching success information. Furthermore, based on the complete trip link information, the fare that the passenger should pay for taking the target segment bus can be accurately calculated, i.e., the fare payable by the passenger.
[0160] For details, please refer to Figure 7 In some embodiments, the fault registration data includes bus identification parameters, passenger identity data, and data registration time. Step S105 may include, but is not limited to, steps S701 to S703:
[0161] Step S701: Extract station information from the trip matching data to obtain the passenger boarding station;
[0162] Step S702: Extract station information from the trip registration data to obtain the passenger's alighting station;
[0163] Step S703: Based on the passenger boarding station and passenger alighting station, generate the passenger fare payable for the target segment of the bus.
[0164] In steps S701 and S702 of some embodiments, the passenger boarding station refers to the station where the passenger boards the target segment bus.
[0165] Passenger boarding station refers to the station where passengers disembark when boarding a bus for a specific segment.
[0166] In this embodiment of the application, if the trip registration data can find matching data in the trip data pool, it indicates that the trip registration data is the trip data registered by the passenger when getting off the bus. Therefore, the trip matching data included in the trip matching success information is the trip data registered by the passenger when getting on the bus. Thus, this embodiment of the application can determine the passenger's boarding station by extracting the station information in the trip matching data. At the same time, it can determine the passenger's alighting station by extracting the station information in the trip registration data.
[0167] In step S703 of some embodiments, the fare payable by the passenger refers to the fare that the passenger should pay after taking the target segment bus.
[0168] In this embodiment of the application, the segmented bus fare corresponding to the above-mentioned passenger boarding station and passenger alighting station can be determined according to the mapping relationship between the segmented bus fare and the passenger boarding and alighting stations set in advance by the bus company, that is, the fare payable by the passenger.
[0169] Steps S701 to S703, as shown in the embodiments of this application, extract the passenger boarding station from the trip pairing data and then extract the corresponding passenger alighting station from the trip registration data to obtain the complete trip station information for a single passenger ride. Furthermore, based on the passenger boarding and alighting stations, the passenger fare payable for the target segmented bus can be generated, which can effectively avoid the problem of segmented bus fare calculation deviation and prevent passengers from being overcharged or undercharged, thereby improving the accuracy of segmented bus fare calculation.
[0170] This application monitors the onboard unit status of the target segmented bus, enabling timely acquisition of the onboard unit's operational status. In the event of an onboard unit malfunction, a fault registration code is generated, providing a travel registration medium for passengers in onboard unit malfunction scenarios. This facilitates the clarification of passenger travel itineraries during onboard unit malfunctions. Furthermore, it receives travel registration data uploaded by the passenger registration client and performs matching queries based on a travel data pool, achieving precise correlation between passenger travel data in onboard unit malfunction scenarios. This avoids one-sided transactions caused by onboard unit malfunctions. Finally, based on successful travel matching information and travel registration data, the application calculates passenger fares, preventing passengers from incurring excessive charges due to one-sided transactions, thereby improving the accuracy of fare calculation for segmented buses.
[0171] Please see Figure 8 This application also provides a segmented bus fare calculation device, which can implement the above-mentioned segmented bus fare calculation method. The device includes:
[0172] The status monitoring module 801 is used to monitor the status of the on-board unit of the target segment bus and obtain the on-board unit's operating status, including the on-board unit's fault status.
[0173] The fault code generation module 802 is used to generate fault codes for the target segment of the bus based on the fault status of the on-board unit, and obtain the fault registration code.
[0174] The trip recording module 803 is used to receive trip registration data uploaded by the passenger registration client based on the fault registration code;
[0175] The trip matching module 804 is used to perform matching queries on trip registration data based on a preset trip data pool to obtain trip matching results, including trip matching success information.
[0176] The fare calculation module 805 is used to calculate the fare based on the successful trip matching information and trip registration data.
[0177] The specific implementation of this segmented bus fare calculation device is basically the same as the specific implementation of the segmented bus fare calculation method described above, and will not be repeated here.
[0178] This application also provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the above-described segmented bus fare calculation method. This electronic device can be any smart terminal, including a tablet computer or an in-vehicle computer.
[0179] Please see Figure 9 , Figure 9The hardware structure of an electronic device according to another embodiment is illustrated. The electronic device includes:
[0180] The processor 901 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this application.
[0181] The memory 902 can be implemented as a read-only memory (ROM), static storage device, dynamic storage device, or random access memory (RAM). The memory 902 can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 902 and called and executed by the processor 901 using the segmented bus fare calculation method of the embodiments of this application.
[0182] The input / output interface 903 is used to implement information input and output;
[0183] The communication interface 904 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).
[0184] Bus 905 transmits information between various components of the device (e.g., processor 901, memory 902, input / output interface 903, and communication interface 904);
[0185] The processor 901, memory 902, input / output interface 903, and communication interface 904 are connected to each other within the device via bus 905.
[0186] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method for calculating segmented bus fares.
[0187] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0188] The segmented bus fare calculation method, segmented bus fare calculation device, electronic device and storage medium provided in this application embodiment obtain the on-board machine operating status by monitoring the on-board machine status of the target segmented bus. The on-board machine operating status includes the on-board machine fault status. Based on the on-board machine fault status, a fault code is generated for the target segmented bus to obtain a fault registration code. The travel registration data uploaded by the passenger registration client based on the fault registration code is received.
[0189] Based on a pre-set trip data pool, the trip registration data is matched and queried to obtain the trip matching results. The trip matching results include trip matching success information. Based on the trip matching success information and the trip registration data, the travel fare is calculated.
[0190] The embodiments described in this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided by the embodiments of this application. As those skilled in the art will know, with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.
[0191] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of this application, and may include more or fewer steps than shown, or combine certain steps, or different steps.
[0192] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0193] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.
[0194] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0195] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.
[0196] 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 the units described above 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. The coupling or direct coupling or communication connection between the shown or discussed units may be through some interfaces, or indirect coupling or communication connection between the apparatus or units, and may be electrical, mechanical, or other forms.
[0197] The units described above 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.
[0198] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0199] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes multiple instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing programs, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0200] The preferred embodiments of the present application have been described above with reference to the accompanying drawings, but this does not limit the scope of the claims of the present application. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and substance of the embodiments of the present application shall be within the scope of the claims of the present application.
Claims
1. A method for calculating segmented bus fares, characterized in that, Applied to a public transport operation service terminal, the method includes: The onboard unit status of the target segment bus is monitored to obtain the onboard unit's operating status, which includes the onboard unit's fault status. Based on the fault status of the vehicle-mounted unit, a fault identification identifier for the vehicle-mounted unit is generated; The target segment of the bus is subjected to operation parameter reading to obtain bus operation information, wherein the bus operation information includes the current operating time of the bus; Based on a preset bus key, the bus operation information is encrypted to obtain encrypted bus operation information; Based on the vehicle-mounted unit's fault identification identifier and the bus's current operating time, the encrypted bus operation information is signed to obtain the target digital signature; Based on the encrypted bus operation information and the target digital signature, a format conversion is performed to obtain the fault registration code; Receive trip registration data uploaded by the passenger registration client based on the fault registration code; Based on a preset trip data pool, the trip registration data is matched and queried to obtain trip matching results, wherein the trip matching results include trip matching success information; Based on the successful trip matching information and the trip registration data, the travel fare is calculated.
2. The method according to claim 1, characterized in that, The process of matching and querying the trip registration data based on a preset trip data pool to obtain trip matching results includes: The trip registration data is validated to obtain trip validation information, which includes trip abnormality information or trip normal information. Based on the trip anomaly information, the passenger registration client is processed to generate a trip registration error feedback, and the trip matching result is generated based on the trip registration error feedback. Based on the normal trip information and the trip registration data, the trip data pool is matched to obtain the trip matching result.
3. The method according to claim 2, characterized in that, The trip registration data includes bus identification parameters and passenger identity data; The process of verifying the itinerary registration data to obtain itinerary verification information includes: Based on the bus identification parameters, the authenticity of the vehicle is verified to obtain vehicle verification information; Based on the passenger identity data, a passenger status query is performed to obtain passenger status information; The trip verification information is generated based on the vehicle verification information and the passenger status information.
4. The method according to claim 3, characterized in that, The step of matching the trip data pool based on the trip normal information and the trip registration data to obtain the trip matching result includes: Based on the normal trip information, the trip registration data is stored in the trip data pool to obtain fault single-trip registration data; Based on the fault registration data, the trip data pool is compared to obtain the comparison results, wherein the comparison information includes unmatched data results or matched data results. The trip matching result is generated based on the unmatched data. Based on the data pairing results and the fault single registration data, the trip data pool is used to extract pairing data to obtain trip pairing data. Based on the data pairing results and the trip pairing data, data encapsulation is performed to obtain the trip matching results.
5. The method according to claim 4, characterized in that, The fault registration data includes the bus identification parameters, the passenger identity data, and the data registration time. Based on the data pairing results and the fault single-time registration data, the trip data pool is used to extract paired data to obtain trip pairing data, including: Based on the data pairing results and the bus identification parameters, the trip data pool is initially screened to obtain a candidate set of bus trip data. Based on the passenger identity data, the candidate set of data for the same bus trip is further filtered to obtain the candidate set of data for the same passenger's bus trip. Based on the data registration time, the candidate set of bus trip data for the same passenger is matched to obtain the trip matching data.
6. The method according to claim 5, characterized in that, The successful trip matching information includes the trip pairing data; Based on the successful trip matching information and the trip registration data, the fare is calculated, including: The station information is extracted from the trip matching data to obtain the passenger boarding station; The station information is extracted from the trip registration data to obtain the passenger's drop-off station; Based on the passenger boarding station and the passenger alighting station, the passenger fare for the target segment of the bus is generated.
7. A segmented bus fare calculation device, characterized in that, The device includes: The status monitoring module is used to monitor the status of the onboard unit of the target segment bus to obtain the onboard unit's operating status, which includes the onboard unit's fault status. The fault code generation module is used to generate a fault identification identifier for the onboard unit based on the fault status of the onboard unit, read the operating parameters of the target segment bus to obtain bus operation information, wherein the bus operation information includes the current operating time of the bus, encrypt the bus operation information based on a preset bus key to obtain encrypted bus operation information, sign the encrypted bus operation information based on the fault identification identifier of the onboard unit and the current operating time of the bus to obtain a target digital signature, and perform format conversion based on the encrypted bus operation information and the target digital signature to obtain a fault registration code; The trip recording module is used to receive trip registration data uploaded by the passenger registration client based on the fault registration code; The trip matching module is used to perform matching queries on the trip registration data based on a preset trip data pool to obtain trip matching results, wherein the trip matching results include trip matching success information; The fare calculation module is used to calculate the fare based on the trip matching success information and the trip registration data.
8. An electronic device, characterized in that, The electronic device includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the segmented bus fare calculation method according to any one of claims 1 to 6.
9. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the segmented bus fare calculation method according to any one of claims 1 to 6.
Citation Information
Patent Citations
New energy vehicle operation and management method based on internet information system
CN108335178A
Novel scanning payment system and method for movable price computing scale
CN110348844A