Automatic test method for highway lane system based on historical data

Through an automated testing method based on historical data, the problems of insufficient use case coverage, difficulty in judging results and low efficiency in highway lane system testing are solved, and a more comprehensive test coverage and a more efficient test process are achieved.

CN120144449APending Publication Date: 2025-06-13COSCO SHIPPING TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510213979.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-25
Publication Date
2025-06-13

AI Technical Summary

Technical Problem

The test of highway lane system has problems such as insufficient use case coverage, difficulty in judging test results and low testing efficiency, resulting in the failure to fully verified toll calculation and discount situation.

Method used

Using the automated testing method of highway lane system based on historical data, we will collect and analyze historical transaction data, build automated testing services, and perform automated testing to achieve full coverage of test cases and automated verification.

Benefits of technology

It improves the coverage of test cases, simplifies the judgment of test results, significantly improves the testing efficiency, and ensures the stability and accuracy of lane system software.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120144449A_ABST
    Figure CN120144449A_ABST
Patent Text Reader

Abstract

According to the highway lane system automatic test method based on the historical transaction data provided by the invention, accurate test cases are constructed by using lane historical transaction logs, so that the verification capability of software on the historical transaction data is enhanced, and the stability and reliability of a software system are greatly improved; different types of test cases can be automatically obtained by constructing a case obtaining interface and a vernier updating interface, so that the test time is greatly shortened; a transaction input item, an output item log and a vehicle transaction flow are automatically verified through a transaction verification interface, and each field in a lane transaction flow and a flow generated by the test can be accurately and rapidly compared; according to the method, the automatic test service is constructed, so that the expansibility of the test method is greatly enhanced, the test efficiency and the reusability of codes are effectively improved, and meanwhile, the influence of human factors on test results is avoided, so that the consistency of the test results is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of intelligent transportation, and particularly relates to an automated testing method for a highway lane system based on historical data. Background Art

[0002] The testing of the highway lane system plays a very important role in ensuring the stable operation of highway network toll collection. However, there are objective situations such as a wide testing scope, a long testing cycle, and complex test cases in the testing of the highway lane system. Therefore, at present, the testing of the highway lane system mainly has problems such as insufficient coverage of test cases, difficulty in judging test results, and low testing efficiency, which are specifically manifested as follows:

[0003] 1. The existing lane system test cases have insufficient coverage. During the daily testing process, to ensure the correctness of toll collection, the testing work needs to comprehensively write and execute all test cases for highway network toll collection. However, the vehicle type, vehicle category, entrance station, differential discounts, and payment methods all affect the calculation of the toll. Therefore, it is very difficult for the existing testing work to include all influencing factors in the testing scope through permutation and combination. As a result, there will be situations where the toll calculation or differential discounts in some special cases are not verified by the test.

[0004] 2. It is difficult to judge the results of the existing lane system test. During the daily testing process, in addition to the large variety and quantity of test cases in the test input process, there are also problems such as a large number of verification items for the output results, easy errors in verification, and inconsistent verification criteria in the test output process.

[0005] 3. The existing lane system testing has low efficiency. The low testing efficiency is manifested in many aspects. First, it is highly dependent on manual operations. Second, the degree of automation in the testing process is low. Third, the testing process takes a long time and does not meet the timeliness requirements for the launch of new versions of the lane system. Specifically, the writing, preparation, and execution of all test cases have to be manually operated item by item, and the full-process testing cycle is as long as 7 - 10 days. Summary of the Invention

[0006] In view of the problems in the prior art that the test case coverage of the highway toll lane system in testing is insufficient, and it is difficult to judge the test results of the lane system and the testing efficiency of the lane system is low, an automated testing method for a highway lane system based on historical data is proposed, which can cover various types of test cases, effectively solve the problem of difficult verification in the existing lane system testing, realize the automated testing and verification of the lane system, and thus improve the overall testing efficiency.

[0007] An automated testing method for a highway lane system based on historical data

[0008] S1: Collect historical transaction data: Collect the vehicle historical transaction data of the lane system in the production environment of the entire road network; the vehicle historical transaction data includes transaction log data and transaction flow data; the transaction log data includes ETC transaction data and MTC transaction data; the transaction flow data includes: entrance transaction flow data and exit transaction flow data;

[0009] S2: Analyze historical transaction data: Read and analyze the ETC transaction data, MTC transaction data and transaction flow data collected in S1, and obtain the structured data composed of input item data, output item data and PASSID as test cases, and save the test cases to the test library;

[0010] S3: Build an automated test service: Build an automated test interaction interface for the lane automated transaction process and further complete the automated test service; Add a test case acquisition interface, a cursor update interface and a transaction verification interface to form the automated test interaction interface on the basis of the actual lane system process calling the interaction interface; the automated test service includes: ETC test service and MTC test service; the ETC test service is divided into an antenna transparent transmission mode and an integrated service mode;

[0011] S4: Execute automated tests: Modify the configuration file in the lane system directory; Start the lane system, and automatically read the configuration file to start the corresponding automated test service described in S3, and enter the automated test process. The automated test process calls the test cases in the test library of S2 based on the automated test interaction interface, automatically generates and verifies the transaction input item data, output item data and vehicle transaction flow, and outputs the verification result.

[0012] Preferably, the specific method for collecting transaction log data is:

[0013] A1: Obtain the vehicle transaction input item data and output item data in the production environment lane system, and save them to the log file according to the key value;

[0014] A2: Save the current vehicle transaction type, transaction time and payment-related information to the log file according to the key value; if there is a situation where the payment medium is inconsistent with the passing medium, it is necessary to record the payment medium input item and output item data to the log file.

[0015] Preferably, the ETC transaction data collection includes collecting OBU data and ETC card data; the OBU data includes input item data composed of an OBU system information file, a vehicle information file, and an EF04 file, and output item data composed of an EF04 file; the OBU system information file is composed of an issuer identifier, a contract version, a contract version number, a contract serial number, a contract signing date, a contract expiration date, a disassembly status, and reserved data; the ETC card data includes input item data composed of a 0015 basic issue data file, a 0019 composite consumption file, and a balance information file, and output item data composed of a 0019 composite consumption file and a balance information file.

[0016] Preferably, the MTC transaction data collection includes collecting transaction data of a passing medium and collecting payment data; the collection of the passing medium data is divided into CPC card data collection and ETC card data collection; the CPC data includes input item data composed of an MF_EF01 system information file, an MF_EF02 basic file, a DF01_EF01 entrance information, a DF01_EF02 charging information, a DF01_EF04 passing information, and a vehicle information file, and output item data composed of a DF01_EF01 entrance information, a DF01_EF02 charging information, a DF01_EF04 passing information, and a vehicle information file; the MF_EF01 system information file is composed of an issuer identifier, a card number, a version number, a contract signing date, a contract expiration date, and custom data; the collection of the payment data is divided into cash payment data collection, mobile payment data collection, and non-cash payment data collection.

[0017] Preferably, the entrance transaction flow data mainly records vehicle entrance station information, vehicle information, charging information, passing medium information, toll collector information, authorization information, and event information; the exit transaction flow data, on the basis of the entrance transaction flow data, additionally records exit station information, payment data information, and detailed toll information.

