Data-driven interactive function simulation method and device and medium

Through the data-driven interactive functional simulation method, functional simulation of components to be simulated in the automotive test platform is solved, and the problem of strong dependence on the testing environment in the existing technology is achieved, and efficient and low-cost functional simulation and testing are achieved.

CN119783506APending Publication Date: 2025-04-08ZHENGZHOU UNIV +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411761546.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-03
Publication Date
2025-04-08

AI Technical Summary

Technical Problem

Existing automotive testing platforms usually need to work with other real components, resulting in the inability to continue in case of tight funding, non-cooperation of cooperation departments or tight accessories, and the requirements of comprehensive testing and evaluation of the elasticity of the Internet of Vehicles network are not met.

Method used

Using data-driven interactive functional simulation method, by obtaining the initial instruction set of components to be simulated, forming labeled data, parameter training of deep learning models, generating prediction response sets, and adjusting the instruction set according to response prediction errors, to realize functional simulation of components to be simulated.

Benefits of technology

This method can perform functional simulation when the internal source code of the component to be simulated is unknown, reduce dependence on real vehicle components, reduce test costs, and improve simulation efficiency. It is suitable for functional simulation of almost all vehicle components.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119783506A_ABST
    Figure CN119783506A_ABST
Patent Text Reader

Abstract

The invention provides a data-driven interactive function simulation method and device and a medium, and the method comprises the steps: 1, obtaining an instruction set of a to-be-simulated part, inputting the instruction set into the to-be-simulated part, and obtaining a real response set; 2, enabling the instruction set and the real response set to form labeled data, and carrying out the parameter training of a deep learning model through the labeled data; after training is finished, the instruction set is sent into the trained deep learning model, and a prediction response set is obtained; step 3, calculating a response prediction error between a prediction response in the prediction response set and a corresponding real response in the real response set, calculating a response prediction error mean value between the prediction response set and the real response set, and when the response prediction error mean value is greater than or equal to a preset value, executing the step 3; sorting the corresponding instructions in the instruction set according to the response prediction error, and selecting N instructions with the maximum sorting; and generating a new instruction set based on the N instructions, and returning to execute the step 1 again.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to network resilience assessment capabilities of Internet of Vehicles, and in particular to a data-driven interactive function simulation method, device and medium. Background Art

[0002] The Internet of Vehicles is a strategic emerging industry that deeply empowers the automotive and transportation industries with the new generation of information technology. The formation of Internet of Vehicles network resilience assessment capabilities is in line with the needs of the national development strategy.

[0003] The existing automobile testing platforms are generally aimed at functional testing or safety testing of a certain brand of automobile or a certain type of automobile architecture; specifically, when testing automobile components, a test environment for functional testing or safety testing is generally established in a targeted manner, and it is necessary to work with other real components. Therefore, when conducting functional testing or safety testing of components, it is necessary to invest a large amount of money to establish a complete testing environment. When there is a lack of cooperation with other real components that work in coordination with it, that is, when funds are tight, the cooperating departments are uncooperative, or there is a shortage of spare parts, the test will be unable to continue; therefore, due to the single test project, it cannot meet the requirements of comprehensive testing and evaluation of vehicle network resilience.

[0004] In order to solve the above problems, people have been seeking an ideal technical solution. Summary of the invention

[0005] The purpose of the present invention is to address the deficiencies of the prior art and thus provide a data-driven interactive function simulation method, device and medium.

[0006] In order to achieve the above object, the technical solution adopted by the present invention is: a first aspect provides a data-driven interactive function simulation method, comprising the following steps: Step 1, obtaining an initial instruction set of the component to be simulated, inputting the initial instruction set into the component to be simulated, and obtaining a real response set; Step 2: The initial instruction set and the real response set are converted into labeled data, and the labeled data is used to train the parameters of the deep learning model; After the training is completed, the initial instruction set is fed into the trained deep learning model to obtain the predicted response set; Step 3, calculate the response prediction error between the predicted response in the predicted response set and the corresponding true response in the true response set, and calculate the mean response prediction error between the predicted response set and the true response set. When the mean response prediction error is greater than or equal to a preset value, sort the corresponding instructions in the instruction set according to the response prediction error, and select the N instructions with the largest sorting; generate a new instruction set based on the N instructions, update the initial instruction set with the new instruction set, and return to execute step 1 again; when the mean response prediction error is less than a preset value, exit the current step.

[0007] Furthermore, the step of generating a new instruction set based on the N instructions includes: Each of the N instructions is mutated r times, and all the instructions obtained after the mutation are combined into an instruction set; where r = M / N, M is the number of instructions in the initial instruction set in step 1.

