CN115469561A - Simulation test method and device, electronic device and storage medium - Google Patents

Simulation test method and device, electronic device and storage medium Download PDF

Info

Publication number
CN115469561A
CN115469561A CN202210249394.9A CN202210249394A CN115469561A CN 115469561 A CN115469561 A CN 115469561A CN 202210249394 A CN202210249394 A CN 202210249394A CN 115469561 A CN115469561 A CN 115469561A
Authority
CN
China
Prior art keywords
test
signal
initial value
model
initial
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210249394.9A
Other languages
Chinese (zh)
Inventor
刘希
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Co Wheels Technology Co Ltd
Original Assignee
Beijing Co Wheels Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Co Wheels Technology Co Ltd filed Critical Beijing Co Wheels Technology Co Ltd
Priority to CN202210249394.9A priority Critical patent/CN115469561A/en
Publication of CN115469561A publication Critical patent/CN115469561A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B17/00Systems involving the use of models or simulators of said systems
    • G05B17/02Systems involving the use of models or simulators of said systems electric

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Test And Diagnosis Of Digital Computers (AREA)

Abstract

The present disclosure relates to the field of computer technologies, and in particular, to a simulation test method and apparatus, an electronic device, and a storage medium. The simulation test method comprises the following steps: in the process of the in-loop simulation test of the high-voltage hardware, if the high-voltage hardware is detected to be in a connection state with the upper equipment, a test file corresponding to a target environment test model is obtained, wherein the test file comprises a test initial value set corresponding to at least one test signal in the target environment test model, and the test signals are in one-to-one correspondence with the test initial values; and setting a test value corresponding to at least one test signal based on the test initial value set so as to enable the target environment test model to perform high-voltage hardware-in-the-loop simulation test based on the test initial value set. By adopting the method and the device, the efficiency of the simulation test can be improved, the convenience of the simulation test is improved, and the use experience of a user is further improved.

Description

