Scene-based vehicle adaptive test method, system and device and storage medium

By acquiring vehicle motion data and environmental parameters and using prediction models and knowledge graphs to automatically generate the test case execution sequence, the problems of execution conflicts and low coverage of traditional vehicle testing methods in complex driving scenarios are solved, achieving more efficient and accurate testing.

CN120803909APending Publication Date: 2025-10-17JINAN AUTOMOBILE CHECKING & MEASURING CENT +1
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510754062.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-06
Publication Date
2025-10-17

AI Technical Summary

Technical Problem

Traditional vehicle testing methods are unable to dynamically adapt to complex and changing driving scenarios, resulting in test case execution conflicts and low coverage.

Method used

By obtaining vehicle motion data and environmental parameters, the prediction model is used to identify the current event and generate the predicted event for the next time step. The test case set is queried from the knowledge graph, and the execution order of the test cases is automatically generated considering the execution constraints.

Benefits of technology

It improves test coverage and authenticity, reduces test conflicts, ensures the accuracy and repeatability of test results, and is suitable for complex and changeable actual driving scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120803909A_ABST
    Figure CN120803909A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of vehicle testing, and particularly provides a scene-based vehicle adaptive testing method, system and device and a storage medium, and the method comprises the steps: obtaining a motion data sequence and an environment parameter sequence of a vehicle; identifying an actual event at the current moment according to the motion data sequence and the environment parameter sequence, and generating a prediction event of the next time step; querying a test case set from a pre-constructed knowledge graph according to the actual event and the prediction event; and considering an execution constraint relationship among the test cases, generating an execution sequence of the test cases for the test case set, and sequentially executing the corresponding test cases based on the execution sequence. The current scene is automatically identified and the next event is predicted by analyzing the vehicle motion data and the environmental parameters in real time, so that the limitation of a traditional fixed test case is avoided, and the test coverage rate and authenticity are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the technical field of vehicle testing, and particularly relates to a scene-based vehicle adaptive testing method, system, device and storage medium. BACKGROUND

[0002] At present, the traditional vehicle testing method mainly relies on preset test cases of fixed scenes, such as executing standardized test procedures (such as ABS testing, ESP testing, etc.) under specific road conditions or environments. This kind of method usually needs to manually set the test order, and the dependency relationship (such as conflict or priority) between test cases needs to be manually managed. However, this static testing mode has obvious defects: on the one hand, it cannot dynamically adapt to the complex and changeable scenes in real driving (such as sudden emergency braking or road wetness switching); on the other hand, the hard combination of test cases may cause execution conflicts (such as ABS and TCS tests running at the same time), affecting the test effectiveness. SUMMARY

[0003] In view of the above shortcomings of the prior art, the present application provides a scene-based vehicle adaptive testing method, system, device and storage medium to solve the above technical problems.

[0004] In a first aspect, the present application provides a scene-based vehicle adaptive testing method, comprising: obtaining a motion data sequence and an environmental parameter sequence of a vehicle, the motion data sequence comprising motion state data of the vehicle at different time points, and the environmental parameter sequence comprising environmental parameters of the scene where the vehicle is located at different time points; identifying an actual event at the current time according to the motion data sequence and the environmental parameter sequence; generating a predicted event at the next time step using a prediction model according to the motion data sequence and the environmental parameter sequence; querying a test case set from a pre-constructed knowledge graph according to the actual event and the predicted event; considering the execution constraint relationship between test cases, generating an execution order of test cases for the test case set, and executing the corresponding test cases in sequence based on the execution order.

[0005] In an optional embodiment, identifying an actual event at the current time according to the motion data sequence and the environmental parameter sequence comprises: aligning the motion state data with the environmental parameters timestamp, and constructing a multi-dimensional time series data matrix; clustering the multi-dimensional time series data matrix using a Gaussian mixture model to obtain a hidden state label at each time step; identifying the actual event according to the hidden state label at each time step using a hidden Markov model.

[0006] In an optional implementation, the prediction model adopts a spatio-temporal graph neural network model.

[0007] In an optional implementation, generating a predicted event of a next time step according to the sequence of motion data and the sequence of environment parameters by using the prediction model comprises: constructing a spatio-temporal graph according to the sequence of motion data and the sequence of environment parameters; predicting motion state data and environment parameters of the next time step according to the spatio-temporal graph by using a spatio-temporal graph neural network model; generating the predicted event according to the motion state data and the environment parameters of the next time step by using a gated spatio-temporal convolution.