[0018] Preferably, the specific method for analyzing ETC transaction log data is as follows:

[0019] B1: Read the OBU input data items and ETC card input data items in the ETC transaction log; read the OBU output data items and ETC card output data items in the ETC transaction log.

[0020] B2: Compose a vehicle passing PASSID according to the vehicle transaction type, transaction time, and the OBU contract serial number in the system information file of the OBU input data items.

[0021] B3: Combine the input item data, output item data, and PASSID to form a transaction structure, and save the structure data in JSON format to the test library.

[0022] Preferably, the specific method for analyzing the MTC transaction log is as follows:

[0023] C1: Read the CPC or ETC card input data items in the transaction log. The CPC card input data items can exist in both the entrance lane system and the exit lane system, while the ETC card input data items only exist in the exit lane system.

[0024] C2: Read the payment data information in the transaction log. If it is cash payment, do not read the payment medium information. If it is mobile payment, read the mobile payment data. If it is ETC card payment, read the ETC card deduction input data items and output data items.

[0025] C3: Combine the vehicle transaction type, transaction time, and card number in the MF_EF01 system information file to form the vehicle pass PASSID.

[0026] C4: Combine the CPC card input data items, output data items, and PASSID to form the MTC transaction structure data, and save the MTC transaction structure data in JSON format to the test library.

[0027] Preferably, the specific method for analyzing the transaction flow data is as follows:

[0028] D1: Analyze the transaction flow data to obtain the flow PASSID and the flow data object. The flow PASSID is composed of the medium type, card number, and transaction time. The medium type is composed of OBU, CPC, paper ticket, and no passing medium. The flow data object mainly consists of the entrance station information, entrance vehicle information, weighing information, entrance time, exit station information, exit vehicle information, exit time, charging information, PASSID, payment information, and its passing medium information.

[0029] D2: Query the MTC transaction structure data or ETC transaction structure data in the test library according to the flow PASSID.

[0030] D3: Determine whether the flow data is repeated with the corresponding constructed MTC test case or ETC test case through the flow data entrance station information, vehicle information, charging information, passing medium information, exit information, and payment data. If it is repeated, the data does not need to be processed. If it is not repeated, record the flow data PASSID and generate the test case number and case type.

[0031] D4: Save the flow PASSID, test case number, and case type data to the test library.

[0032] Preferably, the interfaces in the automated test service described in S3 include:

[0033] An antenna initialization interface, which is used to obtain ETC transaction test cases in the test library, save the test case number data, and at the same time set the cursor serial number to 0;

[0034] A reader / writer initialization interface, which is used to obtain MTC transaction test cases in the test library, save the test case number data, and at the same time set the cursor serial number to 0;

[0035] A test case acquisition interface, which is an interface added for automated testing. It obtains the test case number according to the cursor serial number, and queries and associates the ETC transaction structure data and transaction data in the test library according to the test case number;

[0036] An integrated protocol data interface, which judges the integrated protocol frame type. If the frame is for reading data, it encapsulates the corresponding file data of the ETC transaction structure into the protocol frame and returns the file data; if the frame is for writing data, it records the written data into the RSU log data file and at the same time records it into the experimental group output item;

[0037] A channel instruction interface. If the instruction is a read data instruction, it encapsulates the corresponding file data of the ETC transaction structure into the channel instruction and returns the data packet; if the instruction is a write data instruction, it returns a data packet indicating successful writing, records the written data into the RSU log data file, and at the same time records it into the experimental group output item;

[0038] A cursor update interface, which is an interface added for automated testing. This interface increments the cursor serial number by 1. If the test case number data cannot be obtained using the new cursor serial number, it means that all test cases have been obtained;

[0039] A transaction verification interface, which is an interface added for automated testing. It compares the control group output item data of the ETC transaction structure or MTC transaction structure with the experimental group output item data and records the comparison result of the output item data; at the same time, it also needs to compare the queried transaction data with the transaction data generated by the current vehicle and record the comparison result.

[0040] Preferably, the interfaces in the antenna transparent transmission mode described in S3 include: an antenna initialization interface, a test case acquisition interface, a channel instruction interface, a cursor update interface, and a transaction verification interface; the interfaces in the integrated service mode include: an antenna initialization interface, a test case acquisition interface, an integrated protocol data interface, a cursor update interface, and a transaction verification interface; the interfaces in the MTC test service are: a reader / writer initialization interface, a test case acquisition interface, an integrated protocol data interface, a cursor update interface, and a transaction verification interface.

[0041] Preferably, the specific method for performing the automated test is:

[0042] S41: Modify the configuration file under the lane system directory according to the selected type of automated test service; start the lane system, and the lane system automatically reads the configuration file under the lane system directory to determine whether the current lane system needs to enter the automated test process of the corresponding automated test service;

[0043] S42: The lane system automatically calls the antenna initialization interface or the reader / writer initialization interface according to the selected type of automated test service, obtains the test cases of the corresponding type in the test library, and saves the number data of the test cases;

[0044] S43: The lane system calls the test case acquisition interface to obtain the test case data of the test library, including data PASSID, test case number, test case type data, and transaction structure data;

[0045] S44: The lane system triggers the automatic transaction process according to the test case type data and the transaction structure data; in the automatic transaction process, transaction input item data, output item data, and vehicle transaction records are generated;

[0046] S45: After the vehicle transaction is completed, the lane system calls the transaction verification interface to verify the transaction input item data, output item data, and vehicle transaction records;

[0047] S46: The lane system calls the cursor update interface; after executing this interface, it calls the test case acquisition interface again to obtain the next test case data, and repeats steps S44 - S45.

[0048] Preferably, the specific method for performing automated verification is as follows:

[0049] 1) Input information verification: By comparing the test case input item data with the experimental test input item data; when the two pieces of information are inconsistent, record the abnormal fields or reasons of the input items in the verification log file; wait for manual troubleshooting after the test ends;

[0050] 2) Output information verification: By comparing the test case output item data with the experimental test output item data; when the two pieces of information are inconsistent, record the abnormal fields or reasons of the input items in the verification log file; wait for manual troubleshooting after the test ends;

[0051] 3) Transaction record verification: By comparing the historical transaction records in the test library with the automated test records for key fields, and at the same time record the abnormal fields or reasons of the records in the verification log file; the comparison information includes: deduction amount, billing method, province information, entrance station information, billing method, exit station information, and vehicle information.

[0052] Beneficial effects:

[0053] The present invention proposes an automated testing method for highway lane systems based on historical data. By collecting historical transaction data, analyzing historical transaction data, constructing an automated testing service, and executing automated tests, testers can more easily achieve full coverage of test case types, thereby improving the testing efficiency of lane system software. It can not only perform automated tests using lane historical transaction logs, but also automatically verify transaction input items, output item logs, and vehicle transaction flows, and can quickly and accurately complete field verification work.

[0054] By collecting and analyzing historical transaction data, test cases are generated. These test cases are designed to fully consider various possible situations, thus greatly improving the coverage for different test types and providing strong guarantee for the stable operation of the system.