Simulation test method and device, electronic device and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a simulation test method and apparatus, an electronic device, and a storage medium.
Background
With the development of science and technology, the requirements of users on products are increasing day by day. Therefore, before a product is delivered for use, the product needs to be subjected to simulation test based on the requirements of the user. In the process that a tester adopts test equipment to carry out simulation test on a product, if a current test item is finished and a next test item needs to be entered, a simulation test signal which is set before needs to be reset.
However, in the related art, the test device resets the previously set simulation test signal and simultaneously resets the power supply module. If the test equipment resets the power supply module in the process of high-voltage simulation test, the test equipment cannot recover the high-voltage power supply, and a tester needs to manually start the high-voltage power supply. Therefore, the efficiency of the simulation test is reduced, the convenience of the simulation test is reduced, and the use experience of a user is further influenced.
Disclosure of Invention
The disclosure provides a simulation test method and device, electronic equipment and a storage medium, and mainly aims to improve the convenience of simulation test and further improve the use experience of a user.
According to an aspect of the present disclosure, there is provided a simulation test method, including:
in the process of the in-loop simulation test of the high-voltage hardware, if the high-voltage hardware is detected to be in a connection state with an upper device, a test file corresponding to a target environment test model is obtained, wherein the test file comprises a test initial value set corresponding to at least one test signal in the target environment test model, and the test signals correspond to the test initial values one to one;
and setting a test value corresponding to the at least one test signal based on the test initial value set, so that the target environment test model performs high-voltage hardware-in-loop simulation test based on the test initial value set.
Optionally, if it is detected that the target environment test model is in a connected state with the upper device, before obtaining a file corresponding to the target environment test model, the method further includes:
and establishing connection with the upper equipment through a C language application program interface or an application program interface in the script language.
Optionally, if it is detected that the device is in a connection state with the upper device, before obtaining the file corresponding to the target environment test model, the method further includes:
acquiring at least one test signal which meets the storage condition of the initial signal value in the initial environment test model;
acquiring a test initial value corresponding to the at least one test signal;
and storing the test initial value corresponding to the at least one test signal into a test file corresponding to the initial environment test model.
Optionally, the obtaining a test initial value corresponding to the at least one test signal includes:
and calling an MATLAB program to obtain a test initial value corresponding to at least one test signal in the initial environment test model through a C language application program interface or an application program interface in a script language.
Optionally, the obtaining at least one test signal in the initial environment test model that satisfies a signal initial value storage condition includes:
acquiring at least one test signal in the initial environment test model based on a preset signal initial value storage condition;
or,
acquiring a test signal set in the initial environment test model;
acquiring a test value attribute corresponding to any test signal in the test signal set;
and acquiring at least one test signal with the test value attribute consistent with the attribute condition in the test signal set.
Optionally, the setting a test value corresponding to the at least one test signal based on the test initial value set includes:
acquiring any test signal in the target environment test model;
acquiring a test initial value corresponding to any test signal in the test initial value set;
setting a test value corresponding to any test signal as the test initial value;
and traversing the at least one test signal, and setting a test value corresponding to the at least one test signal in the target environment test model.
Optionally, the method further includes:
acquiring a test instruction sent by upper equipment aiming at a target environment test model;
and responding to a test instruction, and performing high-voltage hardware-in-the-loop simulation test by adopting the target environment test model.
According to another aspect of the present disclosure, there is provided a simulation test apparatus including:
the device comprises a file acquisition unit, a test unit and a test unit, wherein the file acquisition unit is used for acquiring a test file corresponding to a target environment test model if detecting that the test file is in a connection state with upper equipment in the process of the in-loop simulation test of the high-voltage hardware, the test file comprises a test initial value set corresponding to at least one test signal in the target environment test model, and the test signals correspond to the test initial values one by one;
and the hardware testing unit is used for setting a testing value corresponding to the at least one testing signal based on the testing initial value set so as to enable the target environment testing model to carry out high-voltage hardware-in-the-loop simulation testing based on the testing initial value set.
Optionally, the apparatus further includes a device connection unit, configured to, before obtaining a file corresponding to the target environment test model if it is detected that the device is in a connection state with the upper device:
and the equipment connecting unit is used for establishing connection with the upper equipment through a C language application program interface or an application program interface in a script language.
Optionally, the device further includes a signal obtaining unit, an initial value obtaining unit, and an initial value storing unit, configured to, before obtaining a file corresponding to the target environment test model if it is detected that the device is in a connection state with the upper device:
the signal acquisition unit is used for acquiring at least one test signal which meets the storage condition of the initial signal value in the initial environment test model;
the initial value acquiring unit is used for acquiring a test initial value corresponding to the at least one test signal;
the initial value storage unit is used for storing the test initial value corresponding to the at least one test signal into a test file corresponding to the initial environment test model.
Optionally, when the initial value obtaining unit is configured to obtain a test initial value corresponding to the at least one test signal, the initial value obtaining unit is specifically configured to:
and calling an MATLAB program to obtain a test initial value corresponding to at least one test signal in the initial environment test model through a C language application program interface or an application program interface in a script language.
Optionally, the signal obtaining unit includes a set obtaining subunit, an attribute obtaining subunit, and a signal obtaining subunit, where the signal obtaining unit is configured to, when obtaining at least one test signal that satisfies a signal initial value storage condition in the initial environment test model:
the signal acquisition subunit is used for acquiring at least one test signal in the initial environment test model based on a preset signal initial value storage condition;
or,
the set acquisition subunit is configured to acquire a test signal set in the initial environment test model;
the attribute acquiring subunit is configured to acquire a test value attribute corresponding to any test signal in the test signal set;
the signal acquiring subunit is further configured to acquire at least one test signal in the test signal set, where the attribute of the test value is consistent with the attribute condition.
Optionally, the hardware testing unit includes a model signal obtaining subunit, an initial value setting subunit, and a signal traversing subunit, and the hardware testing unit is configured to, when setting a test value corresponding to the at least one test signal based on the test initial value set:
the model signal acquisition subunit is used for acquiring any test signal in the target environment test model;
the initial value obtaining subunit is configured to obtain, in the test initial value set, a test initial value corresponding to the any test signal;
the initial value setting subunit is configured to set a test value corresponding to the any test signal as the test initial value;
and the signal traversing subunit is configured to traverse the at least one test signal, and set a test value corresponding to the at least one test signal in the target environment test model.
Optionally, the apparatus further comprises:
the instruction acquisition unit is used for acquiring a test instruction sent by the upper equipment aiming at the target environment test model;
and the instruction response unit is used for responding to the test instruction and adopting the target environment test model to perform the high-voltage hardware-in-the-loop simulation test.
According to another aspect of the present disclosure, there is provided an electronic device including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of the preceding aspects.
According to another aspect of the present disclosure, there is provided a non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of the preceding aspects.
According to another aspect of the present disclosure, there is provided a computer program product comprising a computer program which, when executed by a processor, implements the method of any one of the preceding aspects.
In one or more embodiments of the present disclosure, in a process of a ring simulation test of high-voltage hardware, if it is detected that the high-voltage hardware is in a connection state with an upper device, a test file corresponding to a target environment test model is obtained, where the test file includes a set of test initial values corresponding to at least one test signal in the target environment test model, where the test signals correspond to the test initial values one to one; and setting a test value corresponding to the at least one test signal based on the test initial value set so that the target environment test model performs high-voltage hardware-in-the-loop emulation test based on the test initial value set. Therefore, in the simulation test process, the test file is acquired when the test file is connected with the upper device, the test value corresponding to the test signal is set based on the test file, the test can be continued without powering off the high-voltage power supply, the efficiency of the simulation test can be improved, the convenience of the simulation test can be improved, and the use experience of a user is improved.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present disclosure, nor do they limit the scope of the present disclosure. Other features of the present disclosure will become readily apparent from the following description.
Drawings
The drawings are included to provide a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
fig. 1 illustrates a background schematic diagram of a simulation testing method provided by an embodiment of the present disclosure;
FIG. 2 is a system architecture diagram illustrating a simulation testing method according to an embodiment of the present disclosure;
fig. 3 is a schematic flowchart illustrating a first simulation testing method provided in the embodiment of the present disclosure;
FIG. 4 is a flow chart illustrating a second simulation testing method provided by the embodiment of the present disclosure;
FIG. 5 is a schematic structural diagram of a first simulation testing apparatus provided in an embodiment of the present disclosure;
fig. 6 shows a schematic structural diagram of a second simulation test apparatus provided in the embodiment of the present disclosure;
FIG. 7 is a schematic structural diagram of a third simulation testing apparatus provided in the embodiment of the present disclosure;
FIG. 8 is a schematic structural diagram of a fourth simulation testing apparatus provided in the embodiment of the present disclosure;
fig. 9 is a schematic structural diagram of a fifth simulation testing apparatus provided in the embodiment of the present disclosure;
fig. 10 is a schematic structural diagram of a sixth simulation test apparatus provided in the embodiment of the present disclosure;
FIG. 11 is a block diagram of an electronic device for implementing a simulation testing method of an embodiment of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, in which various details of the embodiments of the disclosure are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
With the development of science and technology, the requirements of users on products are increasing day by day. Therefore, before a product is delivered for use, the product needs to be subjected to simulation test based on the requirements of the user.
According to some embodiments, fig. 1 illustrates a background schematic diagram of a simulation testing method provided by the embodiments of the present disclosure. As shown in fig. 1, when the test equipment completes a current test item corresponding to any product and needs to enter a next test item, the test equipment may stop testing the simulation model corresponding to the current test item and unload the simulation model. The test equipment may then reload the simulation model corresponding to the next test item and reset the power module responsible for controlling the voltage. When the test equipment reloads the simulation model, the corresponding model parameters in the simulation model can be initialized and reset.
It will be readily appreciated that for low voltage simulation testing, the low voltage power supply may be restored to the required value during the reloading of the simulation model by the test equipment. However, for the high voltage simulation test, after the test equipment powers off the high voltage power supply, the test equipment cannot recover the high voltage power supply, and a tester needs to manually start the high voltage power supply switch.
In some embodiments, fig. 2 is a system architecture diagram illustrating a simulation test method provided by the embodiments of the present disclosure. As shown in fig. 2, when the test equipment reloads the simulation model corresponding to the next test item, the test equipment 11 may send power-off information to the terminal 13 corresponding to the tester through the network 12. When the tester receives the power-off information transmitted from the test device 11 through the terminal 13, the tester may activate the switching of the high-voltage power supply.
It will be readily appreciated that the test device 11 may be connected to the terminal 13 via a network 12. The network 12 is used to provide a communication link between the test equipment 11 and the terminal 13. Network 12 may include various types of connections, such as wire, wireless communication links, or fiber optic cables, to name a few. It should be understood that the number of test devices 11, networks 12 and terminals 13 in fig. 2 is merely illustrative. There may be any number of test devices 11, networks 12 and terminals 13, as desired for the implementation. A user may use the terminal 13 to interact with the test equipment 11 via the network 12 for simulation testing or the like.
The present disclosure is described in detail below with reference to specific examples.
In a first embodiment, as shown in fig. 3, fig. 3 shows a schematic flow chart of a first simulation testing method provided by the embodiment of the present disclosure, which may be implemented by relying on a computer program and may be run on a device for performing area determination. The computer program may be integrated into the application or may run as a separate tool-like application.
Wherein, the simulation test device may be a terminal having an area determination function, the terminal including but not limited to: wearable devices, handheld devices, personal computers, tablet computers, in-vehicle devices, smart phones, computing devices or other processing devices connected to a wireless modem, and the like. Terminals in different networks may be called different names, for example: user equipment, access terminal, subscriber unit, subscriber station, mobile station, remote terminal, mobile device, user terminal, wireless Communication device, user agent or user equipment, cellular telephone, cordless telephone, personal Digital Assistant (PDA), fifth Generation Mobile Communication technology (5G) network, fourth Generation Mobile Communication technology (4G) network, third Generation Mobile Communication technology (3 rd-Generation, 3G) network, or a terminal in a future evolution network, etc.
Specifically, the simulation test method comprises the following steps:
s101, in the process of in-loop simulation test of high-voltage hardware, if the high-voltage hardware is detected to be in a connection state with upper equipment, obtaining a test file corresponding to a target environment test model;
according to some embodiments, hardware-in-loop (HIL), also known as semi-physical simulation, is a simulation system that puts system Hardware that needs simulation directly into a simulation loop. The HIL test is a test in which a real-time processor runs a simulation model to simulate the running state of a controlled object, and is connected to an Electronic Control Unit (ECU) to be tested through an Input/Output (I/O) interface, thereby performing an all-around and systematic test on the ECU to be tested. The high-voltage hardware in-loop simulation test refers to an HIL test with a high-voltage simulation function.
In some embodiments, the host device refers to a device that can directly issue the manipulation command. The host device is not particularly limited to a fixed device. The upper device includes, but is not limited to, a Personal Computer (PC), a host computer (host computer), a host computer master computer, an upper computer (upper computer), and the like.
In some embodiments, the target environment test model refers to a simulation model corresponding to the tested ECU, which is constructed by the testing equipment when the tested ECU is subjected to HIL test. The target environment test model is not specific to a fixed model. For example, when the ECU under test is changed, the target environment test model may also be changed. When the test equipment acquires the model modification instruction for the target environment test model, the target environment test model may also be changed.
In some embodiments, the test file refers to a file generated when HIL testing is performed on the ECU under test. The test file comprises a set of test initial values corresponding to at least one test signal in the target environment test model. The test file does not refer to a fixed file. For example, when the ECU under test is changed, the test file may also be changed. When the time for the tested ECU to perform the HIL test changes, the test file can also change. The test files include, but are not limited to, text files, form files, comma separated value files, and the like.
In some embodiments, the test signal refers to a model parameter corresponding to a target environment test model when the tested ECU is subjected to the HIL test. The test signal does not refer to a fixed signal. For example, when the target environment test pattern changes, the test signal may also change. When the ECU under test changes, the test signal can also change.
In some embodiments, the test initial value refers to an initial value corresponding to a test signal when the tested ECU is subjected to the HIL test. The test signals correspond to the test initial values one by one. The test initial value does not refer to a fixed value. For example, when the test signal changes, the test initial value may also change. When the target environment test model changes, the test initial value may also change.
In some embodiments, the set of test initial values refers to a set formed by aggregating at least two test initial values. The set of test initial values does not refer to a fixed set. For example, when the test initial value changes, the set of test initial values may also change. When the target environment test model changes, the set of test initial values may also change.
It is easy to understand that when the test equipment performs a simulation test on the tested ECU, in the process of the high-voltage hardware-in-the-loop simulation test, if the test equipment detects that the test equipment is in a connection state with the upper equipment, the test equipment can acquire a test file corresponding to the target environment test model.
S102, setting a test value corresponding to at least one test signal based on the test initial value set so that the target environment test model performs high-voltage hardware-in-loop simulation test based on the test initial value set.
According to some embodiments, the test value refers to a value corresponding to the test signal when the tested ECU is subjected to the HIL test. The test value does not refer to a fixed value. For example, when the test signal changes, the test value may also change. When the ECU under test changes, the test value may also change.
It is easy to understand that, when the test device obtains the test file corresponding to the target environment test model, the test device may set the test value corresponding to at least one test signal based on the test initial value set, so that the target environment test model performs the high-voltage hardware-in-the-loop simulation test based on the test initial value set.
In the embodiment of the disclosure, in the process of in-loop simulation test of high-voltage hardware, if the high-voltage hardware is detected to be in a connection state with upper equipment, a test file corresponding to a target environment test model is acquired; and setting a test value corresponding to at least one test signal based on the test initial value set so that the target environment test model performs high-voltage hardware-in-the-loop simulation test based on the test initial value set. Therefore, in the simulation test process, the test file is acquired when the test file is connected with the upper equipment, and the test value corresponding to the test signal is set based on the test file, so that the test can be continuously carried out without powering off the high-voltage power supply, the efficiency of the simulation test can be improved, the convenience of the simulation test can be improved, and the use experience of a user is improved.
Referring to fig. 4, fig. 4 is a flow chart illustrating a second simulation testing method according to an embodiment of the disclosure. Specifically, the simulation test method comprises the following steps:
s201, establishing connection with upper equipment through a C language application program interface or an application program interface in a script language;
the specific process is as above, and is not described herein again.
According to some embodiments, an Application Programming Interface (API) refers to a convention for interfacing different components of a software system. May be used to provide a set of routines that applications and developers can access based on certain software or hardware without accessing source code or understanding the details of internal working mechanisms.
In some embodiments, a C language application program interface refers to an interface predefined through the C language. The C language api does not refer to a fixed interface. For example, when the tested ECU changes, the C language application program interface may also change. When the upper device changes, the C language application program interface can also change.
In some embodiments, scripting languages refer to computer programming languages created to shorten the traditional write-compile-link-run process. Also known as a build-out language, or a dynamic language. Can be used to control software applications, scripts can be saved in text form and interpreted or compiled only when called. The scripting language does not specifically refer to a fixed voice. For example, when the ECU under test changes, the script language may also change. When the host device changes, the script language may also change.
It is easy to understand that, when the test equipment performs simulation test on the ECU under test, the test equipment may establish connection with the upper device through the C language application program interface or the application program interface in the script language.
S202, acquiring at least one test signal which meets the storage condition of the initial value of the signal in the initial environment test model;
the specific process is as above, and is not described herein again.
According to some embodiments, the signal initial value storage condition refers to a condition employed when the test device stores the test initial value. The signal initial value storage condition does not particularly refer to a fixed condition. The signal initial value storage condition may also change when the test equipment acquires a condition modification instruction for the signal initial value storage condition. For example, the signal initial value storage condition may be an address and a value of a writable module.
According to some embodiments, when the test device obtains at least one test signal satisfying the signal initial value storage condition in the initial environment test model, the test device may obtain a test signal identified by the test device body, and the test device may also obtain a test signal input to the test device by a user. Therefore, the efficiency and the accuracy of test signal acquisition can be improved, and the use experience of a user can be improved.
In some embodiments, when the test device obtains the test signal identified by the test device body, the test device may obtain at least one test signal in the initial environment test model based on a preset signal initial value storage condition.
In some embodiments, when the test device obtains test signals input to the test device by a user, the test device may obtain a set of test signals in the initial environmental test model. Furthermore, the test device may obtain a test value attribute corresponding to any test signal in the test signal set. Finally, the test device may obtain at least one test signal in the set of test signals with a test value attribute consistent with the attribute condition.
In some embodiments, a test value attribute refers to an attribute of a test value to which a test signal corresponds. The test value attribute does not refer to a fixed attribute. For example, the test value attribute may be an initial attribute. The test value attribute may also be a normal value attribute.
In some embodiments, the attribute condition refers to a condition that is employed when the test device stores the test signal. The attribute condition does not refer to a fixed condition. When the terminal acquires the condition modification instruction for the attribute condition, the attribute condition may also be changed. For example, when the attribute condition is an initial attribute, the test device may acquire a test initial value in which the test value attribute is the initial attribute in the test signal set.
It is easy to understand that, when the test equipment performs a simulation test on the ECU under test, the test equipment may acquire at least one test signal that satisfies the signal initial value storage condition in the initial environment test model.
S203, acquiring a test initial value corresponding to at least one test signal;
the specific process is as above, and is not described herein again.
According to some embodiments, when the test device obtains a test initial value corresponding to at least one test signal, the test device may call the MATLAB program to obtain the test initial value corresponding to the at least one test signal in the initial environmental test model through a C language application program interface or an application program interface in a script language. Therefore, the accuracy of the initial value testing can be improved, and the use experience of a user can be improved.
It is easily understood that, when the test device acquires at least one test signal satisfying the signal initial value storage condition in the initial environment test model, the test device may acquire a test initial value corresponding to the at least one test signal.
S204, storing a test initial value corresponding to at least one test signal into a test file corresponding to the initial environment test model;
the specific process is as above, and is not described herein again.
According to some embodiments, when the test device stores a test initial value corresponding to at least one test signal into a test file corresponding to the initial environmental test model, the test device may store the test initial value into a corresponding position in a text file corresponding to the initial environmental test model. The test equipment can also store the test initial value to the corresponding position in the form file corresponding to the test model of the initial environment. The test equipment can also store the test initial value to the corresponding position in the comma separated value file corresponding to the initial environment test model.
It is easy to understand that, when the test equipment obtains the test initial value corresponding to the at least one test signal, the test equipment may store the test initial value corresponding to the at least one test signal in the test file corresponding to the initial environmental test model.
S205, in the process of the high-voltage hardware-in-loop simulation test, if the high-voltage hardware-in-loop simulation test is detected to be in a connection state with the upper equipment, a test file corresponding to the target environment test model is obtained;
the specific process is as above, and is not described herein again.
According to some embodiments, when the test device detects a connection state between the body and the upper device in a process of the high-voltage hardware-in-loop simulation test, the test device may detect the connection state between the test device and the upper device by detecting a connection state of a link between a C language application program interface in the test device and the upper device. The test equipment can also detect the connection state between the test equipment and the upper equipment by detecting the connection state of a link between the application program interface in the script language and the upper equipment.
It is easy to understand that, when the test equipment performs a simulation test on the ECU to be tested, in the process of the high-voltage hardware-in-the-loop simulation test, if the test equipment detects that the ECU to be tested is in a connection state with the upper device, the test equipment may obtain a test file corresponding to the target environment test model.
S206, acquiring any test signal in the target environment test model;
it is easy to understand that, when the test equipment acquires the test file corresponding to the target environment test model, the test equipment may acquire any test signal in the target environment test model.
S207, acquiring a test initial value corresponding to any test signal in the test initial value set;
it is easy to understand that, when the test device obtains any test signal in the target environment test model, the test device may obtain a test initial value corresponding to any test signal in the set of test initial values.
S208, setting a test value corresponding to any test signal as a test initial value;
according to some embodiments, the manner in which the test device sets the test value corresponding to any test signal as the test initial value may be, for example, simple assignment, complex assignment, recursive assignment, conditional assignment, additional assignment, or the like.
In some embodiments, when the test apparatus sets the test value corresponding to any test signal as the test initial value by simple assignment, the test apparatus may store the value of the operand to the right of the operator in the variable specified by the operand to the left of the operator, that is, the test apparatus may store the value corresponding to the test initial value to the right of the operator in the test signal specified to the left of the operator. The operator may be "=", for example.
It is easy to understand that, when the test device obtains the test initial value corresponding to any test signal in the test initial value set, the test device may set the test value corresponding to any test signal as the test initial value.
S209, traversing at least one test signal, and setting a test value corresponding to at least one test signal in the target environment test model, so that the target environment test model performs high-voltage hardware-in-loop simulation test based on the test initial value set.
According to some embodiments, when the test equipment makes the target environment test model perform the high-voltage hardware-in-loop simulation test based on the test initial value set, the test equipment may make the target environment test model perform the high-voltage hardware-in-loop simulation test based on the test initial value set in a direct start or indirect start manner.
In some embodiments, when the test device directly starts the target environment test model to perform the high-voltage hardware-in-the-loop simulation test based on the test initial value set, the test device may perform the high-voltage hardware-in-the-loop simulation test based on the test initial value set by the target environment test model when setting the test values corresponding to all the test signals in the target environment test model.
In some embodiments, when the test device performs the high-voltage hardware-in-the-loop simulation test on the target environment test model based on the test initial value set in an indirect start manner, the test device may obtain a test instruction sent by the upper device to the target environment test model. And responding to the test instruction, and performing the high-voltage hardware-in-the-loop simulation test by adopting the target environment test model.
In some embodiments, the upper device sends the instruction when the test instruction refers to performing a high-voltage hardware-in-loop simulation test. The test instruction does not specify a fixed instruction. The test instruction may also change when the modification instruction for the test instruction is fetched by the upper-order device.
In some embodiments, when the test device completes setting the test values corresponding to all the test signals in the target environment test model, the test device may send a prompt message to the upper-level device. When the upper device receives the prompt message sent by the test device, the upper device can send a corresponding test instruction to the test device.
It is easy to understand that, when the test device obtains the test file corresponding to the target environment test model, the test device may traverse the at least one test signal, and set the test value corresponding to the at least one test signal in the target environment test model, so that the target environment test model performs the high-voltage hardware-in-the-loop simulation test based on the test initial value set.
In the embodiment of the disclosure, the connection with the upper device is established through a C language application program interface or an application program interface in a script language; therefore, the stability of connection with the upper device can be improved, and the use experience of a user can be further improved. Acquiring at least one test signal which meets the storage condition of the initial signal value in the initial environment test model; acquiring a test initial value corresponding to at least one test signal; storing a test initial value corresponding to at least one test signal into a test file corresponding to the initial environment test model; therefore, by acquiring the test signal meeting the signal initial value storage condition, the accuracy of acquiring the test file can be improved, and the use experience of a user can be further improved. In the process of the high-voltage hardware in the environment simulation test, if the high-voltage hardware is detected to be in a connection state with the upper equipment, a test file corresponding to the target environment test model is obtained; therefore, in the simulation test process, the test file is acquired when the test file is connected with the upper device, the test value corresponding to the test signal can be set based on the test file, the test can be continued without powering off the high-voltage power supply, the efficiency of the simulation test can be improved, the convenience of the simulation test can be improved, and the use experience of a user is improved. Acquiring any test signal in the target environment test model; acquiring a test initial value corresponding to any test signal in the test initial value set; setting a test value corresponding to any test signal as a test initial value; and after at least one test signal is passed, setting a test value corresponding to at least one test signal in the target environment test model so as to enable the target environment test model to perform high-voltage hardware-in-loop simulation test based on the test initial value set. Therefore, the test value corresponding to the test signal is set by the traversal method, the accuracy of obtaining the initial value set can be improved, the convenience of simulation test can be improved, and the use experience of a user is further improved.
In the technical scheme of the disclosure, the collection, storage, use, processing, transmission, provision, disclosure and other processing of the personal information of the related user are all in accordance with the regulations of related laws and regulations and do not violate the good customs of the public order.
The following are embodiments of the disclosed apparatus that may be used to perform embodiments of the disclosed methods. For details not disclosed in the embodiments of the apparatus of the present disclosure, refer to the embodiments of the method of the present disclosure.
Referring to fig. 5, a schematic structural diagram of a first simulation testing apparatus provided in an exemplary embodiment of the disclosure is shown. The simulation test device may be implemented as all or part of a device by software, hardware, or a combination of both. The simulation testing apparatus 500 includes a file obtaining unit 501 and a hardware testing unit 502, wherein:
a file obtaining unit 501, configured to, in a process of the in-loop simulation test of the high-voltage hardware, if it is detected that the high-voltage hardware is in a connection state with an upper device, obtain a test file corresponding to a target environment test model, where the test file includes a set of test initial values corresponding to at least one test signal in the target environment test model, where the test signals correspond to the test initial values one to one;
the hardware testing unit 502 is configured to set a test value corresponding to at least one test signal based on the test initial value set, so that the target environment testing model performs a high-voltage hardware-in-loop simulation test based on the test initial value set.
According to some embodiments, fig. 6 shows a schematic structural diagram of a second simulation test apparatus provided in the embodiments of the present disclosure. As shown in fig. 6, the simulation testing apparatus 500 further includes a device connection unit 503, configured to, before acquiring a file corresponding to the target environment test model if it is detected that the upper device is in a connected state:
the device connection unit 503 is configured to establish a connection with an upper device through a C-language application program interface or an application program interface in a script language.
According to some embodiments, fig. 7 shows a schematic structural diagram of a third simulation test apparatus provided in the embodiments of the present disclosure. As shown in fig. 7, the simulation testing apparatus 500 further includes a signal obtaining unit 504, an initial value obtaining unit 505, and an initial value storing unit 506, which are configured to, if it is detected that the host device is in a connected state, before obtaining a file corresponding to the target environment test model:
a signal obtaining unit 504, configured to obtain at least one test signal that satisfies a signal initial value storage condition in the initial environment test model;
an initial value obtaining unit 505, configured to obtain a test initial value corresponding to at least one test signal;
an initial value storage unit 506, configured to store a test initial value corresponding to at least one test signal into a test file corresponding to the initial environmental test model.
According to some embodiments, the initial value obtaining unit 505 is used for obtaining a test initial value corresponding to at least one test signal, and is specifically used for obtaining a test initial value corresponding to at least one test signal
And calling an MATLAB program to obtain a test initial value corresponding to at least one test signal in the initial environment test model through a C language application program interface or an application program interface in a script language.
According to some embodiments, fig. 8 shows a schematic structural diagram of a fourth simulation test apparatus provided in the embodiments of the present disclosure. As shown in fig. 8, the signal obtaining unit 504 includes a set obtaining subunit 514, an attribute obtaining subunit 524, and a signal obtaining subunit 534, and when the signal obtaining unit 504 is configured to obtain at least one test signal in the initial environment test model, which satisfies the storage condition of the initial value of the signal:
the signal obtaining subunit 534 is configured to obtain at least one test signal in the initial environment test model based on a preset signal initial value storage condition.
Or,
a set obtaining subunit 514, configured to obtain a set of test signals in the initial environment test model;
an attribute obtaining subunit 524, configured to obtain a test value attribute corresponding to any test signal in the test signal set;
the signal acquiring subunit 534 is further configured to acquire at least one test signal in the test signal set, where the attribute of the test value is consistent with the attribute condition.
According to some embodiments, fig. 9 illustrates a schematic structural diagram of a fifth simulation testing apparatus provided in an embodiment of the present disclosure. As shown in fig. 9, the hardware testing unit 502 includes a model signal obtaining subunit 512, an initial value obtaining subunit 522, an initial value setting subunit 532, and a signal traversing subunit 542, and when the hardware testing unit 502 is configured to set a test value corresponding to at least one test signal based on a set of test initial values:
a model signal obtaining subunit 512, configured to obtain any test signal in the target environment test model;
an initial value obtaining subunit 522, configured to obtain, in the set of test initial values, a test initial value corresponding to any one test signal;
an initial value setting subunit 532, configured to set a test value corresponding to any test signal as a test initial value;
and the signal traversing subunit 542 is configured to traverse at least one test signal, and set a test value corresponding to the at least one test signal in the target environment test model.
According to some embodiments, fig. 10 shows a schematic structural diagram of a sixth simulation testing apparatus provided in the embodiments of the present disclosure. As shown in fig. 10, the simulation test apparatus 500 further includes:
an instruction obtaining unit 507, configured to obtain a test instruction sent by the upper device for the target environment test model;
and the instruction response unit 508 is configured to perform a high-voltage hardware-in-loop simulation test by using the target environment test model in response to the test instruction.
It should be noted that, when the simulation test apparatus provided in the foregoing embodiment executes the simulation test method, only the division of each functional module is illustrated by way of example, and in practical applications, the above function distribution may be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules, so as to complete all or part of the above described functions. In addition, the simulation test apparatus and the simulation test method provided by the above embodiments belong to the same concept, and the implementation process is detailed in the method embodiments, which is not described herein again.
The above-mentioned serial numbers of the embodiments of the present disclosure are merely for description, and do not represent the advantages or disadvantages of the embodiments.
In the embodiment of the disclosure, in the process of the in-loop simulation test of the high-voltage hardware, if the file acquisition unit detects that the high-voltage hardware is in a connection state with the upper device, a test file corresponding to a target environment test model is acquired; the hardware testing unit sets a testing value corresponding to at least one testing signal based on the testing initial value set so that the target environment testing model performs high-voltage hardware-in-loop simulation testing based on the testing initial value set. Therefore, in the simulation test process, the test file is acquired when the test file is in a connection state with the upper device, and the test value corresponding to the test signal is set based on the test file, so that the test can be continued without powering off the high-voltage power supply, the efficiency of the simulation test can be improved, the convenience of the simulation test can be improved, and the use experience of a user is improved.
In the technical scheme of the disclosure, the acquisition, storage, application and the like of the personal information of the related user all accord with the regulations of related laws and regulations, and do not violate the good customs of the public order.
The present disclosure also provides an electronic device, a readable storage medium, and a computer program product according to embodiments of the present disclosure.
FIG. 11 shows an illustrative block diagram of an example electronic device 1100 that may be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may 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 meant to be examples only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 11, the device 1100 comprises a computing unit 1101 which may perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM) 1102 or a computer program loaded from a storage unit 1108 into a Random Access Memory (RAM) 1103. In the RAM 1103, various programs and data necessary for the operation of the device 1100 may also be stored. The calculation unit 1101, the ROM 1102, and the RAM 1103 are connected to each other by a bus 1104. An input/output (I/O) interface 1105 is also connected to bus 1104.
A number of components in device 1100 connect to I/O interface 1105, including: an input unit 1106 such as a keyboard, a mouse, and the like; an output unit 1107 such as various types of displays, speakers, and the like; a storage unit 1108 such as a magnetic disk, optical disk, or the like; and a communication unit 1109 such as a network card, a modem, a wireless communication transceiver, and the like. A communication unit 1109 allows the device 1100 to exchange information/data with other devices via a computer network, such as an internet, and/or various telecommunication networks.
The computing unit 1101 can be a variety of general purpose and/or special purpose processing components having processing and computing capabilities. Some examples of the computing unit 1101 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various dedicated Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and the like. The calculation unit 1101 performs the respective methods and processes described above, such as a simulation test method. For example, in some embodiments, the simulation test method may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as storage unit 1108. In some embodiments, part or all of the computer program may be loaded and/or installed onto device 1100 via ROM 1102 and/or communications unit 1109. When the computer program is loaded into RAM 1103 and executed by the computing unit 1101, one or more steps of the above-described emulation testing method can be performed. Alternatively, in other embodiments, the computing unit 1101 may be configured to perform the simulation test method in any other suitable manner (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), the Internet, and blockchain networks.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The Server can be a cloud Server, also called a cloud computing Server or a cloud host, and is a host product in a cloud computing service system, so as to solve the defects of high management difficulty and weak service expansibility in the traditional physical host and VPS service ("Virtual Private Server", or simply "VPS"). The server may also be a server of a distributed system, or a server incorporating a blockchain.
It should be understood that various forms of the flows shown above, reordering, adding or deleting steps, may be used. For example, the steps described in the present disclosure may be executed in parallel, sequentially, or in different orders, as long as the desired results of the technical solutions disclosed in the present disclosure can be achieved, and the present disclosure is not limited herein.
The above detailed description should not be construed as limiting the scope of the disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present disclosure should be included in the scope of protection of the present disclosure.

