CN110633275A - ETC transaction data retention analysis method and device - Google Patents

ETC transaction data retention analysis method and device Download PDF

Info

Publication number
CN110633275A
CN110633275A CN201910681872.1A CN201910681872A CN110633275A CN 110633275 A CN110633275 A CN 110633275A CN 201910681872 A CN201910681872 A CN 201910681872A CN 110633275 A CN110633275 A CN 110633275A
Authority
CN
China
Prior art keywords
hash
node
transaction data
psam card
work shift
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910681872.1A
Other languages
Chinese (zh)
Other versions
CN110633275B (en
Inventor
马根峰
陈喆
陈彦奕
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Unitoll Services Inc
Original Assignee
Guangdong Unitoll Services Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Unitoll Services Inc filed Critical Guangdong Unitoll Services Inc
Priority to CN201910681872.1A priority Critical patent/CN110633275B/en
Publication of CN110633275A publication Critical patent/CN110633275A/en
Application granted granted Critical
Publication of CN110633275B publication Critical patent/CN110633275B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • G06F16/2255Hash tables
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2453Query optimisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2465Query processing support for facilitating data mining operations in structured databases
    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07BTICKET-ISSUING APPARATUS; FARE-REGISTERING APPARATUS; FRANKING APPARATUS
    • G07B15/00Arrangements or apparatus for collecting fares, tolls or entrance fees at one or more control points
    • G07B15/06Arrangements for road pricing or congestion charging of vehicles or vehicle users, e.g. automatic toll systems

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Software Systems (AREA)
  • Computational Linguistics (AREA)
  • Fuzzy Systems (AREA)
  • Mathematical Physics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Business, Economics & Management (AREA)
  • Finance (AREA)
  • Devices For Checking Fares Or Tickets At Control Points (AREA)

Abstract

The invention discloses an ETC transaction data retention analysis method, which comprises the following steps: acquiring each hash node in the hash table; judging whether the charging point information in the corresponding hash node is empty, if not, executing a PSAM card judgment step; and acquiring the PSAM card corresponding to the charging point information, judging whether the data at the corresponding PSAM card is empty, if so, executing a quantity judgment step, and if not, calculating the cross-work retention of the transaction data of all work shifts of the PSAM card. The ETC transaction data retention analysis method completes storage and extraction of transaction data by setting the hash table, and judges data in all hash nodes to obtain cross-class retention of the transaction data of all work classes; the comparison efficiency is greatly improved, the accuracy of fee settlement is improved, and the expense of settlement units is reduced.

Description

ETC transaction data retention analysis method and device
Technical Field
The invention relates to the technical field of data processing, in particular to a retention analysis method and device for ETC transaction data.
Background
At present, two methods are generally used for analyzing and mining the data retention of the ETC on the expressway. One is to determine a rule base of ETC data retention using a data mining algorithm and then predict according to the ETC data retention rule base.
The other method is that according to the principle that the transaction serial numbers of the terminal machines in the ETC charging record correspondingly generated by each PSAM card used by the ETC lane are continuous theoretically, and the SPAN SPAN of the serial numbers of the terminal machines is calculated for the terminal machine serial numbers of each PSAM card in the charging record during each work shift datepsam=MaxTerminal transaction serial number-MinTerminal transaction serial number+1, comparing the result with the number RecNum of the charge records of the PSAM card on the work shift date, theoretically SPANpsamShould be equal to RecNum. If SPAN is presentpsamIf the PSAM card is larger than RecNum, the ETC data of the PSAM card in the work class can be judged to be detained. However, the method is premised on eliminating the hop terminal transaction serial number existing in the ETC transaction data of the highway in Guangdong province. Through statistics of mass vehicle passing toll records of about 40 hundred million vehicles on the highway of Guangdong province in two years, PSAM cards used by ETC lanes of the whole province have terminal machine transaction serial numbers which jump with 50% probability in the daily generated toll records.
However, in practice, it is found that there is another situation of the retention of the ETC data, and the retention of the ETC data across work shifts is that the ETC transaction data between two adjacent work shifts corresponding to the same PSAM card has the data retention. The work shift date is the minimum time unit for fund clearing and settlement determined between a settlement unit and each road section company of the highway in Guangdong province, and all business processes including checking of various charging data and clearing data are all services developed around the work shift date.
For example, a PSAM card used by an ETC lane is in the ETC transaction data generated on a work shift date, and the terminal serial number values are n +3, n +4, …, n + m; the terminal serial numbers in the ETC transaction data generated on the next shift date are n + m + p, n + m + p +1, …, n + m + p + q. If p > is 2, the data retention existing in two shifts is the part of the data n + m +1, …, n + m + p-1. Obviously, a larger P value indicates more ETC data retention.
How to design the algorithm in the mass vehicle passing toll records of which the number is about 1.7 hundred million in one month in Guangdong province, the ETC transaction data detained across the work shifts is found through accurate calculation, so that the accurate calculation method after eliminating the jump terminal machine transaction serial number is more perfect, the ETC detained transaction data of highway section companies can be found more in practice, the abnormal service processing quantity of settlement units is greatly reduced, and the toll income loss of the sections is reduced.
However, in the ETC lane of the highway in Guangdong province, more than 2 PSAM cards are used for more than 61% of ETC lanes, and even 6 PSAMs are used for one ETC, but only the terminal machine transaction serial numbers in the ETC charging records generated correspondingly to each PSAM card are theoretically continuous. Therefore, what kind of computer data structure and what algorithm are designed to process 2000 ETC exit lanes in the province once, 6 PSAM cards are used at most in each ETC exit lane, 366 work shift dates are used at most, and 400 or more than ten thousand PSAM card work shift date data sets are retained across work shifts, which becomes a technical problem to be solved urgently by the technical personnel in the field.
Disclosure of Invention
In order to overcome the defects of the prior art, an object of the present invention is to provide an ETC transaction data retention analysis method, which can solve the technical problem of cross-shift data retention analysis.
The second objective of the present invention is to provide an electronic device, which can solve the technical problem of cross-shift data retention analysis.
It is a fourth objective of the present invention to provide a computer-readable storage medium, which can solve the technical problem of data retention analysis across shift classes.
One of the purposes of the invention is realized by adopting the following technical scheme:
an ETC transaction data retention analysis method comprises the following steps:
an acquisition step: acquiring each hash node in a hash table, wherein the hash node stores charging point information and transaction data of each PSAM card of the charging point in each work class, and the transaction data comprises a transaction serial number of a maximum terminal and a transaction serial number of a minimum terminal;
a node judgment step: judging whether the charging point information in the corresponding hash node is empty, if not, executing a PSAM card judgment step;
PSAM card judging step: acquiring a PSAM card corresponding to the charging point information, judging whether the data at the corresponding PSAM card is empty, if so, executing a quantity judgment step, and if not, calculating the cross-work retention of the transaction data of all work shifts of the PSAM card;
a quantity judgment step: judging whether the number of PSAM cards processed at the hash node is less than the maximum number of PSAM cards corresponding to the charging point, if so, sequentially executing a node judgment step, a PSAM card judgment step and a number judgment step on the next hash node until all hash nodes are calculated; if not, returning to the PSAM card judgment step.
Further, the hash table is constructed mainly by the following steps:
acquiring all toll collection point information and transaction data of each PSAM card of the toll collection point in each work class to obtain a first data set, wherein the transaction data comprises a transaction serial number of a maximum terminal machine and a transaction serial number of a minimum terminal machine;
and processing all data in the first data set by using a node adding function to obtain a hash table.
Further, the data in the first data set is processed to reject the hopped terminal transaction serial number.
Further, the charging point information includes an area code, a road section code, and a charging station code, and after the node adding function is used to process all data in the first data set to obtain the hash table, the method further includes the following steps:
storing the region code, the road section code and the toll station code of each toll station as preset variables, and acquiring the length of the hash table;
calculating according to the preset variable and the length of the hash table to obtain a hash value corresponding to each charging point;
judging whether a hash node corresponding to the hash value exists in the hash table or not, if so, returning a value to be a first preset value, wherein the value is used for adding a new hash node in the hash table to solve hash collision, and if not, executing the next step;
judging whether the acquired charging point information is consistent with the area, the road section and the charging station at the Hash node, if so, executing non-empty node judgment, and if not, executing the next step;
and judging whether the next hash node is empty, if so, returning to a second preset value, if not, judging whether the acquired charging point information is consistent with the region, the road section and the charging station at the hash node, and if so, executing non-empty node judgment.
Further, the data type of the preset variable is int64 type.
Further, the determining of the non-empty node specifically includes the following steps:
acquiring the PSAM card number of the toll point, judging whether the PSAM card number is the same as the PSAM card number in the hash table or not, if so, acquiring the work shift date of the PSAM card of the current toll point, if not, further judging whether the number of the processed PSAM cards is less than the maximum PSAM card number of the toll point, and if not, returning to a third preset value;
and judging whether data exist at the work shift date or not, and if not, returning to a fourth preset value.
Further, the step of calculating the cross-work-shift retention of the transaction data of all work shifts of the PSAM card specifically comprises the following steps:
judging whether the current work shift date is larger than the maximum work shift date or not, and if not, acquiring the work shift state of the PSAM card of the current hash node;
judging whether transaction data exist in the work shift state, if so, executing the next step;
judging whether the next work shift date is larger than the maximum work shift date, if so, setting the cross work shift retention quantity of the transaction data of the current work shift date of the PSAM card of the current hash node to be zero, and if not, obtaining the next work shift state of the PSAM card of the current hash node;
judging whether transaction data exist in the next work shift state or not, if so, calculating the cross-work shift retention quantity, wherein the cross-work shift retention quantity is the minimum value of the transaction serial number of the next work shift and the maximum value of the transaction serial number of the current work shift; if not, judging whether the work shift leaving date is larger than the maximum work shift date, if so, setting the cross work shift detention quantity of the PSAM card of the current hash node to be zero, and if not, obtaining the work shift leaving state of the PSAM card of the current hash node;
judging whether transaction data exist at the next work shift state or not, if so, calculating the cross-work shift retention quantity of the ETC, wherein the cross-work shift retention quantity of the ETC is the minimum value of the transaction serial number of the next work shift and the maximum value of the transaction serial number of the current work shift; if not, setting the cross-shift detention quantity of the PSAM card of the current hash node to be zero until the cross-shift detention judgment of all shift dates is completed.
Further, the method also comprises a query step after the quantity judgment step, wherein the query step specifically comprises the following steps:
receiving query information;
acquiring a corresponding hash node in the hash table according to the received query information, and judging whether the hash node is empty, if so, the ETC transaction data is zero across shift data, and if not, executing the next step;
and judging whether the area, the road section, the toll station and the query information of the hash node are consistent, and if so, calculating the cross-working detention quantity of the hash node.
The second purpose of the invention is realized by adopting the following technical scheme:
an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing a ETC transaction data retention analysis method according to any one of the objects of the invention when executing the computer program.
The third purpose of the invention is realized by adopting the following technical scheme:
a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements an ETC transaction data retention analysis method according to any one of the objects of the invention.
Compared with the prior art, the invention has the beneficial effects that:
the ETC transaction data retention analysis method completes storage and extraction of transaction data by setting the hash table, and judges data in all hash nodes to obtain cross-class retention of the transaction data of all work classes; the comparison efficiency is greatly improved, the accuracy of fee settlement is improved, and the expense of settlement units is reduced.
Drawings
Fig. 1 is a flowchart of an ETC transaction data retention analysis method according to a first embodiment;
fig. 2 is a specific flowchart of cross-shift retention of transaction data existing in all work shifts by all PSAM cards in the hash table in the first embodiment;
FIG. 3 is a schematic diagram illustrating an algorithm for cross-shift retention of transaction data of all work shifts of a PSAM card according to an embodiment;
FIG. 4 is a diagram illustrating an algorithm for constructing a hash table function according to an embodiment;
FIG. 5 is a schematic diagram of a functional algorithm for adding a hash node according to the first embodiment;
fig. 6 is a schematic diagram of an algorithm for determining whether data of a work shift date of a PSAM card exists in a hash table according to the first embodiment;
FIG. 7 is a schematic diagram of an algorithm for determining a non-empty node according to the first embodiment;
fig. 8 is a schematic diagram of an algorithm for acquiring the number of ETC data staying across shifts in a toll station according to the first embodiment;
fig. 9 is a schematic diagram illustrating an ETC transaction data retention amount algorithm of a computing node according to an embodiment.
Detailed Description
The present invention will be further described with reference to the accompanying drawings and the detailed description, and it should be noted that any combination of the embodiments or technical features described below can be used to form a new embodiment without conflict.
Example one
As shown in fig. 1 and fig. 2, the present embodiment provides an ETC transaction data retention analysis method, including the following steps:
s1: acquiring each hash node in a hash table, wherein the hash node stores charging point information and transaction data of each PSAM card of the charging point in each work class, and the transaction data comprises a transaction serial number of a maximum terminal and a transaction serial number of a minimum terminal; in this step, basic data to be analyzed is mainly acquired, but before this step, data stored at the server needs to be migrated to the hash table first, that is, in this embodiment, the data is mainly stored and queried by designing the hash table, the hash table has many construction methods, and the common methods include a direct addressing method, a numerical analysis method, a square mid-fetching method, a folding method, a divisor remainder method, and a random number method. The divisor remainder method is the simplest and most common method for constructing a hash function. In this embodiment, preferably, a divisor remainder method is selected to construct a hash function, and the region code (four digits including 4412 and 4409), the link code (four digits at most), and the toll station code (three digits at most) are combined, and the maximum length 11-bit code is converted into int64 type.
Selection of P value: the choice of the value of P is important when using the divisor remainder method. If the selection is not good, the hash collision is easy to generate. P is selected to be a prime number or a composite number that does not contain a prime factor less than 20. In this embodiment, since the data is huge, it is adopted to find a large prime number P of more than 500 ten thousand, and P is slightly larger than the tuple number of the relational pattern R. The relation mode R is an information set of all PSAM cards in the province within the range of the appointed work shift date counted by aggregating 5 fields of area codes, road section codes, toll station codes, PSAM card numbers and work shift dates after eliminating the jumping terminal machine transaction serial numbers. The R tuple comprises an area code, a road section code, a toll station code, a PSAM card number, a work shift date, a record number, a terminal transaction serial number minimum value and a terminal transaction serial number maximum value; the hash table length is determined by using P as the hash table length since P is slightly larger than the tuple number of R.
As shown in fig. 4, the hash table is constructed in this embodiment mainly by the following steps:
acquiring all toll collection point information and transaction data of each PSAM card of the toll collection point in each work class to obtain a first data set, wherein the transaction data comprises a transaction serial number of a maximum terminal machine and a transaction serial number of a minimum terminal machine; processing the data in the first data set to eliminate the jumping terminal transaction serial number; specifically, the transaction serial number of each PSAM card used by each toll station ETC lane in a selected time range is calculated, the transaction serial number of the largest terminal machine and the transaction serial number of the smallest terminal machine in each work class are eliminated, and the jump terminal machine transaction serial number is eliminated to obtain a record set A.
And processing all data in the first data set by using a node adding function to obtain a hash table. Specifically, a record a1 is read from a, and the current record a1 is processed by using a function hash.
Hash collision occurs during data processing, and the following methods are commonly used to process collision, namely, open addressing method, re-hash method, chain address method, and method of establishing a common overflow area. In the present embodiment, a chain address method is used. Because the average search length Snc when the search is successful and the length Unc when the search is unsuccessful are both smaller when the chain address method is adopted,
Figure BDA0002144984530000081
Unc≈d+e
where α ≈ 1, the number of records filled in the table/length of the hash table.
As shown in fig. 5, 6, and 7, in this embodiment, the charging point information includes an area code, a link code, and a charging station code, and after the node adding function is used to process all data in the first data set to obtain the hash table, the method further includes the following steps:
storing the region code, the road section code and the toll station code of each toll station as preset variables, and acquiring the length of the hash table; the data type of the preset variable is int64 type. Int64 is a signed 64-bit integer data type.
Calculating according to the preset variable and the length of the hash table to obtain a hash value corresponding to each charging point; each hash value will correspond to a location in the hash table, which has a one-to-one correspondence. If only one step is needed, some problems still exist, although the dividend is selected to be larger, the situation that the hash values are the same still exists, when the situation occurs, hash collision occurs, and the following method is adopted for solving the collision;
judging whether a hash node corresponding to the hash value exists in the hash table or not, if so, setting the return value as a first preset value, wherein the first preset value is 2, namely when the return value is 2, the node of the toll station does not exist, the hash [ intmode ] is empty, and the LPnode is empty; adding a new node in the memory, storing the transaction serial numbers of the maximum terminal and the minimum terminal of the current area, road section, toll station and PSAM card in the added new node, and pointing HashTbl [ intmod ] to the node, if not, executing the next step;
judging whether the acquired charging point information is consistent with the area, the road section and the charging station at the Hash node, if so, executing non-empty node judgment, and if not, executing the next step;
judging whether the next hash node is empty or not, if so, returning a second preset value, wherein the second preset value is 1, the second preset value is used for solving the hash conflict, the returning of 1 indicates that the node of the toll station does not exist, the hash [ intMode ] is not empty, and the LPnode points to the last node of the hash [ intMode ] linked list; and adding a new node in the memory, storing the transaction serial numbers of the maximum terminal machine and the minimum terminal machine of the current region, the current road section, the toll station and the PSAM card in the added new node, and inserting the node behind the LPnode. If not, judging whether the acquired charging point information is consistent with the region, the road section and the charging station at the Hash node, and if so, executing non-empty node judgment.
The judgment of the non-empty node specifically comprises the following steps:
acquiring the PSAM card number of the toll point, judging whether the PSAM card number is the same as the PSAM card number in the hash table or not, if so, acquiring the work shift date of the PSAM card of the current toll point, if not, further judging whether the number of the processed PSAM cards is less than the maximum PSAM card number of the toll point, and if not, returning to a third preset value; the third preset value is 100, and the return 100 indicates that the node of the toll station exists, but the PSAM card does not exist, and ETC data of the work class does not exist; and storing the maximum terminal machine transaction serial number and the minimum terminal machine transaction serial number of the current region, road section, toll station and PSAM card in a newly added PSAM card of the node Lpnode.
And judging whether data exist at the work shift date or not, and if not, returning to a fourth preset value. The fourth preset value is 110. Return 110 indicates that the node of the toll booth is present and the PSAM card is present but the ETC data for the work shift is not present; and storing the transaction serial numbers of the maximum terminal machine and the minimum terminal machine of the current area, the road section, the toll station and the PSAM card in the node Lpnode.
The data structure used in this embodiment is specifically as follows:
Figure BDA0002144984530000101
Figure BDA0002144984530000111
Figure BDA0002144984530000121
Figure BDA0002144984530000131
the present embodiment is also configured to execute the following step S2: judging whether the charging point information in the corresponding hash node is empty, if not, executing S3;
s3: acquiring a PSAM card corresponding to the charging point information, judging whether the data of the corresponding PSAM card is empty, if so, executing S4, and if not, calculating that the transaction data of all work shifts of the PSAM card stays across the work shifts;
s4: judging whether the number of PSAM cards processed at the hash node is less than the maximum number of PSAM cards corresponding to the charging point, if so, sequentially executing S2, S3 and S4 on the next hash node until all hash nodes are calculated; if not, return is made to step S3.
As shown in fig. 3, the calculating of the business class-crossing retention of the transaction data of all the business classes of the PSAM card specifically includes the following steps:
judging whether the current work shift date is larger than the maximum work shift date or not, and if not, acquiring the work shift state of the PSAM card of the current hash node;
judging whether transaction data exist in the work shift state, if so, executing the next step;
judging whether the next work shift date is larger than the maximum work shift date, if so, setting the cross work shift retention quantity of the transaction data of the current work shift date of the PSAM card of the current hash node to be zero, and if not, obtaining the next work shift state of the PSAM card of the current hash node;
judging whether transaction data exist in the next work shift state or not, if so, calculating the cross-work shift retention quantity, wherein the cross-work shift retention quantity is the minimum value of the transaction serial number of the next work shift and the maximum value of the transaction serial number of the current work shift; if not, judging whether the work shift leaving date is larger than the maximum work shift date, if so, setting the cross work shift detention quantity of the PSAM card of the current hash node to be zero, and if not, obtaining the work shift leaving state of the PSAM card of the current hash node;
judging whether transaction data exist at the next work shift state or not, if so, calculating the cross-work shift retention quantity of the ETC, wherein the cross-work shift retention quantity of the ETC is the minimum value of the transaction serial number of the next work shift and the maximum value of the transaction serial number of the current work shift; if not, setting the cross-shift detention quantity of the PSAM card of the current hash node to be zero until the cross-shift detention judgment of all shift dates is completed. The method mainly comprises the steps of calculating whether data retention exists or not by traversing data of all work shifts, namely calculating ETC data of all work shifts of the PSAM card to be retained across the work shifts; until the data in all working shifts are processed.
As shown in fig. 8 and 9, the present embodiment further provides a query step, where the query step specifically includes the following steps:
receiving query information; that is, when data of a certain station needs to be acquired and is retained, the relevant information of the station, for example, information such as the Guangan station, is input, and then the data corresponding to the station is processed.
Acquiring a corresponding hash node in the hash table according to the received query information, and judging whether the hash node is empty, if so, the ETC transaction data is zero across shift data, and if not, executing the next step;
and judging whether the area, the road section, the toll station and the query information of the hash node are consistent, and if so, calculating the cross-working detention quantity of the hash node.
In the embodiment, a relatively complex data structure is designed to be used as an information node to store ETC transaction data statistical information generated in the maximum working class date of 366 pieces of PSAM card used by each ETC lane of each toll station of each expressway in the whole province, and a hash table technology is used for searching the information node according to the region code, the road section code and the toll station code, so that the average searching length Snc when the searching is successful and the length Unc when the searching is unsuccessful are both relatively small, and the query efficiency is greatly improved. More efficiently, when the work shift date is searched, the subscript value of the array is directly determined by the difference value of the initial value of the range of the work shift date, so that the positions in 366 work shift date arrays can be determined in one step, and the execution efficiency of the whole algorithm is very high.
The scheme of the embodiment finally realizes the processing of the ETC data of the highway in Guangdong province to stay across the work shifts, the effect is ideal in practical application, the system operates for the first time, the early warning result of the ETC data of 30 work shifts of 15 highways in the province is output, and the hit rate is up to more than 90% after the data is confirmed by corresponding highway section companies. Several days later, the toll assembly line in the ETC transaction retention data is uploaded to the combined electric power suit from the corresponding expressway, and about 60 ten thousand yuan of toll loss is saved for the expressway owner. The retention of the ETC transaction data of the two road sections is caused by the fact that a problem occurs to the magnetic disk hardware equipment, and the retention of the ETC transaction data of the road section is not found in time by the monitoring program of one road section. The method of the embodiment can realize the ETC transaction data retention early warning, improves the accuracy of data settlement, and can search the charging running water which is not easy to find out usually and then split and settle the charging running water.
Example two
The second embodiment discloses an electronic device, which comprises a processor, a memory and a program, wherein the processor and the memory can adopt one or more, the program is stored in the memory and configured to be executed by the processor, and when the processor executes the program, the ETC transaction data retention analysis method of the first embodiment is realized. The electronic device may be a series of electronic devices such as a mobile phone, a computer, a tablet computer, and the like.
EXAMPLE III
The third embodiment discloses a computer-readable storage medium which is used for storing a program, and when the program is executed by a processor, the ETC transaction data retention analysis method of the first embodiment is realized.
Of course, the storage medium provided by the embodiment of the present invention contains computer-executable instructions, and the computer-executable instructions are not limited to the method operations described above, and may also perform related operations in the method provided by any embodiment of the present invention.
From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which may be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes instructions for enabling an electronic device (which may be a personal computer, a server, or a network device) to execute the methods according to the embodiments of the present invention.
It should be noted that, in the embodiment of the content-based update notification apparatus, the included units and modules are merely divided according to functional logic, but are not limited to the above division as long as the corresponding functions can be implemented; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
The above embodiments are only preferred embodiments of the present invention, and the protection scope of the present invention is not limited thereby, and any insubstantial changes and substitutions made by those skilled in the art based on the present invention are within the protection scope of the present invention.

Claims (10)

1. The ETC transaction data retention analysis method is characterized by comprising the following steps:
an acquisition step: acquiring each hash node in a hash table, wherein the hash node stores charging point information and transaction data of each PSAM card of the charging point in each work class, and the transaction data comprises a transaction serial number of a maximum terminal and a transaction serial number of a minimum terminal;
a node judgment step: judging whether the charging point information in the corresponding hash node is empty, if not, executing a PSAM card judgment step;
PSAM card judging step: acquiring a PSAM card corresponding to the charging point information, judging whether the data at the corresponding PSAM card is empty, if so, executing a quantity judgment step, and if not, calculating the cross-work retention of the transaction data of all work shifts of the PSAM card;
a quantity judgment step: judging whether the number of PSAM cards processed at the hash node is less than the maximum number of PSAM cards corresponding to the charging point, if so, sequentially executing a node judgment step, a PSAM card judgment step and a number judgment step on the next hash node until all hash nodes are calculated; if not, returning to the PSAM card judgment step.
2. The ETC transaction data retention analysis method according to claim 1, wherein the hash table is constructed by mainly:
acquiring all toll collection point information and transaction data of each PSAM card of the toll collection point in each work class to obtain a first data set, wherein the transaction data comprises a transaction serial number of a maximum terminal machine and a transaction serial number of a minimum terminal machine;
and processing all data in the first data set by using a node adding function to obtain a hash table.
3. The ETC transaction data retention analysis method according to claim 2, wherein the data in the first data set is processed to remove jumped terminal transaction serial numbers.
4. The ETC transaction data retention analysis method according to claim 2, wherein the toll point information comprises an area code, a road segment code and a toll station code, and the method further comprises the following steps after the step of processing all data in the first data set by using the node adding function to obtain the hash table:
storing the region code, the road section code and the toll station code of each toll station as preset variables, and acquiring the length of the hash table;
calculating according to the preset variable and the length of the hash table to obtain a hash value corresponding to each charging point;
judging whether a hash node corresponding to the hash value exists in the hash table or not, if so, returning a value to be a first preset value, wherein the value is used for adding a new hash node in the hash table to solve hash collision, and if not, executing the next step;
judging whether the acquired charging point information is consistent with the area, the road section and the charging station at the Hash node, if so, executing non-empty node judgment, and if not, executing the next step;
and judging whether the next hash node is empty, if so, returning to a second preset value, if not, judging whether the acquired charging point information is consistent with the region, the road section and the charging station at the hash node, and if so, executing non-empty node judgment.
5. The ETC transaction data retention analysis method according to claim 4, wherein the determination of the non-null node specifically comprises the steps of:
acquiring the PSAM card number of the toll point, judging whether the PSAM card number is the same as the PSAM card number in the hash table or not, if so, acquiring the work shift date of the PSAM card of the current toll point, if not, further judging whether the number of the processed PSAM cards is less than the maximum PSAM card number of the toll point, and if not, returning to a third preset value;
and judging whether data exist at the work shift date or not, and if not, returning to a fourth preset value.
6. The ETC transaction data retention analysis method according to claim 5, wherein the data type of the preset variable is int64 type, wherein the first preset value is 2, the second preset value is 1, the third preset value is 100, and the fourth preset value is 110.
7. The ETC transaction data retention analysis method according to claim 1, wherein the calculating of the transaction data retention across work shifts of the PSAM card specifically comprises the following steps:
judging whether the current work shift date is larger than the maximum work shift date or not, and if not, acquiring the work shift state of the PSAM card of the current hash node;
judging whether transaction data exist in the work shift state, if so, executing the next step;
judging whether the next work shift date is larger than the maximum work shift date, if so, setting the cross work shift retention quantity of the transaction data of the current work shift date of the PSAM card of the current hash node to be zero, and if not, obtaining the next work shift state of the PSAM card of the current hash node;
judging whether transaction data exist in the next work shift state or not, if so, calculating the cross-work shift retention quantity, wherein the cross-work shift retention quantity is the minimum value of the transaction serial number of the next work shift and the maximum value of the transaction serial number of the current work shift; if not, judging whether the work shift leaving date is larger than the maximum work shift date, if so, setting the cross work shift detention quantity of the PSAM card of the current hash node to be zero, and if not, obtaining the work shift leaving state of the PSAM card of the current hash node;
judging whether transaction data exist at the next work shift state or not, if so, calculating the cross-work shift retention quantity of the ETC, wherein the cross-work shift retention quantity of the ETC is the minimum value of the transaction serial number of the next work shift and the maximum value of the transaction serial number of the current work shift; if not, setting the cross-shift detention quantity of the PSAM card of the current hash node to be zero until the cross-shift detention judgment of all shift dates is completed.
8. The ETC transaction data retention analysis method according to claim 1, further comprising an inquiry step after the quantity judgment step, wherein the inquiry step specifically comprises the following steps:
receiving query information;
acquiring a corresponding hash node in the hash table according to the received query information, and judging whether the hash node is empty, if so, the ETC transaction data is zero across shift data, and if not, executing the next step;
and judging whether the area, the road section, the toll station and the query information of the hash node are consistent, and if so, calculating the cross-working detention quantity of the hash node.
9. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor implements a method of ETC transaction data retention analysis according to any one of claims 1-8 when executing the computer program.
10. A computer-readable storage medium having stored thereon a computer program, characterized in that: the computer program when executed by a processor implements an ETC transaction data retention analysis method according to any one of claims 1 to 8.
CN201910681872.1A 2019-07-26 2019-07-26 ETC transaction data retention analysis method and device Active CN110633275B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910681872.1A CN110633275B (en) 2019-07-26 2019-07-26 ETC transaction data retention analysis method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910681872.1A CN110633275B (en) 2019-07-26 2019-07-26 ETC transaction data retention analysis method and device

Publications (2)

Publication Number Publication Date
CN110633275A true CN110633275A (en) 2019-12-31
CN110633275B CN110633275B (en) 2023-12-12

Family

ID=68969495

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910681872.1A Active CN110633275B (en) 2019-07-26 2019-07-26 ETC transaction data retention analysis method and device

Country Status (1)

Country Link
CN (1) CN110633275B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111275840A (en) * 2020-02-19 2020-06-12 中国联合网络通信集团有限公司 Vehicle charging method and device

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000259877A (en) * 1999-03-12 2000-09-22 Toshiba Corp Charge collecting system, on-vehicle equipment, lane controller and charge collecting method
JP2007058299A (en) * 2005-08-22 2007-03-08 Toshiba Corp Toll collection system and toll collection method
CN103294822A (en) * 2013-06-17 2013-09-11 北京航空航天大学 Efficient cache method based on initiative hash and bloom filter
CN104731879A (en) * 2015-03-09 2015-06-24 江苏省邮电规划设计院有限责任公司 Expressway vehicle fee evasion behavior data analysis method
CN105513147A (en) * 2015-12-25 2016-04-20 广东联合电子服务股份有限公司 Highway charging system and highway charging method based on ETC vehicle
CN106710016A (en) * 2017-01-10 2017-05-24 广州智路交通咨询有限公司 ETC equipment application system and vehicle renter paying method
US10311650B2 (en) * 2016-09-01 2019-06-04 Anthony Nelson Application, device and system for toll collection
CN109885576A (en) * 2019-03-06 2019-06-14 珠海金山网络游戏科技有限公司 A kind of Hash table creation method and system calculate equipment and storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000259877A (en) * 1999-03-12 2000-09-22 Toshiba Corp Charge collecting system, on-vehicle equipment, lane controller and charge collecting method
JP2007058299A (en) * 2005-08-22 2007-03-08 Toshiba Corp Toll collection system and toll collection method
CN103294822A (en) * 2013-06-17 2013-09-11 北京航空航天大学 Efficient cache method based on initiative hash and bloom filter
CN104731879A (en) * 2015-03-09 2015-06-24 江苏省邮电规划设计院有限责任公司 Expressway vehicle fee evasion behavior data analysis method
CN105513147A (en) * 2015-12-25 2016-04-20 广东联合电子服务股份有限公司 Highway charging system and highway charging method based on ETC vehicle
US10311650B2 (en) * 2016-09-01 2019-06-04 Anthony Nelson Application, device and system for toll collection
CN106710016A (en) * 2017-01-10 2017-05-24 广州智路交通咨询有限公司 ETC equipment application system and vehicle renter paying method
CN109885576A (en) * 2019-03-06 2019-06-14 珠海金山网络游戏科技有限公司 A kind of Hash table creation method and system calculate equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111275840A (en) * 2020-02-19 2020-06-12 中国联合网络通信集团有限公司 Vehicle charging method and device
CN111275840B (en) * 2020-02-19 2021-08-03 中国联合网络通信集团有限公司 Vehicle charging method and device

Also Published As

Publication number Publication date
CN110633275B (en) 2023-12-12

Similar Documents

Publication Publication Date Title
CN103077604B (en) traffic sensor management method and system
CN106326475A (en) High-efficiency static hash table implement method and system
CN105303437A (en) Processing method and device for account checking
CN105631551A (en) Optimal route recommendation method and device
CN112463859B (en) User data processing method and server based on big data and business analysis
CN108572958A (en) Data processing method and device
CN109388636A (en) Business datum is inserted into database method, apparatus, computer equipment and storage medium
CN112395322A (en) List data display method and device based on hierarchical cache and terminal equipment
CN110633275A (en) ETC transaction data retention analysis method and device
CN114153898A (en) Method, device and application for combing relationships among database tables
CN111369790B (en) Vehicle passing record correction method, device, equipment and storage medium
CN110442589B (en) Electronic map updating method, device and equipment
CN110427599A (en) The statistical method and device of report subtotal, storage medium, electronic device
CN105608206A (en) Data-broadcasting-oriented location correlation skyline query processing method
CN110765100A (en) Label generation method and device, computer readable storage medium and server
CN113360551B (en) Method and system for storing and rapidly counting time sequence data in shooting range
CN113076451B (en) Abnormal behavior identification and risk model library establishment method and device and electronic equipment
CN101799803B (en) Method, module and system for processing information
CN111368616B (en) Slave vehicle identification method, device and equipment
CN113919873A (en) Method, device and equipment for determining market capacity and storage medium
CN112395277B (en) Vehicle information screening method, device, equipment and storage medium
CN108376365A (en) A kind of Bank Number determines method and device
CN109325149A (en) XML message search method and device
CN116308018A (en) Matching method and device of distribution area and distribution point and storage medium
CN116109223B (en) Intelligent logistics data management method and system for merchants

Legal Events

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