A near real-time vehicle and transaction record matching method based on priority queues

By using a priority queue-based approach, vehicle behavior and fuel dispenser transaction records are collected synchronously. By utilizing a priority calculation module and a matching module, the problem of matching fuel dispenser transaction records with vehicle behavior is solved, achieving near real-time matching and improving accuracy.

CN114969454BActive Publication Date: 2026-03-13LANZHOU SIDIAN INFORMATION TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-24
Publication Date
2026-03-13

AI Technical Summary

Technical Problem

Existing technology cannot achieve near real-time matching between fuel dispenser transaction records and vehicle behavior.

Method used

A priority queue-based approach is adopted. By synchronously collecting vehicle behavior sequences and refueling transaction records, and using a priority calculation module and a matching module, combined with predefined rules and self-learning rules, the matching priority between vehicle behavior and refueling transactions is calculated and matched.

Benefits of technology

It achieves near real-time matching of refueling transaction records with vehicle behavior, improving matching accuracy and supporting self-learning expansion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114969454B_ABST
    Figure CN114969454B_ABST
Patent Text Reader

Abstract

This invention discloses a near real-time vehicle and transaction record matching method based on a priority queue. The matching method includes the following steps: S1. Synchronously collect vehicle behavior sequences and refueling transaction records from refueling nozzles. The flow of multiple refueling transaction records forms a refueling transaction record queue, and multiple vehicle behavior sequences form a vehicle behavior queue; S2. Input several vehicle behavior sequences in the vehicle behavior queue into a priority calculation module. The priority calculation module outputs the vehicle behavior sequence with the highest priority according to the weight; S3. The matching module retrieves a refueling transaction record and the vehicle behavior sequence with the highest priority output from the priority calculation module, and matches the two; S4. If the match is successful, the corresponding refueling transaction record and vehicle behavior sequence are removed from the refueling transaction record queue and the vehicle behavior queue, respectively. Repeat step three to complete the matching of other data; S5. If the match is unsuccessful, repeat step three to continue matching.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of data matching technology, specifically relating to a near real-time matching method for vehicles and transaction records based on a priority queue. Background Technology

[0002] Gas stations typically have multiple fuel dispensers, with several fuel nozzles on both sides of each dispenser, and several parking spaces on each side. During each refueling transaction, the state of each fuel nozzle changes according to a state machine. By interfacing with the fuel dispenser manufacturer, the state transition sequence of the fuel nozzle can be obtained in real time. Fuel dispenser manufacturers usually have their own internal protocols or implement the standard IFS protocol. By interfacing with the fuel dispenser manufacturer's protocol, the state change process of the fuel dispenser and the transaction records can be obtained.

[0003] By deploying smart cameras at different locations within a gas station, signals indicating vehicles entering and leaving the gas station can be identified. Similarly, smart cameras deployed at parking spaces can be used to identify signals indicating vehicles entering and leaving parking spaces. Currently, there are relatively mature technologies for license plate recognition, and existing technologies can identify vehicle behavior at gas stations in real time.

[0004] Although both of these technologies have been developed—for example, existing camera recognition technology can identify vehicle license plates and vehicle behavior, and real-time transaction records of fuel dispensers can be obtained through fuel dispenser protocols—current technologies cannot match fuel dispenser transaction records with vehicles. Summary of the Invention

[0005] In view of the problems mentioned in the background art above, the purpose of this invention is to provide a near real-time matching method for vehicle and transaction records based on priority queues.

[0006] To achieve the above-mentioned technical objectives, the technical solution adopted by the present invention is as follows:

[0007] A near real-time vehicle and transaction record matching method based on a priority queue, the matching method comprising the following steps:

[0008] S1. Synchronously collect vehicle behavior sequences and refueling transaction records from refueling nozzles. The flow of multiple refueling transaction records forms a refueling transaction record queue, and the multiple vehicle behavior sequences form a vehicle behavior queue.

[0009] S2. Input several vehicle behavior sequences in the vehicle behavior queue into the priority calculation module. The priority calculation module outputs the vehicle behavior sequence with the highest priority according to the weight.

[0010] S3. The matching module retrieves a refueling transaction record and the vehicle behavior sequence with the highest priority output from the priority calculation module, and matches the two.

[0011] S4. If the match is successful, the corresponding refueling transaction record and vehicle behavior sequence are removed from the refueling transaction record queue and vehicle behavior queue, respectively. Repeat step three to complete the matching of other data.

[0012] S5. If the match fails, repeat step three to continue matching.

[0013] Furthermore, the refueling transaction record includes information such as the fuel nozzle ID, the time the nozzle was raised, the time the nozzle was hung up, the type of fuel, the amount of fuel dispensed, and the amount paid.

