Vehicle system test method, device, equipment, storage medium and program product
By constructing initial test cases and optimizing the test sequence, the problem of low efficiency in traditional train onboard system testing methods was solved, achieving efficient and reliable testing results.
Patent Information
- Application Number
- CN202610150703.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-02-03
- Publication Date
- 2026-06-23
AI Technical Summary
Traditional testing methods for train onboard systems rely on human experience, which is inefficient and prone to omissions, making it difficult to meet the testing requirements of modern intelligent and automated trains.
By constructing initial test cases based on train operation data and dependencies, initial test cases are generated using feature extraction networks and test case generation networks. Combined with path optimization algorithms and scoring mechanisms, the test sequence is optimized to improve test efficiency and reliability.
It achieves high efficiency and reliability in vehicle system testing, ensures the accuracy and rationality of test cases, and improves test coverage and resource utilization efficiency.
Smart Images

Figure CN122261983A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a method, apparatus, equipment, storage medium, and program product for testing vehicle-mounted systems. Background Technology
[0002] Optimization of test sequences for train onboard systems has become an important research area that has emerged in recent years with the rapid development of rail transit technology. As train intelligence and automation continue to increase, the complexity and functional diversity of onboard systems are also growing, leading to increasingly stringent requirements for system testing. Traditional testing methods often rely on human experience and manual operation, resulting in low testing efficiency and a high risk of omissions. Therefore, designing efficient and automated test sequence optimization methods has become a key research focus. Summary of the Invention
[0003] Therefore, it is necessary to provide a vehicle system testing method, apparatus, equipment, storage medium, and program product to address the aforementioned technical problems.
[0004] Firstly, this application provides a method for testing an in-vehicle system, including:
[0005] Based on the train operation data of the onboard system configured in the heavy-haul train, at least two initial test cases are constructed for testing the onboard system.
[0006] Based on the dependencies between the initial test cases, select at least two target test cases from each initial test case and determine the initial test order among the target test cases;
[0007] Based on the test case execution time required to execute each target test case, the initial test order is adjusted to obtain the target test order among the target test cases;
[0008] Based on the target test order among the target test cases, the target test cases are called sequentially to test the on-board system of the heavy-haul train.
[0009] In one embodiment, the step of constructing at least two initial test cases for testing the onboard system based on train operation data of the onboard system configured in the heavy-haul train includes:
[0010] The train operation data is input into a feature extraction network to obtain the influence features of the on-board system and the importance scores of each influence feature output by the feature extraction network.
[0011] Each influencing feature and its importance score are input into the test case generation network to obtain at least two initial test cases output by the test case generation network for testing the vehicle system; wherein each initial test case includes at least two test steps and an influencing feature corresponding to each test step.
[0012] In one embodiment, the step of selecting at least two target test cases from each initial test case based on the dependencies between the initial test cases, and determining the initial test order among the target test cases, includes:
[0013] Based on each initial test case and the dependencies between them, a connected graph is constructed; wherein the connected graph includes at least two nodes and connecting edges between the nodes, and the nodes represent initial test cases, and the connecting edges between two nodes represent the dependencies between the initial test cases represented by the two nodes.
[0014] Based on the path optimization algorithm, the connected graph is optimized to obtain the target path;
[0015] The initial test cases represented by each node on the target path are taken as the target test cases, and the order between each node on the target path is taken as the initial test order between the target test cases.
[0016] In one embodiment, adjusting the initial test order based on the test case execution time required to execute each target test case to obtain the target test order among the target test cases includes:
[0017] Based on the initial test sequence and the test case execution time required to execute each target test case, the initial evaluation index values for testing the vehicle system under the initial test sequence are determined; wherein, the initial evaluation index values include the total test duration and performance coverage.
[0018] The initial test order is adjusted in multiple rounds to obtain a candidate test order for each round; wherein, in each round, the order of two adjacent target test cases is adjusted.
[0019] Based on each candidate test order and the test case execution time required to execute each target test case, determine the candidate evaluation index values for testing the vehicle system under each candidate test order;
[0020] Based on the candidate evaluation index values and the initial evaluation index values, the target test order among the target test cases is determined.
[0021] In one embodiment, determining the target test order among the target test cases based on each candidate evaluation metric value and the initial evaluation metric value includes:
[0022] Based on the testing requirements and the values of each candidate evaluation index, the first test score for testing the vehicle system in each candidate test order is determined.
[0023] Based on the test requirements and the initial evaluation index values, a second test score is determined for testing the vehicle system under the initial test sequence.
[0024] The test order corresponding to the highest test score among the first test score and the second test score is taken as the target test order among the target test cases.
[0025] In one embodiment, the test requirements include a first priority of total test duration and a second priority of performance coverage;
[0026] The process of determining the first test score for testing the vehicle system according to the test requirements and the values of each candidate evaluation index, under each candidate test order, includes:
[0027] Based on the first importance and the second importance, determine the first weight of the total test duration and the second weight of the performance coverage;
[0028] For any candidate test evaluation index value, a first test score is determined for testing the vehicle system in the candidate test order corresponding to the candidate evaluation index value, based on the first weight, the second weight, and the candidate evaluation index value.
[0029] Secondly, this application also provides an on-board system testing apparatus, comprising:
[0030] The test case construction module is used to construct at least two initial test cases for testing the onboard system based on the train operation data of the onboard system configured in the heavy-haul train.
[0031] The first determining module is used to select at least two target test cases from each initial test case based on the dependencies between each initial test case, and to determine the initial test order between each target test case;
[0032] The second determining module is used to adjust the initial test order based on the test case execution time required to execute each target test case, so as to obtain the target test order among the target test cases;
[0033] The system testing module is used to sequentially call each target test case according to the target test order among the target test cases in order to test the on-board system of the heavy-haul train.
[0034] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:
[0035] Based on the train operation data of the onboard system configured in the heavy-haul train, at least two initial test cases are constructed for testing the onboard system.
[0036] Based on the dependencies between the initial test cases, select at least two target test cases from each initial test case and determine the initial test order among the target test cases;
[0037] Based on the test case execution time required to execute each target test case, the initial test order is adjusted to obtain the target test order among the target test cases;
[0038] Based on the target test order among the target test cases, the target test cases are called sequentially to test the on-board system of the heavy-haul train.
[0039] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the following steps:
[0040] Based on the train operation data of the onboard system configured in the heavy-haul train, at least two initial test cases are constructed for testing the onboard system.
[0041] Based on the dependencies between the initial test cases, select at least two target test cases from each initial test case and determine the initial test order among the target test cases;
[0042] Based on the test case execution time required to execute each target test case, the initial test order is adjusted to obtain the target test order among the target test cases;
[0043] Based on the target test order among the target test cases, the target test cases are called sequentially to test the on-board system of the heavy-haul train.
[0044] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, performs the following steps:
[0045] Based on the train operation data of the onboard system configured in the heavy-haul train, at least two initial test cases are constructed for testing the onboard system.
[0046] Based on the dependencies between the initial test cases, select at least two target test cases from each initial test case and determine the initial test order among the target test cases;
[0047] Based on the test case execution time required to execute each target test case, the initial test order is adjusted to obtain the target test order among the target test cases;
[0048] Based on the target test order among the target test cases, the target test cases are called sequentially to test the on-board system of the heavy-haul train.
[0049] The aforementioned onboard system testing methods, apparatus, equipment, storage media, and program products, based on train operation data of the onboard system configured in heavy-haul trains, ensure the accuracy and availability of at least two initial test cases constructed for testing the onboard system. Furthermore, based on the dependencies between the initial test cases, at least two target test cases are selected from each initial test case, and the initial test order between the target test cases is determined, ensuring the rationality and efficiency of the determined initial test order. Further, based on the test case execution time required to execute each target test case, the initial test order is adjusted to obtain the target test order between the target test cases. According to the target test order, each target test case is called sequentially to test the onboard system of the heavy-haul train, ensuring the efficiency and reliability of the onboard system testing. Attached Figure Description
[0050] To more clearly illustrate the technical solutions in the embodiments or related technologies of this application, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0051] Figure 1 This is a flowchart illustrating a vehicle system testing method in one embodiment;
[0052] Figure 2 This is a flowchart illustrating the process of building initial test cases in one embodiment;
[0053] Figure 3 This is a flowchart illustrating the process of determining the initial test order in one embodiment;
[0054] Figure 4This is a flowchart illustrating the process of determining the target test order in one embodiment;
[0055] Figure 5 Another embodiment is a flowchart illustrating the process of determining the target test order;
[0056] Figure 6 This is a flowchart illustrating the vehicle system testing method in another embodiment;
[0057] Figure 7 This is a structural block diagram of an on-board system test device in one embodiment;
[0058] Figure 8 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0059] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0060] The on-board system testing method provided in this application embodiment can be applied to testing the on-board systems of heavy-haul trains. The on-board system testing method provided in this application embodiment can be executed by a computer device, which can be a server or a terminal with powerful computing capabilities.
[0061] In one exemplary embodiment, such as Figure 1 As shown, a testing method for an in-vehicle system is provided. Taking the application of this method to a server as an example, the specific steps include:
[0062] S101, Based on the train operation data of the onboard system configured in the heavy-haul train, construct at least two initial test cases for testing the onboard system.
[0063] The onboard systems configured on heavy-haul trains are equipment and software systems installed on the trains to realize functions such as train control, monitoring, and communication, ensuring the safe and efficient operation of heavy-haul trains. Train operation data characterizes the operation of heavy-haul trains, including but not limited to sensor data, operation logs, and maintenance records. Test cases are specific test steps and expected results designed to verify the functionality, performance, safety, and reliability of onboard systems (such as vehicle infotainment systems, automatic driving systems, and onboard electronic devices).
[0064] Optionally, data collected from various sensors on the heavy-haul train can be gathered first from its onboard system. Additionally, operation logs and maintenance records can be collected from the onboard system's storage as train operation data. Further, the train operation data needs to be cleaned to remove missing and outlier values, and then standardized and normalized to obtain processed train operation data.
[0065] A mathematical model of the onboard system can be established, and train operation data can be input into the mathematical model of the onboard system to abstract the behavior and state of the onboard system and generate at least two initial test cases for testing the onboard system.
[0066] Furthermore, a predictive model can be constructed, and train operation data can be input into the model to process the data and extract key features such as system state, environmental conditions, and fault modes. These extracted key features are then abstracted into at least two initial test cases, and each initial test case is scored. Initial test cases with scores exceeding a preset threshold are selected. It should be noted that the predictive model can be obtained by training a random forest model using the original dataset.
[0067] S102, based on the dependencies between the initial test cases, select at least two target test cases from each initial test case, and determine the initial test order between the target test cases.
[0068] The dependencies between initial test cases refer to the order constraints, conditional dependencies, or data sharing relationships that exist when multiple initial test cases are executed. These relationships determine the order in which the initial test cases are executed. Improper handling of dependencies may lead to inaccurate test results, wasted resources, or test failures. The target test cases are the final test cases selected for testing the in-vehicle system. The initial test order among the target test cases is the order in which the target test cases are executed.
[0069] Optionally, based on the dependencies between the initial test cases and in conjunction with the system characteristics of the vehicle system, an optimization algorithm can be used to optimize each initial test case, select at least two target test cases from each initial test case, and determine the initial test order among the target test cases.
[0070] S103, adjust the initial test order according to the test case execution time required to execute each target test case, and obtain the target test order between each target test case.
[0071] Among them, the test case execution time is the time required to execute each target test case.
[0072] Optionally, based on the execution time required for each target test case, a formal method can be used to verify each target test case according to the initial test order to determine the correctness and effectiveness of each initial target test case. Furthermore, machine learning or artificial intelligence techniques can be used to analyze the verified target test cases, and based on the testing patterns and rules of the vehicle system, the initial test order can be adjusted to obtain the target test order among the target test cases, ensuring the efficiency and coverage of testing each target test case according to the target test order.
[0073] S104: Based on the target test order among the target test cases, call each target test case in sequence to test the on-board system of the heavy-haul train.
[0074] Optionally, the target test cases can be called sequentially according to the target test order and the calling rules of different target test cases to test the on-board system of the heavy-haul train.
[0075] For example, if the target test cases include onboard signal receiving module initialization test, train positioning function test, and braking control function test, and the target test order is 1, 2, 3, then further, the onboard signal receiving module initialization test, train positioning function test, and braking control function test are performed step by step.
[0076] In the aforementioned onboard system testing method, the accuracy and availability of at least two initial test cases for testing the onboard system are ensured by using train operation data of the onboard system configured in heavy-haul trains. Based on the dependencies between the initial test cases, at least two target test cases are selected from each initial test case, and the initial test order between the target test cases is determined, ensuring the rationality and efficiency of the determined initial test order. Furthermore, the initial test order is adjusted based on the execution time required to execute each target test case, resulting in a target test order between the target test cases. Based on this target test order, each target test case is called sequentially to test the onboard system of the heavy-haul train, ensuring the efficiency and reliability of the onboard system testing.
[0077] Optionally, in one embodiment, such as Figure 2 As shown, a method for constructing initial test cases is provided, which specifically includes the following steps:
[0078] S201, train operation data is input into the feature extraction network to obtain the influence features of the on-board system performance and the importance score of each influence feature output by the feature extraction network.
[0079] In this model, the feature extraction network and the use case generation network can be two separate networks within the random forest model. Feature extraction is used to extract important features. Influencing features include, but are not limited to, system state, environmental conditions, and failure modes; the importance score characterizes the significance of the influencing features. It should be noted that 1000 subsets can be randomly selected from the original dataset, and 5 features can be randomly selected at each node for splitting, recursively constructing 1000 decision trees to build the random forest model.
[0080] Optionally, train operation data can be input into a feature extraction network. Based on the trained model parameters, the feature extraction network extracts features from the train operation data and scores them, obtaining the extracted features that affect the performance of the on-board system and the importance scores of each feature.
[0081] S202, input each influencing feature and its importance score into the test case generation network to obtain at least two initial test cases output by the test case generation network for testing the vehicle system.
[0082] Each initial test case includes at least two test steps and the impact characteristics corresponding to each test step.
[0083] Optionally, each influencing feature and its importance score can be input into the test case generation network. The test case generation network will abstract each influencing feature based on its importance score, and obtain at least two initial test cases output by the test case generation network for testing the vehicle system.
[0084] In this embodiment, by introducing a feature extraction network and a test case generation network, the accuracy of the extracted features affecting the performance of the vehicle system and the importance scores of each feature are ensured, thereby ensuring the accuracy and usability of the determined at least two initial test cases.
[0085] Optionally, in an exemplary embodiment, such as Figure 3 As shown, a method for determining the initial test order among target test cases is provided, specifically including the following steps:
[0086] S301, construct a connectivity graph based on each initial test case and the dependencies between them.
[0087] The connected graph includes at least two nodes and the connecting edges between them. Each node represents an initial test case, and the connecting edge between two nodes represents the dependency relationship between the initial test cases represented by the two nodes.
[0088] Optionally, each initial test case can be represented as a node, and nodes corresponding to initial test cases with dependencies can be connected by edges to form a connected graph. Furthermore, each edge can include a weight, the specific weight value of which can be defined based on the influencing features contained in the initial test cases.
[0089] S302, based on the path optimization algorithm, performs path optimization on the connected graph to obtain the target path.
[0090] The target path is the optimal path in the connected graph.
[0091] Optionally, an optimization algorithm, such as the ant colony algorithm, can be used to optimize the path in the connected graph. For example, firstly, the pheromone concentration, number of ants, pheromone volatility coefficient, and heuristic factor are initialized for each path. Then, for each ant, the next node is selected based on the pheromone concentration and heuristic factor of the current node. The selection probability can be calculated using the following formula (1):
[0092] (1)
[0093] in, It is a path arrive Pheromon concentration It is heuristic information (such as the reciprocal of the path length). and These are parameters representing the importance of pheromones and heuristic information, respectively. This represents the set of unvisited nodes.
[0094] Furthermore, the pheromone levels are updated. Each time an ant moves, it adds pheromone along its path, which then evaporates over time. After all ants have completed a full path selection, the pheromone concentration is updated based on the path's quality. Generally, shorter paths result in higher pheromone concentrations. A maximum number of iterations is set, and the algorithm stops when this maximum is reached. The algorithm also stops when the pheromone distribution stabilizes or the optimal path no longer changes. The optimal target path is then output.
[0095] S303, take the initial test cases represented by each node on the target path as the target test cases, and take the order between each node on the target path as the initial test order between each target test case.
[0096] Optionally, the initial test cases represented by each node on the target path can be used as target test cases, and the order of the nodes on the target path can be used as the initial test order among the target test cases. For example, if the target path is T1→T5→T2→T4→T3, then the initial test cases represented by nodes T1, T2, T3, T4, and T5 can be used as target test cases, and the initial test order among the target test cases is 1, 3, 5, 4, 2.
[0097] In this embodiment, by introducing a connected graph, it is ensured that the constructed connected graph can fully reflect the dependencies between the initial test cases; furthermore, by optimizing the connected graph, the accuracy and usability of the determined target path are ensured, thereby ensuring the accuracy of the determined target test cases and the initial test order.
[0098] Optionally, in one embodiment, such as Figure 4 As shown, a method for determining the target test order among various target test cases is provided, specifically including the following steps:
[0099] S401, Based on the initial test sequence and the test case execution time required to execute each target test case, determine the initial evaluation index values for testing the vehicle system under the initial test sequence.
[0100] The initial evaluation metrics include total test duration and performance coverage. Total test duration is the total time consumed from the start of the first target test case to the end of the last target test case; performance coverage is the range of vehicle system performance that the testing process can cover.
[0101] Optionally, based on the initial test order, determine whether there are parallel target test cases. Further, based on the initial test order and the test case execution time required to execute each target test case, calculate the initial evaluation index value for testing the vehicle system under the initial test order.
[0102] S402, the initial test order is adjusted in multiple rounds to obtain the candidate test order for each round.
[0103] In each round, the order of two adjacent target test cases is adjusted.
[0104] S403, based on each candidate test order and the test case execution time required to execute each target test case, determine the candidate evaluation index values for testing the vehicle system under each candidate test order.
[0105] S404. Based on the candidate evaluation index values and the initial evaluation index values, determine the target test order among the target test cases.
[0106] Optionally, the initial test order can be adjusted in multiple rounds to obtain candidate test orders for each round. For example, if the target test cases under the initial test order are represented as [T1, T2, T3, T4], the total test time for testing the vehicle system under the initial test order is calculated to be 100 minutes, with a performance coverage of 85%. New candidate test orders are generated by swapping the positions of adjacent target test cases, such as [T2, T1, T3, T4], [T1, T3, T2, T4], etc., and the total test time and performance coverage for testing the vehicle system under each candidate test order are calculated. The candidate test order with the shortest time is selected from the candidate test orders. Assuming that [T2, T1, T3, T4] has a total test time of 95 minutes and a performance coverage of 87%, [T2, T1, T3, T4] is selected as the target test order.
[0107] In this embodiment, by continuously adjusting the initial test order, it is equivalent to making a partial adjustment to the initial test order of the target test cases. Based on each candidate test order and the test case execution time required to execute each target test case, candidate evaluation index values for testing the vehicle system under each candidate test order are determined. Furthermore, the optimal test order is selected based on the candidate evaluation index values and the initial evaluation index values, thus ensuring the optimization of the determined target test order.
[0108] Optionally, in one embodiment, such as Figure 5 As shown, a method for determining the target test order among various target test cases is provided, specifically including the following steps:
[0109] S501, based on the test requirements and the values of each candidate evaluation index, determines the first test score for testing the vehicle system in each candidate test order.
[0110] The first test score for each candidate test sequence represents the efficiency and coverage of testing the in-vehicle system using that sequence. Test requirements characterize the degree of bias in evaluating the in-vehicle system's test metrics. For example, test requirements may include a primary importance of total test time and a secondary importance of performance coverage. A higher primary importance indicates a greater bias towards minimizing total test time, while a higher secondary importance indicates a greater bias towards achieving higher performance coverage.
[0111] Optionally, a first weight for the total test duration and a second weight for the performance coverage can be determined based on the first and second importance levels. For any candidate test evaluation index value, a first test score is determined based on the first weight, the second weight, and the candidate evaluation index value, under the candidate test order corresponding to the candidate evaluation index value. For example, the first test score is obtained by calculating a weighted sum based on the first weight, the second weight, and the candidate evaluation index value.
[0112] S502, based on the test requirements and initial evaluation index values, determines the second test score for testing the vehicle system in the initial test sequence.
[0113] The second test score characterizes the efficiency of testing the vehicle system using the initial test sequence and the coverage of the test results.
[0114] Optionally, the first weight of the total test duration and the second weight of the performance coverage can be determined based on the first and second importance; and the second test score for testing the vehicle system in the initial test order corresponding to the initial evaluation index value can be determined based on the first weight, the second weight and the initial evaluation index value.
[0115] S503, the test order corresponding to the highest test score among the first test score and the second test score is taken as the target test order among the target test cases.
[0116] Optionally, the test order corresponding to the highest test score among the first test score and the second test score can be used as the target test order among the target test cases.
[0117] In this embodiment, by introducing a first test score and a second test score, the candidate test order and the initial test order are scored, ensuring the accuracy and efficiency of the determined target test order.
[0118] Figure 6 This is a flowchart illustrating a vehicle system testing method in another embodiment. Based on the above embodiments, this embodiment provides an optional example of a vehicle system testing method. (Combined with...) Figure 6 The specific implementation process is as follows:
[0119] S601, train operation data is input into the feature extraction network to obtain the influence features of the on-board system performance and the importance score of each influence feature output by the feature extraction network.
[0120] S602, input each influencing feature and its importance score into the test case generation network to obtain at least two initial test cases output by the test case generation network for testing the vehicle system.
[0121] Each initial test case includes at least two test steps and the impact characteristics corresponding to each test step.
[0122] S603: Construct a connectivity graph based on each initial test case and the dependencies between them.
[0123] The connected graph includes at least two nodes and the connecting edges between them. Each node represents an initial test case, and the connecting edge between two nodes represents the dependency relationship between the initial test cases represented by the two nodes.
[0124] S604, based on the path optimization algorithm, performs path optimization on the connected graph to obtain the target path.
[0125] S605, take the initial test cases represented by each node on the target path as the target test cases, and take the order between each node on the target path as the initial test order between each target test case.
[0126] S606. Based on the initial test sequence and the test case execution time required to execute each target test case, determine the initial evaluation index values for testing the vehicle system under the initial test sequence.
[0127] The initial evaluation metrics include total test duration and performance coverage.
[0128] S607 adjusts the initial test order multiple times to obtain the candidate test order for each round.
[0129] In each round, the order of two adjacent target test cases is adjusted.
[0130] S608, based on each candidate test order and the test case execution time required to execute each target test case, determine the candidate evaluation index value for testing the vehicle system under each candidate test order.
[0131] S609, determine the target test order among the target test cases based on the candidate evaluation index values and the initial evaluation index values.
[0132] Optionally, based on the test requirements and the values of each candidate evaluation index, a first test score is determined for testing the vehicle system under each candidate test order; based on the test requirements and the initial evaluation index values, a second test score is determined for testing the vehicle system under the initial test order; and the test order corresponding to the highest test score among the first and second test scores is taken as the target test order among the target test cases.
[0133] S610 calls each target test case sequentially according to the target test order among the target test cases to test the on-board system of the heavy-haul train.
[0134] The specific processes of S601-S610 described above can be found in the description of the above method embodiments. Their implementation principles and technical effects are similar, and will not be repeated here.
[0135] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0136] Based on the same inventive concept, this application also provides an on-board system testing apparatus for implementing the on-board system testing method described above. The solution provided by this apparatus is similar to the implementation described in the above method; therefore, the specific limitations in one or more on-board system testing apparatus embodiments provided below can be found in the limitations of the on-board system testing method described above, and will not be repeated here.
[0137] In one exemplary embodiment, such as Figure 7 As shown, an in-vehicle system testing device 700 is provided, including: a test case construction module 710, a first determination module 720, a second determination module 730, and a system testing module 740, wherein:
[0138] The test case construction module 710 is used to construct at least two initial test cases for testing the onboard system based on the train operation data of the onboard system configured in the heavy-haul train.
[0139] The first determining module 720 is used to select at least two target test cases from each initial test case based on the dependencies between each initial test case, and to determine the initial test order between each target test case.
[0140] The second determining module 730 is used to adjust the initial test order based on the test case execution time required to execute each target test case, so as to obtain the target test order among the target test cases.
[0141] The system test module 740 is used to sequentially call each target test case according to the target test order between them in order to test the on-board system of the heavy-haul train.
[0142] The aforementioned onboard system testing device, based on train operation data of the onboard system configured in heavy-haul trains, ensures the accuracy and availability of at least two initial test cases constructed for testing the onboard system. It also selects at least two target test cases from each initial test case based on the dependencies between them, and determines the initial test order among the target test cases, ensuring the rationality and efficiency of the determined initial test order. Furthermore, based on the execution time required to execute each target test case, the initial test order is adjusted to obtain the target test order among the target test cases. According to the target test order, each target test case is called sequentially to test the onboard system of the heavy-haul train, ensuring the efficiency and reliability of the onboard system testing.
[0143] In one embodiment, the use case construction module 710 is specifically used for:
[0144] Train operation data is input into a feature extraction network to obtain the influence features that affect the performance of the on-board system and the importance score of each influence feature. Each influence feature and its importance score are then input into a test case generation network to obtain at least two initial test cases for testing the on-board system. Each initial test case includes at least two test steps and the influence feature corresponding to each test step.
[0145] In one embodiment, the first determining module 720 is specifically used for:
[0146] Based on each initial test case and the dependencies between them, a connected graph is constructed. The connected graph includes at least two nodes and connecting edges between them. Each node represents an initial test case, and the connecting edge between two nodes represents the dependency between the initial test cases represented by those two nodes. A path optimization algorithm is used to optimize the connected graph to obtain the target path. The initial test cases represented by each node on the target path are taken as the target test cases, and the order of the nodes on the target path is taken as the initial test order among the target test cases.
[0147] In one embodiment, the second determining module 730 includes:
[0148] The first determining unit is used to determine the initial evaluation index values for testing the vehicle system under the initial test order, based on the initial test order and the test case execution time required to execute each target test case; wherein, the initial evaluation index values include the total test duration and performance coverage.
[0149] The second determining unit is used to adjust the initial test order in multiple rounds to obtain the candidate test order for each round; wherein, in each round, the order of two adjacent target test cases is adjusted.
[0150] The third determining unit is used to determine the candidate evaluation index values for testing the vehicle system under each candidate test order, based on each candidate test order and the test case execution time required to execute each target test case.
[0151] The fourth determining unit is used to determine the target test order among the target test cases based on the candidate evaluation index values and the initial evaluation index values.
[0152] In one embodiment, the fourth determining unit includes:
[0153] The first determining subunit is used to determine the first test score for testing the vehicle system in each candidate test order, based on the test requirements and the values of each candidate evaluation index.
[0154] The second determining subunit is used to determine the second test score for testing the vehicle system in the initial test sequence based on the test requirements and the initial evaluation index values.
[0155] The third determining subunit is used to determine the test order corresponding to the largest test score among the first test scores and the second test scores, as the target test order among the target test cases.
[0156] In one embodiment, test requirements include a first priority of total test duration and a second priority of performance coverage; the first determining subunit is specifically used for:
[0157] Based on the first and second importance, the first weight of the total test duration and the second weight of the performance coverage are determined; for any candidate test evaluation index value, the first test score for testing the vehicle system in the candidate test order corresponding to the candidate evaluation index value is determined according to the first weight, the second weight and the candidate evaluation index value.
[0158] Each module in the aforementioned vehicle-mounted system testing device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the corresponding operations of each module.
[0159] In one exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 8 As shown, the computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and databases. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it implements a vehicle-mounted system testing method.
[0160] Those skilled in the art will understand that Figure 8 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0161] In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:
[0162] Based on the train operation data of the onboard system configured on the heavy-haul train, construct at least two initial test cases for testing the onboard system.
[0163] Based on the dependencies between the initial test cases, select at least two target test cases from each initial test case and determine the initial test order among the target test cases;
[0164] Based on the test case execution time required to execute each target test case, the initial test order is adjusted to obtain the target test order among the target test cases;
[0165] Based on the target test order among the target test cases, the target test cases are called sequentially to test the on-board system of the heavy-haul train.
[0166] In one embodiment, when the processor executes a computer program to construct at least two initial test cases for testing the onboard system based on train operation data of the onboard system configured in the heavy-haul train, it also performs the following steps:
[0167] Train operation data is input into a feature extraction network to obtain the influence features that affect the performance of the on-board system and the importance score of each influence feature. Each influence feature and its importance score are then input into a test case generation network to obtain at least two initial test cases for testing the on-board system. Each initial test case includes at least two test steps and the influence feature corresponding to each test step.
[0168] In one embodiment, when the processor executes a computer program to select at least two target test cases from each initial test case based on the dependencies between the initial test cases, and determines the initial test order among the target test cases, it also performs the following steps:
[0169] Based on each initial test case and the dependencies between them, a connected graph is constructed. The connected graph includes at least two nodes and connecting edges between them. Each node represents an initial test case, and the connecting edge between two nodes represents the dependency between the initial test cases represented by those two nodes. A path optimization algorithm is used to optimize the connected graph to obtain the target path. The initial test cases represented by each node on the target path are taken as the target test cases, and the order of the nodes on the target path is taken as the initial test order among the target test cases.
[0170] In one embodiment, when the processor executes a computer program to adjust the initial test order based on the test case execution time required to execute each target test case, and obtains the target test order among the target test cases, the following steps are also implemented:
[0171] Based on the initial test order and the execution time required to execute each target test case, initial evaluation metrics for testing the vehicle system under the initial test order are determined. These initial evaluation metrics include total test duration and performance coverage. The initial test order is adjusted multiple times to obtain candidate test orders for each round. Within each round, the order of two adjacent target test cases is adjusted. Based on each candidate test order and the execution time required to execute each target test case, candidate evaluation metrics for testing the vehicle system under each candidate test order are determined. Finally, based on each candidate evaluation metric and the initial evaluation metric, the target test order among the target test cases is determined.
[0172] In one embodiment, when the processor executes a computer program to determine the target test order among target test cases based on each candidate evaluation metric value and the initial evaluation metric value, it also performs the following steps:
[0173] Based on the test requirements and the values of each candidate evaluation index, a first test score is determined for testing the vehicle system under each candidate test order; based on the test requirements and the initial evaluation index values, a second test score is determined for testing the vehicle system under the initial test order; the test order corresponding to the highest test score among the first and second test scores is taken as the target test order among the target test cases.
[0174] In one embodiment, the test requirements include a first priority of total test duration and a second priority of performance coverage; when the processor executes the computer program to determine the first test score for testing the vehicle system in each candidate test order based on the test requirements and the values of each candidate evaluation metric, the following steps are also performed:
[0175] Based on the first and second importance, the first weight of the total test duration and the second weight of the performance coverage are determined; for any candidate test evaluation index value, the first test score for testing the vehicle system in the candidate test order corresponding to the candidate evaluation index value is determined according to the first weight, the second weight and the candidate evaluation index value.
[0176] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor:
[0177] Based on the train operation data of the onboard system configured on the heavy-haul train, construct at least two initial test cases for testing the onboard system.
[0178] Based on the dependencies between the initial test cases, select at least two target test cases from each initial test case and determine the initial test order among the target test cases;
[0179] Based on the test case execution time required to execute each target test case, the initial test order is adjusted to obtain the target test order among the target test cases;
[0180] Based on the target test order among the target test cases, the target test cases are called sequentially to test the on-board system of the heavy-haul train.
[0181] In one embodiment, when the processor executes a computer program to construct at least two initial test cases for testing the onboard system based on train operation data of the onboard system configured in the heavy-haul train, it also performs the following steps:
[0182] Train operation data is input into a feature extraction network to obtain the influence features that affect the performance of the on-board system and the importance score of each influence feature. Each influence feature and its importance score are then input into a test case generation network to obtain at least two initial test cases for testing the on-board system. Each initial test case includes at least two test steps and the influence feature corresponding to each test step.
[0183] In one embodiment, when the processor executes a computer program to select at least two target test cases from each initial test case based on the dependencies between the initial test cases, and determines the initial test order among the target test cases, it also performs the following steps:
[0184] Based on each initial test case and the dependencies between them, a connected graph is constructed. The connected graph includes at least two nodes and connecting edges between them. Each node represents an initial test case, and the connecting edge between two nodes represents the dependency between the initial test cases represented by those two nodes. A path optimization algorithm is used to optimize the connected graph to obtain the target path. The initial test cases represented by each node on the target path are taken as the target test cases, and the order of the nodes on the target path is taken as the initial test order among the target test cases.
[0185] In one embodiment, when the processor executes a computer program to adjust the initial test order based on the test case execution time required to execute each target test case, and obtains the target test order among the target test cases, the following steps are also implemented:
[0186] Based on the initial test order and the execution time required to execute each target test case, initial evaluation metrics for testing the vehicle system under the initial test order are determined. These initial evaluation metrics include total test duration and performance coverage. The initial test order is adjusted multiple times to obtain candidate test orders for each round. Within each round, the order of two adjacent target test cases is adjusted. Based on each candidate test order and the execution time required to execute each target test case, candidate evaluation metrics for testing the vehicle system under each candidate test order are determined. Finally, based on each candidate evaluation metric and the initial evaluation metric, the target test order among the target test cases is determined.
[0187] In one embodiment, when the processor executes a computer program to determine the target test order among target test cases based on each candidate evaluation metric value and the initial evaluation metric value, it also performs the following steps:
[0188] Based on the test requirements and the values of each candidate evaluation index, a first test score is determined for testing the vehicle system under each candidate test order; based on the test requirements and the initial evaluation index values, a second test score is determined for testing the vehicle system under the initial test order; the test order corresponding to the highest test score among the first and second test scores is taken as the target test order among the target test cases.
[0189] In one embodiment, the test requirements include a first priority of total test duration and a second priority of performance coverage; when the processor executes the computer program to determine the first test score for testing the vehicle system in each candidate test order based on the test requirements and the values of each candidate evaluation metric, the following steps are also performed:
[0190] Based on the first and second importance, the first weight of the total test duration and the second weight of the performance coverage are determined; for any candidate test evaluation index value, the first test score for testing the vehicle system in the candidate test order corresponding to the candidate evaluation index value is determined according to the first weight, the second weight and the candidate evaluation index value.
[0191] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, performs the following steps:
[0192] Based on the train operation data of the onboard system configured on the heavy-haul train, construct at least two initial test cases for testing the onboard system.
[0193] Based on the dependencies between the initial test cases, select at least two target test cases from each initial test case and determine the initial test order among the target test cases;
[0194] Based on the test case execution time required to execute each target test case, the initial test order is adjusted to obtain the target test order among the target test cases;
[0195] Based on the target test order among the target test cases, the target test cases are called sequentially to test the on-board system of the heavy-haul train.
[0196] In one embodiment, when the processor executes a computer program to construct at least two initial test cases for testing the onboard system based on train operation data of the onboard system configured in the heavy-haul train, it also performs the following steps:
[0197] Train operation data is input into a feature extraction network to obtain the influence features that affect the performance of the on-board system and the importance score of each influence feature. Each influence feature and its importance score are then input into a test case generation network to obtain at least two initial test cases for testing the on-board system. Each initial test case includes at least two test steps and the influence feature corresponding to each test step.
[0198] In one embodiment, when the processor executes a computer program to select at least two target test cases from each initial test case based on the dependencies between the initial test cases, and determines the initial test order among the target test cases, it also performs the following steps:
[0199] Based on each initial test case and the dependencies between them, a connected graph is constructed. The connected graph includes at least two nodes and connecting edges between them. Each node represents an initial test case, and the connecting edge between two nodes represents the dependency between the initial test cases represented by those two nodes. A path optimization algorithm is used to optimize the connected graph to obtain the target path. The initial test cases represented by each node on the target path are taken as the target test cases, and the order of the nodes on the target path is taken as the initial test order among the target test cases.
[0200] In one embodiment, when the processor executes a computer program to adjust the initial test order based on the test case execution time required to execute each target test case, and obtains the target test order among the target test cases, the following steps are also implemented:
[0201] Based on the initial test order and the execution time required to execute each target test case, initial evaluation metrics for testing the vehicle system under the initial test order are determined. These initial evaluation metrics include total test duration and performance coverage. The initial test order is adjusted multiple times to obtain candidate test orders for each round. Within each round, the order of two adjacent target test cases is adjusted. Based on each candidate test order and the execution time required to execute each target test case, candidate evaluation metrics for testing the vehicle system under each candidate test order are determined. Finally, based on each candidate evaluation metric and the initial evaluation metric, the target test order among the target test cases is determined.
[0202] In one embodiment, when the processor executes a computer program to determine the target test order among target test cases based on each candidate evaluation metric value and the initial evaluation metric value, it also performs the following steps:
[0203] Based on the test requirements and the values of each candidate evaluation index, a first test score is determined for testing the vehicle system under each candidate test order; based on the test requirements and the initial evaluation index values, a second test score is determined for testing the vehicle system under the initial test order; the test order corresponding to the highest test score among the first and second test scores is taken as the target test order among the target test cases.
[0204] In one embodiment, the test requirements include a first priority of total test duration and a second priority of performance coverage; when the processor executes the computer program to determine the first test score for testing the vehicle system in each candidate test order based on the test requirements and the values of each candidate evaluation metric, the following steps are also performed:
[0205] Based on the first and second importance, the first weight of the total test duration and the second weight of the performance coverage are determined; for any candidate test evaluation index value, the first test score for testing the vehicle system in the candidate test order corresponding to the candidate evaluation index value is determined according to the first weight, the second weight and the candidate evaluation index value.
[0206] It should be noted that the data involved in this application (including but not limited to data used for analysis, data stored, data displayed, etc.) are all information and data that have been fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0207] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0208] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0209] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method for testing an in-vehicle system, characterized in that, The method includes: Based on the train operation data of the onboard system configured in the heavy-haul train, at least two initial test cases are constructed for testing the onboard system. Based on the dependencies between the initial test cases, select at least two target test cases from each initial test case and determine the initial test order among the target test cases; Based on the test case execution time required to execute each target test case, the initial test order is adjusted to obtain the target test order among the target test cases; Based on the target test order among the target test cases, the target test cases are called sequentially to test the on-board system of the heavy-haul train.
2. The method according to claim 1, characterized in that, The process involves constructing at least two initial test cases for testing the onboard system based on train operation data configured in the heavy-haul train, including: The train operation data is input into a feature extraction network to obtain the influence features of the on-board system and the importance scores of each influence feature output by the feature extraction network. Each influencing feature and its importance score are input into the test case generation network to obtain at least two initial test cases output by the test case generation network for testing the vehicle system; wherein each initial test case includes at least two test steps and an influencing feature corresponding to each test step.
3. The method according to claim 1, characterized in that, The step of selecting at least two target test cases from each initial test case based on the dependencies between them, and determining the initial test order among the target test cases, includes: Based on each initial test case and the dependencies between them, a connected graph is constructed; wherein the connected graph includes at least two nodes and connecting edges between the nodes, and the nodes represent initial test cases, and the connecting edges between two nodes represent the dependencies between the initial test cases represented by the two nodes. Based on the path optimization algorithm, the connected graph is optimized to obtain the target path; The initial test cases represented by each node on the target path are taken as the target test cases, and the order between each node on the target path is taken as the initial test order between the target test cases.
4. The method according to claim 1, characterized in that, The step of adjusting the initial test order based on the test case execution time required to execute each target test case to obtain the target test order among the target test cases includes: Based on the initial test sequence and the test case execution time required to execute each target test case, the initial evaluation index values for testing the vehicle system under the initial test sequence are determined; wherein, the initial evaluation index values include the total test duration and performance coverage. The initial test order is adjusted in multiple rounds to obtain a candidate test order for each round; wherein, in each round, the order of two adjacent target test cases is adjusted. Based on each candidate test order and the test case execution time required to execute each target test case, determine the candidate evaluation index values for testing the vehicle system under each candidate test order; Based on the candidate evaluation index values and the initial evaluation index values, the target test order among the target test cases is determined.
5. The method according to claim 4, characterized in that, The step of determining the target test order among the target test cases based on the candidate evaluation index values and the initial evaluation index values includes: Based on the testing requirements and the values of each candidate evaluation index, the first test score for testing the vehicle system in each candidate test order is determined. Based on the test requirements and the initial evaluation index values, a second test score is determined for testing the vehicle system under the initial test sequence. The test order corresponding to the highest test score among the first test score and the second test score is taken as the target test order among the target test cases.
6. The method according to claim 5, characterized in that, The testing requirements are prioritized by total testing duration and by performance coverage. The process of determining the first test score for testing the vehicle system according to the test requirements and the values of each candidate evaluation index, under each candidate test order, includes: Based on the first importance and the second importance, a first weight for the total test duration and a second weight for the performance coverage are determined; For any candidate test evaluation index value, a first test score is determined for testing the vehicle system in the candidate test order corresponding to the candidate evaluation index value, based on the first weight, the second weight, and the candidate evaluation index value.
7. A vehicle-mounted system testing device, characterized in that, The device includes: The test case construction module is used to construct at least two initial test cases for testing the onboard system based on the train operation data of the onboard system configured in the heavy-haul train. The first determining module is used to select at least two target test cases from each initial test case based on the dependencies between each initial test case, and to determine the initial test order between each target test case; The second determining module is used to adjust the initial test order based on the test case execution time required to execute each target test case, so as to obtain the target test order among the target test cases; The system testing module is used to sequentially call each target test case according to the target test order among the target test cases in order to test the on-board system of the heavy-haul train.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.