Claims (10)

1. A simulation test method is characterized by comprising the following steps:
in the process of the in-loop simulation test of the high-voltage hardware, if the high-voltage hardware is detected to be in a connection state with an upper device, a test file corresponding to a target environment test model is obtained, wherein the test file comprises a test initial value set corresponding to at least one test signal in the target environment test model, and the test signals correspond to the test initial values one to one;
and setting a test value corresponding to the at least one test signal based on the test initial value set so that the target environment test model performs high-voltage hardware-in-loop simulation test based on the test initial value set.
2. The method according to claim 1, wherein before the step of obtaining the file corresponding to the target environment test model if it is detected that the host device is in the connection state, the method further comprises:
acquiring at least one test signal which meets the storage condition of the initial signal value in the initial environment test model;
acquiring a test initial value corresponding to the at least one test signal;
and storing the test initial value corresponding to the at least one test signal into a test file corresponding to the initial environment test model.
3. The method of claim 2, wherein obtaining the test initial value corresponding to the at least one test signal comprises:
and calling an MATLAB program to obtain a test initial value corresponding to at least one test signal in the initial environment test model through a C language application program interface or an application program interface in a script language.
4. The method of claim 2, wherein the obtaining at least one test signal in the initial environmental test model that satisfies a signal initial value storage condition comprises:
acquiring at least one test signal in an initial environment test model based on a preset signal initial value storage condition;
or,
acquiring a test signal set in the initial environment test model;
acquiring a test value attribute corresponding to any test signal in the test signal set;
and acquiring at least one test signal with the test value attribute consistent with the attribute condition in the test signal set.
5. The method of claim 1, wherein setting the corresponding test value of the at least one test signal based on the set of test initial values comprises:
acquiring any test signal in the target environment test model;
acquiring a test initial value corresponding to any test signal in the test initial value set;
setting a test value corresponding to any test signal as the test initial value;
and traversing the at least one test signal, and setting a test value corresponding to the at least one test signal in the target environment test model.
6. The method of claim 1, further comprising:
acquiring a test instruction sent by upper equipment aiming at a target environment test model;
and responding to a test instruction, and performing high-voltage hardware-in-the-loop simulation test by adopting the target environment test model.
7. A simulation test apparatus, comprising:
the device comprises a file acquisition unit, a test unit and a control unit, wherein the file acquisition unit is used for acquiring a test file corresponding to a target environment test model if detecting that the test file is in a connection state with an upper device in the process of the in-loop simulation test of the high-voltage hardware, the test file comprises a test initial value set corresponding to at least one test signal in the target environment test model, and the test signals correspond to the test initial values one to one;
and the hardware testing unit is used for setting a testing value corresponding to the at least one testing signal based on the testing initial value set so that the target environment testing model performs high-voltage hardware-in-loop simulation testing based on the testing initial value set.
8. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; it is characterized in that the preparation method is characterized in that,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-6.
9. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method according to any one of claims 1-6.
10. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1-6.
CN202210249394.9A 2022-03-14 2022-03-14 Simulation test method and device, electronic device and storage medium Pending CN115469561A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210249394.9A CN115469561A (en) 2022-03-14 2022-03-14 Simulation test method and device, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210249394.9A CN115469561A (en) 2022-03-14 2022-03-14 Simulation test method and device, electronic device and storage medium