[0014] Further specifying, the vehicle behavior sequence includes the time of entering the gas station, the time of entering parking space A, the time of leaving parking space A, ... the time of entering parking space X, the time of leaving parking space X, the time of leaving the gas station, license plate information, vehicle model, vehicle brand, vehicle type, and other vehicle information.

[0015] Further specifying, the priority calculation module completes weight calculation by matching rule chains and outputs the vehicle behavior sequence with the highest priority. The rule chain includes predefined rules and self-learning rules.

[0016] Further defined, the predefined rules are related to the timing of refueling transactions and the timing of vehicles within the gas station. The timing of refueling transactions includes, from beginning to end, raising the nozzle, the refueling process, hanging up the nozzle, and the transaction being completed. The timing of vehicles within the gas station includes, entering the gas station, the vehicle entering and exiting the first parking space, ... the vehicle entering and exiting the last parking space, and leaving the gas station. The matching between the timing of refueling transactions and the timing of vehicles within the gas station generates timing matching rule 1, timing matching rule 2, and timing matching rule 3. Timing matching rule 1 includes entering the parking space, raising the nozzle, hanging up the nozzle, and leaving the parking space; timing matching rule 2 includes raising the nozzle, entering the parking space, and hanging up the nozzle; and timing matching rule 3 includes raising the nozzle, leaving the parking space, and hanging up the nozzle.

[0017] Further defined, the predefined rules include rule A, rule B, rule C, rule D, and rule E. Rule A corresponds to time-series matching rule 1, rule B corresponds to time-series matching rule 2, rule C corresponds to time-series matching rule 3, rule D is for vehicles in parking spaces on the same side as the fuel nozzle, and rule E is for vehicles in parking spaces on the opposite side of the fuel nozzle.

[0018] Further specified, the priority calculation module calculates priority based on the combined weights of predefined rules, where the combination of rule D and rule A simultaneously has a weight of 2. 63 A combination that satisfies both rule D and rule B has a weight of 2.62 A combination that simultaneously satisfies rules D and C has a weight of 2. 61 A combination that satisfies both rule E and rule A has a weight of 2. 60 A combination that satisfies both rule E and rule B has a weight of 2. 59 A combination that satisfies both rule E and rule C has a weight of 2. 58 .

[0019] Further specified, the self-learning rules are generated by a self-learning module, which obtains historical refueling data of the vehicle based on the vehicle information. The historical refueling data includes the type of fuel, the volume of fuel, the amount of fuel, and the refueling time. The self-learning module matches the historical refueling data with the vehicle information and outputs self-learning rules.

[0020] Further specifying the steps of the matching module, the specific execution steps are as follows: First, set the matching success threshold as X and the transaction matching time threshold as T; Second, retrieve a transaction from the refueling transaction record queue; Third, if the transaction exceeds the matching threshold T and fails to match, mark the transaction as unmatchable and remove it from the refueling transaction record queue; Fourth, call the priority calculation module to calculate the matching priority of all vehicle behavior sequences in the current vehicle behavior queue; Fifth, obtain the vehicle behavior sequence with the highest matching priority; Sixth, if the highest matching priority exceeds the matching success threshold, consider the vehicle behavior sequence to match the refueling transaction record; remove the refueling transaction record and the vehicle behavior sequence from their respective queues; if the matching priority does not exceed the matching success threshold, do not process it; Seventh, jump back to step two.

[0021] The beneficial effects of this invention are:

[0022] 1. The present invention provides a near real-time vehicle and transaction record matching method based on a priority queue. It uses multiple matching rules to calculate the priority of matching vehicles and refueling transactions, and can complete the matching of refueling transaction records and vehicles in near real-time. It proposes a self-learning and extensible matching rule chain. Using a self-learning module, the matching rule chain can be expanded to improve the accuracy of matching. Attached Figure Description

[0023] The present invention can be further illustrated by the non-limiting embodiments given in the accompanying drawings;

[0024] Figure 1 This is a schematic diagram of an embodiment of the near real-time vehicle and transaction record matching method based on priority queues according to the present invention.

[0025] Figure 2 This is a schematic diagram of time-series matching rule 1 in an embodiment of a near real-time vehicle and transaction record matching method based on a priority queue according to the present invention.

[0026] Figure 3 This is a schematic diagram of time-series matching rule 2 in an embodiment of a near real-time vehicle and transaction record matching method based on a priority queue according to the present invention;

[0027] Figure 4 This is a schematic diagram of time-series matching rule 3 in an embodiment of a near real-time vehicle and transaction record matching method based on a priority queue according to the present invention. Detailed Implementation