[0008] Furthermore, each instruction is mutated, including: According to the bit flipping strategy, one bit of each instruction is randomly selected for random mutation, and the mutated instruction is checked to see whether it conforms to the correct data format. If it conforms, the instruction is retained, otherwise it is discarded.

[0009] Furthermore, the component to be simulated is a TBOX controller, an IVI, a gateway, an ADAS or a domain controller.

[0010] A second aspect provides a data-driven interactive functional testing method for in-vehicle components, comprising the following steps: Adopting the data-driven interactive functional simulation method described in the first aspect to respectively obtain a functional simulator of each in-vehicle component that interacts with the in-vehicle component to be tested; Establish the connection between the in-vehicle components to be tested and each functional simulator to form an interactive test chain; A function simulator located in front of the vehicle interior component to be tested on the interactive test chain sends instructions to the vehicle interior component to be tested, and / or a function simulator located behind the vehicle interior component to be tested on the interactive test chain receives a response instruction sent by the vehicle interior component to be tested.

[0011] A third aspect provides a data-driven interactive function simulation device, comprising: A response set acquisition module, used for sending the instruction set to the component to be simulated, and acquiring the real response set from the component to be simulated; A label adding module, used to form labeled data from the instruction set and the real response set; Model training module, used to train parameters of deep learning models using labeled data; The prediction response module is used to input the instruction set into the trained deep learning model to obtain the prediction response set; A response prediction error acquisition module is used to calculate the response prediction error between the predicted response in the predicted response set and the corresponding true response in the true response set, and calculate the mean value of the response prediction error between the predicted response set and the true response set; An instruction generator is used to determine whether the mean value of the prediction error is greater than or equal to a preset value. When the mean value of the response prediction error is greater than or equal to the preset value, the corresponding instructions in the instruction set are sorted according to the response prediction error, and the N instructions with the largest sorting are selected; a new instruction set is generated based on the N instructions, and the initial instruction set is updated with the new instruction set; when the mean value of the response prediction error is less than the preset value, no action is taken.

[0012] A fourth aspect provides a data-driven interactive function simulation device, comprising: Memory for storing computer programs; A processor is used to implement the steps of the interactive functional simulation method as described in the first aspect when executing the computer program.

[0013] A fifth aspect provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the interactive functional simulation method described in the first aspect are implemented.

[0014] The present invention has outstanding substantive features and significant progress compared to the prior art, specifically: Firstly, the present invention adopts an interactive component function simulation method to quickly locate the instruction subspace with poor prediction effect according to the response feedback of the component to be simulated, so as to make the training of the functional simulator more targeted, reduce the number of iterations and improve the simulation efficiency.

[0015] Secondly, the invention can simulate the function of the component to be simulated when the internal source code of the component to be simulated is unknown. This advantage makes the invention suitable for the functional simulation of almost all in-vehicle components.

[0016] Finally, after learning the internal rules of the components to be simulated, the present invention can be deployed in a large-scale and concurrent manner in the test platform, reducing the dependence on real in-vehicle components and greatly reducing the investment cost of the platform. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 It is a flowchart of the interactive function simulation method described in Example 1 of the present invention.

[0018] Figure 2 It is a structural block diagram of the interactive function simulation device described in Example 3 of the present invention. DETAILED DESCRIPTION

[0019] The technical solution of the present invention is further described in detail below through specific implementation methods.

[0020] Example 1 This embodiment provides a data-driven interactive function simulation method, such as Figure 1 As shown, the following steps are included: Step 1, obtain an initial instruction set of the component to be simulated, input the initial instruction set into the component to be simulated, and obtain a real response set; specifically, when the method is applied to the automotive field, the component to be simulated is a TBOX controller, IVI, gateway, ADAS or domain controller.

[0021] Step 2: The initial instruction set and the actual response set are formed into labeled data, and the labeled data is used to train the parameters of the deep learning model; after the training is completed, the instruction set is sent to the trained deep learning model to obtain the predicted response set.

[0022] Furthermore, the deep learning model is a general deep learning model such as a decision tree or a deep neural network. When used, the corresponding model structure is selected according to the functional characteristics of each component. These model structures all take a certain instruction as input and output a corresponding response feedback. Specifically, the internal parameters of the deep learning model are obtained by training through input data and output data from the component to be simulated.

[0023] Step 3, calculate the response prediction error between the predicted response in the predicted response set and the corresponding true response in the true response set, and calculate the mean response prediction error between the predicted response set and the true response set. When the mean response prediction error is greater than or equal to the preset value, sort the corresponding instructions in the instruction set according to the response prediction error, and select the N instructions with the largest sorting; generate a new instruction set based on the N instructions, update the initial instruction set with the new instruction set, and return to execute step 1 again; when the mean response prediction error is less than the preset value, exit the current step. .