[0008] In an optional implementation, constructing a spatio-temporal graph according to the sequence of motion data and the sequence of environment parameters comprises: defining internal nodes and external nodes according to a spatial dimension of data; defining physical relationships between the internal nodes by using a vehicle dynamics equation, and discovering data-driven correlation relationships between the internal nodes by using mutual information or Granger causality analysis; constructing an internal subgraph according to the physical relationships and the data-driven correlation relationships between the internal nodes; calculating coupling relationships and correlation coefficients between the external nodes, and constructing an external subgraph based on the coupling relationships and the correlation coefficients; establishing interactive edges between the internal subgraph and the external subgraph by using a pre-defined rule or dynamic weights, to obtain a spatial graph; constructing an autoregressive sliding window for each node in the spatial graph, and defining a temporal similarity edge by capturing non-aligned time series patterns through dynamic time warping; constructing a temporal adjacency matrix according to the temporal similarity edge; combining the spatial graph and the temporal adjacency matrix through Kronecker product, to obtain a spatio-temporal graph.

[0009] In an optional implementation, querying a test case set from a pre-constructed knowledge graph according to the actual event and the predicted event comprises: querying the test case set from the knowledge graph according to the actual event and the predicted event by using a dynamic matching algorithm; the knowledge graph comprises a forced association relationship between events and test cases, a recommended association relationship between events and test cases, a conflict relationship between events and test cases, a conflict relationship between test cases, and a dependency relationship between test cases.

[0010] In an optional implementation, execution constraint relationships among the test cases are considered, an execution order of the test cases is generated for the test case set, and corresponding test cases are executed in sequence based on the execution order, including: dependency constraint relationships, conflict constraint relationships and resource constraint relationships among the test cases are constructed; a target function is established:

[0011] wherein, , and are preconfigured weights, is a total time required from the start of execution of the first test case to the completion of the last test case, is a total power consumption for executing all the test cases, is a coverage degree of the test cases on a preset test target; a genetic algorithm is used to solve the target function based on the dependency constraint relationships, the conflict constraint relationships and the resource constraint relationships among the test cases, so as to obtain an execution scheme of the test cases, the execution scheme including the test cases and an execution order of the test cases.

[0012] In a second aspect, the present application provides a scenario-based vehicle adaptive test system, including: a data acquisition module configured to acquire a motion data sequence and an environment parameter sequence of a vehicle, the motion data sequence including motion state data of the vehicle at different time points, and the environment parameter sequence including environment parameters of a scenario in which the vehicle is located at different time points; an event identification module configured to identify an actual event at a current time point according to the motion data sequence and the environment parameter sequence; an event prediction module configured to generate a predicted event at a next time step according to the motion data sequence and the environment parameter sequence by using a prediction model; a case query module configured to query a test case set from a pre-constructed knowledge graph according to the actual event and the predicted event; a test execution module configured to consider execution constraint relationships among the test cases, generate an execution order of the test cases for the test case set, and execute corresponding test cases in sequence based on the execution order.

[0013] In a third aspect, an apparatus is provided, including: a memory configured to store a scenario-based vehicle adaptive test program; a processor configured to implement steps of the scenario-based vehicle adaptive test method provided in the first aspect when executing the scenario-based vehicle adaptive test program.

[0014] In a fourth aspect, a computer-readable storage medium is provided, and the computer-readable storage medium stores a scene-based vehicle adaptive test program, and the scene-based vehicle adaptive test program, when executed by a processor, implements the steps of the scene-based vehicle adaptive test method provided in the first aspect.

[0015] The scene-based vehicle adaptive test method, system, device and storage medium provided by the present application have the beneficial effects that, by analyzing vehicle motion data and environmental parameters in real time, the present application automatically identifies the current scene and predicts the next event, avoids the limitations of traditional fixed test cases, and significantly improves test coverage and authenticity. Based on the knowledge graph, the test cases are queried, and the execution constraints (such as conflicts or dependencies) are considered, and the optimal execution order is automatically generated, solving the test conflicts or omissions caused by manual management. By combining the prediction model and the knowledge graph, human intervention is reduced, the test period is shortened, and the accuracy and repeatability of the test results are ensured, which is suitable for complex and variable actual driving scene verification.

[0016] In addition, the present application has reliable design principles, simple structure, and very wide application prospects. BRIEF DESCRIPTION OF DRAWINGS

[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiment or prior art description, and obviously, other drawings can be obtained by those skilled in the art without creative labor.

[0018] Figure 1 is a schematic flow chart of the method of an embodiment of the present application.

[0019] Figure 2 is a schematic block diagram of the system of an embodiment of the present application.

[0020] Figure 3 is a structural schematic diagram of a device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0021] In order to enable those skilled in the art to better understand the technical solutions in the present application, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor should belong to the scope of protection of the present application.

