CN116566627A - Method, system, device, equipment and readable storage medium for testing key learning - Google Patents

Method, system, device, equipment and readable storage medium for testing key learning Download PDF

Info

Publication number
CN116566627A
CN116566627A CN202310769256.8A CN202310769256A CN116566627A CN 116566627 A CN116566627 A CN 116566627A CN 202310769256 A CN202310769256 A CN 202310769256A CN 116566627 A CN116566627 A CN 116566627A
Authority
CN
China
Prior art keywords
learning
bms
adas
environment model
model file
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
CN202310769256.8A
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 Electric Vehicle Co Ltd
Original Assignee
Beijing Electric Vehicle 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 Electric Vehicle Co Ltd filed Critical Beijing Electric Vehicle Co Ltd
Priority to CN202310769256.8A priority Critical patent/CN116566627A/en
Publication of CN116566627A publication Critical patent/CN116566627A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/36Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols with means for detecting characters not meant for transmission
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/14Arrangements for monitoring or testing data switching networks using software, i.e. software packages
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements
    • H04L43/55Testing of service level quality, e.g. simulating service usage
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02TCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
    • Y02T10/00Road transport of goods or passengers
    • Y02T10/60Other road transportation technologies with climate change mitigation effect
    • Y02T10/70Energy storage systems for electromobility, e.g. batteries

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Quality & Reliability (AREA)
  • Test And Diagnosis Of Digital Computers (AREA)

Abstract

The invention provides a method, a system, a device, equipment and a readable storage medium for testing key learning. The method relates to the technical field of testing and aims to solve the problem of low accuracy of a test key learning algorithm. The method comprises the following steps: performing message simulation on the sending logic of the ADAS based on the upper computer to obtain an environment model file of the key learning test, wherein the environment model file comprises a key SKC and a safety code SC; compiling the environment model file on hardware-in-loop HIL equipment based on the upper computer; generating an executable file according to the environment model file based on the upper computer; transmitting the executable file to the HIL equipment based on the upper computer; and performing key learning test on the battery management system BMS by using the executable file based on the HIL equipment. The invention can improve the accuracy of the test.

Description