[0028] To enable those skilled in the art to better understand the present invention, the technical solution of the present invention will be further described below in conjunction with the accompanying drawings and embodiments.

[0029] In the implementation of this case, combined with Figure 1-4 The present invention provides a near real-time vehicle and transaction record matching method based on a priority queue, comprising the following steps:

[0030] S1. Synchronously collect vehicle behavior sequences and refueling transaction records from fuel nozzles. The flow of multiple refueling transaction records forms a refueling transaction record queue, and multiple vehicle behavior sequences form a vehicle behavior queue. Among them, the refueling transaction records include fuel nozzle ID, nozzle lifting time, nozzle hanging time, fuel type, refueling volume, and amount information; the vehicle behavior sequences include the time of entering the gas station, the time of entering parking space A, the time of leaving parking space A, ... the time of entering parking space X, the time of leaving parking space X, the time of leaving the gas station, license plate information, vehicle model, vehicle brand, vehicle type, and other vehicle information.

[0031] S2. Input several vehicle behavior sequences in the vehicle behavior queue into the priority calculation module. The priority calculation module outputs the vehicle behavior sequence with the highest priority according to the weight. The priority calculation module completes the weight calculation through the matching rule chain and outputs the vehicle behavior sequence with the highest priority. The rule chain includes predefined rules and self-learning rules.

[0032] Among them, the predefined rules are related to the timing of refueling transactions and the timing of vehicles within the gas station. The timing of refueling transactions includes raising the nozzle, the refueling process, hanging up the nozzle, and the transaction being completed. The timing of vehicles within the gas station includes entering the gas station, entering and exiting the first parking space, ... entering and exiting the last parking space, and leaving the gas station. The matching between the timing of refueling transactions and the timing of vehicles within the gas station generates timing matching rules 1, 2, and 3. Timing matching rule 1 includes entering the parking space, raising the nozzle, hanging up the nozzle, and leaving the parking space; timing matching rule 2 includes raising the nozzle, entering the parking space, and hanging up the nozzle; and timing matching rule 3 includes raising the nozzle, leaving the parking space, and hanging up the nozzle. The predefined rules include rule A, rule B, rule C, rule D, and rule E. Rule A corresponds to timing matching rule 1, rule B corresponds to timing matching rule 2, rule C corresponds to timing matching rule 3, rule D is for vehicles in the same parking space as the refueling nozzle, and rule E is for vehicles in the opposite parking space.

[0033] The self-learning rules are generated by the self-learning module. The self-learning module obtains the vehicle's historical refueling data based on the vehicle information. The historical refueling data includes the type of fuel, the volume of fuel, the amount of fuel, and the vehicle's refueling time. The self-learning module matches the historical refueling data with the vehicle information and outputs the self-learning rules.

[0034] Finally, the priority calculation module calculates the priority based on the combined weights of predefined rules. A combination that satisfies both rule D and rule A has a weight of 2. 63 A combination that satisfies both rule D and rule B has a weight of 2. 62 A combination that simultaneously satisfies rules D and C has a weight of 2. 61 A combination that satisfies both rule E and rule A has a weight of 2. 60 A combination that satisfies both rule E and rule B has a weight of 2. 59 A combination that satisfies both rule E and rule C has a weight of 2. 58 ;

[0035] S3. The matching module retrieves a refueling transaction record and the vehicle behavior sequence with the highest priority output from the priority calculation module, and matches the two.

[0036] Specifically, the execution order of the matching module is as follows: 3.1. Set the matching success threshold to X and the transaction matching time threshold to T; 3.2. Take a transaction from the refueling transaction record queue; 3.3. If the transaction exceeds the matching threshold T and fails to match, mark the transaction as unmatchable and remove it from the refueling transaction record queue; 3.4. Call the priority calculation module to calculate the matching priority of all vehicle behavior sequences in the current vehicle behavior queue; 3.5. Obtain the vehicle behavior sequence with the highest matching priority; 3.6. If the highest matching priority exceeds the matching success threshold, the vehicle behavior sequence is considered to match the refueling transaction record; remove the refueling transaction record and the vehicle behavior sequence from their respective queues; if the matching priority does not exceed the matching success threshold, no processing is performed; 3.7. Jump back to 3.2.

[0037] The above embodiments are merely illustrative of the principles and effects of the present invention and are not intended to limit the invention. Any person skilled in the art can modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or alterations made by those skilled in the art without departing from the spirit and technical concept disclosed in the present invention should still be covered by the claims of the present invention.

Claims