[0022] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used in the description herein is for describing particular embodiments only and is not intended to be limiting of the application.

[0023] The scene-based vehicle adaptive test method provided by the embodiments of the application is executed by a computer device, and accordingly, the scene-based vehicle adaptive test system runs in the computer device.

[0024] Figure 1 is a schematic flowchart of the method of one embodiment of the application. In the flowchart, Figure 1 The execution subject can be a scene-based vehicle adaptive test system. The order of the steps in the flowchart can be changed, and some steps can be omitted according to different requirements.

[0025] As Figure 1 shown, the method comprises the following steps: S1. acquiring a motion data sequence of a vehicle and an environment parameter sequence, the motion data sequence comprising motion state data of the vehicle at different time points, and the environment parameter sequence comprising environment parameters of a scene in which the vehicle is located at different time points; S2. identifying an actual event at a current time point according to the motion data sequence and the environment parameter sequence; S3. generating a predicted event at a next time step by using a prediction model according to the motion data sequence and the environment parameter sequence; S4. querying a test case set from a pre-constructed knowledge graph according to the actual event and the predicted event; S5. considering an execution constraint relationship between test cases, generating an execution order of the test cases for the test case set, and executing corresponding test cases in sequence based on the execution order.

[0026] By predicting a future event (such as a sudden drop in the road friction coefficient in the next 0.5 seconds), the system can load a related test case (such as an ESP intervention test) in advance, rather than waiting for the event to actually occur and then triggering it. Based on the event chain composed of the current event and the predicted event, a coherent test sequence is generated, rather than isolatedly testing a single event, which can cover a complex scene and improve the test integrity.

[0027] In one embodiment of the application, based on step S1, a possible embodiment will be given below to non-restrictively describe the specific implementation thereof.

[0028] Vehicle motion data and environmental parameter acquisition utilize a multi-sensor fusion architecture, with a high-precision inertial measurement unit (IMU), a global navigation satellite system (GNSS) receiver, wheel speed encoders, lidar, millimeter-wave radar, and environmental perception sensors as core components. The IMU, a tactical-grade device with ±0.01° / h bias stability, captures the vehicle's three-dimensional acceleration and angular velocity in real time using a triaxial accelerometer (±16g range, 16-bit resolution) and a triaxial gyroscope (±2000° / s range, 16-bit resolution). A dual-frequency, multi-constellation GNSS receiver supports multi-system positioning including BDS, GPS, GLONASS, and Galileo, achieving centimeter-level positioning accuracy with a 10Hz update rate. This receiver is used to obtain absolute sensor and velocity information. Wheel speed encoders, mounted on the drive wheels, achieve submillimeter odometry through pulse counting, and are fused with IMU data to compensate for positioning errors in scenarios where GNSS signals are obstructed.

[0029] Vehicle motion state data collection covers kinematic and dynamic parameters, including but not limited to: (1) sensor parameters: longitude and latitude coordinates (accuracy ≤ 2 cm) and altitude (accuracy ≤ 5 cm) are obtained based on GNSS carrier phase difference (RTK) technology; (2) attitude parameters: vehicle roll angle, pitch angle and heading angle are calculated by combining IMU data with the extended Kalman filter (EKF) algorithm (accuracy ≤ 0.5°); (3) kinematic parameters: linear velocity is obtained by fusing wheel speed encoder and GNSS velocity data (resolution 0.01 m / s), and angular velocity is calculated by integrating IMU angular velocity (resolution 0.01° / s); (4) dynamic parameters: engine torque, brake pressure and other data are obtained using the on-board CAN bus, and longitudinal acceleration and lateral acceleration are estimated in combination with the vehicle dynamics model (accuracy ≤ 0.05 m / s²). All motion data are collected synchronously at a sampling frequency of 100 Hz and aligned to the microsecond level through time stamps.

[0030] The environmental parameter acquisition module deploys multiple types of sensors: (1) meteorological parameters: high-precision temperature and humidity sensors (temperature accuracy ±0.2℃, humidity accuracy ±2%RH) and barometric pressure sensors (accuracy ±0.1 hPa) are used to monitor environmental temperature and humidity and atmospheric pressure; (2) road surface parameters: a laser texture scanner and an infrared temperature sensor are fused to construct a road surface temperature field (accuracy ±1℃), combined with a tire force sensor and lateral acceleration data, and based on a friction coefficient estimation model to real-time inversion of road adhesion coefficient (accuracy ±0.05); (3) scene parameters: a multi-line laser radar (32 lines / 64 lines) and a millimeter wave radar are used to obtain vehicle surrounding obstacle distance and speed information, combined with a vision sensor (RGB / single depth camera) to realize scene semantic segmentation, identify road types (highway / urban road), traffic signs and other environmental features. The environmental sensors need to be calibrated in the laboratory and verified by road test, and temperature and humidity compensation models are established by polynomial fitting and other methods to ensure the accuracy of data measurement.