[0024] In one embodiment, the step of generating a new instruction set based on N instructions includes: Each of the N instructions is mutated r times, and all the instructions obtained after the mutation are combined into an instruction set; where r = M / N, M is the number of instructions in the initial instruction set in step 1.

[0025] Among them, each instruction is mutated, including: According to the bit flipping strategy, one bit of each instruction is randomly selected for random mutation, such as randomly taking 0 or 1, and checking whether the mutated instruction conforms to the correct data format. If it conforms, the instruction is retained, otherwise the instruction is discarded.

[0026] It can be understood that the number of instructions in the new instruction set finally generated is less than or equal to M, that is, it is comparable to the size of the initial instruction set.

[0027] It can be understood that the role of this step is to selectively update and iterate the initial instruction set. Specifically, only the instruction subspace with poor prediction effect is retrained, so that the training of the deep learning model is more targeted, the number of iterations is reduced, and the simulation efficiency is improved.

[0028] Furthermore, based on the data-driven principle, this embodiment uses the input instructions of the component to be simulated as input and the response feedback of the component to be simulated as output, and performs black-box simulation of the function of the component to be simulated through labeled data without knowing the internal source code of the component to be simulated. This advantage makes this embodiment suitable for functional simulation of almost all in-vehicle components, and can be deployed in the test platform on a large scale and concurrently, reducing the dependence on real in-vehicle components, greatly reducing the investment cost of the platform, and saving testing funds.

[0029] Example 2 This embodiment provides a data-driven interactive function test method for in-vehicle components, comprising the following steps: Adopting the data-driven interactive functional simulation method described in the first aspect to respectively obtain a functional simulator of each in-vehicle component that interacts with the in-vehicle component to be tested; Establish the connection between the in-vehicle components to be tested and each functional simulator to form an interactive test chain; A function simulator located in front of the vehicle interior component to be tested on the interactive test chain sends instructions to the vehicle interior component to be tested, and / or a function simulator located behind the vehicle interior component to be tested on the interactive test chain receives a response instruction sent by the vehicle interior component to be tested.

[0030] It should be noted that the in-vehicle components to be tested are real on-board electronic control units, such as TBOX, IVI, gateway, ADAS, domain controller, etc. They can work normally under the correct configuration. After receiving an input command, they will output the corresponding response feedback according to their own internal processing rules.

[0031] This embodiment adopts a data-driven concept. By interacting with real components, the input instructions and response feedback of real components are monitored and recorded to form a training data set, so as to train the machine learning model to predict the response to the instructions, and realize the functional modeling of real components under the condition that the internal source code of the components is unknown. Therefore, based on the virtual functional modules corresponding to the real components, functional tests or safety tests can be performed on other real tested components. It can adapt to the testing of ADAS, TBOX, IVI, GATEWAY, and domain controllers in the absence of external component cooperation, and has the advantages of large-scale and concurrent deployment, saving testing funds and the cost of the test environment.

[0032] Example 3 This embodiment provides a data-driven interactive function simulation device, such as Figure 2 As shown, including: A response set acquisition module, used for sending the instruction set to the component to be simulated, and acquiring the real response set from the component to be simulated; A label adding module, used to form labeled data from the instruction set and the real response set; A model training module, used to perform parameter training on a deep learning model using labeled data; preferably, the deep learning model is a general deep learning model such as a decision tree or a deep neural network; The prediction response module is used to input the instruction set into the trained deep learning model to obtain the prediction response set; A response prediction error acquisition module is used to calculate the response prediction error between the predicted response in the predicted response set and the corresponding true response in the true response set, and calculate the mean value of the response prediction error between the predicted response set and the true response set; An instruction generator is used to determine whether the mean value of the prediction error is greater than or equal to a preset value. When the mean value of the response prediction error is greater than or equal to the preset value, the corresponding instructions in the instruction set are sorted according to the response prediction error, and the N instructions with the largest sorting are selected; a new instruction set is generated based on the N instructions, and the initial instruction set is updated with the new instruction set; when the mean value of the response prediction error is less than the preset value, no action is taken.

[0033] In specific implementation, after the above multiple iterations, a functional simulator corresponding to the component to be simulated is obtained to interact with the real component to be tested.

[0034] Furthermore, the step of generating a new instruction set based on the N instructions includes: Each of the N instructions is mutated r times, and all the instructions obtained after the mutation are combined into an instruction set; where r=M / N, M is r=M / N, and M is the number of instructions in the initial instruction set.

[0035] Among them, each instruction is mutated, including: According to the bit flipping strategy, one bit of each instruction is randomly selected for random mutation, and the mutated instruction is checked to see whether it conforms to the correct data format. If it conforms, the instruction is retained, otherwise it is discarded.