1. A priority queue based near real-time matching of vehicle and transaction records method, characterized by: The matching method comprises the following steps: S1. Synchronize the collection of vehicle behavior sequences and fueling transaction records of fueling guns, the flow of a plurality of the fueling transaction records forms a fueling transaction record queue, and a plurality of the vehicle behavior sequences form a vehicle behavior queue; S2. Input several vehicle behavior sequences in the vehicle behavior queue into a priority calculation module, and output a vehicle behavior sequence with the maximum priority according to weights by the priority calculation module; S3. A matching module calls a fueling transaction record and a vehicle behavior sequence with the maximum priority output from the priority calculation module, and matches the two; specifically, The priority calculation module completes weight calculation by a matching rule chain, and outputs a vehicle behavior sequence with the maximum priority, wherein the rule chain comprises predefined rules and self-learning rules; wherein the predefined rules are as follows: Matching between fueling transaction time sequence states and vehicle time sequence states in a gas station generates time sequence matching rule 1, time sequence matching rule 2 and time sequence matching rule 3; the predefined rules comprise rule A, rule B, rule C, rule D and rule E, wherein rule A corresponds to time sequence matching rule 1, rule B corresponds to time sequence matching rule 2, rule C corresponds to time sequence matching rule 3, rule D is that a vehicle is in a same-side parking space corresponding to a fueling gun, and rule E is that a vehicle is in an opposite-side parking space corresponding to a fueling gun; The priority calculation is done according to the combination weights between the predefined rules, while satisfying the combination of rule D and rule A, with a weight of 2 63 , while satisfying the combination of rule D and rule B, with a weight of 2 62 , while satisfying the combination of rule D and rule C, with a weight of 2 61 , while satisfying the combination of rule E and rule A, with a weight of 2 60 , while satisfying the combination of rule E and rule B, with a weight of 2 59 , while satisfying the combination of rule E and rule C, with a weight of 2 58 ; S4. If matching is successful, the corresponding fueling transaction record and vehicle behavior sequence are removed from the fueling transaction record queue and the vehicle behavior queue respectively, and step 3 is repeated to complete matching of other data subsequently; S5. If matching is unsuccessful, step 3 is repeated to continue matching.

2. The priority queue based quasi-real-time matching of vehicle and transaction records method of claim 1, wherein: The fueling transaction record comprises information of a fueling gun ID, a gun lifting time, a gun hanging time, fuel, fueling volume and amount.

3. The priority queue based quasi-real-time matching of vehicle and transaction records method of claim 2, wherein: The vehicle behavior sequence comprises information of a time of entering a gas station, a time of entering parking space A, a time of leaving parking space A, …, a time of entering parking space X, a time of leaving parking space X, a time of leaving the gas station, a license plate number, a vehicle model, a vehicle brand, a vehicle type and the like.

4. The priority queue based near real-time matching of vehicle and transaction records method of claim 1, wherein: The predefined rules are related to fueling transaction time sequence states and vehicle time sequence states in a gas station, wherein the fueling transaction time sequence states comprise gun lifting, a fueling process, gun hanging and transaction generation from beginning to end, and the vehicle time sequence states in the gas station comprise entering the gas station, vehicle entry and exit of a first parking space, …, vehicle entry and exit of a last parking space and leaving the gas station; The time sequence matching rule 1 comprises entering a parking space, gun lifting, gun hanging and leaving a parking space, the time sequence matching rule 2 comprises gun lifting, entering a parking space and gun hanging, and the time sequence matching rule 3 comprises gun lifting, leaving a parking space and gun hanging.

5. The priority queue based near real-time matching of vehicle and transaction records method of claim 1, wherein: The self-learning rules are generated by a self-learning module, the self-learning module obtains vehicle historical fueling data according to vehicle information, the historical fueling data comprises a fueling product number, a fueling volume, a fueling amount and a vehicle fueling duration, and the self-learning module matches the historical fueling data with the vehicle information and outputs self-learning rules.

6. The priority queue based near real-time matching of vehicle and transaction records method of claim 5, wherein: The specific execution steps of the matching module are as follows: first, set the matching success threshold value as X and the transaction matching time threshold value T; second, take a transaction from the fuel transaction record queue; third, if the transaction exceeds the matching threshold value T and fails to match, mark the transaction as unable to match and remove it from the fuel transaction record queue; fourth, call the priority calculation module to calculate the matching priority of all vehicle behavior sequences in the current vehicle behavior queue; fifth, obtain the vehicle behavior sequence with the maximum matching priority; sixth, if the maximum matching priority exceeds the matching success threshold value, consider that the vehicle behavior sequence matches the fuel transaction record; remove the fuel transaction record and the vehicle behavior sequence from the corresponding queues respectively; if the matching priority does not exceed the matching success threshold value, do not process; seventh, jump back to the second step.

Citation Information

Patent Citations

  • VR-based vehicle body control system and method

    CN113571049A