[0031] A synchronization scheme based on hardware timestamp is adopted, a high-precision clock module (accuracy ±1ppm) is deployed in the vehicle data acquisition unit (DCU), and a unified timestamp is added to all sensor data. The motion data and environmental parameters are fused by a timestamp alignment algorithm (such as bidirectional matching method) to generate time-aligned sequence data. In order to reduce data redundancy, a sliding window filtering (window size 500ms) and variable step sampling strategy are adopted to reduce the sampling of the original data. Finally, a standardized data sequence containing timestamp, motion parameter vector (12 dimensions) and environmental parameter vector (8 dimensions) is formed, stored in the vehicle solid state disk (SSD), and supports real-time transmission to the remote server for subsequent analysis.

[0032] In an embodiment of the present application, based on step S2, a possible embodiment will be given below to non-restrictively illustrate the specific implementation thereof.

[0033] S201. Align the motion state data and the environmental parameters with the timestamps, and construct a multi-dimensional time sequence data matrix.

[0034] Align the environmental parameters (road surface friction coefficient μ, temperature T) and the motion parameters (speed v, longitudinal acceleration a x , lateral acceleration a y ) with the timestamps, and construct a multi-dimensional time sequence data matrix:

[0035] Z-score standardization is performed on each dimension: .

[0036] S202. Cluster the multi-dimensional time-series data matrix using Gaussian Mixture Model to get the hidden state label for each time step. Includes: Assume the data is generated by K Gaussian distributions, each representing a driving mode, such as "hard acceleration", "constant speed driving", etc. Each data point has a certain probability of belonging to one of the K distributions.

[0037] The probability density function is:

[0038] Where π k is the mixing weight, satisfying .

[0039] EM algorithm parameter estimation: E step (calculate posterior probability):

[0040] According to the current model parameters (mean, variance and mixing weight of each Gaussian distribution), calculate the posterior probability of each data point belonging to each distribution. Simply put, it is to determine which mode the driving state of each time point is most likely to belong to.

[0041] M step (update parameters):

[0042]

[0043] According to the posterior probability calculated in the E step, update the parameters (mean, variance and mixing weight) of each Gaussian distribution to maximize the fitting degree of the model to the data.

[0044] Iterate the E step and M step until the model parameters converge.

[0045] For each time step, select the Gaussian distribution with the maximum posterior probability as the hidden state label for that time point. These labels will be used as the observation sequence for the subsequent HMM model.

[0046] Hidden state label for each time step: .

[0047] S203. Use Hidden Markov Model to identify actual events according to the hidden state label for each time step.

[0048] Hidden Markov Model (HMM) parameter definition: State space: Corresponding to driving events such as "hard acceleration", "constant speed cruising", etc. Observation sequence: , GMM clustering result; Initial state probabilities: , the probability of the model being in each state at the initial time step; State transition matrix: , describing the probability of transitioning from one state to another. For example, it is more likely to enter the steady driving state after a sudden acceleration, but less likely to directly enter the emergency braking state; Emission probability matrix: , describing the probability of generating each observation value for each hidden state.

[0049] Parameter learning phase (Baum-Welch algorithm), calculate the state transition expectation through the forward-backward algorithm, then update the parameters of the HMM (initial state probability, state transition matrix and emission probability matrix) to maximize the probability of the observed sequence. Forward probability:

[0050] Backward probability:

[0051] State transition expectation:

[0052] Parameter update:

[0053] Event decoding phase, according to the learned HMM parameters and observation sequence, find the most likely state sequence. This is a dynamic programming problem, by recursively calculating the maximum probability path in each state at each time step, finally get the optimal state sequence. For example, the state sequence s1→s3→s2 may correspond to "sudden acceleration→high-speed corner→emergency braking" such a complete driving event chain.

[0054] Define path probability:

[0055] Recursion formula:

[0056] Finally get the optimal state sequence:

[0057] Use Viterbi algorithm to solve the optimal state sequence, the output result is the state sequence s1→s3→s2→..., not a single state.

[0058] In Hidden Markov Model (HMM), the correspondence between different states and specific driving events is determined by the features clustered by Gaussian Mixture Model (GMM), for example: State s1, feature: longitudinal acceleration a x > 0.5g, road surface friction coefficient μ>0.8.

[0059] Corresponding event: represents the vehicle in the dry land acceleration scene. At this time, the tire is in contact with the high adhesion road surface, and the acceleration is significantly improved.

[0060] State s2, feature: longitudinal acceleration a x <−0.7g, ambient temperature T<5℃.

[0061] Corresponding event: represents the ice and snow road emergency braking. Low temperature and severe deceleration indicate that the vehicle is braking on the low adhesion road surface, which may trigger the ABS system intervention.

[0062] State s3, feature: lateral acceleration a y > 0.4g, vehicle speed v>80kph.

[0063] Corresponding event: corresponds to the high-speed cornering scene. Large lateral acceleration at high speed indicates that the vehicle is turning sharply, which may involve active control of stability by the ESP system.

[0064] In an embodiment of the present application, based on step S3, a possible embodiment will be given below to illustrate the specific implementation scheme.

[0065] S301. Constructing a space-time graph according to the motion data sequence and the environmental parameter sequence; (1) Defining internal nodes and external nodes according to the spatial dimension of data.

[0066] For example, internal sensor nodes (spatial dimension): vehicle dynamics sensors (such as IMU, wheel speed sensor), power system sensors (such as motor torque, battery state); External environmental nodes (spatial dimension): road surface properties (friction coefficient, slope) , weather conditions (temperature, humidity), traffic participants (position of adjacent vehicles, pedestrians).

[0067] (2) Defining the physical relationship between internal nodes through vehicle dynamics equation, and discovering the data-driven correlation relationship between internal nodes by using mutual information or Granger causality analysis.

[0068] Defining node relationship through vehicle dynamics equation, such as physical coupling between acceleration and motor torque: Dynamic coupling: defining edge relationship according to vehicle dynamics equation.

[0069] Environmental interaction: influence of external parameters on vehicle state, e.g. Edge(μ, a x )=1 (friction coefficient related to braking distance).

[0070] Discover node associations automatically using mutual information or Granger causality analysis: Compute mutual information I(X i ;X j ) of nodes i and j, if I>α, add edge; If X j is Granger cause of X i (p<0.05), add directed edge j→i.

[0071] (3) Construct internal subgraph according to physical relationship and data-driven association between internal nodes.

[0072] Construct weighted adjacency matrix , where:

[0073] Physical connection priority: initialize key edges (e.g. motor torque→wheel speed) according to vehicle dynamics equations; Data-driven supplement: prune edges with low mutual information (α<0.2) to reduce computational load.

[0074] (4) Compute coupling relationship and correlation coefficient between external nodes, and construct external subgraph based on coupling relationship and correlation coefficient.

[0075] Fit the nonlinear relationship between temperature T and road friction coefficient μ through experimental data, and determine whether to build edges according to the fitting coefficients.

[0076] Compute the Pearson correlation coefficient between external nodes, and determine whether to build edges according to whether the coefficient reaches the threshold.

[0077] (5) Establish interaction edges between internal subgraph and external subgraph through predefined rules or dynamic weights, and obtain spatial graph; Rule example: physical relationship between friction coefficient and braking acceleration.

[0078] Learning mechanism: for example, attention weight dynamically adjusts interaction strength.

[0079] (6) Construct an autoregressive sliding window for each node in the spatial graph, and capture non-aligned time series patterns through dynamic time warping to define time similarity edges; Autoregressive sliding window: construct time self-connection for each node, window size L (e.g. L=10 corresponds to 0.1 seconds of history).

[0080] Dynamic Time Warping (DTW): capture non-aligned temporal patterns, define time similarity edges:

[0081] (7) Construct a time adjacency matrix according to the time similarity edges.

[0082] Construct where T is the total number of time steps:

[0083] β=0.9, is the time decay factor.

[0084] (8) Combine the space graph and the time adjacency matrix through Kronecker product to obtain the space-time graph.

[0085] Combine the space graph A s and the time graph A t through Kronecker product:

[0086] Store using block diagonal matrix, only keep non-zero blocks (A s copy of each time step).

[0087] S302. Use the space-time graph neural network model to predict the motion state data and environmental parameters of the next time step according to the space-time graph.

[0088] The formula for spatio-temporal convolution of the space-time graph:

[0089] where, is the trainable parameter of the l-th layer spatio-temporal convolution kernel; is the k-th power of the space graph (representing k-hop neighbor relationship); is the τ-step sliding window mask of the time graph.

[0090] S303. Use the gated spatio-temporal convolution to generate a predicted event according to the motion state data and environmental parameters of the next time step.