Publications (1)

Publication Number Publication Date
CN115469561A true CN115469561A (en) 2022-12-13

Family

ID=84364437

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210249394.9A Pending CN115469561A (en) 2022-03-14 2022-03-14 Simulation test method and device, electronic device and storage medium

Country Status (1)

Country Link
CN (1) CN115469561A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116125950A (en) * 2023-01-19 2023-05-16 重庆赛力斯新能源汽车设计院有限公司 Automatic generation method, equipment and medium for hardware-in-loop simulation test tool

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116125950A (en) * 2023-01-19 2023-05-16 重庆赛力斯新能源汽车设计院有限公司 Automatic generation method, equipment and medium for hardware-in-loop simulation test tool

Similar Documents

Publication Publication Date Title
CN113795039B (en) Operator network switching method, device, equipment and computer readable storage medium
CN113127357B (en) Unit test method, apparatus, device, storage medium, and program product
CN112506584B (en) Resource file loading method, device, equipment, storage medium and product
EP4124957A2 (en) Core board, server, fault repairing method and apparatus, and storage medium
CN112131092A (en) Page debugging method and device
CN114417780B (en) State synchronization method and device, electronic equipment and storage medium
CN114389969B (en) Method and device for testing client, electronic equipment and storage medium
CN113609027A (en) ARM cloud server testing method and device, electronic equipment and storage medium
CN115469561A (en) Simulation test method and device, electronic device and storage medium
CN113572833B (en) Cloud mobile phone maintenance method and device, electronic equipment and storage medium
CN113535020B (en) Method, apparatus, device, medium and product for generating application icons
CN114374703B (en) Cloud mobile phone information acquisition method, device, equipment and storage medium
CN113691937B (en) Method for determining position information, cloud mobile phone and terminal equipment
CN114138358A (en) Application program starting optimization method, device, equipment and storage medium
CN114741286A (en) Data processing method and device, electronic equipment and storage medium
CN114743586A (en) Mirror image storage implementation method and device of storage model and storage medium
CN113703821A (en) Cloud mobile phone updating method, device, equipment and storage medium
CN113992729B (en) Cloud mobile phone control method, related device and computer program product
CN113741937B (en) Application updating method and device for cloud terminal and computer program product
CN114879981B (en) Cloud operating system installation method and device, electronic equipment and storage medium
CN116756061A (en) External equipment adaptation method, device, equipment and storage medium
CN118394342A (en) Code running method, device, electronic equipment and storage medium
CN118132428A (en) IOS application testing method, device, equipment and medium based on MAC operating system
CN113961207A (en) Application control method, device, electronic equipment and medium
CN114217837A (en) Software updating method, device, equipment and medium for cloud mobile phone

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination