A hand-held POS machine bus card swiping data automatic matching method
By using a bipartite graph maximum weight matching algorithm to automatically match handheld POS machine swipe data with vehicle data, the problem of matching handheld POS machine swipe data with vehicle data is solved, achieving efficient and accurate automated matching and supporting precise matching of passengers, vehicles, and stations.
Patent Information
- Application Number
- CN202211328032.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-26
- Publication Date
- 2025-12-05
- Estimated Expiration
- 2042-10-26
AI Technical Summary
Existing technologies have failed to effectively solve the problem of matching handheld POS machine card swipe data with vehicle data, resulting in unsatisfactory and time-consuming manual matching results, and making it impossible to build an accurate passenger-vehicle-station matching chain.
The algorithm uses a bipartite graph maximum weight matching algorithm to filter vehicle shift groups by obtaining bus route data, calculate timestamp matching rate, construct time matching rate matrix, and automatically match handheld POS machines with vehicle shift groups using the bipartite graph maximum weight matching algorithm.
It enables automated matching of handheld POS machine card swipe data and vehicle data, improving matching accuracy and efficiency, avoiding errors from manual matching, and helping to build an accurate passenger-vehicle-station matching chain.
Smart Images

Figure CN115905349B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of bus card swiping data processing technology, and in particular to a method for automatically matching bus card swiping data from a handheld POS machine. Background Technology
[0002] Improving urban public transport services is a crucial way to alleviate urban traffic congestion and promote sustainable urban development. This requires accurate analysis of passenger numbers at each stop. For long-distance bus routes with segmented pricing, conductors often need to manually swipe passengers' cards using handheld POS machines. However, handheld POS machines are not fixed to the vehicle and cannot directly establish the passenger-vehicle correspondence, representing a key technological bottleneck in constructing the "passenger-vehicle-stop" matching chain.
[0003] Currently, no research has considered the randomness of the correspondence between handheld POS machines and vehicles and proposed a solution. Many existing studies are based on the development and improvement of public transportation information collection systems. The card swiping data mainly used is collected by on-board card swiping collection equipment. Generally, subsequent research is carried out after the card swiping data and vehicle data have been matched. However, this ignores the fact that in many domestic public transportation systems, due to imperfect equipment and other reasons, card swiping data and vehicle data are recorded separately. Handheld POS machines are used by conductors to swipe cards and do not record vehicle information. For the card swiping data of handheld POS machines, it is necessary to match the card swiping data and vehicle data before proceeding with subsequent work.
[0004] With the development of automation and informatization in the transportation industry, the processing and analysis of traffic data is crucial for intelligent transportation systems. Currently, bus companies need to manually search for route slips and other forms recorded by conductors to match the data from handheld POS terminals. Due to factors such as inaccuracies between handheld POS terminals and vehicle form records, the results of manual matching are unsatisfactory and time-consuming. Summary of the Invention
[0005] The purpose of this invention is to overcome the shortcomings of the existing technology and provide a method for automatically matching bus card swiping data using a handheld POS machine.
[0006] The objective of this invention can be achieved through the following technical solutions:
[0007] A method for automatically matching bus card swiping data using a handheld POS machine, specifically including the following steps:
[0008] Step 1: Obtain bus route data, filter and stitch the vehicles by shift group;
[0009] Step 2: Obtain bus card swiping data, filter out handheld POS machine card swiping data from the card swiping data, calculate the time matching rate between the handheld POS machine card swiping data and the vehicle shift group based on the timestamp, and construct a time matching rate matrix;
[0010] Step 3: Use the automatic matching method based on the bipartite graph maximum weight matching algorithm to match handheld POS machines with vehicle shift groups. If there are remaining handheld POS machines that have not been matched with actual vehicles, proceed to step 4; if a perfect match is found, proceed to step 5.
[0011] Step 4: Repeat the matching process for the remaining handheld POS machines until all POS machines have been matched with actual vehicles;
[0012] Step 5: Output the matching relationship between the handheld POS machine and the vehicle.
[0013] As a preferred technical solution, the process of screening vehicles by shift group includes the following steps:
[0014] Read the bus route data table, which includes route information and date information. Filter the required bus schedules for the desired routes using the route information and filter the required bus schedules for the desired dates using the date information. The route information includes vehicle number, start and end times of the bus schedule, and route name.
[0015] Remove the bus trips that enter and exit the parking lot, and obtain the trip group data corresponding to each bus. The trip group data includes the actual departure and arrival times of each trip. One bus corresponds to one trip group, and one trip group contains multiple trips.
[0016] As a preferred technical solution, the process of assembling vehicle shift groups includes the following steps:
[0017] Let M be the maximum number of shifts in all the aforementioned shift groups. Shift groups with fewer than M are assigned to a vehicle set W to be spliced. Each shift group in the vehicle set W is then sequentially spliced with other shift groups in W. The splicing must satisfy the following two conditions:
[0018] 1) All shifts in a combined shift group must not overlap in time;
[0019] 2) The total number of shifts in the combined shift group cannot exceed the maximum number of shifts M;
[0020] If the vehicle shift group is successfully spliced, the spliced vehicle shifts are considered to be in the same shift group, and the vehicle shift group to be spliced and the vehicle shift group to be spliced are removed from the vehicle set W to be spliced; if the vehicle shift group splicing fails, the vehicle shift group to be spliced is removed from the vehicle set W to be spliced.
[0021] Continue splicing until the number of remaining shift groups to be spliced in W is 0.
[0022] As a preferred technical solution, the step of filtering out handheld POS machine swipe data from the swipe data is as follows:
[0023] The card swipe data includes card swipe data from vehicle-mounted POS machines and handheld POS machines. Based on the POS machine number in the card swipe data, all card swipe data records with vehicle-mounted POS machine numbers are removed, and the card swipe data of handheld POS machines is filtered out.
[0024] As a preferred technical solution, the step of calculating the time matching rate of handheld POS machine card swipe data based on timestamps and constructing a time matching rate matrix includes the following steps:
[0025] Abnormal card swipe data is removed. Abnormal card swipe data includes duplicate card swipe data and card swipe data of a handheld POS machine with less than a set value in a day.
[0026] Calculate the time matching rate for each handheld POS machine and each vehicle shift. The time matching rate is the proportion of the total card swiping time of a handheld POS machine within the vehicle shift time window for all card swiping data in a day. The vehicle shift time window is a time interval consisting of the start and end times of each vehicle shift. The formula for calculating the time matching rate is:
[0027]
[0028] Where: M (p,b) Let N be the time matching rate between vehicle shift group b and handheld POS machine card swipe data group p, and let N be the total number of card swipes in handheld POS machine card swipe data group p. t The number of card swipes within the vehicle's scheduled time window;
[0029] The calculated time matching rate is processed, and a time matching rate matrix is constructed based on the processed time matching rate.
[0030] As a preferred technical solution, the calculation of the time matching rate between a handheld POS machine and a vehicle shift group specifically includes the following steps:
[0031] Input all card swipe data from a handheld POS machine, where N is the total number of card swipe data from the POS machine. t The initial value is set to 0; the time window of a vehicle shift group covers a time range of T. b ; Transaction time t for iterating through card swipe data i If t i ∈T b Then N t +1; Calculate the time matching rate M = N between the handheld POS machine and the vehicle shift group.t / N.
[0032] As a preferred technical solution, the processing of the calculated time matching rate includes the following steps:
[0033] If the first card swipe data from the handheld POS machine is swiped before the start time of the first vehicle shift, exceeding a set time, their time matching rate is set to 0; if the time matching rate is less than the set threshold M, the matching rate is set to 0. min Set the matching rate directly to 0.
[0034] As a preferred technical solution, the automatic matching method based on the bipartite graph maximum weight matching algorithm for matching handheld POS machines with vehicle shift groups includes the following steps:
[0035] Add virtual shift groups or virtual POS machines to make the number of shift groups and handheld POS machines the same, and set the time matching rate of the virtual shift groups or virtual POS machines to 0.
[0036] Based on the time matching rate matrix, with the time matching rate as the weight, the set of vehicle shift groups and the set of handheld POS machines are the two vertices B and P at the two ends of the bipartite graph, forming a weighted bipartite graph G = (B, P). The bipartite graph maximum weight matching algorithm is used to solve for the perfect matching with the maximum weight in the bipartite graph.
[0037] As a preferred technical solution, the method of using the bipartite graph maximum weight matching algorithm to solve for the perfect matching with the maximum weight in a bipartite graph includes the following steps:
[0038] Let the vertex label be l, and let l(x) represent the label of vertex x. Initially, the label l(b) of vertex b in each vehicle shift group is assigned the maximum value of the weights among all the vertices adjacent to vertex b. The label l(p) of vertex p of each handheld POS machine is assigned 0. Starting from a feasible vertex label l of a weighted bipartite graph G, find the equal subgraph G. l ;
[0039] In G l The Hungarian algorithm is executed. If a perfect matching M is found, M is output and the algorithm terminates; otherwise, the Hungarian algorithm terminates at the two sets. The current match found is M′;
[0040] The label of vertex b is l(b), and the weight of edge (b,p), i.e. the time matching rate, is w(bp). For each vertex x, modify its label l(x) as shown below, and then return to the previous step.
[0041] m l =min(l(b)+l(p)-w(bp)|b∈S, p∈PT}
[0042]
[0043] As a preferred technical solution, the step of repeatedly matching the remaining handheld POS machines until all POS machines have been matched with actual vehicles includes the following steps:
[0044] If any handheld POS machines remain unmatched with actual vehicles, remove the handheld POS machines in the handheld POS machine dataset that have already been matched with actual vehicles, and then perform the next round of matching between the vehicle shift group and the remaining handheld POS machines until all POS machines have been matched with actual vehicles, thus obtaining the matching results between handheld POS machines and vehicles.
[0045] Compared with the prior art, the present invention has the following beneficial effects:
[0046] This invention provides an automatic matching method for bus card swiping data from handheld POS machines. Based on a bipartite graph maximum weight matching algorithm, it can automatically match separately recorded handheld POS machine card swiping data with vehicle data in scenarios where bus information collection system equipment is imperfect. This avoids errors that may occur during manual matching and improves matching accuracy and efficiency. This invention automates the matching of handheld POS machine card swiping data with bus vehicle data, facilitating the better construction of a "passenger-vehicle-stop" passenger boarding station matching chain. Attached Figure Description
[0047] Figure 1 This is a schematic diagram of the method flow of the present invention;
[0048] Figure 2 This is a flowchart of the vehicle shift group selection process of the present invention;
[0049] Figure 3 This is a flowchart of the vehicle shift group splicing method of the present invention;
[0050] Figure 4 This is a schematic diagram of the vehicle shift group splicing method of the present invention;
[0051] Figure 5 This is a flowchart of the time matching rate calculation based on timestamps according to the present invention;
[0052] Figure 6 This is a schematic diagram of the time matching rate matrix of the present invention;
[0053] Figure 7 This is a schematic diagram of bipartite graph matching according to the present invention;
[0054] Figure 8 This is a schematic diagram illustrating the matching of the handheld POS machine of the present invention with a vehicle. Detailed Implementation
[0055] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments. These embodiments are based on the technical solution of the present invention and provide detailed implementation methods and specific operating procedures. However, the scope of protection of the present invention is not limited to the following embodiments.
[0056] like Figure 1 The image shows an automatic matching method for handheld POS machine card swipe data based on a bipartite graph maximum weight matching algorithm, which specifically includes the following steps:
[0057] S1: Obtain bus route data, filter vehicle shift groups, remove vehicle entry and exit parking lot data, and then stitch together the vehicle shift groups.
[0058] S2, obtain bus card swiping data, filter handheld POS machine card swiping data from the card swiping data based on POS machine number, remove abnormal card swiping data, and calculate the time matching rate between handheld POS machine card swiping data and shift group based on timestamp;
[0059] S3, based on the bipartite graph maximum weight matching algorithm, realizes automatic matching between handheld POS machines and vehicle shift groups;
[0060] S4. If there are any remaining handheld POS machines that have not been matched with actual vehicles, first remove the handheld POS machines that have been matched with actual vehicles, and then match the vehicle shift group and the remaining handheld POS machines in the next round until all POS machines have been matched with actual vehicles.
[0061] S5 outputs the matching results between the POS machine and the vehicle.
[0062] S1 is the method for concatenating vehicle schedule data. The specific process is as follows:
[0063] Step 1.1: Filter vehicle schedule groups. Read the bus route data table, which records information such as vehicle number, start and end time of vehicle schedule, route name, and date. Use the route information to filter vehicle schedules for the desired routes, and use the date information to filter vehicle schedules for the desired dates.
[0064] Step 1.2: Remove the bus trips that enter and exit the parking lot, and obtain the trip group data for each bus, including the actual departure and arrival times of each trip. One bus corresponds to one trip group, and one trip group contains multiple trips. Figure 2 A flowchart for selecting vehicle shift groups;
[0065] Step 1.3: Obtain the maximum number of shifts M in all shift groups. The shift groups with fewer than M are the vehicle sets W to be spliced. The shift groups in the vehicle set W to be spliced are then spliced with other shift groups in turn. The splicing must meet the following two conditions:
[0066] ①The schedules of all the combined shifts must not overlap in time;
[0067] ②The total number of trips in the combined trip group cannot exceed the maximum number of trips M.
[0068] If the vehicle shift group is successfully spliced, the spliced vehicle shifts are considered to be in the same shift group, and the vehicle shift group to be spliced and the vehicle shift group to be spliced are removed from the vehicle set W to be spliced; if the vehicle shift group splicing fails, the vehicle shift group to be spliced is removed from the vehicle set W to be spliced; until the number of vehicle shift groups in W is 0.
[0069] like Figure 3 and Figure 4 The diagram shows the flowchart and schematic of the vehicle shift group splicing method. There are five vehicle shift groups: ABCDE. The shift group splicing method is used on them. The maximum number of shifts M is 9. The vehicle set W to be spliced includes four vehicle shift groups: vehicle A, vehicle B, vehicle C, and vehicle D. Among them, vehicle A and vehicle B are successfully spliced, while vehicle C and vehicle D are both unsuccessful. Finally, four vehicle shift groups are obtained: A+B, C, D, and E.
[0070] S2 calculates the time matching rate between handheld POS machine swipe data and vehicle shift groups based on timestamps. The specific process is as follows:
[0071] Step 2.1: Filter the card swipe data from handheld POS machines. The card swipe data includes both vehicle-mounted POS machines and handheld POS machines. Based on the vehicle-mounted POS machine numbers recorded in the vehicle-mounted POS machine statistics table, remove all card swipe data records with vehicle-mounted POS machine numbers, and filter out the card swipe data from handheld POS machines.
[0072] Step 2.2: Remove abnormal handheld POS machine swipe data, including completely duplicate swipe data. If the total number of swipe data for a handheld POS machine in a day is less than 10, or only a single digit, it is also considered abnormal data and removed.
[0073] Step 2.3, calculate the time matching rate. The time matching rate is defined as the proportion of all card swipe times of a handheld POS machine within a vehicle shift time window throughout the day. The vehicle shift time window is a time interval comprised of the start and end times of each vehicle shift. The formula for calculating the time matching rate is:
[0074]
[0075] Where: M (p,b) Let N be the time matching rate between vehicle shift group b and handheld POS machine card swipe data group p, and let N be the total number of card swipes in handheld POS machine card swipe data group p. t This refers to the number of card swipes within the vehicle's scheduled time window.
[0076] The specific process for calculating the time matching rate between a handheld POS machine and a vehicle shift group is as follows: Input all card swipe data from a handheld POS machine, where N is the total number of card swipe data from that POS machine. t The initial value is set to 0; the time window of a vehicle shift group covers a time range of T. b ; Transaction time t for iterating through card swipe data i If t i ∈T b Then N t +1; Calculate the time matching rate M = N between the handheld POS machine and the vehicle shift group. t / N. Following the above process, calculate the time matching rate for each handheld POS machine and each vehicle shift sequentially.
[0077] Step 2.4: Process the calculated time matching rate. If the swipe time of the first card swipe data from the handheld POS machine is more than a certain number of minutes earlier than the start time of the first vehicle shift, their time matching rate is directly set to 0; if the time matching rate is less than the set threshold M... min =0.5, so the matching rate is also set to 0. Finally, the time matching rate matrix is obtained. Figure 5 This is a flowchart for calculating the time matching rate based on timestamps.
[0078] S3 is based on the bipartite graph maximum weight matching algorithm to achieve automatic matching between handheld POS machines and vehicles. The specific process is as follows:
[0079] Step 3.1: Add virtual POS machines or virtual vehicles, and compare the number of existing vehicle shift groups with the number of handheld POS machines:
[0080] ① If the number of shift groups equals the number of handheld POS machines, there is no need to add virtual shift groups or POS machines;
[0081] ② If the number of shift groups is less than the number of handheld POS machines, add virtual shift groups;
[0082] ③ If the number of shift groups is greater than the number of handheld POS machines, add virtual POS machines;
[0083] Add virtual shift groups or virtual POS machines to ensure that the number of shift groups and handheld POS machines are the same, and set the time matching rate of virtual shift groups or virtual POS machines to 0. Figure 6 The time matching rate matrix is calculated after adding two virtual vehicle shift groups F and G. The matching rate of virtual vehicles F and G for all handheld POS machines is 0.
[0084] Step 3.2: Input the time matching rate matrix. Using the time matching rate as weight, the set of vehicle shift groups and the set of handheld POS machines are the two vertices B and P at the ends of the bipartite graph, forming a weighted bipartite graph G = (B, P). Use the bipartite graph maximum weight matching algorithm to find the perfect match with the maximum weight in this bipartite graph. The main steps include:
[0085] ① Set the vertex label l, where l(x) represents the label of vertex x. Initially, the label l(b) of each vertex b (vehicle shift group) is assigned the maximum value of the weights among all points adjacent to vertex b, and the label l(p) of each vertex p (handheld POS machine) is assigned the value 0. Figure 8 The initial settings for vertex labels are displayed. Starting with a feasible vertex label l of G, find the equal subgraph G. l ;
[0086] ②In G l The Hungarian algorithm is executed. If a perfect matching M is found, M is output and the algorithm terminates; otherwise, the Hungarian algorithm terminates at the two sets. The current match found is M′, proceed to the next step. Figure 7 This is a schematic diagram of bipartite graph matching, showing the relationships between S, T, B, and P;
[0087] ③ The label of vertex b is l(b), and the weight of edge (b,p), i.e. the time matching rate, is w(bp). For each vertex x, modify its label l(x) as shown below, and then return to the second step.
[0088] m l =min{l(b)+l(p)-w(bp)|b∈S, p∈PT}
[0089]
[0090] like Figure 8 The diagram shows the matching of handheld POS machines with vehicles. There are 4 vehicle shift groups and 6 handheld POS machines. After adding two virtual vehicle shift groups F and G, the matching is performed based on the bipartite graph maximum weight matching algorithm.
[0091] S4 is the repeated matching process for the remaining handheld POS machines. If any remaining handheld POS machines are not matched with actual vehicles, firstly, the handheld POS machine dataset is removed from the dataset of handheld POS machines that have already been matched with actual vehicles. Then, the vehicle shift group and the remaining handheld POS machines are matched in the next round until all POS machines have been matched with actual vehicles. Finally, the matching results of handheld POS machines and vehicles are obtained.
[0092] Figure 8In the first matching, both handheld POS machines III and VI were matched with virtual vehicles. Handheld POS machines III and VI are the remaining handheld POS machines. The matching process of step 3 is repeated for the remaining handheld POS machines and vehicle shift groups. Finally, the matching results of handheld POS machines and vehicles are output.
[0093] The preferred embodiments of the present invention have been described in detail above. It should be understood that those skilled in the art can make numerous modifications and variations based on the concept of the present invention without creative effort. Therefore, all technical solutions that can be obtained by those skilled in the art based on the concept of the present invention through logical analysis, reasoning, or limited experimentation on the basis of existing technology should be within the scope of protection defined by the claims.
Claims
1. A hand-held POS machine bus card swiping data automatic matching method, characterized in that, Specifically comprising the following steps: Step 1: obtaining bus route sheet data, screening and splicing vehicle shift groups; Step 2: obtaining bus card swiping data, screening handheld POS machine card swiping data from the card swiping data, calculating the time matching rate of the handheld POS machine card swiping data and the vehicle shift group based on the time stamp, and constructing a time matching rate matrix, the specific steps being as follows: Eliminate abnormal card swiping data, including repeated card swiping data and card swiping data of a handheld POS machine with less than a set value of card swiping data amount within a day; Calculate the time matching rate of each handheld POS machine and each vehicle shift, the time matching rate being the proportion of the card swiping time of all card swiping data of a handheld POS machine within a day within the vehicle shift time window, the vehicle shift time window being a time interval formed by the start time and the end time of each shift of the vehicle, and the calculation formula of the time matching rate being: In the formula: is the time matching rate between the vehicle shift group b and the handheld POS card swiping data group p, N is the total number of card swiping of the handheld POS card swiping data p, is the number of card swiping whose card swiping time is within the vehicle shift time window; The step of calculating the time matching rate of each handheld POS machine and each vehicle shift comprises: inputting all card swiping data of a handheld POS machine, N being the total number of card swiping data of the POS machine, , setting an initial value as 0, setting a time range covered by a time window of a vehicle shift group as , traversing transaction time of card swiping data, , if , then +1, and calculating the time matching rate of the handheld POS machine and the vehicle shift group The calculated time matching rate is processed, if the card swiping time of the first card swiping data of the handheld POS machine is earlier than the starting time of the first shift of the vehicle by more than a set time length, the time matching rate of them is directly set to 0; if the time matching rate is less than a set threshold , the matching rate is directly set to 0; Construct a time matching rate matrix based on the processed time matching rate; Step 3: using an automatic matching method based on the maximum weight matching algorithm of a bipartite graph to match the handheld POS machine and the vehicle shift group, and if there are remaining handheld POS machines that have not been matched to actual vehicles, then entering step 4; If a perfect match is obtained, then entering step 5; Step 4: repeatedly matching the remaining handheld POS machines until all POS machines have been matched to actual vehicles; Step 5: outputting the matching relationship between the handheld POS machine and the vehicle.
2. The method according to claim 1, wherein, The screening of the vehicle shift groups comprises the following steps: Read the bus route sheet data table, the route sheet data table comprising line information and date information, screen the vehicle shifts of the required line through the line information, and screen the vehicle shifts of the required date through the date information, the line information comprising vehicle number, vehicle shift start and end time, and line name; Eliminate the shifts of the vehicle entering and leaving the parking lot, obtain the shift group data corresponding to each bus vehicle, the shift group data comprising the actual departure and arrival time of each shift, one vehicle corresponding to one shift group, and the one shift group comprising a plurality of shifts.
3. The method of claim 1, wherein the method further comprises: The splicing of the vehicle shift groups comprises the following steps: Record the maximum number of shifts in all shift groups as M, and the vehicle shift groups with a shift number less than M are classified into a set of vehicles to be spliced W, and each shift group in the set of vehicles to be spliced W is sequentially spliced with other shift groups in W, the shift splicing needing to satisfy the following two conditions: 1) All shifts of the spliced shift groups cannot overlap in time; 2) The total number of shifts of the spliced shift groups cannot exceed the maximum number of shifts M; If the splicing of the vehicle shift groups is successful, the spliced vehicle shifts are regarded as the same shift group, and the set of vehicles to be spliced W eliminates the spliced and spliced vehicle shift groups; if the splicing of the vehicle shift groups fails, the set of vehicles to be spliced W eliminates the vehicle shift group; Continue splicing until the number of remaining shift groups to be spliced in W is 0.
4. The method of claim 1, wherein the method further comprises: The screening of handheld POS machine card swiping data from the card swiping data is: The card swiping data includes card swiping data of the vehicle-mounted POS machine and the handheld POS machine, and based on the POS machine number in the card swiping data, all card swiping data records of the vehicle-mounted POS machine number are removed, and the card swiping data of the handheld POS machine is screened out.
5. The method of claim 1, wherein the method further comprises: The automatic matching method based on the maximum weight matching algorithm of the bipartite graph includes the following steps of matching the handheld POS machine and the vehicle shift group: A virtual shift group or a virtual POS machine is added, so that the number of the shift group and the handheld POS machine is the same, and the time matching rate of the virtual shift group or the virtual POS machine is set to 0; According to the time matching rate matrix, the time matching rate is taken as the weight, the set of the vehicle shift group and the set of the handheld POS machine are taken as the vertices B and P of the two ends of the bipartite graph, a weighted bipartite graph G=(B, P) is formed, and the maximum weight complete matching of the bipartite graph is solved by using the maximum weight matching algorithm of the bipartite graph.
6. The method of claim 5, wherein the bus card data of the handheld POS machine is automatically matched, and The maximum weight complete matching of the bipartite graph includes the following steps of: Set vertex labels , Label of vertex x, initially, label of vertex b of each vehicle shift group is assigned the maximum weight between all points adjacent to vertex b, label of vertex p of each hand-held POS is assigned 0, from the weighted bipartite graph a feasible vertex label Start, find the equal subgraph ; In the Hungarian algorithm is executed, if a perfect matching is found then the output is given, the algorithm ends; otherwise, the Hungarian algorithm terminates in two sets , the matching found so far is ; The label of vertex b is , the weight of edge , i.e. the time matching rate is , for each vertex x, modify its label as follows, and then return to the previous step; 。 7. The method of claim 1, wherein the method further comprises: The remaining handheld POS machine is repeatedly matched until all the POS machines are matched to the actual vehicle. If there is a remaining handheld POS machine that is not matched to the actual vehicle, the handheld POS machine that has been matched to the actual vehicle in the handheld POS machine data set is removed, the vehicle shift group and the remaining handheld POS machine are matched in the next round, until all the POS machines are matched to the actual vehicle, and the matching result of the handheld POS machine and the vehicle is obtained.
Citation Information
Patent Citations
Matching method based on public transport IC card lines
CN101540098A
Regional multi-line vehicle scheduling algorithm for resource pool sharing
CN111476490A