Method, system, device, equipment and readable storage medium for testing key learning
Technical Field
The present invention relates to the field of testing technologies, and in particular, to a method, a system, an apparatus, a device, and a readable storage medium for testing key learning.
Background
In an automatic driving vehicle, for safety of communication, an advanced auxiliary driving system (Advanced Driving Assistance System, ADAS) needs to perform key learning when communicating with other controllers, so that it becomes necessary to test the accuracy and reliability of a key learning algorithm of a battery management system BMS, but a manual test method is often adopted in the prior art, resulting in lower accuracy of the test key learning algorithm.
Disclosure of Invention
The embodiment of the invention provides a method, a system, a device, equipment and a readable storage medium for testing key learning, which have the problem of lower accuracy of a test key learning algorithm in the current practical application.
In order to solve the problems, the embodiment of the invention adopts the following technical scheme:
in a first aspect, an embodiment of the present invention provides a method for testing key learning, including:
performing message simulation on the sending logic of the ADAS based on the upper computer to obtain an environment model file of the key learning test, wherein the environment model file comprises a key SKC and a safety code SC;
compiling the environment model file on hardware-in-loop HIL equipment based on the upper computer;
generating an executable file according to the environment model file based on the upper computer;
transmitting the executable file to the HIL equipment based on the upper computer;
and performing key learning test on the battery management system BMS by using the executable file based on the HIL equipment.
In a second aspect, an embodiment of the present invention provides a test system for key learning, where the test system includes an upper computer and an HIL device;
the upper computer performs message simulation on the sending logic of the ADAS to obtain an environment model file of the key learning test, wherein the environment model file comprises a key SKC and a safety code SC;
compiling the environment model file into HIL equipment by the upper computer;
generating an executable file according to the environment model file based on the upper computer;
the upper computer sends the executable file to the HIL equipment;
the HIL device performs a key learning test on the battery management system BMS using the executable file.
In a third aspect, an embodiment of the present invention provides a test apparatus for key learning, including:
the simulation module is used for carrying out message simulation on the sending logic of the ADAS based on the upper computer to obtain an environment model file of the key learning test, wherein the environment model file comprises a key SKC and a safety code SC;
the compiling module is used for compiling the environment model file on the hardware-in-loop HIL equipment based on the upper computer;
the generation module is used for generating an executable file according to the environment model file based on the upper computer;
the sending module is used for sending the executable file to the HIL equipment based on the upper computer;
and the testing module is used for carrying out key learning testing on the battery management system BMS by utilizing the executable file based on the HIL equipment.
In a third aspect, an embodiment of the present invention provides a test apparatus for key learning, the apparatus including: a transceiver, a memory, a processor, and a program stored on the memory and executable on the processor; the processor is configured to read a program in a memory to implement the steps in the method according to the first aspect.
In a fourth aspect, embodiments of the present invention provide a readable storage medium having stored thereon a program or instructions which when executed by a processor implement the steps in the method according to the first aspect.
In the embodiment of the invention, the test method for the key learning can simulate ADAS and BMS communication flows on the HIL test environment, so that a BMS bus communication security algorithm is changed into a testable item in the HIL environment, the security of bus communication is ensured, and automatic test is realized by writing use cases and automatic scripts, so that the test accuracy is higher.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the description of the embodiments of the present invention will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort to a person of ordinary skill in the art.
Fig. 1 is one of flowcharts of a testing method for learning an ADAS and BMS key according to an embodiment of the present invention;
fig. 2 is a second flowchart of a testing method for learning an ADAS and BMS key according to an embodiment of the present invention;
fig. 3 is a third flowchart of a testing method for learning an ADAS and BMS key according to an embodiment of the present invention;
fig. 4 is a flowchart of an ADAS and BMS key learning process according to an embodiment of the present invention;
fig. 5 is a flowchart of an ADAS and BMS key clearing process according to an embodiment of the present invention;
fig. 6 is a flowchart of ADAS learning process message simulation provided in an embodiment of the present invention;
FIG. 7 is a schematic diagram of a test system for key learning according to an embodiment of the present invention;
FIG. 8 is a schematic diagram of a test device for key learning according to an embodiment of the present invention;
fig. 9 is a schematic diagram of a test device for key learning according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Unless defined otherwise, technical or scientific terms used herein should be given the ordinary meaning as understood by one of ordinary skill in the art to which this invention belongs. The terms "first," "second," and the like, as used herein, do not denote any order, quantity, or importance, but rather are used to distinguish one element from another. "upper", "lower", "left", "right", etc. are used merely to indicate a relative positional relationship, which changes accordingly when the absolute position of the object to be described changes.
Referring to fig. 1, fig. 1 is one of flowcharts of a testing method for learning an ADAS and BMS key according to an embodiment of the present invention, and as shown in fig. 1, the method includes:
step 101, performing message simulation on the sending logic of the ADAS based on the upper computer to obtain an environment model file of the key learning test, wherein the environment model file comprises a key SKC and a safety code SC.
Specifically, the message simulation is performed on the sending logic of the driving assistance system ADAS based on the host computer, which may be sending logic such as SKC, SC, random number after the ADAS sends the request learning state in the environment model, may be implemented in MATLAB/SIMULINK2018, and implement logic description, where the host computer may be a computer or a single chip microcomputer that directly sends the operation instruction, generally provides a user operation interaction interface and presents feedback data to the user, the driving assistance system may be an advanced driving assistance system (Advanced Driving Assistance System, ADAS), the environment model file may be an environment model obtained after the driving assistance system ADAS is simulated, the Secret Key SKC may be a Secret Key, SKC, and the security Code SC may be a security Code (Safe Code, SC), and the SC may be generated by a vehicle identification Code (Vehicle Identification Number, VIN), have uniqueness, and respectively consist of 16 bytes and 3 bytes.
And 102, compiling the environment model file on the hardware-in-loop HIL equipment based on the upper computer.
Specifically, the HIL device may be a device employing Hardware-in-the-Loop (HIL), which is a development and testing technique for complex device controllers.
And step 103, the upper computer generates an executable file according to the environment model file.
Specifically, the executable file may be a file directly executed by an autonomous automatic test tool, and may be a test case, where the test case may be a specific scenario and parameters are designed according to simulation logic and implementation logic description, for verifying functions and performances of a system, for example, table 1 below is a BMS key learning test case, as shown in table 1, an input signal in the test case is an environment model external interface, learning flow logic of the test case is integrated inside the model, an ADAS before learning sends a "request learning state" signal, a BMS feeds back a learning state "no learning", after learning (the process is completed in a "S5" line in the case), a "request learning state" signal is sent again, and a BMS feeds back the learning state "learned", where specific learning flows are shown in fig. 2 and 3, and contents in virtual boxes are integrated inside the environment.
Table 1BMS Key learning test cases
Table 2 below shows a test case for clearing a learning state of a BMS, in which an input signal is an external interface of an environmental model, the BMS is ensured to be in a "learned" state before clearing the learning state, the learning state is requested again after clearing the learning state, and the BMS learning state returns to be "not learned" to indicate that the clearing is successful.
Table 2BMS clears learning state test cases
And 104, transmitting the executable file to the HIL equipment based on the upper computer.
And step 105, performing key learning test on the battery management system BMS by using the executable file based on the HIL device.
Specifically, the battery management system BMS may be a battery management system (Battery Management System, BMS), the key learning test includes a learning process and a clearing process, the learning process of the BMS is different in the factory mode and the after-sales mode of the whole vehicle, in the offline learning function, the BMS writes SKC and SC into the secure storage area through the Tester device, and verifies through the authentication process between the ADAS and the BMS, and after the verification passes, the offline learning function ends; in the after-sales learning process, the newly installed BMS sends an instruction through a Tester, the stored SKC and SC in the unrechanged ADAS are shared to the newly installed BMS, verification is carried out through an authentication process between the ADAS and the BMS, the after-sales learning process is finished after the verification is passed, the Tester equipment in the factory learning mode refers to the off-line electric inspection equipment, the Tester equipment in the after-sales mode refers to the after-sales diagnostic equipment, the safety storage area can be a storage with a hardware safety chip into the safety chip, and a storage without the hardware safety chip into the FLASH memory.
In the embodiment of the invention, the test method for the key learning can simulate ADAS and BMS communication flows on the HIL test environment, so that a BMS bus communication security algorithm is changed into a testable item in the HIL environment, the security of bus communication is ensured, and automatic test is realized by writing use cases and automatic scripts, so that the test accuracy is higher.
Optionally, the performing, based on the upper computer, a message simulation on the sending logic of the driving support system ADAS to obtain an environment model file of the key learning test includes:
based on an upper computer, carrying out message simulation on a sending logic of a learning flow of an ADAS (advanced automatic analysis and driving system) to obtain a learning environment model file in a key learning test;
and carrying out message simulation on the sending logic of the clearing flow of the ADAS based on the upper computer to obtain a clearing environment model file in the key learning test, wherein the environment model file comprises a learning environment model file and the clearing environment model file.
Specifically, the key learning of the ADAS and the BMS includes a key learning process and a clearing process, for example, fig. 4 is a flowchart of an ADAS and BMS key learning process provided by an embodiment of the present invention, as shown in fig. 4, where after the ADAS sending system starts a learning process after learning activation, the BMS receives the signal to feed back the self-learning state, and if the BMS is in a learned state, the BMS does not perform the learning process any more; if the BMS is in an unlearned state, the BMS starts a learning process, the ADAS continues to send the SKC and the SC, the BMS stores the SKC and the SC in a safety area, then the SKC and the SC are verified through the random numbers, if the authentication is not passed and the authentication is overtime, the ADAS sends authentication failure, after the authentication is passed, the BMS stops the learning process, the ADAS sends a learning state setting, and the BMS receives the signal and sets the self learning state as the learned and sends the self learning state.
Fig. 5 is a flowchart of an ADAS and BMS key clearing process according to an embodiment of the present invention, where, as shown in fig. 5, when the ADAS sends a clear learning command and SC, the BMS compares whether the SC value is consistent with the storage, if not, the clear command is not executed, and if so, the status of learning is cleared.
In the embodiment of the invention, the method for testing the key learning can be used for simulating the key learning process and the clearing process of the ADAS and the BMS respectively to obtain the learning environment model file and the clearing environment model file, so that the automatic test of the key learning process and the clearing process of the ADAS and the BMS is realized.
Optionally, the step of performing message simulation on the sending logic of the learning process of the driving support system ADAS based on the upper computer to obtain a learning environment model file in the key learning test includes:
receiving a learning state replied by the BMS under the condition that the ADAS sends a learning state request signal to the BMS;
if the returned learning state is not learned, sending a secret key SKC and a security code SC to the BMS at intervals of a first time based on the ADAS;
under the condition that the SKC and the SC are sent completely, after the ADAS waits for a second time interval, a random number message is sent to the BMS, wherein the second time interval is larger than the first time interval;
the ADAS compares the calculation result sent by the BMS with the random number message to obtain an authentication result, wherein the calculation result is obtained by the BMS according to the received random number message, and the authentication result is used for indicating whether the BMS learns successfully or not;
under the condition that the authentication result characterizes the BMS to learn successfully, the ADAS sends the authentication result to the BMS;
and under the condition that the authentication result is sent completely, the ADAS sends setting learning state information to the BMS, wherein the setting learning state information is used for indicating the BMS to set the learning state.
Specifically, the key point of the simulation ADAS message is when to send and send signal values, for example, fig. 6 is a flow chart of ADAS learning flow message simulation, as shown in fig. 6, an ADAS learning message (message 1) polls to send request learning states, SKC and SC, when the request learning state signal is set to 1, SKC and SC continue to be sent, the time interval is 30ms, after the sending is completed, waiting for 100ms triggers sending of a random number message, and this message (message 2) also polls to send a random number and an authentication result, and after the message is compared with the BMS to return an AES calculation result, authentication is successfully output, and after the successful sending of authentication is completed, message 1 sends the set learning state.
In the embodiment of the invention, the testing method for the key learning can simulate the key learning process of the BMS by using an automatic testing tool, verify the correctness and the safety of the key learning process, improve the testing efficiency and the testing quality and reduce the errors and the cost of manual operation.
Optionally, the step of performing message simulation on the sending logic of the clearing process of the driving support system ADAS based on the upper computer to obtain a clearing environment model file in the key learning test includes:
the ADAS sends a clearing learning instruction and a safety code SC to the BMS, wherein the clearing learning instruction is used for indicating the BMS to clear a learning state;
the BMS executes the purge learning instruction in case the security code SC is the same as the security code stored by the BMS.
Specifically, the flow of the ADAS learning flow message simulation is that the ADAS learning message (message 3) sends a clearing instruction and an SC code to the BMS.
In the embodiment of the invention, the key learning test method can simulate the key clearing process of the BMS by using an automatic test tool, verify the correctness and safety of the key clearing process, improve the test efficiency and quality and reduce the errors and cost of manual operation.
Fig. 7 is a schematic diagram of a test system for key learning according to an embodiment of the present invention, as shown in fig. 7, where the test system includes an upper computer and an HIL device;
the upper computer performs message simulation on the sending logic of the ADAS to obtain an environment model file of the key learning test, wherein the environment model file comprises a key SKC and a safety code SC;
compiling the environment model file into HIL equipment by the upper computer;
generating an executable file according to the environment model file based on the upper computer;
the upper computer sends the executable file to the HIL equipment;
the HIL device performs a key learning test on the battery management system BMS using the executable file.
Fig. 8 is a schematic diagram of a testing apparatus for key learning according to an embodiment of the present invention, as shown in fig. 8, the apparatus 800 includes:
the simulation module 801 is configured to perform message simulation on a sending logic of an ADAS based on an upper computer to obtain an environment model file of a key learning test, where the environment model file includes a key SKC and a security code SC;
a compiling module 802, configured to compile the environment model file on a hardware-in-loop HIL device based on the upper computer;
a generating module 803, configured to generate an executable file according to the environment model file based on the upper computer;
a sending module 804, configured to send the executable file to the HIL device based on the host computer;
and the test module 805 is configured to perform a key learning test on the battery management system BMS by using the executable file based on the HIL device.
Optionally, the simulation module 801 includes:
the first simulation unit is used for carrying out message simulation on the transmission logic of the learning flow of the ADAS based on the upper computer to obtain a learning environment model file in the key learning test;
and the second simulation unit is used for carrying out message simulation on the sending logic of the clearing flow of the ADAS based on the upper computer to obtain a clearing environment model file in the key learning test, wherein the environment model file comprises a learning environment model file and the clearing environment model file.
Optionally, the first analog unit is configured to:
receiving a learning state replied by the BMS under the condition that the ADAS sends a learning state request signal to the BMS;
if the returned learning state is not learned, sending a secret key SKC and a security code SC to the BMS at intervals of a first time based on the ADAS;
under the condition that the SKC and the SC are sent completely, after the ADAS waits for a second time interval, a random number message is sent to the BMS, wherein the second time interval is larger than the first time interval;
the ADAS compares the calculation result sent by the BMS with the random number message to obtain an authentication result, wherein the calculation result is obtained by the BMS according to the received random number message, and the authentication result is used for indicating whether the BMS learns successfully or not;
under the condition that the authentication result characterizes the BMS to learn successfully, the ADAS sends the authentication result to the BMS;
and under the condition that the authentication result is sent completely, the ADAS sends setting learning state information to the BMS, wherein the setting learning state information is used for indicating the BMS to set the learning state.
Optionally, the second analog unit is configured to:
the ADAS sends a clearing learning instruction and a safety code SC to the BMS, wherein the clearing learning instruction is used for indicating the BMS to clear a learning state;
the BMS executes the purge learning instruction in case the security code SC is the same as the security code stored by the BMS.
Fig. 9 is a schematic diagram of a test device for key learning according to an embodiment of the present invention, as shown in fig. 9, where the device includes: a transceiver 701, a memory 702, a processor 700, and a program stored on the memory and executable on the processor;
the processor 700 is configured to perform message simulation on a sending logic of the driving support system ADAS based on the upper computer, so as to obtain an environment model file of the key learning test, where the environment model file includes a key SKC and a security code SC;
compiling the environment model file on hardware-in-loop HIL equipment based on the upper computer;
generating an executable file according to the environment model file based on the upper computer; transmitting the executable file to the HIL equipment based on the upper computer;
and performing key learning test on the battery management system BMS by using the executable file based on the HIL equipment.
Wherein in fig. 7, a bus architecture may comprise any number of interconnected buses and bridges, and in particular one or more processors represented by processor 700 and various circuits of memory represented by memory 702, linked together. The bus architecture may also link together various other circuits such as peripheral devices, voltage regulators, power management circuits, etc., which are well known in the art and, therefore, will not be described further herein. The bus interface provides an interface. The transceiver 701 may be a number of elements, including a transmitter and a transceiver, providing a means for communicating with various other apparatus over a transmission medium. The processor 700 is responsible for managing the bus architecture and general processing, and the memory 702 may store data used by the processor 700 in performing operations.
Optionally, the processor 700 is further configured to:
based on an upper computer, carrying out message simulation on a sending logic of a learning flow of an ADAS (advanced automatic analysis and driving system) to obtain a learning environment model file in a key learning test;
and carrying out message simulation on the sending logic of the clearing flow of the ADAS based on the upper computer to obtain a clearing environment model file in the key learning test, wherein the environment model file comprises a learning environment model file and the clearing environment model file.
Optionally, the processor 700 is further configured to:
receiving a learning state replied by the BMS under the condition that the ADAS sends a learning state request signal to the BMS;
if the returned learning state is not learned, sending a secret key SKC and a security code SC to the BMS at intervals of a first time based on the ADAS;
under the condition that the SKC and the SC are sent completely, after the ADAS waits for a second time interval, a random number message is sent to the BMS, wherein the second time interval is larger than the first time interval;
the ADAS compares the calculation result sent by the BMS with the random number message to obtain an authentication result, wherein the calculation result is obtained by the BMS according to the received random number message, and the authentication result is used for indicating whether the BMS learns successfully or not;
under the condition that the authentication result characterizes the BMS to learn successfully, the ADAS sends the authentication result to the BMS;
and under the condition that the authentication result is sent completely, the ADAS sends setting learning state information to the BMS, wherein the setting learning state information is used for indicating the BMS to set the learning state.
Optionally, the processor 700 is further configured to:
the ADAS sends a clearing learning instruction and a safety code SC to the BMS, wherein the clearing learning instruction is used for indicating the BMS to clear a learning state;
the BMS executes the purge learning instruction in case the security code SC is the same as the security code stored by the BMS.
The embodiment of the present invention further provides a readable storage medium, configured to store a program, where the program may be executed by a processor to implement each process of the embodiments of the method, and the implementation principle and technical effects are similar, so that, for avoiding repetition, the description of this embodiment is omitted here.
In the several embodiments provided in the present invention, it should be understood that the disclosed methods and apparatus may be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may be physically included separately, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in hardware plus software functional units.
The integrated units implemented in the form of software functional units described above may be stored in a computer readable storage medium. The software functional unit is stored in a storage medium, and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform part of the steps of the transceiving method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
While the invention has been described with reference to preferred embodiments, it will be understood by those skilled in the art that the scope of the invention is not limited thereto, and that modifications and variations may be made without departing from the spirit of the invention, which is also intended to be considered as the scope of the invention.