[0036] Example 4 This embodiment provides a data-driven interactive function simulation device, including: Memory for storing computer programs; A processor is used to implement the steps of the interactive function simulation method described in Example 1 when executing the computer program.

[0037] Example 5 This embodiment provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the interactive function simulation method described in Embodiment 1 are implemented.

[0038] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, ordinary technicians in the field should understand that the specific implementation methods of the present invention can still be modified or some technical features can be replaced by equivalents without departing from the spirit of the technical solution of the present invention, which should be included in the scope of the technical solution for protection of the present invention.

Claims

1. A data-driven interactive functional simulation method, characterized in that: The following steps are involved: Step 1, obtaining an initial instruction set of the component to be simulated, inputting the initial instruction set into the component to be simulated, and obtaining a real response set; Step 2: The initial instruction set and the real response set are converted into labeled data, and the labeled data is used to train the parameters of the deep learning model; After the training is completed, the initial instruction set is fed into the trained deep learning model to obtain the predicted response set; Step 3, calculate the response prediction error between the predicted response in the predicted response set and the corresponding true response in the true response set, and calculate the mean response prediction error between the predicted response set and the true response set. When the mean response prediction error is greater than or equal to a preset value, sort the corresponding instructions in the instruction set according to the response prediction error, and select the N instructions with the largest sorting; generate a new instruction set based on the N instructions, update the initial instruction set with the new instruction set, and return to execute step 1 again; when the mean response prediction error is less than a preset value, exit the current step.

2. A data-driven interactive function simulation method according to claim 1, characterized in that: The steps of generating a new instruction set based on N instructions include: Each of the N instructions is mutated r times, and all the instructions obtained after the mutation are combined into an instruction set; where r = M / N, M is the number of instructions in the initial instruction set in step 1.

3. A data-driven interactive function simulation method according to claim 2, characterized in that: Mutate each instruction, including: According to the bit flipping strategy, one bit of each instruction is randomly selected for random mutation, and the mutated instruction is checked to see whether it conforms to the correct data format. If it conforms, the instruction is retained, otherwise it is discarded.

4. A data-driven interactive function simulation method according to claim 1, 2 or 3, characterized in that: The component to be simulated is a TBOX controller, an IVI, a gateway, an ADAS or a domain controller.

5. A data-driven interactive functional testing method for in-vehicle components, characterized in that: Adopting the data-driven interactive functional simulation method according to any one of claims 1 to 4 to respectively obtain a functional simulator of each in-vehicle component that interacts with the in-vehicle component to be tested; Establish the connection between the in-vehicle components to be tested and each functional simulator to form an interactive test chain; A function simulator located in front of the vehicle interior component to be tested on the interactive test chain sends instructions to the vehicle interior component to be tested, and / or a function simulator located behind the vehicle interior component to be tested on the interactive test chain receives a response instruction sent by the vehicle interior component to be tested.

6. A data-driven interactive function simulation device, characterized in that: include: A response set acquisition module, used for sending the instruction set to the component to be simulated, and acquiring the real response set from the component to be simulated; A label adding module, used to form labeled data from the instruction set and the real response set; Model training module, used to train parameters of deep learning models using labeled data; The prediction response module is used to input the instruction set into the trained deep learning model to obtain the prediction response set; A response prediction error acquisition module is used to calculate the response prediction error between the predicted response in the predicted response set and the corresponding true response in the true response set, and calculate the mean value of the response prediction error between the predicted response set and the true response set; An instruction generator is used to determine whether the mean value of the prediction error is greater than or equal to a preset value. When the mean value of the response prediction error is greater than or equal to the preset value, the corresponding instructions in the instruction set are sorted according to the response prediction error, and the N instructions with the largest sorting are selected; a new instruction set is generated based on the N instructions, and the initial instruction set is updated with the new instruction set; when the mean value of the response prediction error is less than the preset value, no action is taken.

7. A data-driven interactive function simulation device according to claim 6, characterized in that: The steps of generating a new instruction set based on N instructions include: Each of the N instructions is mutated r times, and all the instructions obtained after the mutation are combined into an instruction set; where r=M / N, M is r=M / N, and M is the number of instructions in the initial instruction set.

8. A data-driven interactive function simulation device according to claim 7, characterized in that: Mutate each instruction, including: According to the bit flipping strategy, one bit of each instruction is randomly selected for random mutation, and the mutated instruction is checked to see whether it conforms to the correct data format. If it conforms, the instruction is retained, otherwise it is discarded.

9. A data-driven interactive function simulation device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the interactive function simulation method as claimed in any one of claims 1 to 4 when executing the computer program.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the interactive function simulation method according to any one of claims 1 to 4.