[0055] By constructing a use case acquisition interface and a cursor update interface, different types of test cases can be automatically obtained, and a large number of test cases can be executed quickly and accurately in a short time, which can greatly shorten the testing time.

[0056] By constructing an automated testing service, the scalability of the testing method is greatly enhanced, effectively improving the testing efficiency and code reusability. At the same time, each time a test is executed, it will be carried out according to the predetermined steps and requirements, avoiding the influence of human factors on the test results, thus ensuring the consistency of the test results. At the same time, automated tests can be run during non-working hours, making full use of hardware resources and improving the overall utilization rate of resources.

[0057] By using a transaction verification interface to automatically verify transaction input items, output item logs, and vehicle transaction flows, it can accurately compare each field in the lane transaction flow and the flow generated by this test, and can quickly identify and clearly mark any existing field differences. Once a difference is found, the system will immediately make a mark, thus effectively preventing the generation of incorrect flows, significantly reducing the error rate, and ensuring the accuracy and integrity of transaction data. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] Figure 1 is a flowchart of an automated testing method for highway lane systems based on historical data.

[0059] Figure 2 is the MTC transaction storage data structure.

[0060] Figure 3 is the ETC transaction storage data structure. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0061] Such as Figure 1As shown below, the specific steps of an automated testing method for a highway lane system based on historical data are as follows:

[0062] S1: Collect historical transaction data: Collect the vehicle historical transaction data of the lane system in the production environment of the entire road network; the vehicle historical transaction data includes transaction log data and transaction flow data; the transaction log data includes ETC transaction data and MTC transaction data; the transaction flow data includes: entrance transaction flow data and exit transaction flow data;

[0063] S2: Analyze historical transaction data: Read and analyze the ETC transaction data, MTC transaction data, and transaction flow data collected in S1 to obtain structured data composed of input item data, output item data, and PASSID as test cases, and save the test cases to the test library;

[0064] S3: Build an automated testing service: Build an automated testing interaction interface for the lane automated transaction process and further complete the automated testing service; add a test case acquisition interface, a cursor update interface, and a transaction verification interface to form the automated testing interaction interface based on the actual lane system process calling the interaction interface; the automated testing service includes: ETC testing service and MTC testing service; the ETC testing service is divided into an antenna pass-through mode and an integrated service mode;

[0065] S4: Execute automated testing: Modify the configuration file in the lane system directory; start the lane system, and automatically read the configuration file to start the corresponding automated testing service described in S3, and enter the automated testing process. The automated testing process calls the test cases in the test library of S2 based on the automated testing interaction interface, automatically generates and verifies the transaction input item data, output item data, and vehicle transaction flow, and outputs the verification result.

[0066] The present invention will be described below with reference to the accompanying drawings.

[0067] The lane system of a certain provincial expressway currently adopts an automated testing method for expressway lane systems based on historical data of the present invention. Through historical transaction data collection, historical transaction data analysis, construction of automated testing services, and execution of automated tests, automated testing of the lane system is achieved. The automated testing services constructed by the automated testing method are developed in C++. C++ is a compiled language. Compared with interpreted languages, it has higher execution efficiency, which is crucial for expressway lane systems that require quick response and handling of a large number of concurrent transactions. C++ supports object-oriented programming (OOP), which helps to build a modular and maintainable code structure. Choosing C++ as the development language for the automated testing services constructed by the expressway automated testing method can provide strong flexibility and scalability while ensuring system performance, meeting complex business requirements.

[0068] An automated testing method for expressway lane systems based on historical data, the process of which is as Figure 1 shown, and its features include: collecting historical transaction data, analyzing historical transaction data, constructing automated testing services, and executing automated testing steps.

[0069] I. Collecting historical transaction data

[0070] Collecting historical transaction data means collecting transaction data of lane systems in a large number of production environments across the entire road network, and generating a test library based on the collected vehicle transaction data for subsequent analysis of historical transaction data. However, collecting historical transaction data is further divided into collecting transaction log data and collecting transaction flow data.

[0071] (1) Collecting transaction log data

[0072] Collecting transaction log data means formatting and saving the transaction data of passing vehicles in the production environment lane system to obtain the original vehicle transaction data. First, after obtaining the vehicle transaction input items and output items in the production environment lane system, save them to the log file according to key values; secondly, it is also necessary to save the current vehicle media type, transaction time, and payment-related information to the log file according to key values; then, if there is a situation where the payment media is inconsistent with the passing media, it is also necessary to record the payment media input item and output item data to the log file.

[0073] For the input and output item data in the log file, the key names are named in the format of "input / output item type_media type_read or write file name". For example, the input item type is "read", and the output item type is "write"; the media types include "OBU", "ETC card", and "CPC"; the key values are saved in the form of hexadecimal strings, and the read data and written data are converted into hexadecimal strings. The key name of the transaction time uses the fixed name "tradetime", and the key value uses a time string, such as "2024-01-01 00:00:00"; if there is mobile payment, the mobile payment serial number, payment time, and payment amount need to be recorded; if ETC card payment is used, the input and output item data of the ETC card used for payment need to be recorded.

[0074] Transaction log data collection includes ETC (Electronic Toll Collection) transaction data collection and MTC (Manual Toll Collection system) transaction data collection.

[0075] 1. ETC Transaction Data Collection

[0076] ETC transaction data collection refers to collecting OBU and ETC card file data when an ETC vehicle passes. Therefore, ETC transaction data collection is further divided into OBU data collection and ETC card data collection.

[0077] (1) OBU Data Collection

[0078] OBU data collection mainly collects OBU data files, including system information files, vehicle information files, and EF04 files; among them, the input item data includes system information files, vehicle information files, and EF04 files, and the output item data file is only the EF04 file.

[0079] The specific implementation steps are as follows:

[0080] ① The lane system starts and loads the configuration of whether to collect transaction log data.

[0081] ② The lane system reads the OBU input item data. First, the data value is formatted in hexadecimal, and then the formatted input data is saved to the log file in the form of a key value. The ETC transaction log file is named in the form of "rsu_data_laneno", where "laneno" is the lane number, and the log keyword uses the form of input / output type + media type + file name. The log record is as follows:

[0082] read_obu_systemfile:F6FFC…

[0083] read_obu_vehiclefile:CC…

[0084] read_obu_ef04:A0F2…

[0085] ③ After the lane system transaction is successful, the OBU output item data will be updated. The data value is formatted in hexadecimal, and then the formatted output data is saved to the log file in key-value form. The log recording method is as follows: write_obu_ef04:F6FFC….

[0086] (2) ETC Card Data Collection

[0087] ETC card data collection mainly collects ETC card data files, including the 0015 issuance basic data file, the 0019 composite consumption file, and the balance information file. The input item data includes the 0015 issuance basic data file, the 0019 composite consumption file, and the balance information file. The output item data files include the 0019 composite consumption file and the balance information file.

[0088] The specific implementation steps are as follows:

[0089] ① When the lane system starts, it loads the configuration of whether to collect transaction log data.

[0090] ② After the lane system successfully reads the ETC card, the input item data value is formatted in hexadecimal, and then the formatted input data is saved to the log file in key-value form. The input data log record is as follows:

[0091] read_etc_0015:F6FFC…

[0092] read_etc_0019:FF…

[0093] read_etc_balance:186A0

[0094] ③ After the lane system transaction is successful, the ETC card output item data will be updated. The data value is formatted in hexadecimal, and then the formatted output data is saved to the log file in key-value form. The output data log record is as follows: write_etc_0019:F6FFC….

[0095] 2. MTC Transaction Data Collection

[0096] MTC transaction data collection is mainly divided into toll media transaction data collection and payment data collection. Among them, toll media data collection is further divided into CPC card data collection and ETC card data collection. Payment data collection is divided into cash payment data collection, mobile payment data collection, and non-cash payment data collection.

[0097] (1) Toll Media Transaction Data Collection

[0098] 1) CPC data collection

[0099] CPC data collection mainly collects CPC data files, including MF_EF01 system information file, MF_EF02 basic file, DF01_EF01 entry information, DF01_EF02 billing information, DF01_EF04 passing information, and vehicle information file. Among them, the input item data are all the read files, and the output item data files are DF01_EF01 entry information, DF01_EF02 billing information, DF01_EF04 passing information, and vehicle information file.

[0100] The specific implementation steps are as follows:

[0101] ① The lane system starts and loads the configuration of whether to collect transaction log data.

[0102] ② When the lane system reads the CPC input item data, first format the data file values in hexadecimal, and then save the formatted input data in key-value form to the log file. Among them, the MTC transaction log file is named in the form of "reader_data_laneno", where "laneno" is the corresponding lane number, and the log keyword adopts the form of input / output type + medium type + file name. The input data log records are as follows:

[0103] read_cpc_mf_ef01:FF…

[0104] read_cpc_mf_ef02:FF…

[0105] read_cpc_df01_ef01:F6FFC…

[0106] read_cpc_df01_ef02:FF…

[0107] read_cpc_df01_ef04:FF…

[0108] ③ After the lane system transaction is successful, it will update the CPC output item data, format the data values in hexadecimal, and then save the formatted output data in key-value form to the log file. The output data log records are as follows:

[0109] write_cpc_df01_ef01:F6FFC…

[0110] write_cpc_df01_ef02:FF…

[0111] write_cpc_df01_ef04:FF…

[0112] 2) Export ETC Card Data Collection

[0113] The content of ETC card data collection is the same as that during ETC transactions. Among them, the log file is saved in the MTC lane transaction log directory.

[0114] (2) Payment Data Collection

[0115] After the vehicle in the MTC transaction pays successfully, record the vehicle payment type; if it is mobile payment, it is also necessary to record the mobile payment interface return information, mainly including the payment serial number, payment time, and payment amount; if it is non-cash payment, record the ETC card input and output item payment data. The specific implementation steps are as follows:

[0116] ① After the lane system enters the payment process, if it is cash payment, record the payment type as 0 - cash payment and the payment amount in the log. Among them, the payment data is recorded in the MTC transaction log file, and the MTC transaction log file is named in the form of "reader_data_", and the log keyword is in the form of a fixed payment type key, such as:

[0117] paytype:0

[0118] paymoney:20.00

[0119] ② If it is mobile payment, record the payment type as 1 - mobile payment in the log, and it is also necessary to record the mobile payment serial number, payment time, and payment amount information. The log save record is as follows:

[0120] paytype:1

[0121] paymoney:19.23

[0122] mobilepaylistno:2040101231923000021

[0123] mobilepaytime:2024-01-01 23:19:23

[0124] ③ If it is non-cash payment, record the payment type as 2 - non-cash payment in the log, and it is also necessary to record the payment amount and ETC card input and output item information. The log save record is as follows.

[0125] paytype:2

[0126] paymoney:19.23

[0127] read_etc_0015:F6FFC…

[0128] read_etc_0019:AA2900…

[0129] read_etc_balance:186A0

[0130] write_etc_0019:AA2900…

[0131] write_etc_afterbalance:17F1D

[0132] (2) Collecting transaction flow data

[0133] Collecting transaction flow data means saving the vehicle passing transaction flow data of the production environment lane system into a file in json file format for reading and analyzing the transaction flow data. The transaction flow data is divided into entrance transaction flow data and exit transaction flow data.

[0134] The entrance transaction flow data mainly records vehicle entrance station information, vehicle information, charging information, passing medium information, toll collector information, authorization information, event information, etc. The exit transaction flow data, on the basis of the entrance transaction flow data, adds the recording of exit station information, payment data information, detailed charging information, etc.

[0135] The specific implementation steps are as follows:

[0136] ① The lane system starts and loads the configuration of whether to collect transaction flow data.

[0137] ② After the lane system completes the CPC card swiping transaction or ETC transaction, when writing the original passing flow, add the writing of the json format flow file and write the flow file into the list folder, named in the form of "flow table name + transaction time + flow number + license plate.json".

[0138] II. Analyzing historical transaction data

[0139] Analyzing historical transaction data means reading the historical transaction data saved in the production environment lane system, parsing the transaction data to obtain the test library control group data items that are convenient for reading and use, and at the same time using the data in the test library as the test result to verify the control group data. Analyzing historical transaction data mainly has two aspects, one is analyzing transaction logs, and the other is analyzing transaction flow files.

[0140] (1) Analyzing transaction logs

[0141] Analyzing transaction logs mainly consists of analyzing ETC transaction log data and MTC transaction log data.

[0142] 1. Analyzing ETC transaction logs

[0143] Analyzing ETC transaction log data mainly involves analyzing OBU transaction logs and ETC card transaction logs. First, the ETC test service reads the OBU input data items in the transaction log data file. The OBU input data includes the OBU system information file, the OBU vehicle information file, and the OBU EF04 file. Second, it reads the ETC card input data items in the transaction log data file. The ETC card input data includes the ETC card 0015 issuance basic information file, the 0019 composite consumption file, and the balance information file. Then, it reads the EF04 file data in the OBU output items. Next, it reads the ETC card 0019 composite consumption file and the balance information file. Finally, based on the vehicle transaction type, transaction time, and the OBU contract serial number in the system information file, etc., it composes the vehicle passing PASSID.

[0144] Among them, PASSID is the vehicle passing transaction code generated in the toll system and is the only passing proof of the vehicle. Through it, information such as the vehicle's passing time, deduction record, and vehicle license plate are all associated together to jointly form the single-pass information data group of the vehicle.

[0145] The OBU and ETC card input item data, output item data, and PASSID are composed into an ETC transaction structure, and the structure data is saved to the test library in json format to form the ETC transaction log control group data. The ETC transaction structure is as Figure 3 shown.

[0146] Specific implementation steps:

[0147] ① Place all ETC transaction log files in the ETC data analysis directory. Distinguish the entrance and exit transaction logs according to the lane number of the log file. The entrance lane number is conventionally less than 100, and the exit lane number is conventionally greater than 100.

[0148] ② Start the automated analysis program to read the ETC transaction log files in the analysis directory, obtain the ETC vehicle transaction input items and output items, and analyze the vehicle PASSID based on the input item data.