Claims (10)

1. A method for testing key learning, comprising:
performing message simulation on the sending logic of the ADAS based on the upper computer to obtain an environment model file of the key learning test, wherein the environment model file comprises a key SKC and a safety code SC;
compiling the environment model file on hardware-in-loop HIL equipment based on the upper computer;
generating an executable file according to the environment model file based on the upper computer; transmitting the executable file to the HIL equipment based on the upper computer;
and performing key learning test on the battery management system BMS by using the executable file based on the HIL equipment.
2. The method of claim 1, wherein the performing, based on the host computer, a message simulation on the transmission logic of the driving support system ADAS to obtain an environment model file of the key learning test includes:
based on an upper computer, carrying out message simulation on a sending logic of a learning flow of an ADAS (advanced automatic analysis and driving system) to obtain a learning environment model file in a key learning test;
and carrying out message simulation on the sending logic of the clearing flow of the ADAS based on the upper computer to obtain a clearing environment model file in the key learning test, wherein the environment model file comprises a learning environment model file and the clearing environment model file.
3. The method of claim 2, wherein the step of performing message simulation on the transmission logic of the learning process of the driving support system ADAS based on the upper computer to obtain the learning environment model file in the key learning test comprises:
receiving a learning state replied by the BMS under the condition that the ADAS sends a learning state request signal to the BMS;
if the returned learning state is not learned, sending a secret key SKC and a security code SC to the BMS at intervals of a first time based on the ADAS;
under the condition that the SKC and the SC are sent completely, after the ADAS waits for a second time interval, a random number message is sent to the BMS, wherein the second time interval is larger than the first time interval;
the ADAS compares the calculation result sent by the BMS with the random number message to obtain an authentication result, wherein the calculation result is obtained by the BMS according to the received random number message, and the authentication result is used for indicating whether the BMS learns successfully or not;
under the condition that the authentication result characterizes the BMS to learn successfully, the ADAS sends the authentication result to the BMS;
and under the condition that the authentication result is sent completely, the ADAS sends setting learning state information to the BMS, wherein the setting learning state information is used for indicating the BMS to set the learning state.
4. The method of claim 2, wherein the step of performing message simulation on the sending logic of the clearing process of the driving support system ADAS based on the upper computer to obtain the clearing environment model file in the key learning test comprises the steps of:
the ADAS sends a clearing learning instruction and a safety code SC to the BMS, wherein the clearing learning instruction is used for indicating the BMS to clear a learning state;
the BMS executes the purge learning instruction in case the security code SC is the same as the security code stored by the BMS.
5. The test system for key learning is characterized by comprising an upper computer and HIL equipment;
the upper computer performs message simulation on the sending logic of the ADAS to obtain an environment model file of the key learning test, wherein the environment model file comprises a key SKC and a safety code SC;
compiling the environment model file into HIL equipment by the upper computer;
generating an executable file according to the environment model file based on the upper computer;
the upper computer sends the executable file to the HIL equipment;
the HIL device performs a key learning test on the battery management system BMS using the executable file.
6. A test device for key learning, comprising:
the simulation module is used for carrying out message simulation on the sending logic of the ADAS based on the upper computer to obtain an environment model file of the key learning test, wherein the environment model file comprises a key SKC and a safety code SC;
the compiling module is used for compiling the environment model file on the hardware-in-loop HIL equipment based on the upper computer;
the generation module is used for generating an executable file according to the environment model file based on the upper computer;
the sending module is used for sending the executable file to the HIL equipment based on the upper computer;
and the testing module is used for carrying out key learning testing on the battery management system BMS by utilizing the executable file based on the HIL equipment.
7. The apparatus of claim 6, wherein the simulation module comprises:
the first simulation unit is used for carrying out message simulation on the transmission logic of the learning flow of the ADAS based on the upper computer to obtain a learning environment model file in the key learning test;
and the second simulation unit is used for carrying out message simulation on the sending logic of the clearing flow of the ADAS based on the upper computer to obtain a clearing environment model file in the key learning test, wherein the environment model file comprises a learning environment model file and the clearing environment model file.
8. The apparatus of claim 7, wherein the first analog unit is to:
receiving a learning state replied by the BMS under the condition that the ADAS sends a learning state request signal to the BMS;
if the returned learning state is not learned, sending a secret key SKC and a security code SC to the BMS at intervals of a first time based on the ADAS;
under the condition that the SKC and the SC are sent completely, after the ADAS waits for a second time interval, a random number message is sent to the BMS, wherein the second time interval is larger than the first time interval;
the ADAS compares the calculation result sent by the BMS with the random number message to obtain an authentication result, wherein the calculation result is obtained by the BMS according to the received random number message, and the authentication result is used for indicating whether the BMS learns successfully or not;
under the condition that the authentication result characterizes the BMS to learn successfully, the ADAS sends the authentication result to the BMS;
and under the condition that the authentication result is sent completely, the ADAS sends setting learning state information to the BMS, wherein the setting learning state information is used for indicating the BMS to set the learning state.
9. A test apparatus for key learning, the apparatus comprising: a transceiver, a memory, a processor, and a program stored on the memory and executable on the processor; it is characterized in that the method comprises the steps of,
the processor being configured to read a program in a memory to implement the steps in the method according to any one of claims 1 to 4.
10. A readable storage medium, characterized in that a program or instructions is stored on the readable storage medium, wherein the program or instructions, when executed by a processor, implement the steps of the method according to any one of claims 1 to 4.
CN202310769256.8A 2023-06-27 2023-06-27 Method, system, device, equipment and readable storage medium for testing key learning Pending CN116566627A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310769256.8A CN116566627A (en) 2023-06-27 2023-06-27 Method, system, device, equipment and readable storage medium for testing key learning

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310769256.8A CN116566627A (en) 2023-06-27 2023-06-27 Method, system, device, equipment and readable storage medium for testing key learning