[0091] Gating fusion formula:

[0092] g space =Sigmoid(W g ⋅X) is the spatial gating signal; Conv is the local spatio-temporal convolution output; Attn is the global self-attention output.

[0093] Initialize W gSmall random numbers (to prevent gradient saturation). Gradient clipping (Clip norm=5.0) to avoid exploding gates.

[0094] In an embodiment of the present application, based on step S4, a possible embodiment will be given below to illustrate the specific implementation thereof.

[0095] The dynamic matching algorithm is used to query the test case set from the knowledge graph according to actual events and predicted events; the dynamic matching algorithm is:

[0096] E current is the current event set; E predict is the predicted event set; the screening rule is: covering all mandatory (require) relationships and optional recommended suggest relationships.

[0097] The knowledge graph comprises mandatory association relationships between events and test cases, recommended association relationships between events and test cases, conflict relationships between events and test cases, conflict relationships between test cases and dependency relationships between test cases.

[0098] In an embodiment of the present application, based on step S5, a possible embodiment will be given below to illustrate the specific implementation thereof.

[0099] Dependency constraint relationships, conflict constraint relationships and resource constraint relationships between test cases are constructed: Dependency constraint: if t i →t j (such as sensor calibration→performance test), t j must be after t i ; Conflict constraint: if t i ↔t j (such as simultaneously occupying a CAN bus), t i and t j cannot be parallel; Resource constraint: , R m is the upper limit of the mth type of resource wherein, is a test case set, is the amount of the mth type of resource required for the kth test case to run.

[0100] A minimum value objective function is established:

[0101] wherein, , and preconfigured weights, total time required to execute from the first test case to the completion of the last test case, total power consumed to execute all test cases, coverage of test cases to the preset test target.

[0102] The calculation method of T, E and S can adopt the existing calculation method in the art, and the present application will not be described in detail.

[0103] The genetic algorithm is used to solve the objective function based on the dependency constraint relationship, conflict constraint relationship and resource constraint relationship between test cases, to obtain the execution scheme of the test cases, which includes the test cases and the execution order of the test cases. The specific solving process includes: (1) Initialization of population Input: candidate test case set (such as ["ABS test", "ESP test", "battery performance test"]).

[0104] Heuristic generation of initial solution: generate initial population according to test case priority or resource utilization, rather than completely randomly.

[0105] Example: place high-priority test cases (such as safety-critical tests) at the front of the sequence. Output: initial population containing multiple individuals (test sequences), such as:

[0106] (2) Iterative evolution (Generations) fitness evaluation: Objective function: calculate the comprehensive score of each test sequence i:

[0107] Dynamic weight adjustment: adjust the weight according to the test phase (such as higher λ3 in the R&D phase).

[0108] Selection (tournament selection): Randomly select k individuals (such as k=4) from the population, and select the one with the highest fitness as the parent. Introduce a diversity protection mechanism to avoid premature convergence.

[0109] Crossover (order crossover OX): perform crossover operation on the parent sequence, retain part of the order and generate new offspring. Adopt resource dependency-aware crossover to avoid generating conflicting sequences (such as occupying the same rack at the same time).

[0110] Mutation (swap mutation): randomly swap the positions of two test cases in the offspring sequence. Adaptive mutation rate, increase the mutation probability when the population diversity decreases.

[0111] Population update: replace the individuals with lower fitness in the current population with offspring, and keep the elite individuals (the optimal solution is not lost).

[0112] (3) Termination and output Termination condition: reach the maximum number of iterations (such as 200 generations) or fitness convergence (change rate <1%). Output the historical optimal test sequence and its fitness value.

[0113] In some embodiments, the scenario-based vehicle adaptive test system can include a plurality of functional modules composed of computer program segments. The computer programs of each program segment in the scenario-based vehicle adaptive test system can be stored in the memory of the computer device and executed by at least one processor to perform the functions of the scenario-based vehicle adaptive test (see Figure 1 Description).

[0114] In this embodiment, the scenario-based vehicle adaptive test system can be divided into a plurality of functional modules according to the functions it performs, as shown in Figure 2 The module referred to in the present application refers to a series of computer program segments that can be executed by at least one processor and can complete a fixed function, which are stored in the memory. In this embodiment, the functions of each module will be described in detail in subsequent embodiments.