[0149] ③ Compose the input items, output items, and PASSID data into an ETC transaction structure, format the structure into json format data, and save it to the test library to form the control group data items.

[0150] 2. Analyze MTC transaction logs

[0151] Analyzing MTC transaction log data mainly involves analyzing CPC transaction logs and payment data logs. First, read the CPC or ETC card input data items in the transaction log data file. Among them, the CPC card input data items can exist in both the entrance lane system and the exit lane system, while the ETC card input data items only exist in the exit lane system. Second, read the payment data information in the transaction log data file. If it is cash payment, the payment medium information is no longer read. If it is mobile payment, the mobile payment data needs to be read. If it is ETC card payment, the ETC card deduction input item data and output item data need to be read. Then, form the vehicle passing PASSID based on the vehicle transaction type, transaction time, and card number in the MF_EF01 system information file.

[0152] Combine the CPC card input item data, output item data, and PASSID to form an MTC transaction structure. The structure schematic diagram is as Figure 2 , and save the structure data in json format to the test library to form the MTC transaction log control group data.

[0153] Specific implementation steps:

[0154] ① Place all MTC transaction log files in the MTC data analysis directory. Distinguish the entrance and exit transaction logs according to the lane numbers in the log files. The entrance lane number is conventionally less than 100, and the exit lane number is conventionally greater than 100.

[0155] ② Start the automated analysis program to read the CPC transaction log files in the analysis directory, obtain the CPC vehicle transaction input items and output items, and analyze the vehicle PASSID based on the input item data.

[0156] ③ Read and analyze the CPC card payment type data and payment data information.

[0157] ④ Combine the input items, output items, and PASSID data to form an MTC transaction structure, format the structure into json format data, and save it to the test library to form the control group transaction log data items.

[0158] (2) Analyze the transaction flow

[0159] Analyzing transaction logs refers to analyzing the JSON log data generated when vehicles pass through the lane system in the production environment. Based on the parsed log data PASSID, query the MTC or ETC transaction structure data in the test library, and merge the log data with the transaction structure data to form test cases. The main process is as follows: First, analyze the collected JSON-formatted logs to obtain the log PASSID and the log data object; Second, query the MTC transaction structure data or the ETC transaction structure data in the test library based on the log PASSID; Then, analyze information such as the entrance station information, vehicle information, billing information, toll media information, exit information, and payment data in the log data to determine whether the test case corresponding to the log data is repeated. If it is repeated, the data does not need to be processed. If it is not repeated, record the log data PASSID and generate the test case number, case type, etc.; Finally, save the log PASSID, test case number, and case type data to the test library.

[0160] Specific implementation steps:

[0161] ① Place all the collected JSON log files in the data analysis directory, and distinguish between entrance and exit transaction logs.

[0162] ② Start the automated analysis program to read the JSON log data files in the analysis directory and analyze the vehicle PASSID and log information in the log data.

[0163] ③ Search the test library for MTC transaction structure data or ETC transaction structure data that is consistent with this PASSID.

[0164] ④ Determine the repeatability of the test case based on information such as the transaction type, vehicle type, vehicle category, entrance station, exit station, and payment type in the log data. If the case data is repeated, the data can be discarded.

[0165] ⑤ If the recorded log data is not repeated, generate the test case number, case type, etc.; Finally, save the log PASSID, test case number, and case type data to the test library.

[0166] III. Build an automated testing service

[0167] (I) Build a lane test mode

[0168] Building a lane test mode means establishing an automated test process in the existing lane system. By adding an automated test process, the existing lane system can automatically conduct ETC transaction and MTC transaction tests. Among them, ETC transactions are divided into antenna pass-through mode and integrated service mode. ETC automated testing can perform tests according to the test cases in the test library, calculate the vehicle toll and deduct the toll from the ETC card. At the same time, it records the input and output data of ETC transactions, generates transaction flow data, and completes the verification of the flow data. The MTC test mode can automatically enter license plate, vehicle type, and vehicle category information according to the test cases in the test library, calculate the vehicle toll, automatically deduct the fee according to the payment type of the test case, and at the same time record the input and output data of MTC transactions and payment data, generate transaction flow data, and complete the verification of the flow data.

[0169] The main processes of the lane system are as follows:

[0170] 1) When the lane system starts, the lane system automatically reads the configuration file in the lane system directory to determine whether the current lane system needs to enter the automated test process;

[0171] 2) Call the test case acquisition interface to obtain the test case data in the test library, including data PASSID, test case number, test case type data, and transaction structure data;

[0172] 3) Trigger the automatic transaction process according to the test case type and transaction structure data, such as automatically entering license plate, vehicle type, and vehicle category information in the interface;

[0173] 4) Read and write the OBU, ETC card, or CPC card according to the original process during the transaction, and at the same time generate transaction input item, output item logs, and vehicle transaction flows;

[0174] 5) After the vehicle transaction is completed, call the transaction verification interface to verify the validity of the output item data and flow data;

[0175] 6) Call the cursor update interface. After executing this interface, call the test case acquisition interface again to obtain the next test case data.

[0176] (2) Building test services

[0177] 1. ETC test service

[0178] The ETC test service refers to the interactive interface required for automated testing of the ETC transaction process. The lane system can complete a closed-loop automated test process through the interactive interface. The ETC test service mainly provides the following interactive interfaces. First is the test case acquisition interface, which acquires the transaction control group data in the historical data analysis link, and returns the control group data to the lane system through this interface. Second is the channel instruction interface. When the lane system conducts an ETC transaction, it can obtain the OBU and ETC card data through this interface, and can also complete the writing of OBU and ETC card data through this interface. Then is the transaction verification interface. After the lane system completes a transaction, it calls the transaction verification interface. After the ETC test service is completed, it verifies the ETC output item data and transaction data and generates a verification log. Finally is the cursor update interface. After the lane system completes an ETC transaction, it calls this interface to obtain the next test data. Among them, the ETC test service is mainly divided into the antenna pass-through mode and the integrated service mode.

[0179] (1) The antenna pass-through mode encapsulates the automated test interaction module in the form of a dynamic link library for the lane system to call. It is a protocol specification that provides an interactive interface in the form of a dynamic library. It is a highly flexible and compatible software component that follows the protocol specification of the existing interactive interface between the lane system and the antenna. Its main interfaces are as follows:

[0180] 1) The antenna initialization interface mainly obtains the ETC transaction test cases in the test library, saves the test case number data, and at the same time sets the cursor serial number to 0;

[0181] 2) The test case acquisition interface is an additional interface for automated testing. It obtains the test case number according to the cursor serial number, and queries and associates the ETC transaction structure data and transaction data in the test library according to the test case number;

[0182] 3) The channel instruction interface. If the instruction is a data read instruction, it encapsulates the corresponding file data of the ETC transaction structure into a channel instruction return data packet; if the instruction is a data write instruction, it returns a write success data packet, records the written data into the RSU log data file, and at the same time records it into the experimental group output items for the verification interface to compare.

[0183] 4) The cursor update interface is an additional interface for automated testing. This interface increments the cursor serial number by 1. If the test case number data cannot be obtained with the new cursor serial number, it means that all test cases have been acquired;

[0184] 5) The transaction verification interface is an additional interface for automated testing. It compares the control group output item data of the ETC transaction structure with the experimental group output item data and records the comparison result of the output item data; at the same time, it also needs to compare the queried transaction data with the transaction data generated by the current vehicle and record the comparison result.

[0185] (2) The integrated service mode means encapsulating the automated test interaction module as a TCP server for the lane system to call. After receiving the lane connection, the server actively initializes and pushes vehicle OBU and ETC card information to the lane system, thereby triggering the lane system to enter the automated test process. Its main interfaces are as follows:

[0186] 1) Antenna initialization module, mainly obtaining the ETC transaction test cases in the test library, saving the test case number data, and at the same time setting the cursor serial number to 0;

[0187] 2) Test case acquisition interface, which is an additional interface for automated testing. It obtains the test case number according to the cursor serial number, and queries and associates the ETC transaction structure data and transaction data in the test library according to the test case number;

[0188] 3) Integrated protocol data interface, judging the integrated protocol frame type. If the frame is for reading data, it encapsulates the corresponding file data of the ETC transaction structure into the protocol frame and returns the file data; if the frame is for writing data, it records the written data into the RSU log data file and at the same time records it into the experimental group output item for the verification interface to compare.

[0189] 4) Cursor update interface, which is an additional interface for automated testing. This interface increments the cursor serial number by 1. If the test case number data cannot be obtained with the new cursor serial number, it means that all test cases have been obtained;

[0190] 5) Transaction verification interface, which is an additional interface for automated testing. It compares the data of the control group output item of the ETC transaction structure with the data of the experimental group output item and records the comparison result of the output item data; at the same time, it also needs to compare the queried transaction data with the transaction data generated by the current vehicle and record the comparison result.

[0191] 2. MTC Test Service

[0192] The MTC test service refers to providing an interaction interface for the lane system to call according to the interaction interface protocol between the lane system and the card reader. Its core mechanism lies in that it encapsulates the automated test service and strictly follows the existing interaction interface between the lane system and the card reader. The implementation of this strategy ensures that the automated test process can be perfectly integrated with only minor modifications to the lane system itself. After the lane system is started, it calls the card reader dynamic library initialization interface to enter the test case data acquisition process; it calls the test case acquisition interface to obtain the test case number, MTC transaction structure, and transaction data, and the license plate, vehicle type, and vehicle category information are automatically entered into the interface, thereby triggering the automated transaction process. Its main process is as follows:

[0193] 1) Card reader initialization interface, mainly obtaining the MTC transaction test cases in the test library, saving the test case number data, and at the same time setting the cursor serial number to 0;

[0194] 2) Use case acquisition interface, which is an interface for adding automated tests. It obtains the test case number according to the cursor sequence number, and associates and queries the ETC transaction structure data and flow data in the test library according to the test case number;

[0195] 3) Channel command interface: if the command is a read data command, the file data corresponding to the MTC transaction structure is encapsulated into a channel command return data packet; if the command is a write data command, a write success data packet is returned, and the written data is recorded in the card reader log file and in the experimental group output item for comparison of the verification interface;

[0196] 4) Cursor update interface, which is an interface for adding automated tests. This interface adds 1 to the cursor number. If the test case number data cannot be obtained using the new cursor number, it means that the test case has been obtained;

[0197] 5) Transaction verification interface: This interface is an additional interface for automated testing. It compares the output item data of the control group of the MTC transaction structure with the output item data of the experimental group, and records the output item data comparison results. At the same time, it is also necessary to compare the query-obtained flow data with the flow data generated by the current vehicle, and record the comparison results.

[0198] 4. Perform automated testing

[0199] (I) Running lane test mode

[0200] Enable the automated test mode in the lane system. First, locate the directory where the lane system run files are located, switch to the Configs directory, and find the core configuration file ConfigLane.ini; next, in the configuration file, locate the RunParam node; under this node, add a new configuration item called IsEtcAutoTestModel to indicate whether the lane system enters the automated test mode.

[0201] After completing the above configuration changes, restarting the lane system is a necessary step to activate the test mode. After the system restarts, the IsEtcAutoTestModel configuration item will take effect, guiding the lane system to automatically switch to the preset automated test mode. In this mode, the system will automatically execute a series of test cases according to the predetermined test process without human intervention, thereby achieving a comprehensive evaluation of the lane system's functions and performance, and ensuring its stability and reliability in actual operation. In this way, the automated testing of the lane system not only becomes more convenient, but also greatly improves the efficiency and accuracy of the test.

[0202] (II) Run test service

[0203] Starting the automated test service means running the ETC test service and the MTC test service in the lane system. Running the ETC test service is divided into the ETC pass-through mode and the ETC integration mode. The test service module adopts an interface form, reducing the dependencies between systems, and thus reducing the problem of production system anomalies caused by automated test service anomalies. The specific operations are divided into the following situations:

[0204] 1. ETC antenna pass-through mode

[0205] The ETC antenna pass-through mode means simulating the operation of the RSU antenna interaction dynamic library, implementing the interface between the lane system and the antenna interaction dynamic library, and performing read and write operations according to the associated ETC transaction test case data. The specific implementation steps are as follows:

[0206] ① Modify the antenna device type in the lane system configuration item and replace it with the test antenna pass-through mode.

[0207] ② Start the lane system and load the antenna pass-through mode.

[0208] ③ The lane system calls the antenna initialization interface, and the underlying dynamic library obtains the ETC transaction test cases in the test library and saves the test case number data.

[0209] ④ The lane system automatically simulates and triggers the event of adding a vehicle, triggers the system to call the use case acquisition interface, displays the current vehicle information, and reads the vehicle information before the transaction through the antenna interaction interface.

[0210] ⑤ The lane system completes the relevant operations of charging and deducting fees according to the information before the transaction.

[0211] ⑥ The lane system records the ETC vehicle transaction details, waits for subsequent automatic verification, and at the same time calls the cursor update interface, thus seamlessly connecting to the next use case test process.

[0212] 2. ETC integration service mode

[0213] The ETC integration service mode means encapsulating the automated test process as a TCP server according to the integration protocol interface, implementing the TCP-related interfaces for the interaction between the lane system and the antenna, and completing the relevant read and write operations according to the associated ETC transaction test case data. The specific startup steps are as follows:

[0214] ① Configure the lane system antenna device as the integration service mode and modify the antenna device type in the configuration file;

[0215] ② Update and start the integrated antenna interaction server;

[0216] ③ Start the lane system and actively connect to the server program;

[0217] ④ After successful connection, call the antenna initialization interface, which triggers the automated test service, starts to obtain the ETC transaction test cases in the test library, and saves the test case number data;

[0218] ⑤ When the server detects the connection of the lane system, it actively pushes vehicle information to the lane system, triggering the lane system to read the pre-transaction information;

[0219] ⑥ The lane system completes relevant operations such as charging and deducting fees according to the pushed information;

[0220] ⑦ The lane system records the ETC vehicle transaction flow, waits for subsequent automatic verification, and at the same time calls the cursor update interface, and then seamlessly connects to the next test case process.

[0221] 3. MTC Test Service