Publications (1)

Publication Number Publication Date
CN116566627A true CN116566627A (en) 2023-08-08

Family

ID=87496712

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310769256.8A Pending CN116566627A (en) 2023-06-27 2023-06-27 Method, system, device, equipment and readable storage medium for testing key learning

Country Status (1)

Country Link
CN (1) CN116566627A (en)

Similar Documents

Publication Publication Date Title
CN102779089B (en) Automobile ECU key Simulation Methods and system thereof and verification method
CN109726061B (en) SoC chip verification method
EP3379436B1 (en) Method and apparatus for testing design of satellite wiring harness and signal processing units
CN109991955A (en) A kind of entire car controller test method, device and equipment
CN113759879B (en) Vehicle-mounted Ethernet DoIP diagnosis and writing test method and system based on L3 whole vehicle architecture
Dhadyalla et al. Combinatorial testing for an automotive hybrid electric vehicle control system: a case study
Skruch et al. Model-Based Testing in Embedded Automotive Systems.
CN109947078A (en) Direct fault location unit and its board, real time fail method for implanting, device and equipment
CN103576667A (en) Main control panel test method, device and system
CN113821440A (en) VxWorks application software testing method, system and simulator
CN110928275B (en) Multi-controller combined HIL (high-level hierarchical level) rack message frame loss fault injection test system and method
CN113495545A (en) System and method for testing vehicle equipment controller using in-loop hardware
CN116566627A (en) Method, system, device, equipment and readable storage medium for testing key learning
Khan A Standardized Process Flow for Creating and Maintaining Component Level Hardware in the Loop Simulation Test Bench
CN106354930B (en) A kind of self-adapting reconstruction method and system of spacecraft
RU59284U1 (en) MANAGEMENT SYSTEM SIMULATOR
CN113126881B (en) System configuration method, device, equipment, readable storage medium and distributed storage system
CN113341767A (en) Method, system and computer readable storage medium for automated testing
US20050188275A1 (en) Systems and methods for error tracking and recovery in an expectation-based memory agent checker
Xu et al. Design of vehicle gateway automatic test system based on CANoe
Magnus et al. Test generation for model based fieldbus profiles
CN114444423B (en) Data processing method and system based on verification platform and electronic equipment
CN117170350B (en) Service testing method and device, electronic equipment and storage medium
Luo et al. Research On CAN controller conformance test system
Gomes Safety critical middleware in communication protocols

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