[0115] The data acquisition module is configured to acquire a motion data sequence of the vehicle and an environment parameter sequence, the motion data sequence including motion state data of the vehicle at different time points, and the environment parameter sequence including environment parameters of a scenario in which the vehicle is located at different time points. The event recognition module is configured to recognize an actual event at a current time point according to the motion data sequence and the environment parameter sequence. The event prediction module is configured to generate a predicted event at a next time step according to the motion data sequence and the environment parameter sequence by using a prediction model. The use case query module is configured to query a test case set from a pre-constructed knowledge graph according to the actual event and the predicted event. The test execution module is configured to generate an execution order of test cases for the test case set by considering execution constraint relationships between the test cases, and execute the corresponding test cases in sequence based on the execution order.

[0116] Figure 3The scene-based vehicle adaptive testing method provided in the embodiments of the present application can be applied to a device. Those skilled in the art can understand that the device structure involved in the embodiments of the present application does not constitute a limitation on the device, and the device can include more or fewer components than the diagram, or combine certain components, or different component arrangements. In the embodiments of the present application, the device includes but is not limited to a laptop computer, a desktop computer, a workstation, a personal digital assistant, a server, a blade server, a mainframe computer, and other suitable computers. The device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples, and are not intended to limit the implementation of the embodiments of the present application described herein and / or claimed.

[0117] The device 300 can include a processor 310, a memory 320, and a communication unit 330. These components communicate over one or more buses, and those skilled in the art can understand that the structure of the server shown in the diagram does not constitute a limitation on the present application, and it can be a bus structure or a star structure, and can include more or fewer components than the diagram, or combine certain components, or different component arrangements.

[0118] The memory 320 can be used to store the execution instructions of the processor 310, and the memory 320 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. When the execution instructions in the memory 320 are executed by the processor 310, the device 300 is enabled to perform some or all of the steps in the following method embodiments.

[0119] The processor 310 is the control center of the storage device, connects various parts of the entire electronic device by using various interfaces and lines, and performs various functions of the electronic device and / or processes data by running or executing software programs and / or modules stored in the memory 320 and calling data stored in the memory. The processor can be composed of an integrated circuit (IC), for example, can be composed of a single packaged IC, or can be composed of a plurality of packaged ICs connected together. For example, the processor 310 can only include a central processing unit (CPU). In the embodiments of the present application, the CPU can be a single operation core or can include multiple operation cores.

[0120] The communication unit 330 is configured to establish a communication channel, so that the storage device can communicate with other devices. The communication unit 330 receives user data sent by other devices or sends user data to other devices.

[0121] The present application also provides a computer storage medium, wherein the computer storage medium can store a program, and the program can include some or all steps in the embodiments of the present application when executed. The storage medium can be a magnetic disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.

[0122] Those skilled in the art can clearly understand that the technology in the embodiments of the present application can be realized by means of software and necessary general hardware platforms. Based on such understanding, the technical solutions in the embodiments of the present application can be embodied in the form of a software product, which is stored in a storage medium such as a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc. The software product includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a second device, a network device, etc.) to execute all or part of the steps of the method described in the embodiments of the present application.

[0123] In the present specification, the same or similar parts among various embodiments can be referred to each other. In particular, for the device embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the description in the method embodiments.

[0124] In several embodiments provided by the present application, it should be understood that the disclosed system and method can be implemented in other manners. For example, the system embodiments described above are merely schematic. For example, the division of the modules is only a logical function division. There can be another division manner for the actual implementation. For example, a plurality of modules or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections between different modules can be indirect couplings or communication connections through some interfaces, and electrical, mechanical or other forms.

[0125] The above described modules can or can not be physically separate, and the components shown as modules can or can not be physical modules, i.e., can be located in one place or distributed on a plurality of network modules. Part or all of the modules can be selected according to actual needs to achieve the purpose of the embodiment.

[0126] In addition, the functional modules in each embodiment of the present application can be integrated into a processing module, or each module can exist physically separately, or two or more modules can be integrated into one module.

[0127] Although the present application has been described in detail by referring to the preferred embodiments thereof, it is to be understood that the present application is not limited to the embodiments described above. Rather, it should be appreciated that those skilled in the art, upon consideration of the disclosure, can make modifications and variations to the embodiments of the present application which are within the spirit and scope of the present application.

Claims

1. A scenario-based vehicle adaptive testing method, characterized in that: include: Acquire a motion data sequence and an environmental parameter sequence of the vehicle, wherein the motion data sequence includes motion state data of the vehicle at different time points, and the environmental parameter sequence includes environmental parameters of the scene in which the vehicle is located at different time points; identifying an actual event at a current moment according to the motion data sequence and the environmental parameter sequence; generating a predicted event for the next time step based on the motion data sequence and the environmental parameter sequence using a prediction model; Querying a test case set from a pre-built knowledge graph according to the actual event and the predicted event; Considering the execution constraint relationship between test cases, an execution order of test cases is generated for the test case set, and corresponding test cases are executed in sequence based on the execution order.