[0222] The MTC test service refers to encapsulating the automated test process into a dynamic link library according to the lane system and card reader protocol, implementing the relevant interfaces for the interaction between the lane system and the card reader, and completing the relevant reading and writing operations according to the associated MTC transaction test case data. The specific implementation steps are as follows:

[0223] ① Start the lane system and load the card reader dynamic library;

[0224] ② When the lane system starts, call the card reader initialization interface, obtain the MTC transaction test cases in the test library, and save the test case number data;

[0225] ③ The lane system will automatically call the card reader dynamic library use case acquisition interface, automatically fill in the license plate, vehicle type and vehicle category input information on the interface according to the acquired input item data, and enter the MTC automated transaction process;

[0226] ④ The lane system reads the card information file before the transaction and performs relevant operations such as charging and deducting fees;

[0227] ⑤ The lane system records the MTC vehicle transaction flow, waits for subsequent automatic verification, and at the same time calls the cursor update interface, and then seamlessly connects to the next test case process.

[0228] (3) Execute Automatic Verification

[0229] Automatic verification mainly includes input information verification, output information verification and transaction flow record verification.

[0230] 1. Input Information Verification

[0231] The ETC transaction verification mainly includes the verification of OBU vehicle information, OBU system information, 0015 file, 0019 file, balance information file, and EF04 file. By comparing the input item data of the test case with the input item data of the experimental test, when the two pieces of information are inconsistent, record the abnormal fields or reasons of the input items into the verification log file and wait for manual investigation after the test ends.

[0232] The MTC transaction verification includes the CPC card system information file, CPC card basic file, EF01 entrance information, EF02 charging information, and EF04 passing information file. By comparing the test cases fed back by the automated program with the input information in the original parsing record, when the two pieces of information are inconsistent, mark the abnormal records and wait for manual investigation after the test ends.

[0233] 2. Output information verification

[0234] The ETC output information verification includes 0019 file, EF04 file, deducted amount, and charging information. By comparing the output item data of the test case with the output item data of the experimental test, when the two pieces of information are inconsistent, record the abnormal fields or reasons of the output items into the verification log file and wait for manual investigation after the test ends.

[0235] The MTC transaction verification includes EF01 entrance information, EF02 charging information, and EF04 passing information file. By comparing the test cases fed back by the automated program with the input information in the original parsing record, when the two results are inconsistent, mark the abnormal records and wait for manual investigation after the test ends.

[0236] 3. Transaction record verification

[0237] The transaction record verification should distinguish between ETC automated tests and MTC automated tests, and in automated tests, it should also distinguish between entrance automated test transactions and exit automated test transactions.

[0238] (1) ETC automated test

[0239] 1) Entrance automated test transaction

[0240] When verifying the entrance automated test transaction, it should include key information such as card number, issuer, entrance toll station, entrance lane, license plate, vehicle type, vehicle category (if the entrance is a toll collection gantry, the gantry toll collection amount, gantry code, etc. should also be verified).

[0241] 2) Exit automated test transaction

[0242] When verifying the export automation test flow, key information such as entry information (entry station, entry lane, entry vehicle model, entry license plate, entry vehicle type), EF04 traffic information in OBU, export information (exit station, exit lane, exit vehicle model, exit license plate, exit vehicle type), billing information and deductions should be included.

[0243] (2)MTC automated testing

[0244] 1) Automated entry test flow

[0245] When verifying the entrance automated test flow, key information such as card number, entrance toll station, entrance lane, license plate, vehicle model, and vehicle type (if the entrance is a collection gantry, the gantry collection amount, gantry code, etc. should also be verified).

[0246] 2) Export automated test flow

[0247] When verifying the export automation test flow, key information should be included, including entrance information (entry station, entry lane, entry vehicle model, entry license plate, entry vehicle type), EF02 billing information, EF04 traffic information, exit information (exit station, exit lane, exit vehicle model, exit license plate, exit vehicle type), billing information and deduction method.

[0248] When comparing vehicle pass records, ensuring accuracy is critical. In order to prevent abnormal comparison results due to search errors, especially for multiple pass records of the same vehicle, accurate matching and verification should be performed based on the passid (pass ID). As a unique identifier for each pass, the passid can ensure that each query and comparison is for the correct pass record.

[0249] When the automated testing service identifies any anomalies when comparing input information, it should immediately and accurately record the core identifiers of these anomalies, including license plate numbers and pass IDs, into the test result database. This is to ensure that the testing team can quickly identify the problem and take timely measures, thereby effectively improving the efficiency of problem response and resolution.

[0250] Finally, it should be noted that the above is only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred arrangement scheme, a person skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention.

Claims

1. A highway lane system automated testing method based on historical data, characterized in that: S1: Collect historical transaction data: Collect historical vehicle transaction data of the lane system of the entire road network production environment; the vehicle historical transaction data includes transaction log data and transaction flow data; the transaction log data includes ETC transaction data and MTC transaction data; the transaction flow data includes: entry transaction flow data and exit transaction flow data; S2: Analyze historical transaction data: Read and analyze the ETC transaction data, MTC transaction data and transaction flow data collected by S1, obtain the structure data composed of input data, output data and PASSID as the test case, and save the test case to the test library; S3: Build automated testing services: Build an automated testing interaction interface for lane automated transaction processes and further complete automated testing services; add a use case acquisition interface, a cursor update interface, and a transaction verification interface to the actual lane system process call interaction interface to form the automated testing interaction interface; the automated testing services include: ETC testing services and MTC testing services; the ETC testing services are divided into antenna transparent transmission mode and integrated service mode; S4: Execute automated testing: modify the configuration file under the lane system directory; start the lane system, and automatically read the configuration file to start the corresponding automated testing service described in S3, and enter the automated testing process. The automated testing process calls the test cases in the S2 test library based on the automated testing interaction interface, automatically generates and verifies transaction input data, output data and vehicle transaction flow, and outputs the verification results.

2. The method for automatically testing a highway lane system based on historical data according to claim 1, characterized in that: The specific method for collecting transaction log data is as follows: A1: The vehicle transaction input and output data are obtained in the production environment lane system, and the key values ​​are saved in the log file; A2: Save the current vehicle transaction type, transaction time and payment related information key values ​​to the log file; if there is a discrepancy between the payment medium and the pass medium, the payment medium input and output data must be recorded in the log file.

3. The method for automatically testing a highway lane system based on historical data according to claim 1, characterized in that: The ETC transaction data collection includes collecting OBU data and collecting ETC card data; the OBU data includes: input item data composed of OBU system information file, vehicle information file and EF04 file, and output item data composed of EF04 file; the OBU system information file is composed of issuer identification, agreement version, contract version, contract serial number, contract signing date, contract expiration date, disassembly status and reserved data; the ETC card data includes: input item data composed of 0015 issuance basic data file, 0019 composite consumption file and balance information file, and output item data composed of 0019 composite consumption file and balance information file.

4. The method for automatically testing a highway lane system based on historical data according to claim 1, characterized in that: The MTC transaction data collection includes collecting pass medium transaction data and collecting payment data; the pass medium data collection is divided into CPC card data collection and ETC card data collection; the CPC data includes: input item data composed of MF_EF01 system information file, MF_EF02 basic file, DF01_EF01 entry information, DF01_EF02 billing information, DF01_EF04 pass information and vehicle information file, and output item data composed of DF01_EF01 entry information, DF01_EF02 billing information, DF01_EF04 pass information and vehicle information file; the MF_EF01 system information file is composed of issuer identification, card number, version number, contract signing date, contract expiration date and custom data; the payment data collection is divided into cash payment data collection, mobile payment data collection and non-cash payment data collection.

5. The method for automatically testing a highway lane system based on historical data according to claim 1, characterized in that: The entry transaction flow data mainly records vehicle entry station information, vehicle information, billing information, traffic medium information, toll collector information, authorization information and event information; the exit transaction flow data adds exit station information, payment data information and detailed charging information on the basis of the entry transaction flow data.

6. The method for automatically testing a highway lane system based on historical data according to claim 1, characterized in that: The specific method for analyzing ETC transaction log data is as follows: B1: Read the OBU input data items and ETC card input data items in the ETC transaction log; read the OBU output data items and ETC card output data items in the ETC transaction log; B2: The vehicle pass PASSID is formed according to the vehicle transaction type, transaction time, and OBU contract serial number in the system information file in the OBU input data item; B3: Combine the input data, output data and PASSID into a transaction structure, and save the structure data in JSON format to the test library.

7. The method for automatically testing a highway lane system based on historical data according to claim 1, characterized in that: The specific method for analyzing the MTC transaction log is: C1: Read the CPC or ETC card input data item in the transaction log, where the CPC card input data item may exist in both the entry lane system and the exit lane system, while the ETC card input data item only exists in the exit lane system; C2: Read the payment data information in the transaction log. If it is a cash payment, the payment medium information is no longer read; if it is a mobile payment, the mobile payment data needs to be read; if it is an ETC card payment, the ETC card deduction input item data and output item data need to be read; C3: compose the vehicle pass PASSID according to the vehicle transaction type, transaction time and card number in the MF_EF01 system information file; C4: Combine CPC card input item data, output item data and PASSID into MTC transaction structure data, and save the MTC transaction structure data in json format to the test library.

8. The method for automatically testing a highway lane system based on historical data according to claim 1, characterized in that: The specific method for analyzing transaction flow data is as follows: D1: Analyze transaction flow data to obtain flow PASSID and flow data object; the flow PASSID consists of media type, card number, and transaction time; the media type consists of OBU, CPC, paper coupons, and non-passable media; the flow data object mainly consists of entry station information, entry vehicle information, weight information, entry time, exit station information, exit vehicle information, exit time, billing information, PASSID, payment information, and its pass medium information; D2: query the MTC transaction structure data or ETC transaction structure data according to the transaction PASSID association test library; D3: Determine whether the flow data is repeated with the corresponding MTC test case or ETC test case through the flow data entry station information, vehicle information, billing information, traffic medium information, exit information and payment data; if repeated, the data does not need to be processed; if not, record the flow data PASSID and generate the test case number and case type; D4: Save the serial PASSID, test case number and test case type data to the test library.

9. The method for automatically testing a highway lane system based on historical data according to claim 1, characterized in that: The interfaces in the automated testing service described in S3 include: Antenna initialization interface, used to obtain ETC transaction test cases in the test library, save the test case number data, and set the cursor number to 0; The reader / writer initialization interface is used to obtain the MTC transaction test cases in the test library, save the test case number data, and set the cursor number to 0; Use case acquisition interface, which is an interface added for automated testing. It obtains the test case number according to the cursor sequence number, and associates and queries the ETC transaction structure data and flow data in the test library according to the test case number; Integrated protocol data interface, determine the integrated protocol frame type, if the frame is for reading data, encapsulate the file data corresponding to the ETC transaction structure into the protocol frame and return the file data; if the frame is for writing data, record the written data into the RSU log data file and record it in the experimental group output item; Channel command interface: if the command is a read data command, the file data corresponding to the ETC transaction structure is encapsulated into a channel command return data packet; if the command is a write data command, a data packet of successful writing is returned, and the written data is recorded in the RSU log data file and the experimental group output item; Cursor update interface, which is an interface for adding automated tests. This interface adds 1 to the cursor number. If the test case number data cannot be obtained using the new cursor number, it means that the test case has been obtained. Transaction verification interface, which is an interface added for automated testing. It compares the output item data of the control group of the ETC transaction structure or the MTC transaction structure with the output item data of the experimental group, and records the output item data comparison results. At the same time, it is also necessary to compare the flow data obtained by the query with the flow data generated by the current vehicle, and record the comparison results.

10. A highway lane system automated testing method based on historical data according to claim 1 or 9, characterized in that: The interfaces in the antenna transparent transmission mode described in S3 include: antenna initialization interface, use case acquisition interface, channel instruction interface, cursor update interface and transaction verification interface; the interfaces in the integrated service mode include: antenna initialization interface, use case acquisition interface, integrated protocol data interface, cursor update interface and transaction verification interface; the interfaces in the MTC test service are: reader / writer initialization interface, use case acquisition interface, integrated protocol data interface, cursor update interface and transaction verification interface.

11. The method for automatically testing a highway lane system based on historical data according to claim 1, characterized in that: The specific method for performing automated testing is: S41: Modify the configuration file in the lane system directory according to the selected automated test service type; Start the lane system, which automatically reads the configuration files in the lane system directory to determine whether the current lane system needs to enter the automated testing process of the corresponding automated testing service; S42: the lane system automatically calls the antenna initialization interface or the reader initialization interface according to the selected automatic test service type, obtains the test case of the corresponding type in the test library, and saves the number data of the test case; S43: The lane system calls the use case acquisition interface to obtain the test case data of the test library, including data PASSID, test case number, use case type data and transaction structure data; S44: The lane system triggers the automatic transaction process according to the use case type data and the transaction structure data; generates transaction input item data, output item data and vehicle transaction flow in the automatic transaction process; S45: After the vehicle transaction is completed, the lane system calls the transaction verification interface to verify the transaction input data, output data and vehicle transaction flow; S46: The lane system calls the cursor update interface; after executing the interface, the use case acquisition interface is called again to obtain the next test case data, and steps S44-S45 are repeated.

12. The method for automatically testing a highway lane system based on historical data according to claim 1, characterized in that: The specific method for performing automated verification is as follows: 1) Input information verification: By comparing the test case input data with the experimental test input data; when the two pieces of information are inconsistent, record the input abnormal field or abnormal reason in the verification log file; Wait for the test to be completed before conducting manual investigation; 2) Output information verification: by comparing the test case output item data with the experimental test output item data; When the two pieces of information are inconsistent, record the abnormal field of the input item or the abnormal reason in the verification log file; Wait for the test to be completed before conducting manual investigation; 3) Transaction record verification: by comparing the key fields of historical transaction records in the test library with the automated test records, and recording abnormal transaction fields or abnormal reasons in the verification log file; The comparison information includes: deduction amount, billing method, provincial information, entry station information, billing method, exit station information and vehicle information.