Urban rail product intelligent test method based on AI large model
Through the intelligent testing method of urban rail products based on AI large-scale models, test cases are automatically generated and executed, and the problems of low efficiency, high cost and incomplete coverage of traditional testing methods are solved, and more efficient and comprehensive testing coverage is achieved, ensuring the safety and stability of urban rail signal systems.
Patent Information
- Application Number
- CN202411900224.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-23
- Publication Date
- 2025-05-27
AI Technical Summary
Traditional urban rail product testing methods have problems such as low testing efficiency, high cost, and incomplete coverage, which is difficult to meet the testing needs of high-performance and high-reliability products.
Using an intelligent test method for urban rail products based on AI large models, we automatically generate test cases, conduct automated tests, and generate test reports by building urban rail product requirements-use case models and urban rail product scenario-script models.
It improves test coverage and integrity, reduces labor costs, improves test efficiency and quality, and ensures the safety and stability of urban rail signal systems.
Smart Images

Figure CN120045448A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the testing of urban rail transit systems, and in particular to an intelligent testing method for urban rail products based on an AI large model. Background Art
[0002] With the rapid development of urban rail transit systems, urban rail transit (URT) systems have become an important part of modern urban transportation. URT products include train control systems, signal systems, communication systems, etc., and their requirements for safety, reliability, stability, and performance are also increasing day by day.
[0003] Traditional testing methods for URT products mainly fall into two categories: one is the on-site commissioning method, which requires a large amount of human and material resources, has low testing efficiency, and poses construction safety hazards, and will also have a certain impact on the operation of existing lines. The other is to conduct tests in an indoor simulation test environment, which requires manual design and execution of tests, lacks intelligence. Facing more and more operation scenarios and more and more complex URT products, coupled with the pressure of on-site commissioning and opening nodes, the cost and difficulty of indoor regression testing are increasing.
[0004] Therefore, traditional testing methods for URT products have many deficiencies. Manual testing is not only time-consuming and laborious, but also limited by the experience and skill level of testers, making it difficult to comprehensively cover all test scenarios and prone to omitting potential problems. Secondly, with the continuous progress of URT technology and the increase in product complexity, traditional testing methods are no longer able to meet the testing requirements for high-performance and high-reliability products.
[0005] After retrieval, application publication number CN118035100A discloses a large model-enhanced test scenario intelligent design method, which specifically discloses: first, by analyzing a large amount of historical data and existing test cases, a large model is trained using deep learning algorithms so that it can understand and simulate complex test environments. Then, this model is used to intelligently design new test scenarios that can more comprehensively cover potential system vulnerabilities and edge cases. However, this method does not provide a method for applying it to URT products.
[0006] Therefore, it is particularly important to develop a testing system for URT products that can automatically and intelligently execute testing tasks and accurately identify and locate problems. Summary of the Invention
[0007] The purpose of the present invention is to overcome the above-mentioned defects existing in the prior art and provide an intelligent testing method for URT products based on an AI large model.
[0008] The purpose of the present invention can be achieved through the following technical solutions:
[0009] According to one aspect of the present invention, there is provided an intelligent testing method for urban rail products based on an AI large model. The urban rail products include multiple subsystems. The testing method specifically includes the following steps:
[0010] Step S1, input the requirements, test information, and implementation scenario information of the urban rail products into the urban rail model respectively to construct an urban rail product requirements-use case model and an urban rail product scenario-script model;
[0011] Step S2, input the requirement information and send it to the urban rail product requirements-use case model for testability judgment. If it is testable, execute Step S3; otherwise, generate a verification report and execute Step S6;
[0012] Step S3, generate test cases and a use case verification report form, and send the test cases to the urban rail product scenario-script model;
[0013] Step S4, the urban rail product scenario-script model designs a test script sequence and generates a sequence file for the test platform or test management software;
[0014] Step S5, the test platform or test management software executes automated testing and generates a test report;
[0015] Step S6, merge and analyze the test report and the verification report to form a test analysis record.
[0016] As a preferred technical solution, the multiple subsystems include a train control system, a train automatic monitoring system, and a computer interlocking subsystem; the requirements and test information include the functional requirements of the subsystems, technical specifications, existing test designs, and existing test steps; the implementation scenario information includes the product test script library of the subsystems, rail transit operation scenario files, typical case libraries, signal system operation scenario descriptions, and train operation rules.
[0017] As a preferred technical solution, Step S2 specifically includes the following steps:
[0018] Step S201, input the requirement information into the urban rail product requirements-use case model;
[0019] Step S202, perform semantic matching between the requirement information and the existing testable requirements. If they are consistent, it is judged as a testable requirement; otherwise, execute Step S203;
[0020] Step S203, perform semantic matching between the requirement information and the existing untestable requirements. If they are consistent, it is judged as an untestable requirement; otherwise, execute Step S204;
[0021] Step S204, extract the variable information in the requirement information and perform semantic matching with the variable information of the existing requirements. If they are consistent, it is judged as a testable requirement; otherwise, it is assisted by the tester for judgment.
[0022] As a preferred technical solution, in step S204, the tester's auxiliary judgment specifically includes: the input prompt information interacts with the urban rail product requirement-use case model to obtain a feedback result. If it is judged as a testable requirement according to the feedback result, test cases and a use case verification report form are generated; if it is judged as a non-testable requirement, the urban rail product requirement-use case model will judge the requirement information as a non-testable requirement and convert it to other verification methods.
[0023] As a preferred technical solution, the prompt information includes questions about variable information, follow-up questions about variable information, test scenarios, and scripts.
[0024] As a preferred technical solution, step S3 specifically includes the following steps:
[0025] Step S301, generate test cases by combining existing test steps and test design methods;
[0026] Step S302, perform consistency check and integrity analysis on the traceability coverage relationship of the test cases through the urban rail product requirement-use case model, and generate a use case verification report form;
[0027] Step S303, send the test cases and the use case verification report form to the urban rail product scenario-script model through a function interface.
[0028] As a preferred technical solution, the test design methods include equivalent partitioning, boundary value, cause-and-effect graph, and truth table.
[0029] As a preferred technical solution, the test platform or test management software performs at least one test. Step S4 specifically includes the following steps:
[0030] Step S401, arrange at least one test in sequence according to the test cases;
[0031] Step S402, each test generates a corresponding FunctionAPI sequence, arranges the FunctionAPI sequences according to the test arrangement order, and generates a sequence file.
[0032] As a preferred technical solution, the test cases include test expected results. In step S5, the generation of the test report specifically includes the following steps:
[0033] Step S501, the test platform or test management software reads the test cases, and compares the log file and the packet capture file after the test is executed with the test expected results.
[0034] Step S502: Transmit the comparison result and the log file to the urban rail product scenario - script model. Using the Prompt engineering prompt words and combining with the pre - stored test report template information, guide the urban rail product requirements - use case model to output a test report.
[0035] As a preferred technical solution, the test report includes the product name, test environment version, software version, total number of scripts, number of executed scripts, test case number, execution result of each step of the test case, and the execution result of the entire test case.
[0036] Compared with the prior art, the present invention has the following beneficial effects:
[0037] 1) The present invention improves the test coverage and integrity. By means of the urban rail product requirements - use case model and the urban rail product scenario - script model, test cases are automatically generated; the testability judgment of requirement information is carried out through requirement comparison, variable comparison and the assistance of testers to gradually optimize the test coverage; combined with the application of test design methods such as equivalence class partitioning, boundary value analysis and cause - effect graph method, and combined with implementation scenario information such as operation scenario files and signal system operation scenario descriptions, an intelligent case library containing complete requirements and test information and an intelligent operation scenario library containing implementation scenario information are continuously optimized and established, improving the coverage intensity and utilization rate of test cases, and avoiding the phenomenon of incomplete test coverage caused by human factors such as understanding deviation and thinking rigidity, so as to more comprehensively and effectively discover potential defects and problems in the software.
[0038] 2) The urban rail product requirements - use case model and the urban rail product scenario - script model of the present invention can be extended to different stages such as integration testing and validation testing, while traditional automated testing methods are often only applicable to unit testing; when the model is combined with a test platform or test management software, the test efficiency is further improved, ensuring the software quality and accelerating the development cycle at the same time.
[0039] 3) The present invention improves the test execution efficiency. By means of the urban rail product requirements - use case model and the urban rail product scenario - script model, automated script writing, automatic execution of test cases, analysis of test results and report generation are carried out, reducing the cumbersome and repetitive document writing and test execution work, so that the attention of testers can be concentrated on truly high - value - added business work, improving the product quality.
[0040] 4) The present invention improves the quality of product verification activities. The model is introduced to verify the traceability and coverage relationship among requirements, designs and use cases, avoiding problems such as inconsistency between upper and lower levels and contradictions in requirements before and after, as well as simple syntax description errors in requirements, reducing the cumbersome work of verification personnel to find coverage evidence in various documents and forms such as requirements, designs and interfaces; greatly improving the quality of verification activities such as requirement verification, use case verification and parameter verification. Description of the Drawings
[0041] Figure 1 This is a flowchart of an intelligent test method for urban rail products based on an AI large model according to the present invention;
[0042] Figure 2 This is a flowchart for judging the testability of the urban rail requirement-use case model according to the present invention. Detailed Embodiments
[0043] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0044] As Figure 1 shown, the present invention provides an intelligent test method for urban rail products based on an AI large model, and the specific process is as follows:
[0045] S11. Construct an urban rail product requirement-use case model: First, collect and sort out requirements and test documents such as the functional requirements of each subsystem product of urban rail, subsystem technical specifications, existing test designs, and test cases, input the above files into the model to form a knowledge vector library, fine-tune and train the urban rail model. Through iterative training of a large amount of data, the model can better understand the professional knowledge of the functions of each urban rail product and the test field, so that the model has the ability to judge the testability of the urban rail functional requirements, obtain the urban rail product requirement-use case model, and deploy it in a Retrieval-Augmented Generation (RAG) manner. The urban rail product requirement-use case model is fine-tuned using the rail transit signal system SIG (Signal) including each subsystem such as the train control system, train automatic monitoring system, and computer interlocking, the vehicle specialty RS (RollingStock), the communication system COM (Communication), the platform screen door system PSD (Platform Screen Door), and software confirmation test professional corpus. The variable names defined for the function points in the requirements and test documents are the same as the variable names in the log reading software Omap and the packet capture recording software wireshark.
[0046] S12. Build the urban rail product scenario-script model. Collect and organize the product test script library, rail transit operation scenario files (OMPD, Operation Mode and Principle Definition), typical case libraries, and project implementation scenario information such as signal system operation scenario descriptions and train operation rules. Obtain the urban rail product scenario-script model through supervised fine-tuning of multi-tasks such as specific subway line project data and operation data, and deploy it using the Retrieval-Augmented Generation (RAG) method. This enables the model to combine use cases with urban rail train scenarios, and then continuously optimize the routes and script sequences of urban rail train scenarios, thus forming an intelligent model. The urban rail product scenario-script model is fine-tuned using rail transit signal system SIG (Signal), vehicle specialty RS (RollingStock), communication system COM (Communication), platform screen door system PSD (Platform Screen Door), and software confirmation test professional corpus.
[0047] S13. Requirement and GAP information processing: When a requirement information or GAP function (unmet requirement, which can refer to a lack of function, insufficient performance, or design defect) is detected, it is first sent to the urban rail product requirement-use case model. The model identifies the matching degree of this requirement with existing requirements through indexing and retrieval functions.
[0048] S14. Testability judgment: First, the urban rail product requirement-use case model conducts retrieval and judgment to determine whether the requirement is testable by comparing the variable names of existing requirements and use cases. If it is not testable, the requirement use case model marks it as non-testable and covers and ends the process through the Implementation Verification verification method. Otherwise, intelligent generation of test cases is performed.
[0049] S15. Intelligent generation of test cases and transfer of requirement information: If it is determined to be a testable requirement, combined with the steps of existing test cases and test design methods such as equivalence partitioning classes, boundary values, cause-and-effect diagrams, and truth tables, intelligent generation of test cases is carried out, and the consistency check and integrity analysis of the trace coverage relationship of the use cases are performed using this model to generate a use case verification report form; and the use cases are sent to the urban rail product scenario-script model through a function interface. The test cases include expected test results.
[0050] S16, Design and Generation of Test Scenarios and Script Sequences: The scenario-script model designs a test script sequence based on the intelligent test cases in S1 and relevant knowledge of test scenarios. Then it generates a file and provides it for the corresponding test platform to read. Taking the scenario of train main line service operation as an example, in this scenario, the wheel diameter calibration use case test, train positioning use case test, precise stop use case test, and the interlock test between the train door and platform screen door can be carried out at one time. According to the operation scenario file, the above 4 tests can be arranged in sequence in the route between stations A-D. These 4 test items respectively call the corresponding script API sequences to execute. The train conducts the wheel diameter calibration use case test in the A-B section, generating the corresponding FunctionAPI sequence as API1. It conducts the train positioning use case test in the B-C section, generating the corresponding script sequence as API2. The train stops at station C for the precise stop use case test, generating the corresponding sequence as API3. After completing the precise stop test, it conducts the interlock test between the train door and platform screen door, generating API4. The finally generated file is API1-API2-API3-API4 (one scenario corresponds to one sequence, and the API order cannot be reversed).
[0051] S17, Automated Test Execution: The test platform or test management software executes the test. Taking the NI TestStand test management software as an example, the NI TestStand test platform reads the sequence design file generated by the scenario-script model (taking API1-API2-API3-API4 as an example), and calls the API (Application Programming Interface) of the corresponding function module to execute the Sequence sequence script corresponding to the use case steps in turn for automated test execution.
[0052] S18, Test Report Generation: The test platform reads the test cases generated by the requirement-use case model, compares the executed Omap log file, Wireshark capture, and the test expected results of the test cases, and uses the Prompt engineering prompt words. Combining with the pre-stored test report template information, it guides the model to output the corresponding test report. The report may include information such as product name, test environment version, software version, total number of scripts, number of executed scripts, test case number, results of the steps corresponding to the test cases, and the results of the entire test case execution.
[0053] S19, Report Merging: The test report and the verification report of untestable requirements are merged and analyzed to form a complete record. Through the above process, the present invention realizes the intelligent test of urban rail transit signal system products, improves the test coverage and integrity, reduces labor costs, improves test efficiency and quality, and ensures the safety and stability of the urban rail transit signal system.
[0054] Such asFigure 2 As shown, it is the testability judgment of the urban rail demand-use case model. The specific process is as follows:
[0055] S21, input the requirement description or GAP description into the urban rail product requirement-use case model.
[0056] S22, the urban rail product requirement-use case model performs semantic matching of the input description with the existing testable requirements through retrieval.
[0057] S23, if they are consistent, it is judged as a testable requirement; if not, go to step S24.
[0058] S24, the urban rail product requirement-use case model performs semantic matching judgment with the existing untestable requirements. If they are consistent, it is an untestable requirement; if not, go to the next step S25 to judge the matching degree of the function parameter name of the Function parameter Name requirement.
[0059] S25, retrieve the variable information in this requirement. If the variable information has the same parameter name in both the test case and the Omap log software Base, it is judged as a testable requirement. If the variable name included in this requirement is not found in the model, a prompt is given for the tester to judge. The tester can interact with the requirement use case model by inputting prompt words, including but not limited to asking questions, following up, and providing more test scenarios and scripts, etc., and giving feedback results, which are entered into the urban rail product requirement-use case model. If it is judged as an untestable requirement, the model marks this description content as untestable, converts it to other verification methods for coverage, and ends the process; otherwise, the test case corresponding to this requirement will be automatically generated.
[0060] Urban Rail Transit Product Scenario - Based on the operation scenario OMPD file, the script model designs the train operation scenario Scenario1. The train departs from the depot and enters the operation with a small reverse turnback route. During the execution of Scenario1, test items such as TestCase1, TestCase2, and TestCase3 are sequentially executed. Every other test item corresponds to a Functional API module in the NI TestStandce test platform, such as the deadlock prevention function Dead_lock_API, the platform door opening and closing function PSD_Functional_API, the anti - side - impact function Flanking_Functional_API, the initialization function Init_API, etc. After calling the corresponding functional module API, according to the use case steps, the scripts Sequence to be executed are correspondingly arranged under the corresponding API, such as Start conditions.seq, Get number of trains.seq, Send HILC.seq, etc. Thus, a sequence file of Scenario - TestCase - API - Script is formed and provided to the test platform for reading.
[0061] The Observability_API for reading the NI TestStand call log selects check Omap filedvalue.seq. In the Parameter Name, the Omap field to be observed is obtained, such as the Omap.fields.Signal.X2916.Restrictive_signal_logical_status field. In the ExpectedValue field, such as FilesGlobals.Parameters.Common.SweepZone.ID, the corresponding value is automatically filled according to the test expected results in the test case, so as to analyze and compare the results and record the execution cycle. The recorded log and results are uploaded to the urban rail transit product scenario - script model, and then using the Prompt engineering prompt words, combined with the pre - stored test report template information, the model is guided to output the corresponding test report.
[0062] The above - mentioned is only the specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention can easily think of various equivalent modifications or substitutions, and these modifications or substitutions should be covered within the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims
1. An intelligent testing method for urban rail products based on AI large model, characterized in that: The urban rail product includes multiple subsystems, and the test method specifically includes the following steps: Step S1, inputting the requirements and test information of the urban rail product and the implementation scenario information into the urban rail model respectively, and constructing the urban rail product requirements-use case model and the urban rail product scenario-script model; Step S2, input the demand information and send it to the urban rail product demand-use case model for testability judgment. If it is testable, execute step S3; otherwise, generate a verification report and execute step S6; Step S3, generating a test case and a test case verification report form, and sending the test case to the urban rail product scenario-script model; Step S4, the urban rail product scenario-script model designs a test script sequence and generates a sequence file for the test platform or test management software; Step S5, the test platform or test management software performs automated testing and generates a test report; Step S6, combining and analyzing the test report and the verification report to form a test analysis record.
2. According to claim 1, an intelligent testing method for urban rail products based on an AI large model is characterized in that: The multiple subsystems include a train control system, an automatic train monitoring system and a computer interlocking subsystem; the requirements and test information include the functional requirements, technical specifications, existing test designs and existing test steps of the subsystems; the implementation scenario information includes the subsystem's product test script library, rail transit operation scenario files, typical case libraries, signal system operation scenario descriptions and train operation rules.
3. According to claim 1, an intelligent testing method for urban rail products based on an AI large model is characterized in that: The step S2 specifically includes the following steps: Step S201, inputting demand information into the urban rail product demand-use case model; Step S202, semantically matching the requirement information with the existing measurable requirements, if they are consistent, it is determined to be a measurable requirement, otherwise, step S203 is executed; Step S203, semantically matching the demand information with the existing unmeasurable demand, if they are consistent, it is determined to be an unmeasurable demand, otherwise, executing step S204; Step S204, extracting variable information from the requirement information and performing semantic matching with variable information of existing requirements. If they are consistent, it is determined to be a testable requirement. Otherwise, the tester assists in the judgment.
4. According to claim 3, an intelligent testing method for urban rail products based on an AI large model is characterized in that: In step S204, the tester assists in judging by: inputting prompt information to interact with the urban rail product requirement-use case model to obtain feedback results, and if the feedback results are judged to be testable requirements, generating test cases and use case verification report tables; If it is judged as an unmeasurable demand, the urban rail product demand-use case model will judge the demand information as an unmeasurable demand and switch to other methods for verification.
5. According to claim 4, an intelligent testing method for urban rail products based on an AI large model is characterized in that: The prompt information includes questions about variable information, follow-up questions about variable information, test scenarios and scripts.
6. According to claim 1, an intelligent testing method for urban rail products based on an AI large model is characterized in that: The step S3 specifically includes the following steps: Step S301, generating a test case by combining existing test steps and test design methods; Step S302, performing consistency check and integrity analysis on the tracking coverage relationship of the test cases through the urban rail product requirement-use case model, and generating a use case verification report table; Step S303: Send the test case and the test case verification report form to the urban rail product scenario-script model through the function interface.
7. The intelligent testing method for urban rail products based on AI large model according to claim 6 is characterized in that: The test design method includes equivalence partitioning classes, boundary values, cause-effect diagrams and truth tables.
8. According to claim 1, an intelligent testing method for urban rail products based on AI large model is characterized in that: The test platform or the test management software performs at least one test, and the step S4 specifically includes the following steps: Step S401, arranging at least one test in sequence according to the test case; Step S402: Generate a corresponding FunctionAPI sequence for each test, arrange the FunctionAPI sequence according to the test arrangement order, and generate a sequence file.
9. The intelligent testing method for urban rail products based on AI big model according to claim 1 is characterized in that: The test case includes the expected test result. In step S5, the test report generation specifically includes the following steps: Step S501, the test platform or test management software reads the test case and compares the log file and packet capture file after the test is executed with the expected test result; Step S502: The comparison result and log file are transmitted to the urban rail product scenario-script model, and the urban rail product requirement-use case model is guided to output the test report by using the Prompt engineering prompt word and combining the pre-stored test report template information.
10. The intelligent testing method for urban rail products based on AI large model according to claim 1 or 9, characterized in that: The test report includes the product name, test environment version, software version, total number of scripts, number of executed scripts, test case number, results of each step of the test case and the results of the entire test case execution.