2. The method according to claim 1, characterized in that Identifying an actual event at a current moment according to the motion data sequence and the environmental parameter sequence includes: Align the timestamps of motion state data and environmental parameters and construct a multi-dimensional time series data matrix; Clustering the multidimensional time series data matrix using a Gaussian mixture model to obtain a hidden state label for each time step; Hidden Markov Model is used to identify actual events based on the hidden state labels at each time step.

3. The method according to claim 1, characterized in that The prediction model adopts a spatiotemporal graph neural network model.

4. The method according to claim 3, characterized in that Generating a predicted event for the next time step according to the motion data sequence and the environmental parameter sequence using a prediction model, including: constructing a spatiotemporal graph based on the motion data sequence and the environmental parameter sequence; Using a spatiotemporal graph neural network model to predict motion state data and environmental parameters for the next time step based on the spatiotemporal graph; Gated spatiotemporal convolution is used to generate predicted events based on the motion state data and environmental parameters at the next time step.

5. The method according to claim 4, characterized in that Constructing a spatiotemporal graph according to the motion data sequence and the environmental parameter sequence, comprising: Define internal nodes and external nodes based on the spatial dimensions of the data; Define the physical relationships between internal nodes through vehicle dynamics equations, and use mutual information or Granger causality analysis to discover data-driven associations between internal nodes; Construct internal subgraphs based on the physical relationships and data-driven associations between internal nodes; Calculate the coupling relationship and correlation coefficient between external nodes, and construct an external subgraph based on the coupling relationship and correlation coefficient; Establish interaction edges between internal subgraphs and external subgraphs through predefined rules or dynamic weights to obtain a spatial graph; We construct an autoregressive sliding window for each node in the spatial graph and capture non-aligned temporal patterns through dynamic time warping to define temporal similarity edges. Construct a temporal adjacency matrix based on temporal similarity edges; The spatial graph and the temporal adjacency matrix are combined through the Kronecker product to obtain the space-time graph.

6. The method according to claim 1, characterized in that Querying a test case set from a pre-built knowledge graph according to the actual event and the predicted event includes: Use dynamic matching algorithms to query test case sets from the knowledge graph based on actual events and predicted events; The knowledge graph includes mandatory associations between events and test cases, recommended associations between events and test cases, conflict relationships between events and test cases, conflict relationships between test cases, and dependency relationships between test cases.

7. The method according to claim 1, characterized in that Considering the execution constraints between the test cases, generating an execution order of the test cases for the test case set, and executing the corresponding test cases in sequence based on the execution order, including: Construct dependency constraints, conflict constraints, and resource constraints between test cases; Establish the objective function: in, 、 and To pre-configure weights, is the total time required from the start of execution of the first test case to the completion of the last test case, The total power consumed by executing all test cases, The coverage of the test cases for the preset test objectives; The objective function is solved by using a genetic algorithm based on dependency constraint relationships, conflict constraint relationships and resource constraint relationships between test cases to obtain an execution plan for the test cases. The execution plan includes the test cases and the execution order of the test cases.

8. A scenario-based vehicle adaptive testing system, characterized in that: include: A data acquisition module is used to acquire a motion data sequence and an environmental parameter sequence of the vehicle, wherein the motion data sequence includes the motion state data of the vehicle at different time points, and the environmental parameter sequence includes the environmental parameters of the scene in which the vehicle is located at different time points; An event recognition module, configured to recognize an actual event at a current moment based on the motion data sequence and the environmental parameter sequence; An event prediction module, configured to generate a predicted event for the next time step based on the motion data sequence and the environmental parameter sequence using a prediction model; A use case query module, configured to query a test case set from a pre-built knowledge graph based on the actual event and the predicted event; The test execution module is used to consider the execution constraint relationship between test cases, generate an execution order of test cases for a test case set, and execute corresponding test cases in sequence based on the execution order.

9. A device, characterized in that include: a memory for storing a scenario-based vehicle adaptive test program; A processor is configured to implement the steps of the scenario-based vehicle adaptive testing method as described in any one of claims 1 to 7 when executing the scenario-based vehicle adaptive testing program.

10. A computer-readable storage medium storing a computer program, characterized in that: The readable storage medium stores a scenario-based vehicle adaptive test program, which, when executed by a processor, implements the steps of the scenario-based vehicle adaptive test method according to any one of claims 1 to 7.

Citation Information

Cited By

  • Train control system test scene and test case management method based on knowledge graph

    CN121635277A