WO2023039804A1 - Signal connection method, signal connection apparatus, and test system - Google Patents

Signal connection method, signal connection apparatus, and test system Download PDF

Info

Publication number
WO2023039804A1
WO2023039804A1 PCT/CN2021/118868 CN2021118868W WO2023039804A1 WO 2023039804 A1 WO2023039804 A1 WO 2023039804A1 CN 2021118868 W CN2021118868 W CN 2021118868W WO 2023039804 A1 WO2023039804 A1 WO 2023039804A1
Authority
WO
WIPO (PCT)
Prior art keywords
port
module
under test
tested
signal connection
Prior art date
Application number
PCT/CN2021/118868
Other languages
French (fr)
Chinese (zh)
Inventor
杨宸
周维
杨辉明
黄南阳
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Priority to CN202180029249.3A priority Critical patent/CN117043699A/en
Priority to PCT/CN2021/118868 priority patent/WO2023039804A1/en
Publication of WO2023039804A1 publication Critical patent/WO2023039804A1/en

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R1/00Details of instruments or arrangements of the types included in groups G01R5/00 - G01R13/00 and G01R31/00
    • G01R1/02General constructional details
    • G01R1/04Housings; Supporting members; Arrangements of terminals
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B23/00Testing or monitoring of control systems or parts thereof
    • G05B23/02Electric testing or monitoring

Definitions

  • the invention relates to the technical field of test equipment, in particular to a signal connection method, a signal connection device and a test system.
  • HIL testing The basic principle of hardware-in-the-loop (HIL) testing is to simulate the sensor signals and communication signals required by one or more controllers through HIL equipment, and simultaneously collect the control signals sent by one or more controllers. , one or more controllers and the simulation model running in the HIL device form a closed loop, thereby realizing hardware-in-the-loop testing of one or more controllers.
  • ECU electronic control unit
  • the HIL test it is necessary to configure the port and make the wiring harness according to the hard wire port of the ECU and the I/O board port type of the HIL test system, so that the tested ECU can be connected to the HIL device, complete the construction of the test platform, and conduct subsequent tests .
  • the test platform since there are more ECUs and more signals involved in the vehicle-level HIL test, it takes a lot of time to build the test platform.
  • related technologies mainly focus on reducing the workload of wiring harness customization, such as jumper adapter boards and custom wiring harnesses.
  • the jumper adapter board and the customized wiring harness need to be connected manually, and there are problems such as the inability to realize automatic configuration.
  • Embodiments of the present application provide a signal connection method, a signal connection device, and a test system, which can realize full-link signal connection configuration in HIL testing, and improve the efficiency of development and verification.
  • the embodiment of the present application provides a signal connection method, the method may include: configuring a first mapping relationship through a signal connection device, the first mapping relationship includes the signal connection between the module under test and the hardware-in-the-loop HIL device Relationship; determine the third mapping relationship according to the first mapping relationship, the third mapping relationship includes the signal mapping relationship between the first processor and the HIL device; wherein, the first processor is used to run the simulation model, and the simulation model is the module to be tested A model for function simulation; determine the connection relationship of the HIL test according to the third mapping relationship.
  • the automatic derivation of the link signal between the module to be tested and the first processor in the HIL test can be realized, without artificially connecting and deriving the signal, which can shorten the preparation time for the HIL test. Improve the efficiency of development verification.
  • the first processor before determining the third mapping relationship between the first processor and the HIL device according to the first mapping relationship, it further includes: acquiring a second mapping relationship, where the second mapping relationship It includes the signal mapping relationship between the first processor and the module under test.
  • the signal mapping relationship between the first processor and the module under test can be directly obtained, because the simulation model runs in the first processor, and the signal mapping relationship between the simulation model and the module under test can also be obtained, without Manually writing signal connections can reduce the workload of global signal connections and improve the efficiency of signal configuration.
  • determining the third mapping relationship according to the first mapping relationship includes: determining a third mapping between the first processor and the HIL device according to the second mapping relationship and the first mapping relationship relation.
  • mapping of the I/O resources between the first processor running the simulation model and the HIL device can be determined without manual association, which can reduce operational errors and improve configuration efficiency.
  • configuring the first mapping relationship through the signal connection device includes: setting the networking mode between multiple modules under test through the signal connection device; setting one or more modules through the signal connection device A first link between a module to be tested and the HIL device; determine the first mapping relationship based on the set networking mode and the first link, so as to configure the first mapping relationship through the signal connection device.
  • the signal connection device includes multiple ports
  • setting the networking mode between multiple modules under test through the signal connection device includes: setting the corresponding ports of multiple ports through the signal connection device Multiple port identifiers, for example, the first port identifier corresponding to the first port of the signal connection device, the second port identifier corresponding to the second port of the signal connection device, and the third port identifier corresponding to the third port of the signal connection device, etc.
  • Different port identifiers can be the same or different.
  • the network mode between different modules to be tested can be set through the signal connection device, so that manual connection is not required to define the network topology, which reduces errors caused by manual operation and improves configuration efficiency.
  • multiple modules to be tested are respectively connected to the signal connection device through multiple ports
  • setting the networking mode between the multiple modules to be tested based on the port identification includes: based on the port Identify and set the second link between the first module to be tested and the second module to be tested, wherein the plurality of modules to be tested include the first module to be tested and the second module to be tested, and the port is identified as the An identification corresponding to the port of the signal connection device; setting a networking mode among multiple modules to be tested based on the second link.
  • the port-based configuration can limit message broadcasting within the connection range and complete the exchange between ports.
  • the networking between the modules under test is not sensitive to port configuration, so it will not affect the transmission of networking messages.
  • setting the second link between the first module under test and the second module under test based on the port identifier includes: In this case, determine the signal transmission between the first module under test and the second module under test, so as to realize setting the port identification between the first module under test and the second module under test The second link; wherein, the first port identification is the identification corresponding to the first port of the signal connection device, and the first port is the port connected to the first module under test; the second The port identifier is an identifier corresponding to a second port of the signal connection device, and the second port is a port connected to the second module under test.
  • the port-based configuration (setting the port identifiers to be the same) can limit message broadcasting within the connection range and complete the exchange between ports.
  • the networking between the modules under test is not sensitive to port configuration, so it will not affect the transmission of networking messages.
  • a port connection relationship is determined, the port connection relationship includes a first port identifier and a second port identifier, and the first port identifier is the first port of the signal connection device
  • the corresponding identification the first port is the port connected to the first module to be tested; the second port identification is the identification corresponding to the second port of the signal connection device, and the second port is the identification corresponding to the first module to be tested.
  • a port connected to the second module under test; and a second link between the first module under test and the second module under test is set based on the port connection relationship.
  • the port-based configuration and the established forwarding relationship can limit the message broadcast within the connection range and complete the exchange between ports.
  • the networking between the modules under test is not sensitive to port configuration, so it will not affect the transmission of networking messages.
  • the port of the signal connection device includes an Ethernet port or a control area network CAN port.
  • the above method may be applied to model testing and/or bench testing, where the bench testing includes physical components corresponding to the simulation model, and the physical components are connected to the signal connection device.
  • the signal link in the HIL simulation test and bench test can be configured through the embodiment of the present application, without manual configuration, and hybrid simulation can be realized. Therefore, the simulation results of the model can be compared with the simulation results of the physical components, and the efficiency of test verification can be improved.
  • the method further includes: constructing a test instance according to a test request from the user equipment.
  • the test instance is used for the user equipment to use the resource of the target module under test corresponding to the test request.
  • the embodiments of the present application can provide the user equipment with the resources required by the test instance according to the requirements of the user equipment, so as to meet the test needs of different scales and improve the utilization rate of HIL test resources.
  • constructing a test instance according to a test request from a user equipment includes: assigning a corresponding target module to be tested and an I/O port for the user equipment according to the test request, and the I/O port is Ports on the HIL device; build test instances based on the target module under test and I/O ports.
  • the embodiment of the present application can allocate HIL test resources from the I/O resource pool and the module resource pool to be tested according to the test request, thereby meeting the HIL test requirements of different scales and improving the HIL test performance.
  • Resource utilization According to the assigned I/O port mapping relationship and HIL configuration requirements, the mapping between model signals and I/O ports is automatically derived, and the full link signal connection is completed to build a test instance.
  • constructing a test instance according to the resources and I/O ports of the target module under test includes: determining a fourth mapping relationship according to the resources of the target module under test, and the fourth mapping relationship includes the target The signal connection relationship between the module to be tested and the first processor; the fifth mapping relationship is determined according to the I/O port, and the fifth mapping relationship includes the signal connection relationship between the target module to be tested and the HIL device; according to the fourth mapping relationship and the fifth mapping relationship determine a sixth mapping relationship between the first processor and the HIL device; construct a test instance based on the sixth mapping relationship.
  • the embodiment of the present application can automatically derive the mapping between model signals and HIL device I/O resources, which can reduce the time-consuming configuration of software and hardware, reduce the idle time of HIL device resources, and reduce the cost of use.
  • the embodiment of the present application provides a signal connection device, the signal connection device is used to control the signal connection between the module under test and the HIL setting, the device includes a first configuration unit and a second configuration unit,
  • the first configuration unit is used to set the networking mode between multiple modules to be tested
  • the second configuration unit is used to set the first link between one or more modules under test and the HIL device.
  • the first configuration unit includes a plurality of ports, and the first configuration unit is specifically configured to: set a plurality of port identifiers corresponding to the plurality of ports; The networking mode between the test modules.
  • a plurality of modules to be tested are respectively connected to the first configuration unit through ports, and the first configuration unit is specifically used to: set the first module to be tested and the second module to be tested based on the port identification
  • the second link between the modules to be tested wherein the plurality of modules to be tested includes a first module to be tested and a second module to be tested, and the port identification is the identification corresponding to the port of the signal connection device; based on the second link, multiple The networking mode between the modules under test.
  • the first configuration unit is specifically configured to: determine that the first module under test and the second Signal transmission between the modules under test, so as to realize setting the second link between the first module under test and the second module under test through the port identification; wherein, the first port identification is the The identification corresponding to the first port of the signal connection device, the first port is the port connected to the first module to be tested; the second port identification is the identification corresponding to the second port of the signal connection device, The second port is a port connected to the second module under test.
  • the first configuration unit is specifically configured to: determine a port connection relationship, where the port connection relationship includes a first port identifier and a second port identifier, and the first port identifier is The identification corresponding to the first port of the signal connection device, the first port is the port connected to the first module to be tested; the second port identification is the identification corresponding to the second port of the signal connection device , the second port is a port connected to the second module under test; setting a second link between the first module under test and the second module under test based on the port connection relationship.
  • the port includes an Ethernet port or a control area network CAN port.
  • an embodiment of the present application provides a test system, which may include the signal connection device in any implementation of the second aspect above; hardware-in-the-loop HIL test equipment connected to the signal connection device; the module to be tested, Connect with the signal connection device.
  • the test system also includes a first processor, the first processor is used to run a simulation model, and the simulation model is a model for simulating the function of the module to be tested; the test system also includes a first The signal mapping relationship between the processor and the module under test.
  • the test system runs on at least one of the following devices: a public cloud device, a private cloud device, or a local device.
  • the embodiment of the present application provides a signal connection device, the device can control the unit, and is used to configure the first mapping relationship through the signal connection device, the first mapping relationship includes the module under test and the hardware-in-the-loop HIL device The signal connection relationship; the processing unit is used to determine the third mapping relationship according to the first mapping relationship, and the third mapping relationship includes the signal mapping relationship between the first processor and the HIL device, wherein the first processor is used to run the simulation model , the simulation model is a model for simulating the function of the module to be tested; the connection unit is used to determine the connection relationship of the HIL test according to the third mapping relationship.
  • the device further includes: an acquiring unit, configured to acquire a second mapping relationship, where the second mapping relationship includes a signal mapping relationship between the first processor and the module under test.
  • the processing unit is specifically configured to determine the third mapping relationship according to the second mapping relationship and the first mapping relationship.
  • control unit is specifically used to: set the networking mode between multiple modules under test through the signal connection device; set one or more modules under test and the The first link between the HIL devices: determining the first mapping relationship based on the set networking mode and the first link, so as to configure the first mapping relationship through the signal connection device.
  • the device includes multiple ports
  • the control unit is specifically configured to: set multiple port identifiers corresponding to the multiple ports through the signal connection device; set multiple modules under test based on the port identifiers Between networking modes. For example, the first port identifier corresponding to the first port of the signal connection device, the second port identifier corresponding to the second port of the signal connection device, the third port identifier corresponding to the third port of the signal connection device, and so on. Different port identifiers can be the same or different.
  • multiple modules to be tested are respectively connected to the device through multiple ports, and the control unit is specifically configured to: set the first module to be tested and the second module to be tested based on port identifiers The second link between, wherein, a plurality of modules to be tested includes a first module to be tested and a second module to be tested, and the port identification is the identification corresponding to the port of the signal connection device; a plurality of modules to be tested are set based on the second link The networking mode between modules.
  • control unit is specifically configured to: determine that the first module under test and the second module under test Signal transmission between modules, so as to realize setting the second link between the first module under test and the second module under test through the port identification; wherein, the first port identification is the signal The identification corresponding to the first port of the connection device, the first port is the port connected to the first module to be tested; the second port identification is the identification corresponding to the second port of the signal connection device, the The second port is a port connected to the second module under test.
  • control unit is specifically configured to: determine a port connection relationship, where the port connection relationship includes a first port identifier and a second port identifier, and the first port identifier is the The identification corresponding to the first port of the signal connection device, the first port is the port connected to the first module to be tested; the second port identification is the identification corresponding to the second port of the signal connection device, so The second port is a port connected to the second module under test; a second link between the first module under test and the second module under test is set based on the port connection relationship.
  • the port includes an Ethernet port or a control area network (CAN) port.
  • CAN control area network
  • the device is used for model testing and bench testing, and the bench testing includes a signal connection device of a physical component corresponding to a simulation model.
  • connection unit is configured to construct a test instance according to the test request from the user equipment, and the test instance is used for the user equipment to use resources of the target module under test corresponding to the test request.
  • the processing unit is configured to assign a corresponding target module to be tested and an I/O port to the user equipment according to the test request, and the I/O port is a port in the HIL device; the connection unit, It is used to build a test instance according to the target module under test and I/O port.
  • the embodiment of the present application provides a computer-readable storage medium, and instructions are stored in the computer-readable storage medium, and when the instructions are run on at least one processor, the method described in any one of the aforementioned first aspects is implemented .
  • the present application provides a computer program product, the computer program product includes computer instructions, and when the instructions are run on at least one processor, the method described in any one of the foregoing first aspects is implemented.
  • the computer program product may be a software installation package, and the computer program product may be downloaded and executed on a computing device if the foregoing method needs to be used.
  • FIG. 1 is a schematic diagram of a central computing architecture provided by an embodiment of the present application.
  • Fig. 2A is a schematic diagram of a test system provided by an embodiment of the present application.
  • Fig. 2B is a schematic diagram of a physical component software assembly package provided by the embodiment of the present application.
  • FIG. 3A is a schematic diagram of signal connections in a HIL simulation test provided by an embodiment of the present application.
  • FIG. 3B is a schematic flowchart of a signal connection method provided by an embodiment of the present application.
  • Fig. 4 is a schematic diagram of a signal connection device provided by an embodiment of the present application.
  • FIG. 5A is a schematic diagram of a networking mode between modules to be tested provided in an embodiment of the present application.
  • Fig. 5B is a schematic diagram of another networking mode between the modules to be tested provided by the embodiment of the present application.
  • FIG. 6 is a schematic diagram of a hybrid simulation test provided by an embodiment of the present application.
  • FIG. 7 is a schematic diagram of a simulation test based on a cloud computing service provided by an embodiment of the present application.
  • FIG. 8 is a schematic diagram of resource allocation provided by an embodiment of the present application.
  • FIG. 9 is a schematic structural diagram of a signal connection device provided by an embodiment of the present application.
  • FIG. 10 is a schematic structural diagram of a computing device provided by an embodiment of the present application.
  • HIL Hardware-In-Loop
  • FIG. 1 is a schematic diagram of a central computing architecture (Central Computing Architecture, CCA) 100 provided by an embodiment of the present application.
  • CCA Central Computing Architecture
  • the cars mentioned in the embodiments of this application include but are not limited to smart cars, new energy cars, or traditional cars.
  • smart cars can include smart driving cars, unmanned cars, etc.
  • New energy vehicles include pure electric vehicles, enhanced electric vehicles, hybrid vehicles, fuel cell electric vehicles, hydrogen engine vehicles, and other new energy vehicles.
  • Traditional vehicles include gasoline vehicles, diesel vehicles, etc., which are not limited in this embodiment of the present application.
  • the central computing architecture 100 may include distributed gateways (such as one or more I/O gateways) and data centers (xData Center), xDC (such as smart cockpit CDC, vehicle control VDC and smart driving MDC).
  • xDC such as smart cockpit CDC, vehicle control VDC and smart driving MDC.
  • Smart cockpit CDC is used for smart cockpit control
  • vehicle control VDC is used for vehicle power control
  • smart driving MDC is used for smart driving control.
  • the distributed gateway can provide access to devices, while connecting to xDC, connecting to vehicle parts, and also connecting to the car box (Telematics BOX, T-box). Therefore, the distributed gateway can be the core component in the vehicle central computing architecture and the data exchange hub of the vehicle network. Distributed gateways and xDCs can run incorporated controller logic. T-box is mainly used to communicate with the exterior of the car, background systems and mobile phone applications.
  • Vehicle components including actuators, which are used to achieve specific functions.
  • the actuator may be, for example, an actuator or a sensor in the vehicle.
  • Vehicle components may also include ECUs.
  • the vehicle parts may include one or more of the following: vehicle parts with partial or complete electronic control functions, and vehicle parts without electronic control functions.
  • the car parts that realize the automatic driving function include monocular cameras, binocular cameras, millimeter-wave radars, lidars, ultrasonic radars, etc.
  • the vehicle components that realize the smart cockpit include head-up display, instrument display, radio, navigation, camera, etc.
  • the vehicle parts that realize the control of the whole vehicle include vehicle parts used in the body domain and vehicle parts in the chassis domain.
  • vehicle parts in the body domain include door and window lift controllers, electric rearview mirrors, air conditioners, central door locks, etc.
  • Vehicle components in the chassis domain include vehicle components in the braking system, vehicle components in the steering system, and vehicle components in the acceleration system, such as the accelerator.
  • ECU is located in the interior of auto parts and is composed of one or more of large-scale integrated circuits such as processors, memories, input/output (I/O) interfaces, analog-to-digital converters (A/D), and shaping and driving.
  • electronic control function it can complete various functions.
  • the auto parts can be controlled based on the control information, and for example, data processing can be performed on the data to be transmitted in the auto parts.
  • the above-mentioned electronic control functions mainly include logic control functions and data processing functions.
  • the logic control function includes controlling vehicle components to perform certain operations based on the obtained control information, for example, controlling the action of the wiper based on the control information; another example, controlling the switch state of the door lock based on the control information, etc.
  • the data processing function includes processing the data to be processed in the vehicle components, for example, processing the rain information collected by the sensitive elements of the wiper to determine the working status of the wiper, where the working status includes the working frequency of the wiper or switch status. For another example, data processing is performed on the fingerprint information obtained by the sensitive element of the door lock on the car door to determine the opening and closing status information of the car door.
  • the ECU in the embodiments of the present application refers to the electronic control components located in the vehicle components, which is different from the engine control unit (Engine Control Unit) in the prior art.
  • the engine control unit is located outside the multiple vehicle components in the engine system and is used to control multiple vehicle components in the engine system, which can be regarded as an independent centralized controller.
  • the electronic control unit in the embodiment of the present application that is, ECU refers to an electronic control unit located inside a vehicle component, for example, it may be an electronic control unit inside a plurality of vehicle components in an engine system.
  • the above-mentioned communication connection can be understood as a wireless connection or a wired connection for information transmission, which is not limited in the embodiment of the present application, wherein the wireless connection can be understood as the communication between xDC and other units in the vehicle without going through the bus.
  • the wireless connection for example, Bluetooth communication or Wi-Fi communication can be used.
  • Wired connection can be understood as the communication connection between DC and other units in the vehicle based on bus or Ethernet connection, for example, Controller Area Network (CAN) bus, Local Interconnect Network (LIN) bus can be used , high-speed serial computer expansion bus standard (peripheral component interconnect express, PCI-e), or Ethernet (ethernet) communication technology.
  • CAN Controller Area Network
  • LIN Local Interconnect Network
  • PCI-e peripheral component interconnect express
  • Ethernet Ethernet
  • a signal transfer device such as a signal configuration box (Break-Out-Box, BOB, or signal transfer box, etc.) is connected in series between the I/O board and the ECU to realize hardware-in-the-loop Test the connection between the system and the ECU.
  • a signal configuration box Break-Out-Box, BOB, or signal transfer box, etc.
  • the signal conversion device provided in the related art includes a first connector and a second connector, the first connector is connected to the hardware-in-the-loop test system, and the second connector is connected to the ECU.
  • Some technical solutions are to customize the wiring harness, that is, according to the interface characteristics of the ECU to be tested and the interface characteristics of the hardware-in-the-loop test signal, the first connector, the second connector, and the first connector and the second connection of the signal connection device Make specific settings for the connection mapping relationship between ECUs to meet the connection requirements between the ECU and the hardware-in-the-loop test system.
  • customizing the wiring harness requires a certain amount of time and cost, and it still needs to be done manually when replacing the wiring harness.
  • a jumper adapter board that is, the connection between the first connector and the second connector in the signal adapter device is connected through an on-off switch plug-in strip.
  • the user can Turn the switch on or off, then use a hardwire to manually connect the pins (PINs) of the connectors at both ends.
  • the jumper adapter board also needs to be manually connected and cannot be automated.
  • the signal that needs to be connected to the HIL test system has increased by nearly a hundred times.
  • the manual link may bring the probability of operational errors, and the customization link may increase time and cost, affecting the efficiency of development and verification.
  • FIG. 2A is a schematic diagram of a testing system 200 provided by an embodiment of the present application.
  • the hardware part of the test system 200 may include a signal connection device 201 , a hardware-in-the-loop (HIL) test device 202 and a module to be tested 203 .
  • the hardware-in-the-loop test equipment 202 and the module to be tested 203 are respectively connected to the signal connection device 201 , and information exchange can be performed through the signal connection device 201 .
  • the HIL device 202 includes a first processor capable of running a simulation model, an I/O board suitable for HIL testing, and a power supply module.
  • the signal connecting device 201 is used to set the networking mode between a plurality of modules under test, and is used to control the low-speed I between one or more modules under test and the HIL equipment. /O selective conduction.
  • the module under test 203 includes at least one I/O gateway and one or more components.
  • the hardware part of the test system 200 can form different product forms.
  • the hardware part of the test system 200 may be in the form of multiple cabinets, that is, the HIL device 202 , the signal connection device 201 and the module to be tested 203 are independent devices.
  • the hardware part of the test system 200 may also be in the form of a highly integrated single cabinet, that is, the HIL device 202, the signal connection device 201 and the module to be tested 203 are integrated in the same device.
  • the hardware part of the test system 200 may also be in the form of a partially integrated multi-cabinet, for example, the HIL device 202 and the signal connection device 201 are integrated into one device, and the module to be tested 203 is an independent device.
  • the software part of the test system 200 may include a physical component software package 204 , a simulation model management 205 , a signal connection management 206 , an I/O gateway configuration 207 and a service orchestration 208 .
  • a physical component software package 204 may include a simulation model management 205 , a signal connection management 206 , an I/O gateway configuration 207 and a service orchestration 208 .
  • FIG. 2B is a schematic diagram of a physical component software assembly package 204 provided in the embodiment of the present application.
  • the physical component software assembly package 204 includes a simulation model 2041, a module to be tested 203 and The second mapping relationship 2043 .
  • the first processor 2042 is used to run the simulation model 2041 and information processing.
  • the simulation model 2041 specifically includes one or more of the road environment model, ECU model, mechanical model and electrical model, as well as the conversion of physical quantities and interactive signals, which can be used for real Simulate the working characteristics of the components and their sensors and actuators.
  • the simulation model 2041 may include a vehicle dynamics model and a controlled object model.
  • the vehicle dynamics model is used to simulate vehicle operation scenarios
  • the controlled object model includes at least And battery engine model, power coupling mechanism model, motor model and battery model.
  • the module to be tested 203 may include real components and their sensors, actuator application product models, names, port settings and I/O resources such as signal conversion, and so on. It can be understood that the module to be tested 203 may be an application program for implementing functional logic. It should be noted that the number of modules to be tested 203 may be one or more, which is not limited in this embodiment of the present application.
  • the second mapping relationship 2043 includes the signal mapping relationship between the first processor 2042 and the module under test 203, wherein the second mapping relationship 2043 may specifically be between the simulation model 2041 in the first processor 2042 and the module under test 203
  • the signal mapping relationship for example, the mapping between the ports on the module under test 203 and the ports on the simulation model 2041 . It can be understood that, because the simulation model is a model of a virtual form designed according to the physical component, the ports on the simulation model correspond to the ports on the physical component, so the second mapping relationship 2043 can also be the physical component and the module to be tested 203 The signal mapping relationship between them.
  • the simulation model management 205 is used to manage the simulation model 2041 in the physical component software package 204 .
  • the simulation model 2041 is a model deployed on the hardware-in-the-loop testing device 202 to test the function of the module to be tested 203 .
  • the signal connection management 206 is used to control the signal connection between the signal connection device 201 and the HIL test equipment 202 and the module under test 203 .
  • the I/O gateway configuration 207 is used to configure the I/O interface of the underlying software (such as the corresponding software of the module to be tested 203), that is, to calibrate the physical meaning and engineering unit of the I/O port data, and to set the analog signal and The conversion relationship between actual physical values.
  • the underlying software such as the corresponding software of the module to be tested 203
  • the service orchestration 208 is used for arranging the service components corresponding to the module under test 203 according to actual needs to obtain new services that meet its own actual needs.
  • the module under test 203 can be deployed on the service orchestration 208 .
  • test system shown in FIG. 2A can run on a cloud (such as a public cloud or a private cloud), and can also run on a local device. Further, the high-performance computer running the simulation model in the test system can run on the cloud, and other parts (such as signal connection devices, modules to be tested, etc.) can run locally.
  • a cloud such as a public cloud or a private cloud
  • the high-performance computer running the simulation model in the test system can run on the cloud, and other parts (such as signal connection devices, modules to be tested, etc.) can run locally.
  • FIG. 3A is a schematic diagram of signal connections in an HIL simulation test provided by an embodiment of the present application.
  • supplier A generally provides the simulation model 2041
  • supplier B provides the module under test 203
  • the integrator writes the signal connection document between the simulation model 2041 and the module under test 203 . Therefore, the second mapping relationship between the simulation model 2041 and the module under test 203 can only be obtained by manually associating documents in the HIL test of the related art.
  • the physical component software assembly package 204 shown in FIG. 2A or FIG. 2B contains the mapping relationship between the simulation model 2041 in the first processor 2042 and the module to be tested 203. Therefore, the electronic device passes through the physical The component software package 204 can obtain the second mapping relationship.
  • the connection between the HIL device 202 and the module under test 203 needs to be realized through a customized wiring harness or a jumper board.
  • the electronic device can configure the first mapping relationship between the HIL device 202 and the module under test 203 through the signal connection device 201 . Further, the electronic device can set the networking mode between multiple modules under test 203 through the first configuration unit 2011, and then the electronic device can control the connection between one or more modules under test 203 and the HIL device 202 through the second configuration unit 2012. The conduction of the signal link between.
  • the I/O mapping relationship between the simulation model 2041 and the HIL device 202 requires manual association.
  • the electronic device may determine a third mapping relationship between the simulation model 2041 in the first processor 2042 and the HIL device 202 based on the second mapping relationship and the first mapping relationship.
  • the electronic device can form a closed loop with the module under test 203 and the simulation model 2041 running in the first processor 2042 .
  • Figure 3B is a schematic flowchart of a signal connection method provided by the embodiment of this application, this method can be applied to the system shown in Figure 2A, and the signal shown in Figure 3A can be realized through the method shown in Figure 3B connect.
  • the signal connection method shown in Figure 3B includes but is not limited to the following steps:
  • Step S301 Configuring a first mapping relationship through a signal connection device.
  • port configuration between the module to be tested and the HIL device is a necessary part of the HIL test.
  • a signal connection device can be connected in series between the module to be tested and the HIL device, and the electronic device can be configured through the signal connection device.
  • the signal mapping between the module and the HIL device that is, the first mapping relationship.
  • the HIL device may include a device installed with an I/O board. Therefore, the first mapping relationship may be a signal mapping between the module under test and the I/O board of the HIL device.
  • one or more modules to be tested can be connected to the signal connection device.
  • the electronic equipment can set multiple The networking mode between the test modules.
  • the module to be tested A, the module to be tested B, the module to be tested C and the module to be tested D are respectively connected to the signal connecting device.
  • the electronic equipment can set the communication link between the module A to be tested and the module B to be tested, the communication link between the module B to be tested and the module C to be tested, and the communication link between the module C to be tested and the module D to be tested through the signal connection device.
  • the link between, the communication link between the module D under test and the module C under test. Therefore, the module to be tested A, the module to be tested B, the module to be tested C and the module to be tested D can form a ring networking mode.
  • the signal connection device includes a plurality of ports, wherein the ports may include Ethernet ports or control area network (CAN) ports.
  • the electronic device can set multiple port identifiers corresponding to each port through the signal connection device, and then the electronic device can set a networking mode among multiple modules under test based on the port identifiers.
  • multiple modules to be tested are connected to the signal connection device through multiple ports, for example, module A to be tested is connected to the signal connection device through the first port, and module B to be tested is connected to the signal connection device through the second port.
  • the module C to be tested is connected to the signal connection device through the third port, and the module D to be tested is connected to the signal connection device through the fourth port.
  • the electronic device can obtain configuration information about the networking mode, for example, the configuration information can include the required To establish a communication link, a communication link needs to be established between the module B to be tested and the module C to be tested, and a connection needs to be established between the module C to be tested and the module A to be tested. Therefore, after the electronic device acquires the configuration information about the networking mode, it can configure the networking mode among multiple modules under test based on the configuration information. That is, the electronic device may set the second link between the first module under test and the second module under test based on the port identifier, and then set the networking mode among the multiple modules under test based on the second link.
  • the configuration information can include the required To establish a communication link, a communication link needs to be established between the module B to be tested and the module C to be tested, and a connection needs to be established between the module C to be tested and the module A to be tested. Therefore, after the electronic device acquires the configuration information about the networking mode, it can configure the networking mode among multiple modules under test based on the configuration
  • the first module to be tested and the second module to be tested belong to the above-mentioned multiple modules to be tested
  • the port identification is the identification corresponding to the port of the signal connection device
  • the first module to be tested and the second module to be tested are the configuration information that needs to be established Modules for communication links.
  • the electronic device may set the identifier of the second port based on the identifier of the first port.
  • the first port identification is the identification corresponding to the first port of the signal connection device, and the first port is the port on which the first module to be tested is connected to the information connection device;
  • the two-port identification is the identification corresponding to the second port of the signal connection device, and the second port is the port through which the second module to be tested is connected to the signal connection device.
  • the electronic device can forward the first Ethernet message to the second module under test through the second port according to the identifier of the first port, so as to realize setting the first Ethernet packet through the port identifier.
  • a second link between a module under test and a second module under test That is, after receiving the first Ethernet packet of the first module-under-test through the first port, the electronic device adds the identifier of the first port to the first Ethernet packet. Furthermore, the electronic device may transmit the first Ethernet packet to the second port that has the same identifier as the first port according to the identifier of the first port.
  • the first Ethernet packet from the first module under test can be transmitted to the second module under test.
  • the second link between the first module under test and the second module under test can be determined. Therefore, the electronic device can set the second link between the first module under test and the second module under test based on the port identifier.
  • the electronic device can configure the port connection relationship through the signal connection device.
  • the port connection relationship represents the connection relationship between ports, including the port identification .
  • the port connection relationship includes: a connection between a first port identifier and a second port identifier, a connection between a third port identifier and a fourth port identifier, and the like.
  • the electronic device may add the first port identifier to the Ethernet message from the first module under test.
  • the first port identifier is an identifier corresponding to the first port of the signal connection device.
  • the electronic device may forward the second Ethernet packet added with the first port identifier to the second port where the second port identifier is located according to the port connection relationship. Because the second port is the port through which the second module under test is connected to the signal connection device, the electronic device can forward the Ethernet message to the second module under test through the second port.
  • the first Ethernet message is forwarded from the first module under test to the second module under test
  • the second link between the first module under test and the second module under test can be determined. Therefore, the electronic device sets the second link between the first module under test and the second module under test based on the port identifier.
  • the electronic device can set a networking mode among multiple modules under test based on the second link, and then can realize networking configuration of different modules under test, and realize resource pooling of the modules under test.
  • the second link may include a communication link between module A to be tested and module B to be tested, and module B to be tested and module to be tested A communication link between C, and a communication link between the module under test C and the module under test A, therefore, the electronic device can set the module under test A, the module under test B and the module under test C based on the second link
  • the networking mode among them is, for example, ring networking. It is understandable that in the development process of some functions such as automobiles and aerospace, a new function can only be verified by the cooperation of multiple modules. Network mode to realize the verification of a certain function.
  • the configuration information about the networking mode obtained by the electronic device is that the module A to be tested, the module B to be tested, and the module C to be tested form a ring networking mode.
  • the electronic device can forward the first Ethernet packet from the module under test A to the second port (the module B under test is connected to the signal connection device) based on the port identification of the first port (the module A under test is connected to the signal connection device). port on the device), and then the first message can be forwarded to the module B to be tested. Therefore, the electronic device can set the second link between the module under test A and the module under test B based on the port identification of the first port.
  • the electronic device can also forward the second message from the module under test B to the third port based on the second port identification (the identification of the port on which the module under test B is connected to the signal connection device) (the module under test C is connected to the signal connection device) port on the device), and then the second message can be forwarded to the module C to be tested. Therefore, the electronic device can set the second link between the module under test B and the module under test C based on the port identifier of the second port. Similarly, the electronic device can set the second link between the module C under test and the module A under test. Therefore, the electronic device can set the ring networking mode among the module under test A, the module B under test and the module C under test based on the second link.
  • one or more modules to be tested can output control signals, and the electronic device can output the output signal from one or more modules to be tested through the signal connection device.
  • the control signal is transmitted to the HIL device.
  • the electronic device can also control the conduction of the signal link between one or more modules under test and the HIL device through the signal connection device, thereby setting the first link between one or more modules under test and the HIL device. road.
  • the electronic device can obtain the first mapping relationship, that is, the mapping relationship between the port of the module under test in the networking mode and the I/O port set by the HIL.
  • the module A to be tested, the module B to be tested, and the module C to be tested are in a ring networking mode, and the electronic equipment sets the first link between the module A to be tested and the HIL device through the signal connection device, Therefore, the first mapping relationship determined by the electronic device based on the set ring networking mode and the first link between the module under test A and the HIL device may include: port mapping between the module under test A and the module under test B , the port mapping between the module under test B and the module C under test, the port mapping between the module C under test and the module A under test, and the port mapping between the module A under test and the I/O port of the HIL device.
  • the port resources (such as I/O resources) at the HIL device are limited, and the electronic device can flexibly configure the port resources (such as I/O resources) of the HIL device through the signal connection device.
  • the electronic device can conduct the signal link between the module to be tested and the HIL device through a signal connection device; for a module to be tested that does not need to perform a functional test, the electronic device can Close the signal link between the module under test and the HIL equipment through the signal connection device.
  • Step S302 Determine a third mapping relationship according to the first mapping relationship.
  • the first processor is used to run the simulation model
  • the simulation model is a virtual model for simulating the function of the module to be tested
  • the port of the module to be tested is a real electrical port, which cannot be directly connected with the virtual one in the first processor.
  • the HIL device can provide an I/O board, so the first processor can use the I/O board to obtain a real electrical port for the simulation model to connect with the module to be tested. Therefore, the first mapping relationship can be the mapping relationship between the port of the module to be tested and the I/O board port of the HIL device, so the electronic device can determine the simulation model in the first processor and the HIL based on the first mapping relationship.
  • the signal mapping relationship between the I/O board ports of the device can be the mapping relationship between the port of the module to be tested and the I/O board port of the HIL device.
  • the electronic device may also acquire a second mapping relationship, where the second mapping relationship includes a signal mapping relationship between the first processor and the module under test. Then the electronic device configures the first mapping relationship according to the signal connection device, and finally, the electronic device can derive the first mapping relationship according to the signal mapping relationship between the first processor and the module under test, and the signal mapping relationship between the module under test and the HIL device.
  • the electronic device may obtain a software assembly package of the physical component, and the software assembly package of the physical component includes a simulation model, a module to be tested, and a second mapping relationship. Therefore, the electronic device can obtain the signal mapping relationship between the simulation model in the first processor and the module to be tested from the physical component software package. According to the mapping relationship between the simulation model in the first processor and the module to be tested, and the signal mapping relationship between the module to be tested and the HIL device, the electronic device can derive the I/O resources of the first processor and the HIL device The mapping table, that is, the third mapping relationship.
  • Step S303 Control the connection relationship of the HIL test according to the third mapping relationship.
  • the electronic device can connect the simulation module running in the first processor with the signal of the module under test according to the first mapping relationship, the second mapping relationship and the third mapping relationship.
  • the simulation model and the module under test can communicate with each other, realizing the connection of the whole link signal in the HIL test. Therefore, the HIL device can issue instructions to the module under test, and the module under test can generate control signals according to the instructions.
  • the HIL device can receive the control signal sent by the module under test, and control the simulation model to perform corresponding actions according to the control signal.
  • the electronic device mentioned in the embodiment of the present application may have a data processing capability and a data sending and receiving capability.
  • FIG. 4 is a schematic diagram of a signal connection device 201 provided by an embodiment of the present application.
  • the signal connection device 201 is used for controlling the signal connection between the model under test and the HIL device in the signal connection method shown in FIG. 3B .
  • the signal connection device 201 may include a first configuration unit 401 and a second configuration unit 402 .
  • the module to be tested can be plugged into the first configuration unit 401 of the signal connection device 201 through the first Ethernet port provided by the PHY chip, and the HIL device can be plugged into the signal connection device 201 through the second Ethernet port provided by the switch.
  • the first configuration unit 401 is a schematic diagram of a signal connection device 201 provided by an embodiment of the present application.
  • the signal connection device 201 is used for controlling the signal connection between the model under test and the HIL device in the signal connection method shown in FIG. 3B .
  • the signal connection device 201 may include a first configuration unit 401 and a second configuration unit 402 .
  • the module to be tested can also be plugged into the second configuration unit 402 of the signal connection device 201 through the first low-speed communication port, and the HIL device can also be plugged into the second configuration unit 402 of the signal connection device 201 through the second low-speed communication port.
  • the low-speed communication port is a port with a lower transmission rate than the Ethernet port.
  • the Ethernet can be a vehicle Ethernet or a standard Ethernet, the vehicle Ethernet is connected to the module to be tested, and the standard Ethernet is connected to the HIL device.
  • Low-speed communication includes but not limited to Controller Area Network (CAN), Local Interconnect Network (LIN), digital signal (DI/DO), analog signal (AD/DA), transmission pulse width modulation (Pulse Width Modulation, PWM) signal, and so on.
  • the signal connection device 201 can complete the connection of two types of signals, one is low-speed I/O signals transmitted through low-speed communication ports, such as analog signals, logic signals, low-speed transmission signals, and signals sensitive to electrical characteristics.
  • the other is a high-speed signal transmitted through the vehicle Ethernet.
  • the number of modules to be tested plugged into the first configuration unit 401 is multiple, and the first configuration unit 401 can set a networking mode between a plurality of modules to be tested, that is, a vehicle-mounted Ethernet network, to realize the module to be tested. resource pooling.
  • the second configuration unit 402 can control the conduction of the signal link (for example, a low-speed signal link) between the module under test and the HIL device in the networking mode, so as to realize I/O resource pooling of the HIL device.
  • the first configuration unit 401 may include a switch, one or more port physical layer (Port Physical Layer, PHY) chips, and one or more micro control units (Micro Control Unit, MCU).
  • PHY port physical layer
  • MCU micro control Unit
  • one or more PHY chips can be integrated with the switch on the same chip.
  • the module to be tested can be plugged into the vehicle Ethernet PHY chip through the vehicle Ethernet (Automotive Ethernet) port, and the vehicle Ethernet message from the vehicle vehicle PHY chip can be converted into a standard general Ethernet message, and then The standard general Ethernet packet is transmitted to the switch, and the switch may specifically be a virtual local area network (Virtual Local Area Network, VLAN) switch.
  • VLAN Virtual Local Area Network
  • the first configuration unit 401 can use the VLAN mode to set the networking mode between multiple modules under test through the switch, that is, the vehicle Ethernet port of the module under test that needs to be turned on is connected to the Ethernet port of the VLAN switch through the PHY chip Configure the Ethernet port of the VLAN switch connected to the vehicle-mounted Ethernet port with the same port identifier (such as VLAN ID) or establish a forwarding relationship to limit the broadcast of Ethernet packets within the connection range, and then complete the virtual circuit switching between Ethernet ports .
  • the networking protocol required for the networking between the modules under test such as rapid spanning tree protocol (rapid spanning tree protocol, RSTP), is not sensitive to VLAN configuration, so it will not affect the networking message transmission.
  • rapid spanning tree protocol rapid spanning tree protocol
  • RSTP rapid spanning tree protocol
  • the first configuration unit can set port identifiers of multiple Ethernet ports on the VLAN switch, and set a networking mode among multiple modules to be tested based on the port identifiers. Further, the first configuration unit can set the second link between the first module under test and the second module under test based on the port identification, and then set the networking mode among multiple modules under test based on the second link . That is to say, the electronic device can transmit the Ethernet message from the first module under test to the second module under test based on the first port identifier, so as to set the second link between the first module under test and the second module under test. road.
  • the first port identifier is an identifier corresponding to the first port of the first module to be tested, and the first port is a port connected to the first module to be tested and the first configuration unit, that is, a port connected to the VLAN switch.
  • the first configuration unit may obtain a networking mode between the modules under test based on at least one transmission path formed between the modules under test.
  • FIG. 5A is a schematic diagram of a networking mode among modules to be tested provided by an embodiment of the present application.
  • the module to be tested A, the module to be tested B, the module to be tested C, the module to be tested D and the module to be tested F are plugged into ports of the switch through the PHY chip. Therefore, there are fixed connections between the module to be tested A, the module to be tested B, the module to be tested C, the module to be tested D and the module to be tested F and the switch.
  • Configuration information about the networking mode can be received in the first configuration unit 401, for example, the configuration information can be that the networking mode between the module to be tested A, the module to be tested B, the module to be tested C and the module to be tested D is a ring In networking, there is a point-to-point connection between the module D to be tested and the module F to be tested.
  • the first configuration unit can be based on the first port identification (that is, the module under test A).
  • the identification of the first port connected to the switch sets the second port identification (that is, the identification of the second port of the module B to be tested connected to the switch), and the second port identification is set to be the same as the first port identification.
  • the first configuration unit 401 adds the first port identifier to the port from the port to be tested according to the VLAN configuration of the first port. in the first Ethernet packet of module A.
  • the first configuration unit 401 may broadcast the first Ethernet packet to which the identifier of the first port is added to the second port according to the identifier of the first port. After the second port receives the Ethernet message added with the identification of the first port, the first configuration unit 401 can remove the identification of the first port according to the VLAN configuration of the port, and pass the first Ethernet message without the VLAN tag through the second port. The text is sent to the module B under test. In this way, the first configuration unit 401 can obtain the second link between the module A under test and the module B under test.
  • the first configuration unit 401 can obtain the above-mentioned transmission path between the modules to be tested through VLAN configuration of the switch.
  • the first configuration unit 401 can configure the Ethernet packet forwarding relationship between the Ethernet ports of the switch, for example, the first port (That is, the Ethernet packet received by the module A to be tested (connected to the first port on the switch) is forwarded to the second port (ie, the second port of the module B to be tested connected to the switch).
  • the first configuration unit 401 configures the VLAN configuration of the first port according to the VLAN configuration of the first port. The identifier is added to the Ethernet message from module A under test.
  • the first configuration unit 401 can broadcast the second Ethernet packet added with the first port identifier to the second port according to the Ethernet packet forwarding relationship configured by the switch. After the second port receives the second Ethernet message added with the identification of the first port, the first configuration unit 401 can remove the identification of the first port according to the VLAN configuration of the port, and pass the Ethernet message without the VLAN tag through the second port. The text is sent to the module B under test. In this way, the first configuration unit 401 can obtain the second link between the module A under test and the module B under test.
  • the first configuration unit 401 can obtain the above-mentioned transmission path between the modules to be tested through VLAN configuration of the switch.
  • the first configuration unit 401 can obtain the networking mode shown in (b) of FIG. 5A based on the transmission path between the above-mentioned modules to be tested.
  • the first configuration unit 401 can change the VLAN configuration to realize different networking modes among the modules to be tested. For example, when the first configuration unit 401 sets the networking mode between the module under test A, the module under test B, the module under test C, the module under test D and the module under test E according to the received configuration information, as shown in Figure 5A After that shown in (b), the first configuration unit 401 receives the configuration information again, and the first configuration unit 401 can change the configuration of the switch to implement a new networking mode.
  • FIG. 5B is a schematic diagram of another networking mode between the modules to be tested provided by the embodiment of the present application.
  • the configuration information received by the first configuration unit 401 includes: the module to be tested A, the module to be tested D and the module to be tested are ring networking, the module to be tested B and the module to be tested There is a point-to-point connection between the modules C, and a point-to-point connection between the module D to be tested and the module C to be tested.
  • the first configuration unit 401 can delete the originally set second port identifier (that is, the second port on which the module under test B is connected to the switch), and based on the first port identifier (that is, the first port on which the module under test A is connected to the switch) Port identification) resets the third port (that is, the identification of the third port where the module F to be tested is connected to the switch), and the third port identification is set to be the same as the first port identification.
  • the first configuration unit 401 adds the first port identifier to the port from the port to be tested according to the VLAN configuration of the first port.
  • the first configuration unit 401 may broadcast the Ethernet packet added with the first port identifier to the third port according to the first port identifier. After the third port receives the Ethernet message added with the first port ID, the first configuration unit 401 can remove the ID of the first port according to the VLAN configuration of the port, and send the Ethernet message without the VLAN tag to the waiting port through the third port.
  • the test module F sends. In this way, the first configuration unit 401 can obtain the link between the module A under test and the module F under test.
  • the first configuration unit 401 can reconfigure the Ethernet packet forwarding relationship between the Ethernet ports of the switch, for example, the first port (that is, the first port where the module A to be tested is connected to the switch) ) forwards the received Ethernet message to the third port (that is, the third port where the module F to be tested is connected to the switch).
  • the first configuration unit 401 adds the first port identifier to the port from the port to be tested according to the VLAN configuration of the first port. In the Ethernet packet of the test module A.
  • the first configuration unit 401 can broadcast the Ethernet packet added with the first port identifier to the third port according to the Ethernet packet forwarding relationship configured by the switch, and the third port receives the Ethernet packet added with the identifier of the first port Afterwards, the first configuration unit 401 may remove the identifier of the first port according to the VLAN configuration of the port, and send the Ethernet packet without the VLAN tag to the module F to be tested through the third port. In this way, the first configuration unit 401 can obtain the link between the module A under test and the module F under test.
  • the first configuration unit 401 can change the networking mode shown in (b) of FIG. 5A to the networking mode shown in (b) of FIG. 5B by changing the VLAN configuration.
  • the second configuration unit 402 can set the first link between one or more modules under test and the HIL device.
  • the module to be tested needs to output the low-speed I/O signal to the HIL device through the signal connection device 201, and the HIL device outputs the low-speed I/O signal to the first processor, and the simulation model running in the first processor uses It is used to simulate the operating state based on the low-speed I/O signal, which is an electrical signal generated by the module under test. Because the relay has little influence on the electrical properties, and the upper limit of the power carried is high, it is suitable for the switching of low-speed I/O and power output lines. Therefore, it can be seen from FIG.
  • the second configuration unit includes one or more control switches, which may specifically be relays, and one or more micro control units MCU.
  • One or more control switches are located on the signal link between the first low-speed port where the module to be tested is plugged into the second configuration unit 402 and the second low-speed port where the HIL device is plugged into the second configuration unit 402.
  • the configuration unit 402 can control the conduction of the signal link between the one or more modules under test and the HIL device through a relay, so as to set the first link between the one or more modules under test and the HIL device.
  • the electronic device can open the control switch on the signal link between the module A to be tested and the HIL device, so that the signal link is in the conducting state. pass status.
  • the number of relays can be determined according to the utilization rate of I/O resources and computing resources of the HIL device. If the resource utilization rate of the HIL device is relatively low, it is suitable to configure a higher number of relays to improve the resource utilization rate of the HIL device. .
  • the second configuration unit 402 can control the selective conduction of the relay through the micro control unit MCU, that is, different relays are turned on, and different signal links are turned on. Therefore, only when the relay is turned on, can the module under test be connected to the HIL device through the signal connection device 201 to obtain the I/O resources provided by the HIL device. Therefore, the second configuration unit 402 can allocate the I/O resources on the HIL device to different modes to be tested according to actual needs, and can realize I/O resource pooling of the HIL device.
  • FIG. 6 is a schematic diagram of an HIL test provided in an embodiment of the present application.
  • the method shown in Figure 3B can be applied to model testing and bench testing, wherein, in model testing, the module to be tested and the simulation model in the first processor form a closed-loop link, and in bench testing, the module to be tested and the physical component Form a closed loop link. That is, after the electronic device implements the full-link signal connection between the battery management system in the module-to-be-tested module 203 and the battery model running in the first processor 2042 in the model test through the signal connection device 201 according to the signal connection method shown in FIG.
  • the electronic device can also switch the model test to the bench test through the signal connection device 201, wherein the bench test includes physical components in the form of objects of the simulation model.
  • the solid component may include a solid motor in the form of an object corresponding to the motor model.
  • the electronic device can close the signal link between the part of the simulation model running in the first processor 2042 and the part of the model to be tested in the model test through the signal connection device 201 .
  • the electronic device can close the signal connection between the motor model and the motor controller through the signal connection device 201 .
  • the electronic device can close the signal connection between the motor model and the motor controller through the relay in the signal connection device 201 .
  • the relay is located on the signal link between the motor model and the motor controller, and when the relay is turned off, the signal link between the motor model and the motor controller is also turned off.
  • One or more physical components can be plugged into the signal connection device 201 , or one or more physical components can be plugged into the signal connection device 201 through the HIL device. Therefore, after the electronic device closes the signal link between the part of the simulation model 2041 run by the first processor and the part of the model to be tested in the model test, the platform can be turned on through the signal connection device 201 based on the signal connection method shown in FIG. 3B The signal link between some physical components and some equipment under test in the rack test. It can be understood that the physical component that turns on the signal link is the physical component of the simulation model 2041 that turns off the signal link. It can be seen from FIG. 6 that the electronic device can conduct the signal connection between the physical motor and the motor controller through the signal connection device 201 .
  • the electronic device can conduct the signal connection between the physical motor and the motor controller through the relay in the signal connection device 201 .
  • the relay is located on the signal link between the physical motor and the motor controller, and when the relay is turned on, the signal link between the physical motor and the motor controller is also turned on.
  • the electronic device can switch between the HIL test and the bench test through the signal connection device 201, so as to realize hybrid simulation and HIL test and bench test. Comparing the simulation results.
  • FIG. 7 is a schematic diagram of implementing an HIL test based on cloud computing services provided by an embodiment of the present application.
  • the cloud computing service 700 includes the first processor 2042 deployed on the cloud server, the HIL device 202, the signal connection device 201, and one or more modules 203 to be tested.
  • the cloud computing service 700 may also include a Electronics 704.
  • the simulation model can be deployed in the first processor 2042, and one or more modules to be tested 203 are connected to the I/O boards in the HIL device 202 through the signal connection device 201. Therefore, the first processor running the simulation model
  • the processor 2042 can perform simulation model and signal processing on the module under test 203 .
  • a real-time operating system is installed on the first processor 2042 to ensure the real-time performance of the simulation.
  • the first user equipment 7051, the second user equipment 7052, and the third user equipment 7053 may respectively send respective test requests to the electronic device 704 located in the cloud computing service 700.
  • the user equipment side may display multiple components of the module to be tested, and each component corresponds to a resource of the module to be tested on the cloud computing service 700 .
  • the user equipment may display a user interface, and a commonly used form of the user interface is a graphical user interface (graphic user interface, GUI), which refers to a user interface related to computer operations displayed in a graphical manner.
  • GUI graphical user interface
  • the control may include visual component elements such as icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, and navigation bars. Users can visually organize these components through user equipment to obtain target components (or test instances) that meet their own needs, and then send a test request for the components containing the target module to be tested to the electronic device 704 located in the cloud computing service 700 . After receiving the test request from the user equipment, the electronic device 704 may construct a test instance according to the test request. Wherein, the test instance is used for the resource of the target module under test corresponding to the test request to be used by the user equipment.
  • the resources of the module to be tested may be the functional resources of the module to be tested deployed on the cloud computing service, such as components, sensors, actuators, or functions that can be realized by an application program, or used for Resources to verify the functionality of the module under test, such as simulation models, I/O ports of HIL devices, and so on.
  • the electronic device 704 can determine the target module to be tested and the I/O port according to the test request, wherein the I/O port is a port on the HIL device, so that the target module to be tested and The first processor can communicate.
  • the electronic device 704 can assign corresponding target modules to be tested to the user equipment according to the test request, for example, which modules to be tested specifically correspond to the test request, the networking mode between the modules to be tested, and which module or modules to be tested Communicate with the first processor.
  • the electronic device 704 can determine the number of I/O ports required by the target component according to the target module under test, for example, which or which modules under test in the target component need to communicate with the first processor, the electronic device 704 Allocate the I/O port on the I/O board to the target component through HIL board resource management. Therefore, the electronic device 704 can target the resources and I/O ports of the module under test to build a test instance, and the module under test corresponding to the target component can perform data interaction with the simulation model running in the first processor, so as to realize the user equipment. Test request.
  • FIG. 8 is a schematic diagram of resource allocation provided by an embodiment of the present application. It can be seen from Fig. 8 that the first user equipment 7051 can provide the components of the module under test including 300 ports, and the user can arrange the components of the module under test including 150 ports according to the components of the module under test provided by the first user equipment 7051. Test request for module instance 1. After the number of ports determined by the electronic device 704 according to the components of the target module under test (that is, the module under test instance 1) contained in the test request received from the first user device 7051 is 150, the electronic device 704 can be the first user device The 7051 allocates 150 ports on the signal connection device 201 .
  • the second user equipment 7052 can provide the components of the module under test including 150 ports, and the user can arrange the test request of the module under test instance 2 including 50 ports according to the components of the module under test provided by the second user equipment 7052 .
  • the electronic device 704 can be the second user device The 7052 allocates 50 ports on the signal connection device 201 .
  • the third user equipment 7053 can provide the components of the module under test including 225 ports, and the user can arrange the test request of the module under test instance 3 including 100 ports according to the components of the module under test provided by the third user equipment 7053 .
  • the electronic device 704 can be the third user device The 7053 allocates 100 ports on the signal connection device 201 .
  • the I/O resource mapping relationship between the I/O board and the signal connection device 201 is stored in the HIL board resource management, therefore, for the module instance 1 to be tested, the electronic device 704 can be obtained from the HIL board resource management Get 150 I/O ports on the I/O board that can communicate with HIL devices.
  • the electronic device 704 can obtain 50 I/O ports on the I/O board that can communicate with the HIL device from the resource management of the HIL board.
  • the electronic device 704 can obtain 100 I/O ports on the I/O board that can communicate with the HIL device from the resource management of the HIL board.
  • the electronic device 704 can allocate the resources required by the HIL test instance from the I/O resource pool and the module resource pool to be tested according to the needs of the user equipment, thereby meeting different and expensive HIL test requirements and improving the utilization rate of HIL test resources .
  • the signal mapping relationship between the module to be tested 203 and its corresponding simulation model running on the first processor is stored in the cloud computing service 700 . Therefore, the electronic device 704 can determine the fourth mapping relationship between the target module under test and the target simulation model running in the first processor according to the resources of the target module under test, where the target simulation model is the running The model in the first processor 2042.
  • the electronic device 704 can determine the target module under test according to the target component in the test request, it can set the networking mode between the target modules under test through the signal connection device 201, and then control the networking mode through the signal connection device 201
  • the conduction of the signal link between the target module under test and the HIL device 202 is based on the set networking mode and the conducted signal link to obtain the signal connection relationship between the target module under test and the HIL device. It can be understood that, because the port of the target module under test on the signal connection device 201 is determined, the electronic device 704 can obtain the connection between the signal connection device 201 and the I/O board in the HIL device 202 from the HIL board resource management.
  • the I/O resource mapping relationship among them can determine the I/O port through which the target module under test communicates with the I/O board on the HIL device 202 . Therefore, the electronic device 704 can determine the signal mapping relationship (ie, the fifth mapping relationship) between the target module under test and the I/O board in the HIL device 202 according to the I/O port.
  • the electronic device 704 may determine a sixth mapping relationship between the first processor and the I/O board of the HIL device according to the fourth mapping relationship and the fifth mapping relationship. Therefore, the electronic device 704 can construct the connection relationship in the test instance based on the sixth mapping relationship, and the target simulation model running in the first processor and the target module to be tested can communicate with each other, realizing the connection of the full link signal in the HIL test, The electronic device 704 may send the HIL simulation test result to the user equipment.
  • the model instance 1 to be tested is a test instance programmed by the user through the first user device 7051, and the vehicle model instance 1 that can perform functional tests on the module instance 1 to be tested runs in the first processor, based on cloud
  • the calculation service 700 may complete the test of the model instance 1 to be tested to obtain a test result, and send the test result to the first user equipment 7051 .
  • the model instance 2 to be tested is a test instance arranged by the user through the second user equipment 7052.
  • the vehicle model instance 2 that can perform functional tests on the module instance 2 to be tested runs in the first processor, and the cloud computing service 700 can complete the test instance.
  • the test of model instance 2 obtains test results, and sends the test results to the second user equipment 7052 .
  • the model instance 3 to be tested is a test instance arranged by the user through the third user device 7053.
  • the vehicle model instance 3 that can perform functional tests on the module instance 3 to be tested runs in the first processor, and the cloud computing service 700 can complete the test instance.
  • the test of model instance 3 obtains the test result, and sends the test result to the third user equipment 7053 .
  • the 300 ports of the signal connection device shown in FIG. 8 are used as an example, and the embodiment of the present application does not impose any limitation on the ports of the signal connection device, and the number of ports can be determined according to actual conditions.
  • the first user equipment 7051, the second user equipment 7052 and the third user equipment 7053 may be devices deployed in different geographical locations.
  • FIG. 9 is a schematic structural diagram of a signal connection device 900 provided by an embodiment of the present application.
  • the signal connection device may be an electronic device, or a device in the electronic device, such as a chip, a software module, an integrated Electronic control, etc., the signal connection device 900 is used to implement the aforementioned signal connection method, such as the signal connection method in the embodiment shown in FIG. 3B .
  • the signal connection device 900 includes a control unit 901 , a processing unit 902 and a connection unit 903 .
  • the control unit 901 is configured to configure the first mapping relationship through the signal connection device, the first mapping relationship includes the signal connection relationship between the module to be tested and the hardware-in-the-loop HIL device, and the HIL device is used to run the function of the module to be tested for testing. simulation model;
  • the processing unit 902 is configured to determine a third mapping relationship according to the first mapping relationship, where the third mapping relationship includes a signal mapping relationship between the first processor and the HIL device;
  • the connection unit 903 is configured to control the connection relationship of the HIL test according to the third mapping relationship.
  • the signal connection device 900 belongs to a test system, such as the system shown in FIG. 2A .
  • the signal connection device 900 further includes an acquiring unit 904, configured to acquire a second mapping relationship, where the second mapping relationship includes a signal mapping relationship between the first processor and the module under test.
  • the processing unit 902 is specifically configured to determine a third mapping relationship between the first processor and the HIL device according to the second mapping relationship and the first mapping relationship.
  • control unit 901 is specifically configured to:
  • the first mapping relationship is determined based on the set networking mode and the first link, so as to configure the first mapping relationship through the signal connection device.
  • the signal connection device 900 includes multiple ports, and the control unit 901 is specifically used for:
  • control unit 901 is specifically configured to:
  • a networking mode among multiple modules to be tested is set based on the second link.
  • control unit 901 is specifically configured to:
  • the first port identifier is the same as the second port identifier, determine the signal transmission between the first module under test and the second module under test, so as to realize setting the first module under test through the port identifier
  • control unit 901 is specifically configured to:
  • the port connection relationship includes a first port identifier and a second port identifier
  • the first port identifier is the identifier corresponding to the first port of the signal connection device
  • the first port is the identifier corresponding to the first port of the signal connection device.
  • the second port identification is the identification corresponding to the second port of the signal connection device, and the second port is a port connected to the second module to be tested;
  • the port includes an Ethernet port or a control area network (CAN) port.
  • CAN control area network
  • the signal connecting device is used for model testing and bench testing, and the bench testing includes a signal connecting device for physical components corresponding to the simulation model.
  • the connecting unit 903 is configured to construct a test instance according to the test request from the user equipment, and the test instance is used for the user equipment to use resources of the target module under test corresponding to the test request.
  • the processing unit 902 is configured to assign a corresponding target module to be tested and an I/O port to the user equipment according to the test request, and the I/O port is a port in the HIL device;
  • connection unit 903 is configured to construct a test instance according to the target module to be tested and the I/O port.
  • FIG. 10 is a schematic structural diagram of a computing device 100 provided by an embodiment of the present application.
  • the computing device 100 may be an independent device (such as one or more of a server, or a user device, etc.), or may be It is an internal component of an independent device (such as a chip, a software module or a hardware module, etc.).
  • the computing device 100 may include at least one processor 1001 .
  • at least one memory 1003 may also be included.
  • the computing device 100 may further include a communication interface 1002 .
  • a bus 1004 may also be included, wherein the processor 1001 , the communication interface 1002 and the memory 1003 are connected through the bus 1004 .
  • the processor 1001 is a module for performing arithmetic operations and/or logic operations, specifically, a central processing unit (central processing unit, CPU), a picture processing unit (graphics processing unit, GPU), a microprocessor (microprocessor unit, MPU) ), Application Specific Integrated Circuit (ASIC), Field Programmable Logic Gate Array (Field Programmable Gate Array, FPGA), Complex Programmable Logic Device (Complex programmable logic device, CPLD), coprocessor (assisting central processing One or more combinations of processing modules such as processors to complete corresponding processing and applications), Microcontroller Unit (MCU) and other processing modules.
  • a central processing unit central processing unit, CPU
  • a picture processing unit graphics processing unit, GPU
  • microprocessor microprocessor unit, MPU
  • ASIC Application Specific Integrated Circuit
  • FPGA Field Programmable Gate Array
  • FPGA Field Programmable Gate Array
  • CPLD Complex Programmable Logic Device
  • coprocessor assisting central processing
  • MCU Microcontroller Unit
  • Communication interface 1002 may be used to provide information input or output to at least one processor. And/or, the communication interface 1002 can be used to receive data sent from the outside and/or send data to the outside, and can be a wired link interface such as an Ethernet cable, or a wireless link (Wi-Fi, Bluetooth, General wireless transmission, vehicle short-range communication technology and other short-range wireless communication technologies, etc.) interface. Optionally, the communication interface 1002 may further include a transmitter (such as a radio frequency transmitter, an antenna, etc.) or a receiver coupled with the interface.
  • a transmitter such as a radio frequency transmitter, an antenna, etc.
  • the memory 1003 is used to provide a storage space, in which data such as operating systems and computer programs can be stored.
  • Memory 1003 can be random access memory (random access memory, RAM), read-only memory (read-only memory, ROM), erasable programmable read-only memory (erasable programmable read only memory, EPROM), or portable read-only memory One or more combinations of memory (compact disc read-only memory, CD-ROM), etc.
  • At least one processor 1001 in the computing device 100 is configured to execute the aforementioned signal connection method, such as the version management method described in the embodiment shown in FIG. 3B .
  • At least one processor 1001 in the computing device 100 is configured to execute calling computer instructions to perform the following operations:
  • the first mapping relationship includes the signal connection relationship between the module to be tested and the hardware-in-the-loop HIL device;
  • the third mapping relationship includes a third mapping relationship between the first processor and the HIL device, the first processor is used to run a simulation model, and the simulation model is for the described A model for simulating the function of the module under test;
  • connection relationship of the HIL test is determined according to the third mapping relationship.
  • the processor 1001 is further configured to:
  • the second mapping relationship is obtained through the communication interface 1002, wherein the second mapping relationship includes a signal mapping relationship between the first processor and the module under test.
  • the processor 1001 is further configured to:
  • a third mapping relationship is determined according to the second mapping relationship and the first mapping relationship.
  • the processor 1001 is further configured to:
  • the first mapping relationship is obtained based on the set networking mode and the first link, so as to configure the first mapping relationship through the signal connection device.
  • the processor 1001 is further configured to:
  • the processor 1001 is further configured to:
  • the port identification is the identification corresponding to the port of the signal connection device
  • a networking mode among multiple modules to be tested is set based on the second link.
  • the processor 1001 is further configured to:
  • the first port identifier is the same as the second port identifier, determine the signal transmission between the first module under test and the second module under test, so as to realize setting the first module under test through the port identifier
  • the processor 1001 is further configured to:
  • the port connection relationship includes a first port identifier and a second port identifier
  • the first port identifier is the identifier corresponding to the first port of the signal connection device
  • the first port is the identifier corresponding to the first port of the signal connection device.
  • the second port identification is the identification corresponding to the second port of the signal connection device, and the second port is a port connected to the second module to be tested;
  • the above port includes an Ethernet port or a control area network (CAN) port.
  • CAN control area network
  • the computing device may be used for model testing and bench testing, and the bench testing includes physical components corresponding to the simulation model.
  • the processor 1001 is further configured to: construct a test instance according to the test request from the user equipment, and the test instance is used for the user equipment to use resources of the target module under test corresponding to the test request.
  • the processor 1001 is also configured to: assign a corresponding target module to be tested and an I/O port to the user according to the test request; construct a test instance according to the target module to be tested and the I/O port .
  • the present application also provides a computer-readable storage medium, where instructions are stored in the computer-readable storage medium, and when the instructions are run on at least one processor, the aforementioned version management method is implemented, such as shown in FIG. 3B The signal connection method shown.
  • the present application also provides a computer program product, which includes computer instructions, and when executed by a computing device, realizes the aforementioned version management method, such as the signal connection method shown in FIG. 3B .
  • words such as “exemplary” or “for example” are used as examples, illustrations or descriptions. Any embodiment or design described herein as “exemplary” or “for example” is not to be construed as preferred or advantageous over other embodiments or designs. Rather, the use of words such as “exemplary” or “such as” is intended to present related concepts in a concrete manner.
  • At least one refers to one or more, and the “multiple” refers to two or more.
  • At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items.
  • at least one of a, b, or c may represent: a, b, c, (a and b), (a and c), (b and c), or (a and b and c), where a, b, c can be single or multiple.
  • first and second use ordinal numerals such as "first" and “second” to distinguish multiple objects, and are not used to limit the order, timing, priority or importance of multiple objects degree.
  • first user equipment and the second user equipment are only for the convenience of description, and do not represent the differences in structure, importance, etc. between the first user equipment and the second user equipment.
  • the first user equipment The device and the second user device may also be the same device.
  • the program can be stored in a computer-readable storage medium.
  • the above-mentioned The storage medium mentioned may be a read-only memory, a magnetic disk or an optical disk, and the like.

Landscapes

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

Abstract

A signal connection method, a signal connection apparatus (201), and a test system (200). The method may comprise: configuring a first mapping relationship by means of a signal connection apparatus (201) (S301), wherein the first mapping relationship includes a signal connection relationship between a module to be tested (203) and a hardware-in-the-loop (HIL) device (202); determining a third mapping relationship according to the first mapping relationship (S302), wherein the third mapping relationship includes a signal mapping relationship between a first processor (2042) and the HIL device (202); and determining, according to the third mapping relationship, a connection relationship of an HIL test (S303). By means of the method, the connection configuration of a signal in an HIL test can be realized, thereby improving the efficiency of development and verification.

Description

信号连接方法、信号连接装置及测试系统Signal connection method, signal connection device and test system 技术领域technical field
本发明涉及测试装备技术领域,尤其涉及一种信号连接方法、信号连接装置及测试系统。The invention relates to the technical field of test equipment, in particular to a signal connection method, a signal connection device and a test system.
背景技术Background technique
硬件在环(hardware-in-the-loop,HIL)测试的基本原理是通过HIL设备模拟一个或多个控制器所需要的传感器信号和通信信号,同时采集一个或多个控制器发出的控制信号,一个或多个控制器与运行在HIL设备中的仿真模型构成闭环,由此实现一个或多个控制器的硬件在环测试。当今,HIL测试已成为电子控制单元(electronic control unit,ECU)开发流程中非常重要的一环,可以缩短开发时间和降低成本。The basic principle of hardware-in-the-loop (HIL) testing is to simulate the sensor signals and communication signals required by one or more controllers through HIL equipment, and simultaneously collect the control signals sent by one or more controllers. , one or more controllers and the simulation model running in the HIL device form a closed loop, thereby realizing hardware-in-the-loop testing of one or more controllers. Today, HIL testing has become a very important part of the electronic control unit (ECU) development process, which can reduce development time and cost.
在HIL测试中需要根据ECU的硬线端口以及HIL测试系统的I/O板卡端口类型进行端口配置及线束制作,使得被测试的ECU能够连接到HIL设备,完成测试平台的搭建,进行后续测试。但由于整车级HIL测试中涉及的ECU更多,信号数量也更多,使得测试平台搭建过程中占用大量的时间。为解决这一问题,相关技术主要集中在减少线束定制工作量上,如跳线转接板和定制线束。但是跳线转接板和定制线束需要人工完成连接,存在无法实现自动化配置等问题。In the HIL test, it is necessary to configure the port and make the wiring harness according to the hard wire port of the ECU and the I/O board port type of the HIL test system, so that the tested ECU can be connected to the HIL device, complete the construction of the test platform, and conduct subsequent tests . However, since there are more ECUs and more signals involved in the vehicle-level HIL test, it takes a lot of time to build the test platform. To solve this problem, related technologies mainly focus on reducing the workload of wiring harness customization, such as jumper adapter boards and custom wiring harnesses. However, the jumper adapter board and the customized wiring harness need to be connected manually, and there are problems such as the inability to realize automatic configuration.
发明内容Contents of the invention
本申请实施例提供了一种信号连接方法、信号连接装置及测试系统,能够实现在HIL测试中全链路的信号连接配置,提高开发验证的效率。Embodiments of the present application provide a signal connection method, a signal connection device, and a test system, which can realize full-link signal connection configuration in HIL testing, and improve the efficiency of development and verification.
第一方面,本申请实施例提供了一种信号连接方法,该方法可以包括:通过信号连接装置配置第一映射关系,第一映射关系包含待测模块和硬件在环HIL设备之间的信号连接关系;根据第一映射关系确定第三映射关系,第三映射关系包含第一处理器和HIL设备之间的信号映射关系;其中,第一处理器用于运行仿真模型,仿真模型为对待测模块的功能进行仿真的模型;根据第三映射关系确定HIL测试的连接关系。In the first aspect, the embodiment of the present application provides a signal connection method, the method may include: configuring a first mapping relationship through a signal connection device, the first mapping relationship includes the signal connection between the module under test and the hardware-in-the-loop HIL device Relationship; determine the third mapping relationship according to the first mapping relationship, the third mapping relationship includes the signal mapping relationship between the first processor and the HIL device; wherein, the first processor is used to run the simulation model, and the simulation model is the module to be tested A model for function simulation; determine the connection relationship of the HIL test according to the third mapping relationship.
可以看出,通过第一方面可以实现HIL测试中待测模块与第一处理器之间的链路信号的自动推导,不需要人为对信号进行连接和推导,可以缩短HIL测试的准备耗时,提高开发验证的效率。It can be seen that through the first aspect, the automatic derivation of the link signal between the module to be tested and the first processor in the HIL test can be realized, without artificially connecting and deriving the signal, which can shorten the preparation time for the HIL test. Improve the efficiency of development verification.
在第一方面的一种可能的实施方式中,根据第一映射关系确定第一处理器和HIL设备之间的第三映射关系之前,还包括:获取第二映射关系,其中,第二映射关系包含第一处理器与待测模块之间的信号映射关系。In a possible implementation manner of the first aspect, before determining the third mapping relationship between the first processor and the HIL device according to the first mapping relationship, it further includes: acquiring a second mapping relationship, where the second mapping relationship It includes the signal mapping relationship between the first processor and the module under test.
通过上述方式可以直接得到第一处理器与待测模块之间的信号映射关系,因为第一处理器中运行有仿真模型,进而也可以得到仿真模型与待测模块之间的信号映射关系,无需人工进行编写信号连接,可以减少全局信号连接工作量,提升信号配置效率。Through the above method, the signal mapping relationship between the first processor and the module under test can be directly obtained, because the simulation model runs in the first processor, and the signal mapping relationship between the simulation model and the module under test can also be obtained, without Manually writing signal connections can reduce the workload of global signal connections and improve the efficiency of signal configuration.
在第一方面的一种可能的实施方式中,根据第一映射关系确定第三映射关系,包括:根据第二映射关系和第一映射关系确定第一处理器和HIL设备之间的第三映射关系。In a possible implementation manner of the first aspect, determining the third mapping relationship according to the first mapping relationship includes: determining a third mapping between the first processor and the HIL device according to the second mapping relationship and the first mapping relationship relation.
可以看出,基于第二映射关系和第一映射关系可以确定运行有仿真模型的第一处理器和HIL设备之间I/O资源的映射,无需人为进行手动关联,可以减少操作失误,提高配置效率。It can be seen that based on the second mapping relationship and the first mapping relationship, the mapping of the I/O resources between the first processor running the simulation model and the HIL device can be determined without manual association, which can reduce operational errors and improve configuration efficiency.
在第一方面的一种可能的实施方式中,通过信号连接装置配置第一映射关系,包括:通过信号连接装置设置多个待测模块之间的组网模式;通过信号连接装置设置一个或多个待测模块和HIL设备之间的第一链路;基于设置的组网模式和第一链路确定第一映射关系,以实现通过信号连接装置配置第一映射关系。In a possible implementation manner of the first aspect, configuring the first mapping relationship through the signal connection device includes: setting the networking mode between multiple modules under test through the signal connection device; setting one or more modules through the signal connection device A first link between a module to be tested and the HIL device; determine the first mapping relationship based on the set networking mode and the first link, so as to configure the first mapping relationship through the signal connection device.
可以看出,通过信号连接装置设置不同待测模块之间的组网模式,从而可以实现待测模块的资源池化。而通过信号连接装置控制待测模块和HIL设备之间的信号链路的导通,可以实现HIL设备的资源池化。It can be seen that by setting the networking mode between different modules to be tested through the signal connection device, resource pooling of the modules to be tested can be realized. By controlling the conduction of the signal link between the module under test and the HIL device through the signal connection device, resource pooling of the HIL device can be realized.
在第一方面的一种可能的实施方式中,信号连接装置包含多个端口,通过信号连接装置设置多个待测模块之间的组网模式,包括:通过信号连接装置设置多个端口对应的多个的端口标识,例如,信号连接装置的第一端口对应的第一端口标识,信号连接装置的第二端口对应的第二端口标识,信号连接装置的第三端口对应的第三端口标识,等等。不同的端口标识可以相同也可以不同。基于端口标识设置多个待测模块之间的组网模式。In a possible implementation of the first aspect, the signal connection device includes multiple ports, and setting the networking mode between multiple modules under test through the signal connection device includes: setting the corresponding ports of multiple ports through the signal connection device Multiple port identifiers, for example, the first port identifier corresponding to the first port of the signal connection device, the second port identifier corresponding to the second port of the signal connection device, and the third port identifier corresponding to the third port of the signal connection device, etc. Different port identifiers can be the same or different. Set the networking mode between multiple modules under test based on the port identification.
可以看出,通过信号连接装置可以设置不同待测模块之间的组网模式,从而不需要手工连接来定义组网拓扑,减少了因手工操作而带来错误,可以提高配置效率。It can be seen that the network mode between different modules to be tested can be set through the signal connection device, so that manual connection is not required to define the network topology, which reduces errors caused by manual operation and improves configuration efficiency.
在第一方面的一种可能的实施方式中,多个待测模块分别通过多个端口连接在信号连接装置上,基于端口标识设置多个待测模块之间的组网模式,包括:基于端口标识设置第一待测模块和第二待测模块之间的第二链路,其中,所述多个待测模块包括第一待测模块和第二待测模块,所述端口标识为所述信号连接装置的端口对应的标识;基于第二链路设置多个待测模块之间的组网模式。In a possible implementation of the first aspect, multiple modules to be tested are respectively connected to the signal connection device through multiple ports, and setting the networking mode between the multiple modules to be tested based on the port identification includes: based on the port Identify and set the second link between the first module to be tested and the second module to be tested, wherein the plurality of modules to be tested include the first module to be tested and the second module to be tested, and the port is identified as the An identification corresponding to the port of the signal connection device; setting a networking mode among multiple modules to be tested based on the second link.
可以看出,基于端口的配置可以限制报文广播在连接范围内,完成端口间的交换。而待测模块之间的组网对端口配置不敏感,因此不会影响组网消息传递。It can be seen that the port-based configuration can limit message broadcasting within the connection range and complete the exchange between ports. The networking between the modules under test is not sensitive to port configuration, so it will not affect the transmission of networking messages.
在第一方面的一种可能的实施方式中,基于端口标识设置第一待测模块和第二待测模块之间的第二链路,包括:在第一端口标识与第二端口标识相同的情况下,确定所述第一待测模块和所述第二待测模块之间的信号传输,以实现通过所述端口标识设置所述第一待测模块和所述第二待测模块之间的第二链路;其中,所述第一端口标识为所述信号连接装置的第一端口对应的标识,所述第一端口为与所述第一待测模块连接的端口;所述第二端口标识为所述信号连接装置的第二端口对应的标识,所述第二端口为与所述第二待测模块连接的端口。可以看出,基于端口的配置(将端口标识设置为相同)可以限制报文广播在连接范围内,完成端口间的交换。而待测模块之间的组网对端口配置不敏感,因此不会影响组网消息传递。In a possible implementation manner of the first aspect, setting the second link between the first module under test and the second module under test based on the port identifier includes: In this case, determine the signal transmission between the first module under test and the second module under test, so as to realize setting the port identification between the first module under test and the second module under test The second link; wherein, the first port identification is the identification corresponding to the first port of the signal connection device, and the first port is the port connected to the first module under test; the second The port identifier is an identifier corresponding to a second port of the signal connection device, and the second port is a port connected to the second module under test. It can be seen that the port-based configuration (setting the port identifiers to be the same) can limit message broadcasting within the connection range and complete the exchange between ports. The networking between the modules under test is not sensitive to port configuration, so it will not affect the transmission of networking messages.
在第一方面的一种可能的实施方式中,确定端口连接关系,所述端口连接关系包含第一端口标识和第二端口标识,所述第一端口标识为所述信号连接装置的第一端口对应的标识,所述第一端口为与所述第一待测模块连接的端口;所述第二端口标识为所述信号连接装置的第二端口对应的标识,所述第二端口为与所述第二待测模块连接的端口;基于所述端口连接关系设置所述第一待测模块和所述第二待测模块之间的第二链路。In a possible implementation manner of the first aspect, a port connection relationship is determined, the port connection relationship includes a first port identifier and a second port identifier, and the first port identifier is the first port of the signal connection device The corresponding identification, the first port is the port connected to the first module to be tested; the second port identification is the identification corresponding to the second port of the signal connection device, and the second port is the identification corresponding to the first module to be tested. A port connected to the second module under test; and a second link between the first module under test and the second module under test is set based on the port connection relationship.
可以看出,基于端口的配置和建立的转发关系可以限制报文广播在连接范围内,完成端口间的交换。而待测模块之间的组网对端口配置不敏感,因此不会影响组网消息传递。It can be seen that the port-based configuration and the established forwarding relationship can limit the message broadcast within the connection range and complete the exchange between ports. The networking between the modules under test is not sensitive to port configuration, so it will not affect the transmission of networking messages.
在第一方面的一种可能的实施方式中,所述信号连接装置的端口包括以太网端口或者控制局域网络CAN端口。In a possible implementation manner of the first aspect, the port of the signal connection device includes an Ethernet port or a control area network CAN port.
在第一方面的一种可能的实施方式中,上述方法可以应用于模型测试和/或台架测试,台架测试包含仿真模型对应的实体部件,实体部件与信号连接装置连接。In a possible implementation manner of the first aspect, the above method may be applied to model testing and/or bench testing, where the bench testing includes physical components corresponding to the simulation model, and the physical components are connected to the signal connection device.
可以看出,通过本申请实施例可以配置HIL仿真测试和台架测试中的信号链路,无需手 工配置,可以实现混合仿真。从而可以将模型仿真结果与实体部件仿真结果进行对比,可以提高测试验证效率。It can be seen that the signal link in the HIL simulation test and bench test can be configured through the embodiment of the present application, without manual configuration, and hybrid simulation can be realized. Therefore, the simulation results of the model can be compared with the simulation results of the physical components, and the efficiency of test verification can be improved.
在第一方面的一种可能的实施方式中,根据第三映射关系控制HIL仿真测试中全链路信号的连接之后,还包括:根据来自用户设备的测试请求构建测试实例。测试实例用于供用户设备使用测试请求对应的目标待测模块的资源。In a possible implementation manner of the first aspect, after controlling the connection of all-link signals in the HIL simulation test according to the third mapping relationship, the method further includes: constructing a test instance according to a test request from the user equipment. The test instance is used for the user equipment to use the resource of the target module under test corresponding to the test request.
可以看出,本申请实施例可以根据用户设备的需求为用户设备提供测试实例所需要的资源,从而可以满足不同规模的测试需要,提高HIL测试资源利用率。It can be seen that the embodiments of the present application can provide the user equipment with the resources required by the test instance according to the requirements of the user equipment, so as to meet the test needs of different scales and improve the utilization rate of HIL test resources.
在第一方面的一种可能的实施方式中,根据来自用户设备的测试请求构建测试实例,包括:根据测试请求为用户设备分配对应的目标待测模块和I/O端口,I/O端口为HIL设备上的端口;根据目标待测模块和I/O端口构建测试实例。In a possible implementation manner of the first aspect, constructing a test instance according to a test request from a user equipment includes: assigning a corresponding target module to be tested and an I/O port for the user equipment according to the test request, and the I/O port is Ports on the HIL device; build test instances based on the target module under test and I/O ports.
可以看出,请求开始测试后,本申请实施例可以根据测试请求按需从I/O资源池和待测模块资源池分配HIL测试资源,从而可以满足不同规模的HIL测试需求,提高了HIL测试资源利用率根据分配到的I/O端口映射关系和HIL配置需求,自动推导模型信号和I/O端口的映射,完成全链路信号连接来构建测试实例。It can be seen that after the test is requested to start, the embodiment of the present application can allocate HIL test resources from the I/O resource pool and the module resource pool to be tested according to the test request, thereby meeting the HIL test requirements of different scales and improving the HIL test performance. Resource utilization According to the assigned I/O port mapping relationship and HIL configuration requirements, the mapping between model signals and I/O ports is automatically derived, and the full link signal connection is completed to build a test instance.
在第一方面的一种可能的实施方式中,根据目标待测模块的资源和I/O端口构建测试实例,包括:根据目标待测模块的资源确定第四映射关系,第四映射关系包含目标待测模块与第一处理器之间的信号连接关系;根据I/O端口确定第五映射关系,第五映射关系包含目标待测模块和HIL设备之间的信号连接关系;根据第四映射关系和第五映射关系确定第一处理器和HIL设备之间的第六映射关系;基于第六映射关系构建测试实例。In a possible implementation of the first aspect, constructing a test instance according to the resources and I/O ports of the target module under test includes: determining a fourth mapping relationship according to the resources of the target module under test, and the fourth mapping relationship includes the target The signal connection relationship between the module to be tested and the first processor; the fifth mapping relationship is determined according to the I/O port, and the fifth mapping relationship includes the signal connection relationship between the target module to be tested and the HIL device; according to the fourth mapping relationship and the fifth mapping relationship determine a sixth mapping relationship between the first processor and the HIL device; construct a test instance based on the sixth mapping relationship.
可以看出,本申请实施例可以自动推导模型信号和HIL设备I/O资源的映射,可以减少软硬件配置耗时,降低HIL设备资源闲置时间,降低使用成本。It can be seen that the embodiment of the present application can automatically derive the mapping between model signals and HIL device I/O resources, which can reduce the time-consuming configuration of software and hardware, reduce the idle time of HIL device resources, and reduce the cost of use.
第二方面,本申请实施例提供了一种信号连接装置,信号连接装置用于控制待测模块和HIL设置之间的信号连接,装置包括第一配置单元和第二配置单元,In the second aspect, the embodiment of the present application provides a signal connection device, the signal connection device is used to control the signal connection between the module under test and the HIL setting, the device includes a first configuration unit and a second configuration unit,
第一配置单元,用于设置多个待测模块之间的组网模式;The first configuration unit is used to set the networking mode between multiple modules to be tested;
第二配置单元,用于设置一个或多个待测模块和HIL设备之间的第一链路。The second configuration unit is used to set the first link between one or more modules under test and the HIL device.
在第二方面的一种可能的实施方式中,第一配置单元包括多个端口,第一配置单元,具体用于:设置多个端口对应的多个的端口标识;基于端口标识设置多个待测模块之间的组网模式。In a possible implementation manner of the second aspect, the first configuration unit includes a plurality of ports, and the first configuration unit is specifically configured to: set a plurality of port identifiers corresponding to the plurality of ports; The networking mode between the test modules.
在第二方面的一种可能的实施方式中,多个待测模块分别通过端口连接在第一配置单元上,第一配置单元,具体用于:基于端口标识设置第一待测模块和第二待测模块之间的第二链路,其中,多个待测模块包括第一待测模块和第二待测模块,端口标识为信号连接装置的端口对应的标识;基于第二链路设置多个待测模块之间的组网模式。In a possible implementation manner of the second aspect, a plurality of modules to be tested are respectively connected to the first configuration unit through ports, and the first configuration unit is specifically used to: set the first module to be tested and the second module to be tested based on the port identification The second link between the modules to be tested, wherein the plurality of modules to be tested includes a first module to be tested and a second module to be tested, and the port identification is the identification corresponding to the port of the signal connection device; based on the second link, multiple The networking mode between the modules under test.
在第二方面的一种可能的实施方式中,第一配置单元,具体用于:在第一端口标识以第二端口标识相同的情况下,确定所述第一待测模块和所述第二待测模块之间的信号传输,以实现通过所述端口标识设置所述第一待测模块和所述第二待测模块之间的第二链路;其中,所述第一端口标识为所述信号连接装置的第一端口对应的标识,所述第一端口为与所述第一待测模块连接的端口;所述第二端口标识为所述信号连接装置的第二端口对应的标识,所述第二端口为与所述第二待测模块连接的端口。In a possible implementation manner of the second aspect, the first configuration unit is specifically configured to: determine that the first module under test and the second Signal transmission between the modules under test, so as to realize setting the second link between the first module under test and the second module under test through the port identification; wherein, the first port identification is the The identification corresponding to the first port of the signal connection device, the first port is the port connected to the first module to be tested; the second port identification is the identification corresponding to the second port of the signal connection device, The second port is a port connected to the second module under test.
在第二方面的一种可能的实施方式中,第一配置单元,具体用于:确定端口连接关系,所述端口连接关系包含第一端口标识和第二端口标识,所述第一端口标识为所述信号连接装 置的第一端口对应的标识,所述第一端口为与所述第一待测模块连接的端口;所述第二端口标识为所述信号连接装置的第二端口对应的标识,所述第二端口为与所述第二待测模块连接的端口;基于所述端口连接关系设置所述第一待测模块和所述第二待测模块之间的第二链路。In a possible implementation manner of the second aspect, the first configuration unit is specifically configured to: determine a port connection relationship, where the port connection relationship includes a first port identifier and a second port identifier, and the first port identifier is The identification corresponding to the first port of the signal connection device, the first port is the port connected to the first module to be tested; the second port identification is the identification corresponding to the second port of the signal connection device , the second port is a port connected to the second module under test; setting a second link between the first module under test and the second module under test based on the port connection relationship.
在第二方面的一种可能的实施方式中,端口包括以太网端口或者控制局域网络CAN端口。In a possible implementation manner of the second aspect, the port includes an Ethernet port or a control area network CAN port.
第三方面,本申请实施例提供了一种测试系统,该系统可以包括上述第二方面任一实现方式中的信号连接装置;硬件在环HIL测试设备,与信号连接装置连接;待测模块,与信号连接装置连接。In a third aspect, an embodiment of the present application provides a test system, which may include the signal connection device in any implementation of the second aspect above; hardware-in-the-loop HIL test equipment connected to the signal connection device; the module to be tested, Connect with the signal connection device.
在第三方面的一种可能的实施方式中,测试系统还包括第一处理器,第一处理器用于运行仿真模型,仿真模型为对待测模块的功能进行仿真的模型;测试系统还包括第一处理器与待测模块之间的信号映射关系。In a possible implementation manner of the third aspect, the test system also includes a first processor, the first processor is used to run a simulation model, and the simulation model is a model for simulating the function of the module to be tested; the test system also includes a first The signal mapping relationship between the processor and the module under test.
在第三方面的一种可能的实施方式中,测试系统运行在以下中的至少一种设备中:公有云设备、私有云设备、或者本地设备。In a possible implementation manner of the third aspect, the test system runs on at least one of the following devices: a public cloud device, a private cloud device, or a local device.
第四方面,本申请实施例提供了一种信号连接装置,该设备可以控制单元,用于通过信号连接装置配置第一映射关系,第一映射关系包含待测模块和硬件在环HIL设备之间的信号连接关系;处理单元,用于根据第一映射关系确定第三映射关系,第三映射关系包含第一处理器和HIL设备之间的信号映射关系,其中,第一处理器用于运行仿真模型,仿真模型为对待测模块的功能进行仿真的模型;连接单元,用于根据第三映射关系确定HIL测试的连接关系。In the fourth aspect, the embodiment of the present application provides a signal connection device, the device can control the unit, and is used to configure the first mapping relationship through the signal connection device, the first mapping relationship includes the module under test and the hardware-in-the-loop HIL device The signal connection relationship; the processing unit is used to determine the third mapping relationship according to the first mapping relationship, and the third mapping relationship includes the signal mapping relationship between the first processor and the HIL device, wherein the first processor is used to run the simulation model , the simulation model is a model for simulating the function of the module to be tested; the connection unit is used to determine the connection relationship of the HIL test according to the third mapping relationship.
在第四方面的一种可能的实施方式中,设备还包括:获取单元,用于获取第二映射关系,其中,第二映射关系包含第一处理器与待测模块之间的信号映射关系。In a possible implementation manner of the fourth aspect, the device further includes: an acquiring unit, configured to acquire a second mapping relationship, where the second mapping relationship includes a signal mapping relationship between the first processor and the module under test.
在第四方面的一种可能的实施方式中,处理单元,具体用于根据第二映射关系和第一映射关系确定第三映射关系。In a possible implementation manner of the fourth aspect, the processing unit is specifically configured to determine the third mapping relationship according to the second mapping relationship and the first mapping relationship.
在第四方面的一种可能的实施方式中,控制单元,具体用于:通过信号连接装置设置多个待测模块之间的组网模式;通过信号连接装置设置一个或多个待测模块和HIL设备之间的第一链路;基于设置的组网模式和第一链路确定第一映射关系,以实现通过信号连接装置配置第一映射关系。In a possible implementation manner of the fourth aspect, the control unit is specifically used to: set the networking mode between multiple modules under test through the signal connection device; set one or more modules under test and the The first link between the HIL devices: determining the first mapping relationship based on the set networking mode and the first link, so as to configure the first mapping relationship through the signal connection device.
在第四方面的一种可能的实施方式中,设备包含多个端口,控制单元,具体用于:通过信号连接装置设置多个端口对应的多个端口标识;基于端口标识设置多个待测模块之间的组网模式。例如,信号连接装置的第一端口对应的第一端口标识,信号连接装置的第二端口对应的第二端口标识,信号连接装置的第三端口对应的第三端口标识,等等。不同的端口标识可以相同也可以不同。In a possible implementation manner of the fourth aspect, the device includes multiple ports, and the control unit is specifically configured to: set multiple port identifiers corresponding to the multiple ports through the signal connection device; set multiple modules under test based on the port identifiers Between networking modes. For example, the first port identifier corresponding to the first port of the signal connection device, the second port identifier corresponding to the second port of the signal connection device, the third port identifier corresponding to the third port of the signal connection device, and so on. Different port identifiers can be the same or different.
在第四方面的一种可能的实施方式中,多个待测模块分别通过多个端口连接在设备上,控制单元,具体用于:基于端口标识设置第一待测模块和第二待测模块之间的第二链路,其中,多个待测模块包括第一待测模块和第二待测模块,端口标识为信号连接装置的端口对应的标识;基于第二链路设置多个待测模块之间的组网模式。In a possible implementation manner of the fourth aspect, multiple modules to be tested are respectively connected to the device through multiple ports, and the control unit is specifically configured to: set the first module to be tested and the second module to be tested based on port identifiers The second link between, wherein, a plurality of modules to be tested includes a first module to be tested and a second module to be tested, and the port identification is the identification corresponding to the port of the signal connection device; a plurality of modules to be tested are set based on the second link The networking mode between modules.
在第四方面的一种可能的实施方式中,控制单元,具体用于:在第一端口标识与第二端口标识相同的情况下,确定所述第一待测模块和所述第二待测模块之间的信号传输,以实现通过所述端口标识设置所述第一待测模块和所述第二待测模块之间的第二链路;其中,所述第一端口标识为所述信号连接装置的第一端口对应的标识,所述第一端口为与所述第一待测 模块连接的端口;所述第二端口标识为所述信号连接装置的第二端口对应的标识,所述第二端口为与所述第二待测模块连接的端口。In a possible implementation manner of the fourth aspect, the control unit is specifically configured to: determine that the first module under test and the second module under test Signal transmission between modules, so as to realize setting the second link between the first module under test and the second module under test through the port identification; wherein, the first port identification is the signal The identification corresponding to the first port of the connection device, the first port is the port connected to the first module to be tested; the second port identification is the identification corresponding to the second port of the signal connection device, the The second port is a port connected to the second module under test.
在第四方面的一种可能的实施方式中,控制单元,具体用于:确定端口连接关系,所述端口连接关系包含第一端口标识和第二端口标识,所述第一端口标识为所述信号连接装置的第一端口对应的标识,所述第一端口为与所述第一待测模块连接的端口;所述第二端口标识为所述信号连接装置的第二端口对应的标识,所述第二端口为与所述第二待测模块连接的端口;基于所述端口连接关系设置所述第一待测模块和所述第二待测模块之间的第二链路。In a possible implementation manner of the fourth aspect, the control unit is specifically configured to: determine a port connection relationship, where the port connection relationship includes a first port identifier and a second port identifier, and the first port identifier is the The identification corresponding to the first port of the signal connection device, the first port is the port connected to the first module to be tested; the second port identification is the identification corresponding to the second port of the signal connection device, so The second port is a port connected to the second module under test; a second link between the first module under test and the second module under test is set based on the port connection relationship.
在第四方面的一种可能的实施方式中,端口包括以太网端口或者控制局域网络CAN端口。In a possible implementation manner of the fourth aspect, the port includes an Ethernet port or a control area network (CAN) port.
在第四方面的一种可能的实施方式中,该设备用于模型测试和台架测试,台架测试包含仿真模型对应的实体部件信号连接装置信号连接装置。In a possible implementation manner of the fourth aspect, the device is used for model testing and bench testing, and the bench testing includes a signal connection device of a physical component corresponding to a simulation model.
在第四方面的一种可能的实施方式中,连接单元,用于根据来自用户设备的测试请求构建测试实例,测试实例用于供用户设备使用测试请求对应的目标待测模块的资源。In a possible implementation manner of the fourth aspect, the connection unit is configured to construct a test instance according to the test request from the user equipment, and the test instance is used for the user equipment to use resources of the target module under test corresponding to the test request.
在第四方面的一种可能的实施方式中,处理单元,用于根据测试请求为用户设备分配对应的目标待测模块和I/O端口,I/O端口为HIL设备中端口;连接单元,用于根据目标待测模块和I/O端口构建测试实例。In a possible implementation manner of the fourth aspect, the processing unit is configured to assign a corresponding target module to be tested and an I/O port to the user equipment according to the test request, and the I/O port is a port in the HIL device; the connection unit, It is used to build a test instance according to the target module under test and I/O port.
第五方面,本申请实施例提供一种计算机可读存储介质,计算机可读存储介质中存储有指令,当指令在至少一个处理器上运行时,实现前述第一方面任一项所描述的方法。In the fifth aspect, the embodiment of the present application provides a computer-readable storage medium, and instructions are stored in the computer-readable storage medium, and when the instructions are run on at least one processor, the method described in any one of the aforementioned first aspects is implemented .
第六方面,本申请提供了一种计算机程序产品,计算机程序产品包括计算机指令,当指令在至少一个处理器上运行时,实现前述第一方面任一项所描述的方法。该计算机程序产品可以为一个软件安装包,在需要使用前述方法的情况下,可以下载该计算机程序产品并在计算设备上执行该计算机程序产品。In a sixth aspect, the present application provides a computer program product, the computer program product includes computer instructions, and when the instructions are run on at least one processor, the method described in any one of the foregoing first aspects is implemented. The computer program product may be a software installation package, and the computer program product may be downloaded and executed on a computing device if the foregoing method needs to be used.
本申请第二至第六方面所提供的技术方法,其有益效果可以参考第一方面的技术方案的有益效果,此处不再赘述。For the beneficial effects of the technical methods provided in aspects 2 to 6 of the present application, reference may be made to the beneficial effects of the technical solution in the first aspect, which will not be repeated here.
附图说明Description of drawings
图1是本申请实施例提供的一种中央计算架构的示意图;FIG. 1 is a schematic diagram of a central computing architecture provided by an embodiment of the present application;
图2A是本申请实施例提供的一种测试系统的示意图;Fig. 2A is a schematic diagram of a test system provided by an embodiment of the present application;
图2B是本申请实施例提供的一种实体部件软件总成包的示意图;Fig. 2B is a schematic diagram of a physical component software assembly package provided by the embodiment of the present application;
图3A是本申请实施例提供的一种HIL仿真测试中信号连接的示意图;FIG. 3A is a schematic diagram of signal connections in a HIL simulation test provided by an embodiment of the present application;
图3B是本申请实施例提供的一种信号连接方法的流程示意图;FIG. 3B is a schematic flowchart of a signal connection method provided by an embodiment of the present application;
图4是本申请实施例提供的一种信号连接装置的示意图;Fig. 4 is a schematic diagram of a signal connection device provided by an embodiment of the present application;
图5A是本申请实施例提供的一种待测模块之间的组网模式的示意图;FIG. 5A is a schematic diagram of a networking mode between modules to be tested provided in an embodiment of the present application;
图5B是本申请实施例提供的另一种待测模块之间的组网模式的示意图;Fig. 5B is a schematic diagram of another networking mode between the modules to be tested provided by the embodiment of the present application;
图6是本申请实施例提供的一种混合仿真测试的示意图;FIG. 6 is a schematic diagram of a hybrid simulation test provided by an embodiment of the present application;
图7是本申请实施例提供的一种基于云计算服务实现仿真测试的示意图;FIG. 7 is a schematic diagram of a simulation test based on a cloud computing service provided by an embodiment of the present application;
图8是本申请实施例提供的一种资源分配的示意图;FIG. 8 is a schematic diagram of resource allocation provided by an embodiment of the present application;
图9是本申请实施例提供的一种信号连接装置的结构示意图;FIG. 9 is a schematic structural diagram of a signal connection device provided by an embodiment of the present application;
图10是本申请实施例提供的一种计算设备的结构示意图。FIG. 10 is a schematic structural diagram of a computing device provided by an embodiment of the present application.
具体实施方式Detailed ways
下面结合本发明实施例中的附图对本发明实施例进行描述。Embodiments of the present invention will be described below with reference to the drawings in the embodiments of the present invention.
在汽车、航空航天等一些电控设备的开发过程中,硬件在环(Hardware-In-Loop,HIL) 测试已经成为电子控制单元(Electronic Control Unit,ECU)开发流程中非常重要的一环。这样可以缩短开发时间和降低验证成本,同时,还可以确保ECU的软件质量。In the development process of some electronic control equipment such as automobiles and aerospace, hardware-in-loop (Hardware-In-Loop, HIL) testing has become a very important part of the electronic control unit (Electronic Control Unit, ECU) development process. This shortens development time and reduces verification costs, while ensuring the software quality of the ECU.
以汽车为例,请参见图1,图1是本申请实施例提供的一种中央计算架构(Central Computing Architecture,CCA)100的示意图。需要说明的是,本申请实施例提及的汽车包括但不限于智能汽车、新能源汽车或者传统汽车等。其中,智能汽车可以包括智能驾驶汽车、无人小车等。新能源汽车包括纯电动汽车、增强式电动汽车、混合动力汽车、燃料电池电动汽车、氢发动机汽车、其他新能源汽车等。传统汽车包括汽油汽车、柴油汽车等,本申请实施例对此不做限制。Taking a car as an example, please refer to FIG. 1 , which is a schematic diagram of a central computing architecture (Central Computing Architecture, CCA) 100 provided by an embodiment of the present application. It should be noted that the cars mentioned in the embodiments of this application include but are not limited to smart cars, new energy cars, or traditional cars. Among them, smart cars can include smart driving cars, unmanned cars, etc. New energy vehicles include pure electric vehicles, enhanced electric vehicles, hybrid vehicles, fuel cell electric vehicles, hydrogen engine vehicles, and other new energy vehicles. Traditional vehicles include gasoline vehicles, diesel vehicles, etc., which are not limited in this embodiment of the present application.
中央计算架构100可以包括分布式网关(比如说一个或多个I/O网关)和数据中心(xData Center),xDC(例如智能座舱CDC、整车控制VDC和智能驾驶MDC)。智能座舱CDC用于智能座舱的控制;整车控制VDC用于整车动力控制;智能驾驶MDC用于智能驾驶的控制。The central computing architecture 100 may include distributed gateways (such as one or more I/O gateways) and data centers (xData Center), xDC (such as smart cockpit CDC, vehicle control VDC and smart driving MDC). Smart cockpit CDC is used for smart cockpit control; vehicle control VDC is used for vehicle power control; smart driving MDC is used for smart driving control.
分布式网关可以提供设备的接入,一边连接xDC,一边连接车辆零部件,还可以连接汽车盒子(Telematics BOX,T-box)。因此,分布式网关可以是整车中央计算架构中的核心部件和整车网络的数据交换枢纽。分布式网关和xDC可以运行收编的控制器逻辑。T-box主要用于和汽车外部、后台系统和手机应用通信。The distributed gateway can provide access to devices, while connecting to xDC, connecting to vehicle parts, and also connecting to the car box (Telematics BOX, T-box). Therefore, the distributed gateway can be the core component in the vehicle central computing architecture and the data exchange hub of the vehicle network. Distributed gateways and xDCs can run incorporated controller logic. T-box is mainly used to communicate with the exterior of the car, background systems and mobile phone applications.
车辆零部件,包含执行元件,执行元件用于实现特定的功能。其中,执行元件例如可以是车辆中的执行器或者传感器等。车辆零部件还可以包括ECU。其中,车辆零部件可以包含以下一种或多种:具有部分或完整电子控制功能的车辆零部件,以及不具有电子控制功能的车辆零部件。Vehicle components, including actuators, which are used to achieve specific functions. Wherein, the actuator may be, for example, an actuator or a sensor in the vehicle. Vehicle components may also include ECUs. Among them, the vehicle parts may include one or more of the following: vehicle parts with partial or complete electronic control functions, and vehicle parts without electronic control functions.
其中,实现自动驾驶功能的车零部件包括单目摄像头、双目摄像头、毫米波雷达、激光雷达、超声波雷达等。Among them, the car parts that realize the automatic driving function include monocular cameras, binocular cameras, millimeter-wave radars, lidars, ultrasonic radars, etc.
实现智能座舱的车辆零部件包括抬头显示器、仪表显示器、收音机、导航、摄像头等。The vehicle components that realize the smart cockpit include head-up display, instrument display, radio, navigation, camera, etc.
实现整车控制的车辆零部件包括用于车身域的车辆零部件及底盘域的车辆零部件,车身域的车辆零部件包括门窗升降控制器、电动后视镜、空调、中央门锁等。底盘域的车辆零部件包括制动系统的车辆零部件、转向系统中的车辆零部件、加速系统中的车辆零部件,比如油门等。The vehicle parts that realize the control of the whole vehicle include vehicle parts used in the body domain and vehicle parts in the chassis domain. The vehicle parts in the body domain include door and window lift controllers, electric rearview mirrors, air conditioners, central door locks, etc. Vehicle components in the chassis domain include vehicle components in the braking system, vehicle components in the steering system, and vehicle components in the acceleration system, such as the accelerator.
ECU位于汽车零部件的内部,由处理器、存储器、输入/输出(I/O)接口、模数转换器(A/D)以及整形、驱动等大规模集成电路中的一个或者多个组成,具有电子控制功能,可以完成多种多样的功能。例如,可以基于控制信息对汽车零部件进行控制,又例如,可以对汽车零部件中待传输数据进行数据处理。ECU is located in the interior of auto parts and is composed of one or more of large-scale integrated circuits such as processors, memories, input/output (I/O) interfaces, analog-to-digital converters (A/D), and shaping and driving. With electronic control function, it can complete various functions. For example, the auto parts can be controlled based on the control information, and for example, data processing can be performed on the data to be transmitted in the auto parts.
需要说明的是,上述电子控制功能主要包括逻辑控制功能以及数据处理功能。其中逻辑控制功能包括基于获取的控制信息控制车辆零部件执行某种操作,例如,基于控制信息控制雨刷器的动作;又例如,基于控制信息控制车门门锁的开关状态等。数据处理功能包括对车辆零部件中待处理的数据进行处理,例如,将通过雨刷器的敏感元件采集的雨量信息进行数据处理,确定雨刷器的工作状态,其中工作状态包括雨刷器的工作频率或开关状态。又例如,将车门上通过门锁的敏感元件获取的指纹信息进行数据处理,确定车门的开关状态信息。It should be noted that the above-mentioned electronic control functions mainly include logic control functions and data processing functions. The logic control function includes controlling vehicle components to perform certain operations based on the obtained control information, for example, controlling the action of the wiper based on the control information; another example, controlling the switch state of the door lock based on the control information, etc. The data processing function includes processing the data to be processed in the vehicle components, for example, processing the rain information collected by the sensitive elements of the wiper to determine the working status of the wiper, where the working status includes the working frequency of the wiper or switch status. For another example, data processing is performed on the fingerprint information obtained by the sensitive element of the door lock on the car door to determine the opening and closing status information of the car door.
需要说明的是,除非有特殊的说明,否则本申请实施例中的ECU都是指位于车辆零部件内的电子控制元件,与现有技术中的发动机控制单元(Engine Control Unit)不同。发动机控制单元位于发动机系统中的多个车辆零部件之外,用于控制发动机系统中的多个车辆零部件,可以视为一种独立的集中控制器。然而,本申请实施例中的电子控制单元,即ECU指位于车辆零部件内部的电子控制单元,例如,可以是发动机系统中的多个车辆零部件内部的电子控 制单元。It should be noted that, unless otherwise specified, the ECU in the embodiments of the present application refers to the electronic control components located in the vehicle components, which is different from the engine control unit (Engine Control Unit) in the prior art. The engine control unit is located outside the multiple vehicle components in the engine system and is used to control multiple vehicle components in the engine system, which can be regarded as an independent centralized controller. However, the electronic control unit in the embodiment of the present application, that is, ECU refers to an electronic control unit located inside a vehicle component, for example, it may be an electronic control unit inside a plurality of vehicle components in an engine system.
需要说明的是,上述通信连接可以理解为进行信息传输的无线连线或者有线连接,本申请实施例对此不做限定,其中,无线连接可以理解为xDC无需通过总线即与车辆中的其他单元通信连接,例如,可以采用蓝牙通信或者Wi-Fi通信等。有线连接可以理解为DC基于总线或以太连接等与车辆中的其他单元通信连接,例如,可以采用控制器局域网络(Controller Area Network,CAN)总线、局域互联网络(Local Interconnect Network,LIN)总线、高速串行计算机扩展总线标准(peripheral component interconnect express,PCI-e)、或者以太网(ethernet)通信技术。It should be noted that the above-mentioned communication connection can be understood as a wireless connection or a wired connection for information transmission, which is not limited in the embodiment of the present application, wherein the wireless connection can be understood as the communication between xDC and other units in the vehicle without going through the bus. For the communication connection, for example, Bluetooth communication or Wi-Fi communication can be used. Wired connection can be understood as the communication connection between DC and other units in the vehicle based on bus or Ethernet connection, for example, Controller Area Network (CAN) bus, Local Interconnect Network (LIN) bus can be used , high-speed serial computer expansion bus standard (peripheral component interconnect express, PCI-e), or Ethernet (ethernet) communication technology.
在HIL测试中需要根据ECU的硬线接口以及HIL测试系统的I/O板卡接口类型进行接口配置及线束制作,使得被测试的ECU能够连接到HIL设备,完成测试平台的搭建,进行后续测试。从图1可以看出,车辆中涉及了大量的ECU,所以整车级HIL测试中涉及的ECU更多,信号数量也更多,使得测试平台搭建过程中占用大量的时间。为解决这一问题,相关技术中通过在I/O板卡和ECU之间串联信号配置盒(Break-Out-Box,BOB,或称信号转接盒等)等信号转接装置实现硬件在环测试系统与ECU之间的连接。In the HIL test, it is necessary to configure the interface and make the wiring harness according to the hard wire interface of the ECU and the I/O board interface type of the HIL test system, so that the tested ECU can be connected to the HIL equipment, complete the construction of the test platform, and carry out subsequent tests . It can be seen from Figure 1 that a large number of ECUs are involved in the vehicle, so more ECUs are involved in the vehicle-level HIL test, and the number of signals is also larger, which makes the test platform construction process take up a lot of time. In order to solve this problem, in the related art, a signal transfer device such as a signal configuration box (Break-Out-Box, BOB, or signal transfer box, etc.) is connected in series between the I/O board and the ECU to realize hardware-in-the-loop Test the connection between the system and the ECU.
相关技术中提供的信号转接装置包括第一连接器和二连接器,第一连接器与硬件在环测试系统连接,第二连接器与ECU连接。有的技术方案是定制线束,也即根据需要测试的ECU的接口特性以及硬件在环测试信号的接口特征对信号连接装置的第一连接器、第二连接器以及第一连接器和第二连接器之间的连接映射关系进行特定设置,以满足ECU与硬件在环测试系统之间的连接需求。但是,定制线束需要一定的时间和成本,更换线束时仍然需要人工完成。也有的技术方案是跳线转接板,也即在信号转接装置中第一连接器和第二连接器之间通过可通断的开关插排连接,需要自定义配置接口时,用户根据需要闭合或断开关,然后使用硬线手动连接两端连接器的引脚(PIN)。但是,跳线转接板也需要人工完成连接无法实现自动化。The signal conversion device provided in the related art includes a first connector and a second connector, the first connector is connected to the hardware-in-the-loop test system, and the second connector is connected to the ECU. Some technical solutions are to customize the wiring harness, that is, according to the interface characteristics of the ECU to be tested and the interface characteristics of the hardware-in-the-loop test signal, the first connector, the second connector, and the first connector and the second connection of the signal connection device Make specific settings for the connection mapping relationship between ECUs to meet the connection requirements between the ECU and the hardware-in-the-loop test system. However, customizing the wiring harness requires a certain amount of time and cost, and it still needs to be done manually when replacing the wiring harness. There is also a technical solution that is a jumper adapter board, that is, the connection between the first connector and the second connector in the signal adapter device is connected through an on-off switch plug-in strip. When a custom configuration interface is required, the user can Turn the switch on or off, then use a hardwire to manually connect the pins (PINs) of the connectors at both ends. However, the jumper adapter board also needs to be manually connected and cannot be automated.
当从单ECU的HIL测试趋向于整车级的HIL测试时,需要连接到HIL测试系统上的信号上升到原来的近百倍。相关技术中人工环节可能会带来操作失误概率,定制环节可能会带来时间和成本增加,影响开发验证效率。When the HIL test of a single ECU tends to the HIL test of the whole vehicle level, the signal that needs to be connected to the HIL test system has increased by nearly a hundred times. In related technologies, the manual link may bring the probability of operational errors, and the customization link may increase time and cost, affecting the efficiency of development and verification.
为解决上述技术问题,首先,本申请实施例提供了一种系统。请参见图2A,图2A是本申请实施例提供的一种测试系统200的示意图。如图2A所示,测试系统200的硬件部分可以包括信号连接装置201、硬件在环测试(HIL)设备202和待测模块203。其中,硬件在环测试设备202和待测模块203分别连接在信号连接装置201上,可以通过信号连接装置201进行信息的交互。In order to solve the above technical problem, first, an embodiment of the present application provides a system. Please refer to FIG. 2A . FIG. 2A is a schematic diagram of a testing system 200 provided by an embodiment of the present application. As shown in FIG. 2A , the hardware part of the test system 200 may include a signal connection device 201 , a hardware-in-the-loop (HIL) test device 202 and a module to be tested 203 . Wherein, the hardware-in-the-loop test equipment 202 and the module to be tested 203 are respectively connected to the signal connection device 201 , and information exchange can be performed through the signal connection device 201 .
HIL设备202包含可以运行仿真模型的第一处理器、适合HIL测试的I/O板卡和供电模块。The HIL device 202 includes a first processor capable of running a simulation model, an I/O board suitable for HIL testing, and a power supply module.
当待测模块203的数量为多个时,信号连接装置201用于设置多个待测模块之间的组网模式,以及用于控制一个或多个待测模块和HIL设备之间的低速I/O的选择性导通。When the quantity of the module under test 203 is multiple, the signal connecting device 201 is used to set the networking mode between a plurality of modules under test, and is used to control the low-speed I between one or more modules under test and the HIL equipment. /O selective conduction.
待测模块203包含至少一个I/O网关,以及一个或多个零部件。The module under test 203 includes at least one I/O gateway and one or more components.
其中,根据待测模块203的数量,测试系统200的硬件部分可以形成不同的产品形态。比如说是测试系统200的硬件部分可以是多机柜形式,也即,HIL设备202、信号连接装置201和待测模块203分别是独立的设备。或者,测试系统200的硬件部分也可以是高集成度 的单机柜形式,也即,HIL设备202、信号连接装置201和待测模块203集成在同一个设备中。或者,测试系统200的硬件部分也可以是部分集成的多机柜形式,例如,HIL设备202和信号连接装置201集成在一个设备中,待测模块203为独立的设备。Wherein, according to the quantity of the modules 203 to be tested, the hardware part of the test system 200 can form different product forms. For example, the hardware part of the test system 200 may be in the form of multiple cabinets, that is, the HIL device 202 , the signal connection device 201 and the module to be tested 203 are independent devices. Alternatively, the hardware part of the test system 200 may also be in the form of a highly integrated single cabinet, that is, the HIL device 202, the signal connection device 201 and the module to be tested 203 are integrated in the same device. Alternatively, the hardware part of the test system 200 may also be in the form of a partially integrated multi-cabinet, for example, the HIL device 202 and the signal connection device 201 are integrated into one device, and the module to be tested 203 is an independent device.
如图2A所示,测试系统200的软件部分可以包括实体部件软件总成包204、仿真模型管理205、信号连接管理206、I/O网关配置207和服务编排208。其中,As shown in FIG. 2A , the software part of the test system 200 may include a physical component software package 204 , a simulation model management 205 , a signal connection management 206 , an I/O gateway configuration 207 and a service orchestration 208 . in,
请参见图2B,图2B是本申请实施例提供的一种实体部件软件总成包204的示意图,从图2B可以看出,实体部件软件总成包204包含仿真模型2041、待测模块203和第二映射关系2043。Please refer to FIG. 2B. FIG. 2B is a schematic diagram of a physical component software assembly package 204 provided in the embodiment of the present application. As can be seen from FIG. 2B, the physical component software assembly package 204 includes a simulation model 2041, a module to be tested 203 and The second mapping relationship 2043 .
第一处理器2042用于运行仿真模型2041以及信息处理,仿真模型2041具体包含道路环境模型、ECU模型、机械模型电气模型中的一种或多种,以及物理量与交互信号的转化,可以对真实的零部件及其传感器、执行器的工作特性进行模拟。以汽车为例,仿真模型2041可以包括整车动力学模型和被控对象模型,整车动力学模型用于模拟车辆运行情景,被控对象模型至少包括分别用于模拟发动机、动力耦合机构、电机和电池的发动机模型、动力耦合机构模型、电机模型和电池模型。The first processor 2042 is used to run the simulation model 2041 and information processing. The simulation model 2041 specifically includes one or more of the road environment model, ECU model, mechanical model and electrical model, as well as the conversion of physical quantities and interactive signals, which can be used for real Simulate the working characteristics of the components and their sensors and actuators. Taking a car as an example, the simulation model 2041 may include a vehicle dynamics model and a controlled object model. The vehicle dynamics model is used to simulate vehicle operation scenarios, and the controlled object model includes at least And battery engine model, power coupling mechanism model, motor model and battery model.
待测模块203可以包含真实的零部件及其传感器、执行器的应用产品型号、名称、端口设置和信号转换这类I/O资源,等等。可以理解的,待测模块203可以是应用程序,用于实现功能逻辑。需要说明的是,待测模块203的数量可以是一个或者多个,本申请实施例不做任何限制。The module to be tested 203 may include real components and their sensors, actuator application product models, names, port settings and I/O resources such as signal conversion, and so on. It can be understood that the module to be tested 203 may be an application program for implementing functional logic. It should be noted that the number of modules to be tested 203 may be one or more, which is not limited in this embodiment of the present application.
第二映射关系2043包含第一处理器2042和待测模块203之间的信号映射关系,其中,第二映射关系2043具体可以是第一处理器2042中的仿真模型2041和待测模块203之间的信号映射关系,比如说待测模块203上的端口和仿真模型2041上的端口之间的映射。可以理解的是,因为仿真模型为根据实体部件设计得到的虚拟形态的模型,所以仿真模型上的端口对应于实体部件上的端口,因此第二映射关系2043还可以是实体部件和待测模块203之间的信号映射关系。The second mapping relationship 2043 includes the signal mapping relationship between the first processor 2042 and the module under test 203, wherein the second mapping relationship 2043 may specifically be between the simulation model 2041 in the first processor 2042 and the module under test 203 The signal mapping relationship, for example, the mapping between the ports on the module under test 203 and the ports on the simulation model 2041 . It can be understood that, because the simulation model is a model of a virtual form designed according to the physical component, the ports on the simulation model correspond to the ports on the physical component, so the second mapping relationship 2043 can also be the physical component and the module to be tested 203 The signal mapping relationship between them.
从图2A可以看出,仿真模型管理205,用于管理实体部件软件总成包204中的仿真模型2041。其中,仿真模型2041为部署在硬件在环测试设备202上的对待测模块203的功能进行测试的模型。It can be seen from FIG. 2A that the simulation model management 205 is used to manage the simulation model 2041 in the physical component software package 204 . Wherein, the simulation model 2041 is a model deployed on the hardware-in-the-loop testing device 202 to test the function of the module to be tested 203 .
信号连接管理206,用于控制信号连接装置201对硬件在环测试设备202和待测模块203之间的信号连接。The signal connection management 206 is used to control the signal connection between the signal connection device 201 and the HIL test equipment 202 and the module under test 203 .
I/O网关配置207,用于配置底层软件(比如说待测模块203所对应的软件)的I/O接口,即标定I/O端口数据的物理含义及工程单元,设定模拟量信号与实际物理值之间的换算关系。The I/O gateway configuration 207 is used to configure the I/O interface of the underlying software (such as the corresponding software of the module to be tested 203), that is, to calibrate the physical meaning and engineering unit of the I/O port data, and to set the analog signal and The conversion relationship between actual physical values.
服务编排208,用于根据实际需求编排待测模块203所对应的服务组件得到满足自身实际需求的新服务,待测模块203可以部署在服务编排208上。The service orchestration 208 is used for arranging the service components corresponding to the module under test 203 according to actual needs to obtain new services that meet its own actual needs. The module under test 203 can be deployed on the service orchestration 208 .
需要说明的是,图2A所示的测试系统可以运行在云端(比如公有云或者私有云),还可以运行在本地设备中。进一步地,测试系统中的运行仿真模型的高性能计算机可以在云端运行,其他部分(比如说信号连接装置、待测模块等)可以在本地运行。It should be noted that the test system shown in FIG. 2A can run on a cloud (such as a public cloud or a private cloud), and can also run on a local device. Further, the high-performance computer running the simulation model in the test system can run on the cloud, and other parts (such as signal connection devices, modules to be tested, etc.) can run locally.
可以理解的是,HIL测试的基本原理是通过HIL设备模拟一个或多个控制器所需要的传感信号和通信信号,同时采集一个或多个控制器发出的控制信号,一个或多个控制器与运行在HIL设备中的仿真模型构成闭环。请参见图3A,图3A是本申请实施例提供的一种HIL仿真测试中信号连接的示意图。It can be understood that the basic principle of HIL testing is to simulate the sensing signals and communication signals required by one or more controllers through HIL equipment, and simultaneously collect the control signals sent by one or more controllers, one or more controllers It forms a closed loop with the simulation model running in the HIL device. Please refer to FIG. 3A . FIG. 3A is a schematic diagram of signal connections in an HIL simulation test provided by an embodiment of the present application.
在相关技术中,一般由供应商A提供仿真模型2041,供应商B提供待测模块203,由整合方编写仿真模型2041和待测模块203之间的信号连接文档。因此,在相关技术的HIL测试中需要手动关联文档,才可以获得仿真模型2041和待测模块203之间第二映射关系。在本申请实施例中,图2A或图2B所示的实体部件软件总成包204中包含第一处理器2042中的仿真模型2041和待测模块203之间映射关系,因此,电子设备通过实体部件软件总成包204可以获取第二映射关系。In related technologies, supplier A generally provides the simulation model 2041 , supplier B provides the module under test 203 , and the integrator writes the signal connection document between the simulation model 2041 and the module under test 203 . Therefore, the second mapping relationship between the simulation model 2041 and the module under test 203 can only be obtained by manually associating documents in the HIL test of the related art. In the embodiment of the present application, the physical component software assembly package 204 shown in FIG. 2A or FIG. 2B contains the mapping relationship between the simulation model 2041 in the first processor 2042 and the module to be tested 203. Therefore, the electronic device passes through the physical The component software package 204 can obtain the second mapping relationship.
在相关技术中,HIL设备202与待测模块203之间的连接需要通过定制线束或者跳线板转接来实现。在本申请实施例中,电子设备通过信号连接装置201可以配置HIL设备202和待测模块203之间的第一映射关系。进一步地,电子设备可以通过第一配置单元2011设置多个待测模块203之间的组网模式,然后电子设备可以通过第二配置单元2012控制一个或多个待测模块203和HIL设备202之间的信号链路的导通。In the related technology, the connection between the HIL device 202 and the module under test 203 needs to be realized through a customized wiring harness or a jumper board. In the embodiment of the present application, the electronic device can configure the first mapping relationship between the HIL device 202 and the module under test 203 through the signal connection device 201 . Further, the electronic device can set the networking mode between multiple modules under test 203 through the first configuration unit 2011, and then the electronic device can control the connection between one or more modules under test 203 and the HIL device 202 through the second configuration unit 2012. The conduction of the signal link between.
在相关技术中,仿真模型2041和HIL设备202之间I/O映射关系需要手动关联。在本申请实施例中,电子设备可以基于第二映射关系和第一映射关系确定第一处理器2042中的仿真模型2041和HIL设备202的之间的第三映射关系。最后,电子设备可以将待测模块203与运行在第一处理器2042中的仿真模型2041构成闭环。In related technologies, the I/O mapping relationship between the simulation model 2041 and the HIL device 202 requires manual association. In this embodiment of the present application, the electronic device may determine a third mapping relationship between the simulation model 2041 in the first processor 2042 and the HIL device 202 based on the second mapping relationship and the first mapping relationship. Finally, the electronic device can form a closed loop with the module under test 203 and the simulation model 2041 running in the first processor 2042 .
请参见图3B,图3B是本申请实施例提供的一种信号连接方法的流程示意图,该方法可以应用于图2A所示的系统,通过图3B所示的方法可以实现图3A所示的信号连接。图3B所示的信号连接方法包括但不限于如下步骤:Please refer to Figure 3B, Figure 3B is a schematic flowchart of a signal connection method provided by the embodiment of this application, this method can be applied to the system shown in Figure 2A, and the signal shown in Figure 3A can be realized through the method shown in Figure 3B connect. The signal connection method shown in Figure 3B includes but is not limited to the following steps:
步骤S301:通过信号连接装置配置第一映射关系。Step S301: Configuring a first mapping relationship through a signal connection device.
具体地,在HIL测试中,对待测模块与HIL设备进行端口配置是HIL测试的必要环节,一般可以在待测模块与HIL设备之间串联信号连接装置,电子设备可以通过信号连接装置配置待测模块和HIL设备之间的信号映射,也即第一映射关系。进一步地,HIL设备可以包括安装有I/O板卡的设备。因此,第一映射关系可以是待测模块与HIL设备的I/O板卡之间的信号映射。Specifically, in the HIL test, port configuration between the module to be tested and the HIL device is a necessary part of the HIL test. Generally, a signal connection device can be connected in series between the module to be tested and the HIL device, and the electronic device can be configured through the signal connection device. The signal mapping between the module and the HIL device, that is, the first mapping relationship. Further, the HIL device may include a device installed with an I/O board. Therefore, the first mapping relationship may be a signal mapping between the module under test and the I/O board of the HIL device.
在一种可能的实现方式中,一个或多个待测模块可以连接到信号连接装置上,当多个待测模块都连接到信号连接装置上时,电子设备可以通过信号连接装置设置多个待测模块之间的组网模式。举例来说,待测模块A、待测模块B、待测模块C和待测模块D分别连接到信号连接装置上。电子设备通过信号连接装置可以设置待测模块A和待测模块B之间的通信链路,待测模块B和待测模块C之间的通信链路,待测模块C和待测模块D之间的链路,待测模块D和待测模块C之间的通信链路。因此,待测模块A、待测模块B、待测模块C和待测模块D可以构成一个环状组网模式。In a possible implementation, one or more modules to be tested can be connected to the signal connection device. When multiple modules to be tested are connected to the signal connection device, the electronic equipment can set multiple The networking mode between the test modules. For example, the module to be tested A, the module to be tested B, the module to be tested C and the module to be tested D are respectively connected to the signal connecting device. The electronic equipment can set the communication link between the module A to be tested and the module B to be tested, the communication link between the module B to be tested and the module C to be tested, and the communication link between the module C to be tested and the module D to be tested through the signal connection device. The link between, the communication link between the module D under test and the module C under test. Therefore, the module to be tested A, the module to be tested B, the module to be tested C and the module to be tested D can form a ring networking mode.
进一步地,信号连接装置包括多个端口,其中,端口可以包括以太网端口或者控制局域网络CAN端口。电子设备可以通过信号连接装置设置每个端口对应的多个端口标识,进而电子设备可以基于端口标识设置多个待测模块之间的组网模式。再进一步地,多个待测模块分别通过多个端口连接在信号连接装置上,比如说待测模块A通过第一端口连接在信号连接装置上,待测模块B通过第二端口连接在信号连接装置上,待测模块C通过第三端口连接在信号连接装置上,以及待测模块D通过第四端口连接在信号连接装置上。Further, the signal connection device includes a plurality of ports, wherein the ports may include Ethernet ports or control area network (CAN) ports. The electronic device can set multiple port identifiers corresponding to each port through the signal connection device, and then the electronic device can set a networking mode among multiple modules under test based on the port identifiers. Furthermore, multiple modules to be tested are connected to the signal connection device through multiple ports, for example, module A to be tested is connected to the signal connection device through the first port, and module B to be tested is connected to the signal connection device through the second port. On the device, the module C to be tested is connected to the signal connection device through the third port, and the module D to be tested is connected to the signal connection device through the fourth port.
再进一步地,当需要配置多个待测模块之间的组网模式时,电子设备可以得到关于组网模式的配置信息,比如说配置信息可以包含待测模块A和待测模块B之间需要建立通信链路,待测模块B和待测模块C之间需要建立通信链路,待测模块C和待测模块A之间需要建立 连接。因此,电子设备在获取到关于组网模式的配置信息后,可以基于配置信息来配置多个待测模块之间的组网模式。也即,电子设备可以基于端口标识设置第一待测模块和第二待测模块之间的第二链路,然后再基于第二链路设置多个待测模块之间的组网模式。其中,第一待测模块和第二待测模块属于上述多个待测模块,端口标识为信号连接装置的端口对应的标识,第一待测模块和第二待测模块为配置信息中需要建立通信链路的模块。Furthermore, when it is necessary to configure the networking mode between multiple modules to be tested, the electronic device can obtain configuration information about the networking mode, for example, the configuration information can include the required To establish a communication link, a communication link needs to be established between the module B to be tested and the module C to be tested, and a connection needs to be established between the module C to be tested and the module A to be tested. Therefore, after the electronic device acquires the configuration information about the networking mode, it can configure the networking mode among multiple modules under test based on the configuration information. That is, the electronic device may set the second link between the first module under test and the second module under test based on the port identifier, and then set the networking mode among the multiple modules under test based on the second link. Among them, the first module to be tested and the second module to be tested belong to the above-mentioned multiple modules to be tested, the port identification is the identification corresponding to the port of the signal connection device, the first module to be tested and the second module to be tested are the configuration information that needs to be established Modules for communication links.
在一种可能的实现方式中,电子设备在获取到关于组网模式的配置信息后,电子设备可以基于第一端口标识设置第二端口的标识。将第一端口标识与第二端口标识设置为相同,第一端口标识为信号连接装置的第一端口对应的标识,而第一端口为第一待测模块连接到信息连接装置上的端口;第二端口标识为信号连接装置的第二端口对应的标识,第二端口为第二待测模块连接到信号连接装置上的端口。然后,在第一端口标识与第二端口标识相同的情景下,电子设备可以根据第一端口的标识通过第二端口向第二待测模块转发第一以太报文,以实现通过端口标识设置第一待测模块和第二待测模块之间的第二链路。也即,电子设备通过第一端口接收到第一待测模块的第一以太报文后,将第一端口的标识添加到第一以太报文中。进而,电子设备可以根据第一端口的标识将第一以太报文传输至与第一端口的标识相同的第二端口处。因为第二端口为第二待测模块连接到信号连接装置上的端口,所以来自第一待测模块的第一以太报文可以传输至第二待测模块。当第一以太报文从第一待测模块转发至第二待测模块时,第一待测模块和第二待测模块之间的第二链路就可以确定。因此,电子设备可以基于端口标识设置第一待测模块和第二待测模块之间的第二链路。In a possible implementation manner, after the electronic device obtains the configuration information about the networking mode, the electronic device may set the identifier of the second port based on the identifier of the first port. Set the first port identification and the second port identification to be the same, the first port identification is the identification corresponding to the first port of the signal connection device, and the first port is the port on which the first module to be tested is connected to the information connection device; The two-port identification is the identification corresponding to the second port of the signal connection device, and the second port is the port through which the second module to be tested is connected to the signal connection device. Then, under the situation that the first port identifier is the same as the second port identifier, the electronic device can forward the first Ethernet message to the second module under test through the second port according to the identifier of the first port, so as to realize setting the first Ethernet packet through the port identifier. A second link between a module under test and a second module under test. That is, after receiving the first Ethernet packet of the first module-under-test through the first port, the electronic device adds the identifier of the first port to the first Ethernet packet. Furthermore, the electronic device may transmit the first Ethernet packet to the second port that has the same identifier as the first port according to the identifier of the first port. Since the second port is the port through which the second module under test is connected to the signal connection device, the first Ethernet packet from the first module under test can be transmitted to the second module under test. When the first Ethernet message is forwarded from the first module under test to the second module under test, the second link between the first module under test and the second module under test can be determined. Therefore, the electronic device can set the second link between the first module under test and the second module under test based on the port identifier.
在一种可能的实现方式中,电子设备在获取到关于组网模式的配置信息后,电子设备可以通过信号连接装置配置端口连接关系,该端口连接关系表示各个端口间的连接关系,包含端口标识。例如端口连接关系包含:第一端口标识与第二端口标识的连接,第三端口标识与第四端口标识之间的连接等。当电子设备通过第一端口接收到第一待测模块的以太报文后,可以将第一端口标识添加到来自第一待测模块的以太报文中。其中,第一端口标识为信号连接装置的第一端口对应的标识。当端口转发关系为第一端口标识与第二端口标识的连接,则电子设备可以根据端口连接关系将添加有第一端口标识的第二以太报文转发至第二端口标识所在的第二端口。因为第二端口为第二待测模块连接到信号连接装置上的端口,所以电子设备可以通过第二端口向第二待测模块转发以太报文。当第一以太报文从第一待测模块转发至第二待测模块时,第一待测模块和第二待测模块之间的第二链路就可以确定。因此,电子设备基于端口标识设置第一待测模块和第二待测模块之间的第二链路。In a possible implementation, after the electronic device obtains the configuration information about the networking mode, the electronic device can configure the port connection relationship through the signal connection device. The port connection relationship represents the connection relationship between ports, including the port identification . For example, the port connection relationship includes: a connection between a first port identifier and a second port identifier, a connection between a third port identifier and a fourth port identifier, and the like. After receiving the Ethernet message from the first module under test through the first port, the electronic device may add the first port identifier to the Ethernet message from the first module under test. Wherein, the first port identifier is an identifier corresponding to the first port of the signal connection device. When the port forwarding relationship is a connection between the first port identifier and the second port identifier, the electronic device may forward the second Ethernet packet added with the first port identifier to the second port where the second port identifier is located according to the port connection relationship. Because the second port is the port through which the second module under test is connected to the signal connection device, the electronic device can forward the Ethernet message to the second module under test through the second port. When the first Ethernet message is forwarded from the first module under test to the second module under test, the second link between the first module under test and the second module under test can be determined. Therefore, the electronic device sets the second link between the first module under test and the second module under test based on the port identifier.
最后,电子设备可以基于第二链路设置多个待测模块之间的组网模式,进而可以实现不同待测模块的组网配置,实现待测模块的资源池化。比如说对于待测模块A、待测模块B、待测模块C来说,第二链路可以包含待测模块A和待测模块B之间的通信链路,待测模块B和待测模块C之间的通信链路,以及待测模块C和待测模块A之间的通信链路,因此,电子设备可以基于第二链路设置待测模块A、待测模块B和待测模块C之间的组网模式,例如,为环状组网。可以理解的是,在汽车、航天等一些功能的开发过程中,需要多个模块之间配合才可以验证某个新功能,因此电子设备可以通过信号连接装置设置多个待测模块之间的组网模式,以实现对某一功能的验证。Finally, the electronic device can set a networking mode among multiple modules under test based on the second link, and then can realize networking configuration of different modules under test, and realize resource pooling of the modules under test. For example, for module A to be tested, module B to be tested, and module to be tested C, the second link may include a communication link between module A to be tested and module B to be tested, and module B to be tested and module to be tested A communication link between C, and a communication link between the module under test C and the module under test A, therefore, the electronic device can set the module under test A, the module under test B and the module under test C based on the second link The networking mode among them is, for example, ring networking. It is understandable that in the development process of some functions such as automobiles and aerospace, a new function can only be verified by the cooperation of multiple modules. Network mode to realize the verification of a certain function.
比如说,电子设备得到的关于组网模式的配置信息为待测模块A、待测模块B和待测模块C之间组成环形组网模式。电子设备可以基于第一端口(待测模块A连接到信号连接装置上的端口)的端口标识将来自待测模块A的第一以太报文转发至第二端口(待测模块B连接到信号连接装置上的端口),进而第一报文可以被转发至待测模块B。因此,电子设备可以基 于第一端口的端口标识设置待测模块A和待测模块B之间的第二链路。电子设备还可以基于第二端口标识(待测模块B连接到信号连接装置上的端口的标识)将来自待测模块B的第二报文转发至第三端口(待测模块C连接到信号连接装置上的端口),进而第二报文可以被转发至待测模块C。因此,电子设备可以基于第二端口的端口标识设置待测模块B和待测模块C之间的第二链路。同理,电子设备可以设置待测模块C和待测模块A之间的第二链路。所以电子设备可以基于第二链路设置待测模块A、待测模块B和待测模块C之间的环状组网模式。For example, the configuration information about the networking mode obtained by the electronic device is that the module A to be tested, the module B to be tested, and the module C to be tested form a ring networking mode. The electronic device can forward the first Ethernet packet from the module under test A to the second port (the module B under test is connected to the signal connection device) based on the port identification of the first port (the module A under test is connected to the signal connection device). port on the device), and then the first message can be forwarded to the module B to be tested. Therefore, the electronic device can set the second link between the module under test A and the module under test B based on the port identification of the first port. The electronic device can also forward the second message from the module under test B to the third port based on the second port identification (the identification of the port on which the module under test B is connected to the signal connection device) (the module under test C is connected to the signal connection device) port on the device), and then the second message can be forwarded to the module C to be tested. Therefore, the electronic device can set the second link between the module under test B and the module under test C based on the port identifier of the second port. Similarly, the electronic device can set the second link between the module C under test and the module A under test. Therefore, the electronic device can set the ring networking mode among the module under test A, the module B under test and the module C under test based on the second link.
当电子设备通过信号连接装置设置多个待测模块之间的组网模式后,一个或多个待测模块可以输出控制信号,电子设备可以通过信号连接装置将一个或多个待测模块输出的控制信号向HIL设备传输。进一步地,电子设备还可以通过信号连接装置控制一个或多个待测模块和HIL设备之间的信号链路的导通,从而设置一个或多个待测模块和HIL设置之间的第一链路。基于设置的组网模式和第一链路,电子设备可以得到第一映射关系,也即,组网模式下的待测模块的端口与HIL设的I/O端口之间的映射关系。举例来说,待测模块A、待测模块B和待测模块C和之间为环状组网模式,电子设备通过信号连接装置设置待测模块A和HIL设备之间的第一链路,因此电子设备基于设置的环状组网模式,以及待测模块A和HIL设备之间的第一链路确定的第一映射关系可以包含:待测模块A和待测模块B之间的端口映射,待测模块B和待测模块C之间的端口映射,待测模块C和待测模块A之间的端口映射,以及待测模块A和HIL设备的I/O端口之间的端口映射。After the electronic equipment sets the networking mode between multiple modules to be tested through the signal connection device, one or more modules to be tested can output control signals, and the electronic device can output the output signal from one or more modules to be tested through the signal connection device. The control signal is transmitted to the HIL device. Further, the electronic device can also control the conduction of the signal link between one or more modules under test and the HIL device through the signal connection device, thereby setting the first link between one or more modules under test and the HIL device. road. Based on the set networking mode and the first link, the electronic device can obtain the first mapping relationship, that is, the mapping relationship between the port of the module under test in the networking mode and the I/O port set by the HIL. For example, the module A to be tested, the module B to be tested, and the module C to be tested are in a ring networking mode, and the electronic equipment sets the first link between the module A to be tested and the HIL device through the signal connection device, Therefore, the first mapping relationship determined by the electronic device based on the set ring networking mode and the first link between the module under test A and the HIL device may include: port mapping between the module under test A and the module under test B , the port mapping between the module under test B and the module C under test, the port mapping between the module C under test and the module A under test, and the port mapping between the module A under test and the I/O port of the HIL device.
可以理解的是,HIL设备处的端口资源(比如说I/O资源)是有限的,电子设备通过信号连接装置可以灵活配置HIL设备的端口资源(比如说I/O资源)。举例来说,对于需要进行功能测试的待测模块,电子设备可以通过信号连接装置导通待测模块到HIL设备之间的信号链路;对于不需要进行功能测试的待测模块,电子设备可以通过信号连接装置关闭待测模块到HIL设备之间的信号链路。It can be understood that the port resources (such as I/O resources) at the HIL device are limited, and the electronic device can flexibly configure the port resources (such as I/O resources) of the HIL device through the signal connection device. For example, for a module to be tested that requires a functional test, the electronic device can conduct the signal link between the module to be tested and the HIL device through a signal connection device; for a module to be tested that does not need to perform a functional test, the electronic device can Close the signal link between the module under test and the HIL equipment through the signal connection device.
步骤S302:根据第一映射关系确定第三映射关系。Step S302: Determine a third mapping relationship according to the first mapping relationship.
具体地,第一处理器用于运行仿真模型,仿真模型为对待测模块的功能进行仿真的虚拟的模型,而待测模块的端口是真实的电气端口,无法直接与第一处理器中的虚拟的模型连接。而HIL设备可以提供I/O板卡,所以第一处理器可以通过I/O板卡为仿真模型获得真实的电气端口,用以和待测模块连接。因此,第一映射关系可以是待测模块的端口与HIL设备的口I/O板卡端口之间的映射关系,所以电子设备基于第一映射关系可以确定第一处理器中的仿真模型与HIL设备的I/O板卡端口之间的信号映射关系。Specifically, the first processor is used to run the simulation model, the simulation model is a virtual model for simulating the function of the module to be tested, and the port of the module to be tested is a real electrical port, which cannot be directly connected with the virtual one in the first processor. Model connection. The HIL device can provide an I/O board, so the first processor can use the I/O board to obtain a real electrical port for the simulation model to connect with the module to be tested. Therefore, the first mapping relationship can be the mapping relationship between the port of the module to be tested and the I/O board port of the HIL device, so the electronic device can determine the simulation model in the first processor and the HIL based on the first mapping relationship. The signal mapping relationship between the I/O board ports of the device.
在一种可能的实现方式中,电子设备还可以获取第二映射关系,第二映射关系包含第一处理器与待测模块之间的信号映射关系。然后电子设备根据信号连接装置配置第一映射关系,最后,电子设备可以根据第一处理器与待测模块之间的信号映射关系,以及待测模块和HIL设备之间的信号映射关系推导得到第一处理器和HIL设备之间的信号映射关系。In a possible implementation manner, the electronic device may also acquire a second mapping relationship, where the second mapping relationship includes a signal mapping relationship between the first processor and the module under test. Then the electronic device configures the first mapping relationship according to the signal connection device, and finally, the electronic device can derive the first mapping relationship according to the signal mapping relationship between the first processor and the module under test, and the signal mapping relationship between the module under test and the HIL device. A signal mapping relationship between a processor and an HIL device.
进一步地,电子设备可以获取到实体部件软件总成包,在实体部件软件总成包中包含仿真模型、待测模块和第二映射关系。因此,电子设备可以从实体部件软件总成包中得到第一处理器中的仿真模型和待测模块之间的信号映射关系。电子设备根据第一处理器中的仿真模型和待测模块之间的映射关系,以及待测模块和HIL设备之间的信号映射关系可以推导得到第一处理器和HIL设备的I/O资源的映射表,也即第三映射关系。Further, the electronic device may obtain a software assembly package of the physical component, and the software assembly package of the physical component includes a simulation model, a module to be tested, and a second mapping relationship. Therefore, the electronic device can obtain the signal mapping relationship between the simulation model in the first processor and the module to be tested from the physical component software package. According to the mapping relationship between the simulation model in the first processor and the module to be tested, and the signal mapping relationship between the module to be tested and the HIL device, the electronic device can derive the I/O resources of the first processor and the HIL device The mapping table, that is, the third mapping relationship.
步骤S303:根据第三映射关系控制HIL测试的连接关系。Step S303: Control the connection relationship of the HIL test according to the third mapping relationship.
具体地,电子设备在得到第三映射关系后,可以根据第一映射关系、第二映射关系和第 三映射关系将运行在第一处理器中的仿真模块与待测模块的信号连接起来。这样,仿真模型和待测模块之间可以相互通信,实现了HIL测试中全链路信号的连接。因此,HIL设备可以向待测模块发出指令,待测模块可以根据指令生成控制信号。HIL设备可以接收到待测模块发送的控制信号,并根据控制信号控制仿真模型去执行相应的动作。Specifically, after the electronic device obtains the third mapping relationship, it can connect the simulation module running in the first processor with the signal of the module under test according to the first mapping relationship, the second mapping relationship and the third mapping relationship. In this way, the simulation model and the module under test can communicate with each other, realizing the connection of the whole link signal in the HIL test. Therefore, the HIL device can issue instructions to the module under test, and the module under test can generate control signals according to the instructions. The HIL device can receive the control signal sent by the module under test, and control the simulation model to perform corresponding actions according to the control signal.
需要说明的是,本申请实施例提及的电子设备可以具有数据处理能力和数据收发能力的设备。It should be noted that the electronic device mentioned in the embodiment of the present application may have a data processing capability and a data sending and receiving capability.
请参见图4,图4是本申请实施例提供的一种信号连接装置201的示意图。其中,信号连接装置201用于控制图3B所示的信号连接方法中待测模型和HIL设备之间的信号连接。从图4可以看出,信号连接装置201可以包括第一配置单元401和第二配置单元402。待测模块可以通过PHY芯片所提供的第一以太网端口插接在信号连接装置201的第一配置单元401中,HIL设备可以通过交换机所提供的第二以太网端口插接在信号连接装置201的第一配置单元401。待测模块还可以通过第一低速通信端口插接在信号连接装置201的第二配置单元402中,HIL设备也可以通过第二低速通信端口插接在信号连接装置201的第二配置单元402。需要说明的是,低速通信端口是相对于以太网端口来说传输速率较低的端口。其中,以太网可以是车载以太网或者标准以太网,与待测模块连接是车载以太网,与HIL设备连接的是标准以太网。低速通信包括但不限于控制器局域网络(Controller Area Network,CAN)、局域互联网络(Local Interconnect Network,LIN)、数字信号(DI/DO)、模拟信号(AD/DA)、传输脉冲宽度调制(Pulse Width Modulation,PWM)信号,等等。Please refer to FIG. 4 , which is a schematic diagram of a signal connection device 201 provided by an embodiment of the present application. Wherein, the signal connection device 201 is used for controlling the signal connection between the model under test and the HIL device in the signal connection method shown in FIG. 3B . It can be seen from FIG. 4 that the signal connection device 201 may include a first configuration unit 401 and a second configuration unit 402 . The module to be tested can be plugged into the first configuration unit 401 of the signal connection device 201 through the first Ethernet port provided by the PHY chip, and the HIL device can be plugged into the signal connection device 201 through the second Ethernet port provided by the switch. The first configuration unit 401 . The module to be tested can also be plugged into the second configuration unit 402 of the signal connection device 201 through the first low-speed communication port, and the HIL device can also be plugged into the second configuration unit 402 of the signal connection device 201 through the second low-speed communication port. It should be noted that the low-speed communication port is a port with a lower transmission rate than the Ethernet port. Wherein, the Ethernet can be a vehicle Ethernet or a standard Ethernet, the vehicle Ethernet is connected to the module to be tested, and the standard Ethernet is connected to the HIL device. Low-speed communication includes but not limited to Controller Area Network (CAN), Local Interconnect Network (LIN), digital signal (DI/DO), analog signal (AD/DA), transmission pulse width modulation (Pulse Width Modulation, PWM) signal, and so on.
其中,信号连接装置201可以完成两类信号的连接,一类是通过低速通信端口传输的低速I/O信号,比如说模拟信号、逻辑信号、低速传输信号,以及对电器特性敏感的信号。另一类是通过车载以太网传输的高速信号。插接在第一配置单元401上的待测模块的数量为多个,第一配置单元401可以设置多个待测模块之间的组网模式,即车载以太网组网,来实现待测模块的资源池化。第二配置单元402可以控制组网模式中待测模块和HIL设备之间的信号链路(比如说低速信号链路)的导通,来实现HIL设备的I/O资源池化。Among them, the signal connection device 201 can complete the connection of two types of signals, one is low-speed I/O signals transmitted through low-speed communication ports, such as analog signals, logic signals, low-speed transmission signals, and signals sensitive to electrical characteristics. The other is a high-speed signal transmitted through the vehicle Ethernet. The number of modules to be tested plugged into the first configuration unit 401 is multiple, and the first configuration unit 401 can set a networking mode between a plurality of modules to be tested, that is, a vehicle-mounted Ethernet network, to realize the module to be tested. resource pooling. The second configuration unit 402 can control the conduction of the signal link (for example, a low-speed signal link) between the module under test and the HIL device in the networking mode, so as to realize I/O resource pooling of the HIL device.
从图4可以看出,第一配置单元401可以包括交换机、一个或多个端口物理层(Port Physical Layer,PHY)芯片,以及一个或多个微控制单元(Micro Control Unit,MCU)。其中,一个或多个PHY芯片可以与交换机整合在同一个芯片上。其中,待测模块可以通过车载以太网(Automotive Ethernet)端口插接在车载以太PHY芯片中,经过车载以太PHY芯片可以将来自待测模块的车载以太报文转换为标准通用以太报文,然后再将标准通用以太报文传输到交换机,交换机具体可以是虚拟局域网(Virtual Local Area Network,VLAN)交换机。第一配置单元401可以通过交换机使用VLAN方式设置多个待测模块之间的组网模式,也即将需要导通的待测模块的车载以太网端口通过PHY芯片连接在VLAN交换机的以太网端口上,将连接有车载以太端口的VLAN交换机的以太网端口配置相同的端口标识(比如说VLAN ID)或者建立转发关系,限制以太报文广播在连接范围内,进而可以完成以太端口间的虚电路交换。可以理解的是,待测模块之间的组网所需的组网协议如快速生成树协议(rapid spanning Tree Protocol,RSTP)对VLAN配置不敏感,因此不会影响组网消息传递。As can be seen from FIG. 4, the first configuration unit 401 may include a switch, one or more port physical layer (Port Physical Layer, PHY) chips, and one or more micro control units (Micro Control Unit, MCU). Wherein, one or more PHY chips can be integrated with the switch on the same chip. Among them, the module to be tested can be plugged into the vehicle Ethernet PHY chip through the vehicle Ethernet (Automotive Ethernet) port, and the vehicle Ethernet message from the vehicle vehicle PHY chip can be converted into a standard general Ethernet message, and then The standard general Ethernet packet is transmitted to the switch, and the switch may specifically be a virtual local area network (Virtual Local Area Network, VLAN) switch. The first configuration unit 401 can use the VLAN mode to set the networking mode between multiple modules under test through the switch, that is, the vehicle Ethernet port of the module under test that needs to be turned on is connected to the Ethernet port of the VLAN switch through the PHY chip Configure the Ethernet port of the VLAN switch connected to the vehicle-mounted Ethernet port with the same port identifier (such as VLAN ID) or establish a forwarding relationship to limit the broadcast of Ethernet packets within the connection range, and then complete the virtual circuit switching between Ethernet ports . It can be understood that the networking protocol required for the networking between the modules under test, such as rapid spanning tree protocol (rapid spanning tree protocol, RSTP), is not sensitive to VLAN configuration, so it will not affect the networking message transmission.
比如说第一配置单元可以设置VLAN交换机上多个以太网端口的端口标识,基于端口标识设置多个待测模块之间的组网模式。进一步地,第一配置单元可以基于端口标识设置第一待测模块和第二待测模块之间的第二链路,然后再基于第二链路设置多个待测模块之间的组网模式。也即电子设备可以基于第一端口标识将来自第一待测模块的以太报文传输至第二待 测模块,以此来设置第一待测模块和第二待测模块之间的第二链路。第一端口标识为第一待测模块的第一端口对应的标识,第一端口为第一待测模块与第一配置单元连接的端口,也即,连接在VLAN交换机上的端口。第一配置单元可以基于待测模块之间形成的至少一个传输路径得到待测模块之间的组网模式。For example, the first configuration unit can set port identifiers of multiple Ethernet ports on the VLAN switch, and set a networking mode among multiple modules to be tested based on the port identifiers. Further, the first configuration unit can set the second link between the first module under test and the second module under test based on the port identification, and then set the networking mode among multiple modules under test based on the second link . That is to say, the electronic device can transmit the Ethernet message from the first module under test to the second module under test based on the first port identifier, so as to set the second link between the first module under test and the second module under test. road. The first port identifier is an identifier corresponding to the first port of the first module to be tested, and the first port is a port connected to the first module to be tested and the first configuration unit, that is, a port connected to the VLAN switch. The first configuration unit may obtain a networking mode between the modules under test based on at least one transmission path formed between the modules under test.
请参见图5A,图5A是本申请实施例提供的一种待测模块之间的组网模式的示意图。如图5A的(a)所示,待测模块A、待测模块B、待测模块C、待测模块D和待测模块F通过PHY芯片插接在交换机的端口上。因此,待测模块A、待测模块B、待测模块C、待测模块D和待测模块F与交换机之间存在固定连接。第一配置单元401中可以接收到关于组网模式的配置信息,比如说配置信息可以是待测模块A、待测模块B、待测模块C和待测模块D之间的组网模式是环形组网,待测模块D和待测模块F之间是点对点连接。Please refer to FIG. 5A . FIG. 5A is a schematic diagram of a networking mode among modules to be tested provided by an embodiment of the present application. As shown in (a) of FIG. 5A , the module to be tested A, the module to be tested B, the module to be tested C, the module to be tested D and the module to be tested F are plugged into ports of the switch through the PHY chip. Therefore, there are fixed connections between the module to be tested A, the module to be tested B, the module to be tested C, the module to be tested D and the module to be tested F and the switch. Configuration information about the networking mode can be received in the first configuration unit 401, for example, the configuration information can be that the networking mode between the module to be tested A, the module to be tested B, the module to be tested C and the module to be tested D is a ring In networking, there is a point-to-point connection between the module D to be tested and the module F to be tested.
在待测模块A和待测模块B连接在交换机上的情况下,对于待测模块A和待测模块B之间的连接,第一配置单元可以基于第一端口标识(也即待测模块A连接在交换机上的第一端口的标识)设置第二端口标识(也即待测模块B连接在交换机上的第二端口的标识),将第二端口标识设置为跟第一端口标识相同。当待测模块A发送无VLAN标签的第一以太报文后,无VLAN标签的以太报文进入交换机端口时,第一配置单元401根据第一端口的VLAN配置将第一端口标识添加至来自待测模块A的第一以太报文中。这样,第一配置单元401可以根据第一端口标识向第二端口广播添加有第一端口的标识的第一以太报文。第二端口接收到添加有第一端口的标识的以太报文后,第一配置单元401可以根据端口的VLAN配置移除第一端口的标识,通过第二端口将没有VLAN标签的第一以太报文向待测模块B发送。这样,第一配置单元401可以得到待测模块A和待测模块B之间的第二链路。同理可得,对于待测模块B和待测模块C之间的连接,待测模块C和待测模块D之间的连接,待测模块D和待测模块A之间的连接,以及测模块D和待测模块F之间的连接。第一配置单元401可以通过交换机的VLAN配置得到上述待测模块之间传输路径。In the case that the module under test A and the module under test B are connected to the switch, for the connection between the module under test A and the module under test B, the first configuration unit can be based on the first port identification (that is, the module under test A The identification of the first port connected to the switch) sets the second port identification (that is, the identification of the second port of the module B to be tested connected to the switch), and the second port identification is set to be the same as the first port identification. After the module A to be tested sends the first Ethernet message without the VLAN tag, when the Ethernet message without the VLAN tag enters the switch port, the first configuration unit 401 adds the first port identifier to the port from the port to be tested according to the VLAN configuration of the first port. in the first Ethernet packet of module A. In this way, the first configuration unit 401 may broadcast the first Ethernet packet to which the identifier of the first port is added to the second port according to the identifier of the first port. After the second port receives the Ethernet message added with the identification of the first port, the first configuration unit 401 can remove the identification of the first port according to the VLAN configuration of the port, and pass the first Ethernet message without the VLAN tag through the second port. The text is sent to the module B under test. In this way, the first configuration unit 401 can obtain the second link between the module A under test and the module B under test. In the same way, for the connection between the module under test B and the module under test C, the connection between the module C under test and the module D under test, the connection between the module D under test and the module A under test, and the Connection between module D and module F under test. The first configuration unit 401 can obtain the above-mentioned transmission path between the modules to be tested through VLAN configuration of the switch.
在一种可能的实现方式中,对于待测模块A和待测模块B之间的连接,第一配置单元401可以配置交换机的以太端口之间的以太报文转发关系,比如说第一端口(也即待测模块A连接在交换机上的第一端口)接收到的以太报文转发给第二端口(即待测模块B连接在交换机上的第二端口)。这样,当待测模块A发送无VLAN标签的第二以太报文后,无VLAN标签的第二以太报文进入交换机端口时,第一配置单元401根据第一端口的VLAN配置将第一端口的标识添加至来自待测模块A的以太报文中。这样,第一配置单元401可以根据交换机配置的以太报文转发关系将添加有第一端口标识的第二以太报文广播到第二端口。第二端口接收到添加有第一端口的标识的第二以太报文后,第一配置单元401可以根据端口的VLAN配置移除第一端口的标识,通过第二端口将没有VLAN标签的以太报文向待测模块B发送。这样,第一配置单元401可以得到待测模块A和待测模块B之间的第二链路。对于待测模块B和待测模块C之间的连接,待测模块C和待测模块D之间的连接,待测模块D和待测模块A之间的连接,以及测模块D和待测模块F之间的连接。第一配置单元401可以通过交换机的VLAN配置得到上述待测模块之间传输路径。In a possible implementation, for the connection between the module under test A and the module under test B, the first configuration unit 401 can configure the Ethernet packet forwarding relationship between the Ethernet ports of the switch, for example, the first port ( That is, the Ethernet packet received by the module A to be tested (connected to the first port on the switch) is forwarded to the second port (ie, the second port of the module B to be tested connected to the switch). In this way, after the module A to be tested sends the second Ethernet packet without the VLAN tag, when the second Ethernet packet without the VLAN tag enters the switch port, the first configuration unit 401 configures the VLAN configuration of the first port according to the VLAN configuration of the first port. The identifier is added to the Ethernet message from module A under test. In this way, the first configuration unit 401 can broadcast the second Ethernet packet added with the first port identifier to the second port according to the Ethernet packet forwarding relationship configured by the switch. After the second port receives the second Ethernet message added with the identification of the first port, the first configuration unit 401 can remove the identification of the first port according to the VLAN configuration of the port, and pass the Ethernet message without the VLAN tag through the second port. The text is sent to the module B under test. In this way, the first configuration unit 401 can obtain the second link between the module A under test and the module B under test. For the connection between the module under test B and the module C under test, the connection between the module C under test and the module D under test, the connection between the module D under test and the module A under test, and the connection between the module D under test and the module under test Connections between modules F. The first configuration unit 401 can obtain the above-mentioned transmission path between the modules to be tested through VLAN configuration of the switch.
因此,第一配置单元401基于上述待测模块之间的传输路径,可以得到如图5A的(b)所示的组网模式。Therefore, the first configuration unit 401 can obtain the networking mode shown in (b) of FIG. 5A based on the transmission path between the above-mentioned modules to be tested.
进一步地,第一配置单元401可以改变VLAN配置来实现待测模块之间不同的组网模式。比如说,当第一配置单元401根据接收到的配置信息设置的待测模块A、待测模块B、待测模块C、待测模块D和待测模块E之间的组网模式如图5A的(b)所示的之后,第一配置单 元401再次接收到配置信息,则第一配置单元401可以改变交换机的配置来实现新的组网模式。Further, the first configuration unit 401 can change the VLAN configuration to realize different networking modes among the modules to be tested. For example, when the first configuration unit 401 sets the networking mode between the module under test A, the module under test B, the module under test C, the module under test D and the module under test E according to the received configuration information, as shown in Figure 5A After that shown in (b), the first configuration unit 401 receives the configuration information again, and the first configuration unit 401 can change the configuration of the switch to implement a new networking mode.
请参见图5B,图5B是本申请实施例提供的另一种待测模块之间的组网模式的示意图。如图5B的(a)所示,第一配置单元401接收到的配置信息包括:待测模块A、待测模块D和待测模块F之间为环形组网,待测模块B和待测模块C之间是点对点连接,待测模块D和待测模块C之间是点对点连接。Please refer to FIG. 5B . FIG. 5B is a schematic diagram of another networking mode between the modules to be tested provided by the embodiment of the present application. As shown in (a) of Figure 5B, the configuration information received by the first configuration unit 401 includes: the module to be tested A, the module to be tested D and the module to be tested are ring networking, the module to be tested B and the module to be tested There is a point-to-point connection between the modules C, and a point-to-point connection between the module D to be tested and the module C to be tested.
第一配置单元401可以删除原先设置的第二端口标识(也即待测模块B连接在交换机上的第二端口),基于第一端口标识(也即待测模块A连接在交换机上的第一端口的标识)再重新设置第三端口(也即待测模块F连接在交换机上的第三端口的标识),将第三端口标识设置为跟第一端口标识相同。这样,当待测模块A发送无VLAN标签的以太报文后,无VLAN标签的以太报文进入交换机端口时,第一配置单元401根据第一端口的VLAN配置将第一端口标识添加至来自待测模块A的以太报文中。这样,第一配置单元401可以根据第一端口标识向第三端口广播添加有第一端口标识的以太报文。第三端口接收到添加有第一端口标识的以太报文后,第一配置单元401可以根据端口的VLAN配置移除第一端口的标识,将没有VLAN标签的以太报文通过第三端口向待测模块F发送。这样,第一配置单元401可以得到待测模块A和待测模块F之间的链路。The first configuration unit 401 can delete the originally set second port identifier (that is, the second port on which the module under test B is connected to the switch), and based on the first port identifier (that is, the first port on which the module under test A is connected to the switch) Port identification) resets the third port (that is, the identification of the third port where the module F to be tested is connected to the switch), and the third port identification is set to be the same as the first port identification. In this way, after the module A to be tested sends the Ethernet message without the VLAN tag, when the Ethernet message without the VLAN tag enters the switch port, the first configuration unit 401 adds the first port identifier to the port from the port to be tested according to the VLAN configuration of the first port. In the Ethernet packet of the test module A. In this way, the first configuration unit 401 may broadcast the Ethernet packet added with the first port identifier to the third port according to the first port identifier. After the third port receives the Ethernet message added with the first port ID, the first configuration unit 401 can remove the ID of the first port according to the VLAN configuration of the port, and send the Ethernet message without the VLAN tag to the waiting port through the third port. The test module F sends. In this way, the first configuration unit 401 can obtain the link between the module A under test and the module F under test.
在一种可能的实现方式中,第一配置单元401可以重新配置交换机的以太端口之间的以太报文转发关系,比如说第一端口(也即待测模块A连接在交换机上的第一端口)接收到的以太报文转发给第三端口(即待测模块F连接在交换机上的第三端口)。这样,当待测模块A发送无VLAN标签的以太报文后,无VLAN标签的以太报文进入交换机端口时,第一配置单元401根据第一端口的VLAN配置将第一端口标识添加至来自待测模块A的以太报文中。这样,第一配置单元401可以根据交换机配置的以太报文转发关系将添加有第一端口标识的以太报文广播到第三端口,第三端口接收到添加有第一端口的标识的以太报文后,第一配置单元401可以根据端口的VLAN配置移除第一端口的标识,将没有VLAN标签的以太报文通过第三端口向待测模块F发送。这样,第一配置单元401可以得到待测模块A和待测模块F之间的链路。In a possible implementation, the first configuration unit 401 can reconfigure the Ethernet packet forwarding relationship between the Ethernet ports of the switch, for example, the first port (that is, the first port where the module A to be tested is connected to the switch) ) forwards the received Ethernet message to the third port (that is, the third port where the module F to be tested is connected to the switch). In this way, after the module A to be tested sends the Ethernet message without the VLAN tag, when the Ethernet message without the VLAN tag enters the switch port, the first configuration unit 401 adds the first port identifier to the port from the port to be tested according to the VLAN configuration of the first port. In the Ethernet packet of the test module A. In this way, the first configuration unit 401 can broadcast the Ethernet packet added with the first port identifier to the third port according to the Ethernet packet forwarding relationship configured by the switch, and the third port receives the Ethernet packet added with the identifier of the first port Afterwards, the first configuration unit 401 may remove the identifier of the first port according to the VLAN configuration of the port, and send the Ethernet packet without the VLAN tag to the module F to be tested through the third port. In this way, the first configuration unit 401 can obtain the link between the module A under test and the module F under test.
因此,第一配置单元401可以通过改变VLAN配置将如图5A的(b)所示的组网模式改变为如图5B的(b)所示的组网模式。Therefore, the first configuration unit 401 can change the networking mode shown in (b) of FIG. 5A to the networking mode shown in (b) of FIG. 5B by changing the VLAN configuration.
当第一配置单元401设置待测模块之间的组网模式后,第二配置单元402可以设置一个或多个待测模块和HIL设备之间的第一链路。可以理解的是,待测模块需要通过信号连接装置201向HIL设备输出低速I/O信号,由HIL设备向第一处理器输出低速I/O信号,运行在第一处理器中的仿真模型用于根据低速I/O信号模拟运行状态,而低速I/O信号是待测模块生成的电气信号。由于继电器对电气性质影响小,承载的功率上限较高,适合低速I/O和功率输出线路的切换。因此,从图4可以看出,第二配置单元包括一个或多个控制开关,控制开关具体可以是继电器,以及一个或多个微控制单元MCU。一个或多个控制开关位于待测模块插接到第二配置单元402上的第一低速端口和HIL设备插接到第二配置单元402上的第二低速端口之间信号链路上,第二配置单元402可以通过继电器控制一个或多个待测模块和HIL设备之间的信号链路的导通,以此来设置一个或多个待测模块和HIL设备之间的第一链路。举例来说,若需要待测模块A向HIL设备输出低速I/O信号,则电子设备可以打开待测模块A与HIL设备之间的信号链路上的控制开关,使得该信号链路处于导通的状态。After the first configuration unit 401 sets the networking mode between the modules under test, the second configuration unit 402 can set the first link between one or more modules under test and the HIL device. It can be understood that the module to be tested needs to output the low-speed I/O signal to the HIL device through the signal connection device 201, and the HIL device outputs the low-speed I/O signal to the first processor, and the simulation model running in the first processor uses It is used to simulate the operating state based on the low-speed I/O signal, which is an electrical signal generated by the module under test. Because the relay has little influence on the electrical properties, and the upper limit of the power carried is high, it is suitable for the switching of low-speed I/O and power output lines. Therefore, it can be seen from FIG. 4 that the second configuration unit includes one or more control switches, which may specifically be relays, and one or more micro control units MCU. One or more control switches are located on the signal link between the first low-speed port where the module to be tested is plugged into the second configuration unit 402 and the second low-speed port where the HIL device is plugged into the second configuration unit 402. The configuration unit 402 can control the conduction of the signal link between the one or more modules under test and the HIL device through a relay, so as to set the first link between the one or more modules under test and the HIL device. For example, if the module A to be tested is required to output low-speed I/O signals to the HIL device, the electronic device can open the control switch on the signal link between the module A to be tested and the HIL device, so that the signal link is in the conducting state. pass status.
需要说明的是,继电器的数量可以根据HIL设备的I/O资源和计算资源利用率确定,如 果HIL设备的资源利用率比较低,则适合配置较高数量的继电器来提升HIL设备的资源利用率。第二配置单元402可以通过微控制单元MCU控制继电器的选择性导通,也即,被开启的继电器不同,所导通的信号链路也不同。因此,只有在继电器开启的情况下,待测模块才可以通过信号连接装置201连接到HIL设备上,得到HIL设备所提供的I/O资源。因此,第二配置单元402可以将HIL设备上的I/O资源根据实际需求分配给不同的待测模式,可以实现HIL设备的I/O资源池化。It should be noted that the number of relays can be determined according to the utilization rate of I/O resources and computing resources of the HIL device. If the resource utilization rate of the HIL device is relatively low, it is suitable to configure a higher number of relays to improve the resource utilization rate of the HIL device. . The second configuration unit 402 can control the selective conduction of the relay through the micro control unit MCU, that is, different relays are turned on, and different signal links are turned on. Therefore, only when the relay is turned on, can the module under test be connected to the HIL device through the signal connection device 201 to obtain the I/O resources provided by the HIL device. Therefore, the second configuration unit 402 can allocate the I/O resources on the HIL device to different modes to be tested according to actual needs, and can realize I/O resource pooling of the HIL device.
请参见图6,图6是本申请实施例提供的一种HIL测试的示意图。图3B所示的方法可应用于模型测试和台架测试,其中,在模型测试中待测模块与第一处理器中的仿真模型形成闭环链路,在台架测试中待测模块与实体部件形成闭环链路。也即,电子设备根据图4所示的信号连接方法通过信号连接装置201实现模型测试中待测模块203中的电池管理系统与第一处理器2042中运行的电池模型的全链路信号连接之后,电子设备还可以通过信号连接装置201将模型测试切换到台架测试,其中,台架测试中包括仿真模型的物体形态的实体部件。比如说实体部件可以包括电机模型对应的物体形态的实体电机。Please refer to FIG. 6 , which is a schematic diagram of an HIL test provided in an embodiment of the present application. The method shown in Figure 3B can be applied to model testing and bench testing, wherein, in model testing, the module to be tested and the simulation model in the first processor form a closed-loop link, and in bench testing, the module to be tested and the physical component Form a closed loop link. That is, after the electronic device implements the full-link signal connection between the battery management system in the module-to-be-tested module 203 and the battery model running in the first processor 2042 in the model test through the signal connection device 201 according to the signal connection method shown in FIG. The electronic device can also switch the model test to the bench test through the signal connection device 201, wherein the bench test includes physical components in the form of objects of the simulation model. For example, the solid component may include a solid motor in the form of an object corresponding to the motor model.
进一步地,电子设备可以通过信号连接装置201关闭模型测试中第一处理器2042中运行的部分仿真模型和部分待测模型之间的信号链路。比如说,电子设备可以通过信号连接装置201关闭电机模型和电机控制器之间的信号连接。再进一步地,电子设备可以通过信号连接装置201中的继电器关闭电机模型和电机控制器之间的信号连接。其中,该继电器位于电机模型和电机控制器之间的信号链路上,当继电器被关闭后,电机模型和电机控制器之间的信号链路也被关闭了。Further, the electronic device can close the signal link between the part of the simulation model running in the first processor 2042 and the part of the model to be tested in the model test through the signal connection device 201 . For example, the electronic device can close the signal connection between the motor model and the motor controller through the signal connection device 201 . Still further, the electronic device can close the signal connection between the motor model and the motor controller through the relay in the signal connection device 201 . Wherein, the relay is located on the signal link between the motor model and the motor controller, and when the relay is turned off, the signal link between the motor model and the motor controller is also turned off.
一个或多个实体部件可以插接到信号连接装置201上,或者一个或多个实体部件可以通过HIL设备插接到信号连接装置201上。因此,当电子设备关闭模型测试中第一处理器运行的部分仿真模型2041和部分待测模型之间的信号链路之后,可以基于图3B所示的信号连接方法通过信号连接装置201导通台架测试中部分实体部件和部分待测设备之间的信号链路。可以理解的是,导通信号链路的实体部件为关闭信号链路的仿真模型2041的实体部件。从图6可以看出,电子设备可以通过信号连接装置201导通实体电机和电机控制器之间的信号连接。再进一步地,电子设备可以通过信号连接装置201中的继电器导通实体电机和电机控制器之间的信号连接。其中,该继电器位于实体电机和电机控制器之间的信号链路上,当继电器被打开后,实体电机和电机控制器之间的信号链路也被导通了。One or more physical components can be plugged into the signal connection device 201 , or one or more physical components can be plugged into the signal connection device 201 through the HIL device. Therefore, after the electronic device closes the signal link between the part of the simulation model 2041 run by the first processor and the part of the model to be tested in the model test, the platform can be turned on through the signal connection device 201 based on the signal connection method shown in FIG. 3B The signal link between some physical components and some equipment under test in the rack test. It can be understood that the physical component that turns on the signal link is the physical component of the simulation model 2041 that turns off the signal link. It can be seen from FIG. 6 that the electronic device can conduct the signal connection between the physical motor and the motor controller through the signal connection device 201 . Still further, the electronic device can conduct the signal connection between the physical motor and the motor controller through the relay in the signal connection device 201 . Wherein, the relay is located on the signal link between the physical motor and the motor controller, and when the relay is turned on, the signal link between the physical motor and the motor controller is also turned on.
可以理解的是,当实体部件和仿真模型2041都插接到信号连接装置201上后,电子设备可以通过信号连接装置201切换HIL测试和台架测试,实现混合仿真以及HIL测试和台架测试之间仿真结果的对比。It can be understood that when both the physical component and the simulation model 2041 are plugged into the signal connection device 201, the electronic device can switch between the HIL test and the bench test through the signal connection device 201, so as to realize hybrid simulation and HIL test and bench test. Comparing the simulation results.
请参见图7,图7是本申请实施例提供的一种基于云计算服务实现HIL测试的示意图。云计算服务700包括部署在云服务器上的第一处理器2042、HIL设备202、信号连接装置201以及一个或多个待测模块203,云计算服务700还可以包括用于进行HIL资源调度管理的电子设备704。其中,仿真模型可以部署在的第一处理器2042中,一个或多个待测模块203与HIL设备202中的I/O板卡通过信号连接装置201连接,因此,运行有仿真模型的第一处理器2042可以对待测模块203进行仿真模型以及信号处理。在第一处理器2042上搭载有实时操作系统,以保证模拟的实时性。Please refer to FIG. 7 . FIG. 7 is a schematic diagram of implementing an HIL test based on cloud computing services provided by an embodiment of the present application. The cloud computing service 700 includes the first processor 2042 deployed on the cloud server, the HIL device 202, the signal connection device 201, and one or more modules 203 to be tested. The cloud computing service 700 may also include a Electronics 704. Wherein, the simulation model can be deployed in the first processor 2042, and one or more modules to be tested 203 are connected to the I/O boards in the HIL device 202 through the signal connection device 201. Therefore, the first processor running the simulation model The processor 2042 can perform simulation model and signal processing on the module under test 203 . A real-time operating system is installed on the first processor 2042 to ensure the real-time performance of the simulation.
当位于本地的一个或多个用户设备(图7中只示意出三个,比如说第一用户设备7051、第二用户设备7052和第三用户设备7053)有HIL测试需求时,第一用户设备7051、第二用 户设备7052和第三用户设备7053可以分别向位于云计算服务700中的电子设备704发送各自的测试请求。可以理解的是,用户设备侧可以展示多个待测模块的组件,每个组件对应有云计算服务700上待测模块的资源。其中,用户设备可以显示用户界面,用户界面常用的表现形式是图像用户界面(graphic user interface,GUI),是指采用图形方式显示的与计算机操作相关的用户界面。它可以是在用户设备的显示屏上显示的一个图标、窗口、控件等组件元素。其中,控件可以包括图标、按钮、菜单、选项卡、文本框、对话框、状态栏、导航栏等可视的组件元素。用户可以通过用户设备可视化编排这些组件得到满足自身需求的目标组件(或者测试实例),然后向位于云计算服务700中的电子设备704发送包含目标待测模块的组件的测试请求。电子设备704接收到用户设备的测试请求后,可以根据测试请求构建测试实例。其中,测试实例用于供用户设备使用测试请求对应的目标待测模块的资源。可以理解的是,待测模块的资源可以是部署在云计算服务上的待测模块的功能资源,比如说零部件、传感器、执行器或者某一应用程序的所可以实现的功能,或者用于验证待测模块功能的资源,比如说仿真模型,HIL设备的I/O端口,等等。When one or more user equipments located locally (only three are shown in FIG. 7, for example, the first user equipment 7051, the second user equipment 7052, and the third user equipment 7053) have HIL test requirements, the first user equipment 7051, the second user equipment 7052, and the third user equipment 7053 may respectively send respective test requests to the electronic device 704 located in the cloud computing service 700. It can be understood that the user equipment side may display multiple components of the module to be tested, and each component corresponds to a resource of the module to be tested on the cloud computing service 700 . Wherein, the user equipment may display a user interface, and a commonly used form of the user interface is a graphical user interface (graphic user interface, GUI), which refers to a user interface related to computer operations displayed in a graphical manner. It may be an icon, window, control and other component elements displayed on the display screen of the user equipment. Wherein, the control may include visual component elements such as icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, and navigation bars. Users can visually organize these components through user equipment to obtain target components (or test instances) that meet their own needs, and then send a test request for the components containing the target module to be tested to the electronic device 704 located in the cloud computing service 700 . After receiving the test request from the user equipment, the electronic device 704 may construct a test instance according to the test request. Wherein, the test instance is used for the resource of the target module under test corresponding to the test request to be used by the user equipment. It can be understood that the resources of the module to be tested may be the functional resources of the module to be tested deployed on the cloud computing service, such as components, sensors, actuators, or functions that can be realized by an application program, or used for Resources to verify the functionality of the module under test, such as simulation models, I/O ports of HIL devices, and so on.
进一步地,电子设备704接收到来自用户设备的测试请求后,可以根据测试请求确定目标待测模块和I/O端口,其中,I/O端口为HIL设备上的端口,使得目标待测模块和第一处理器可以进行通信。电子设备704可以根据测试请求为用户设备分配对应的目标待测模块,比如说测试请求具体对应哪几个待测模块,待测模块之间的组网模式、哪一个或者哪几个待测模块与第一处理器进行通信。Further, after receiving the test request from the user equipment, the electronic device 704 can determine the target module to be tested and the I/O port according to the test request, wherein the I/O port is a port on the HIL device, so that the target module to be tested and The first processor can communicate. The electronic device 704 can assign corresponding target modules to be tested to the user equipment according to the test request, for example, which modules to be tested specifically correspond to the test request, the networking mode between the modules to be tested, and which module or modules to be tested Communicate with the first processor.
然后,电子设备704可以根据目标待测模块确定上述目标组件所需要的I/O端口的数量,比如说目标组件中哪一个或者哪几个待测模块需要与第一处理器进行通信,电子设备704通过HIL板卡资源管理为目标组件分配I/O板卡上的I/O端口。因此,电子设备704可以目标待测模块的资源和I/O端口可以构建测试实例,目标组件所对应的待测模块可以与第一处理器中运行的仿真模型进行数据交互,以实现用户设备的测试请求。Then, the electronic device 704 can determine the number of I/O ports required by the target component according to the target module under test, for example, which or which modules under test in the target component need to communicate with the first processor, the electronic device 704 Allocate the I/O port on the I/O board to the target component through HIL board resource management. Therefore, the electronic device 704 can target the resources and I/O ports of the module under test to build a test instance, and the module under test corresponding to the target component can perform data interaction with the simulation model running in the first processor, so as to realize the user equipment. Test request.
请参见图8,图8是本申请实施例提供的一种资源分配的示意图。从图8可以看出,第一用户设备7051可以提供包含300个端口的待测模块的组件,用户可以根据第一用户设备7051提供的待测模块的组件,编排得到包含150个端口的待测模块实例1的测试请求。电子设备704根据接收到的来自第一用户设备7051的测试请求中包含的目标待测模块的组件(即待测模块实例1)确定的端口数量为150之后,电子设备704可以为第一用户设备7051分配信号连接装置201上的150个端口。第二用户设备7052可以提供包含150个端口的待测模块的组件,用户可以根据第二用户设备7052提供的待测模块的组件,编排得到包含50个端口的待测模块实例2的测试请求。电子设备704根据接收到的来自第二用户设备7052的测试请求中包含的目标待测模块的组件(即待测模块实例2)确定的端口数量为50之后,电子设备704可以为第二用户设备7052分配信号连接装置201上的50个端口。第三用户设备7053可以提供包含225个端口的待测模块的组件,用户可以根据第三用户设备7053提供的待测模块的组件,编排得到包含100个端口的待测模块实例3的测试请求。电子设备704根据接收到的来自第三用户设备7053的测试请求中包含的目标待测模块的组件(即待测模块实例3)确定的端口数量为100之后,电子设备704可以为第三用户设备7053分配信号连接装置201上的100个端口。HIL板卡资源管理中存储有I/O板卡和信号连接装置201之间的I/O资源映射关系,因此,对于待测模块实例1来说,电子设备704可以从HIL板卡资源管理中获取I/O板卡上可以与HIL设备进行通信的150个I/O端口。对于待测模块实例2来说,电子设备704可以从HIL板卡资源管理中获,I/O板卡上可以与HIL设备进行通信的50个I/O端口。对于待 测模块实例3来说,电子设备704可以从HIL板卡资源管理中获取I/O板卡上可以与HIL设备进行通信的100个I/O端口。Please refer to FIG. 8 . FIG. 8 is a schematic diagram of resource allocation provided by an embodiment of the present application. It can be seen from Fig. 8 that the first user equipment 7051 can provide the components of the module under test including 300 ports, and the user can arrange the components of the module under test including 150 ports according to the components of the module under test provided by the first user equipment 7051. Test request for module instance 1. After the number of ports determined by the electronic device 704 according to the components of the target module under test (that is, the module under test instance 1) contained in the test request received from the first user device 7051 is 150, the electronic device 704 can be the first user device The 7051 allocates 150 ports on the signal connection device 201 . The second user equipment 7052 can provide the components of the module under test including 150 ports, and the user can arrange the test request of the module under test instance 2 including 50 ports according to the components of the module under test provided by the second user equipment 7052 . After the number of ports determined by the electronic device 704 according to the components of the target module under test (that is, the module under test instance 2) contained in the test request received from the second user device 7052 is 50, the electronic device 704 can be the second user device The 7052 allocates 50 ports on the signal connection device 201 . The third user equipment 7053 can provide the components of the module under test including 225 ports, and the user can arrange the test request of the module under test instance 3 including 100 ports according to the components of the module under test provided by the third user equipment 7053 . After the number of ports determined by the electronic device 704 according to the components of the target module under test (that is, the module under test instance 3) contained in the test request received from the third user device 7053 is 100, the electronic device 704 can be the third user device The 7053 allocates 100 ports on the signal connection device 201 . The I/O resource mapping relationship between the I/O board and the signal connection device 201 is stored in the HIL board resource management, therefore, for the module instance 1 to be tested, the electronic device 704 can be obtained from the HIL board resource management Get 150 I/O ports on the I/O board that can communicate with HIL devices. For the example 2 of the module to be tested, the electronic device 704 can obtain 50 I/O ports on the I/O board that can communicate with the HIL device from the resource management of the HIL board. For the example 3 of the module under test, the electronic device 704 can obtain 100 I/O ports on the I/O board that can communicate with the HIL device from the resource management of the HIL board.
因此,电子设备704可以按照用户设备的需求从I/O资源池和待测模块资源池分配HIL测试实例所需要的资源,从而可以满足不同贵了的HIL测试需求,提高了HIL测试资源利用率。Therefore, the electronic device 704 can allocate the resources required by the HIL test instance from the I/O resource pool and the module resource pool to be tested according to the needs of the user equipment, thereby meeting different and expensive HIL test requirements and improving the utilization rate of HIL test resources .
另外,在云计算服务700中保存有待测模块203与其对应的运行在第一处理器中的仿真模型之间的信号映射关系。因此,电子设备704可以根据目标待测模块的资源确定目标待测模块与运行在第一处理器中的目标仿真模型之间的第四映射关系,目标仿真模型为与目标待测模块对应的运行在第一处理器2042中的模型。In addition, the signal mapping relationship between the module to be tested 203 and its corresponding simulation model running on the first processor is stored in the cloud computing service 700 . Therefore, the electronic device 704 can determine the fourth mapping relationship between the target module under test and the target simulation model running in the first processor according to the resources of the target module under test, where the target simulation model is the running The model in the first processor 2042.
进一步地,电子设备704可以根据测试请求中的目标组件确定目标待测模块之后,可以通过信号连接装置201设置目标待测模块之间的组网模式,然后再通过信号连接装置201控制组网模式中的目标待测模块和HIL设备202之间的信号链路的导通,基于设置的组网模式和导通的信号链路得到目标待测模块和HIL设备之间的信号连接关系。可以理解的是,因为确定了目标待测模块在信号连接装置201上的端口,而电子设备704可以从HIL板卡资源管理中获取信号连接装置201与HIL设备202中的I/O板卡之间的I/O资源映射关系,从而可以确定目标待测模块与HIL设备202上的I/O板卡进行通信的I/O端口。因此,电子设备704可以根据该I/O端口确定目标待测模块与HIL设备202中的I/O板卡之间的信号映射关系(即第五映射关系)。Further, after the electronic device 704 can determine the target module under test according to the target component in the test request, it can set the networking mode between the target modules under test through the signal connection device 201, and then control the networking mode through the signal connection device 201 The conduction of the signal link between the target module under test and the HIL device 202 is based on the set networking mode and the conducted signal link to obtain the signal connection relationship between the target module under test and the HIL device. It can be understood that, because the port of the target module under test on the signal connection device 201 is determined, the electronic device 704 can obtain the connection between the signal connection device 201 and the I/O board in the HIL device 202 from the HIL board resource management. The I/O resource mapping relationship among them can determine the I/O port through which the target module under test communicates with the I/O board on the HIL device 202 . Therefore, the electronic device 704 can determine the signal mapping relationship (ie, the fifth mapping relationship) between the target module under test and the I/O board in the HIL device 202 according to the I/O port.
最后,电子设备704可以根据第四映射关系和第五映射关系确定第一处理器和HIL设备的I/O板卡之间的第六映射关系。因此电子设备704基于第六映射关系可以构建测试实例中连接关系,第一处理器中运行的目标仿真模型和目标待测模块之间可以相互通信,实现了HIL测试中全链路信号的连接,电子设备704可以将HIL仿真测试结果向用户设备发送。Finally, the electronic device 704 may determine a sixth mapping relationship between the first processor and the I/O board of the HIL device according to the fourth mapping relationship and the fifth mapping relationship. Therefore, the electronic device 704 can construct the connection relationship in the test instance based on the sixth mapping relationship, and the target simulation model running in the first processor and the target module to be tested can communicate with each other, realizing the connection of the full link signal in the HIL test, The electronic device 704 may send the HIL simulation test result to the user equipment.
从图8可以看出,待测模型实例1为用户通过第一用户设备7051编排的测试实例,可以对待测模块实例1进行功能测试的整车模型实例1运行在第一处理器中,基于云计算服务700可以完成对待测模型实例1的测试得到测试结果,并将测试结果向第一用户设备7051发送。It can be seen from Figure 8 that the model instance 1 to be tested is a test instance programmed by the user through the first user device 7051, and the vehicle model instance 1 that can perform functional tests on the module instance 1 to be tested runs in the first processor, based on cloud The calculation service 700 may complete the test of the model instance 1 to be tested to obtain a test result, and send the test result to the first user equipment 7051 .
待测模型实例2为用户通过第二用户设备7052编排的测试实例,可以对待测模块实例2进行功能测试的整车模型实例2运行在第一处理器中,基于云计算服务700可以完成对待测模型实例2的测试得到测试结果,并将测试结果向第二用户设备7052发送。The model instance 2 to be tested is a test instance arranged by the user through the second user equipment 7052. The vehicle model instance 2 that can perform functional tests on the module instance 2 to be tested runs in the first processor, and the cloud computing service 700 can complete the test instance. The test of model instance 2 obtains test results, and sends the test results to the second user equipment 7052 .
待测模型实例3为用户通过第三用户设备7053编排的测试实例,可以对待测模块实例3进行功能测试的整车模型实例3运行在第一处理器中,基于云计算服务700可以完成对待测模型实例3的测试得到测试结果,并将测试结果向第三用户设备7053发送。The model instance 3 to be tested is a test instance arranged by the user through the third user device 7053. The vehicle model instance 3 that can perform functional tests on the module instance 3 to be tested runs in the first processor, and the cloud computing service 700 can complete the test instance. The test of model instance 3 obtains the test result, and sends the test result to the third user equipment 7053 .
需要说明的是,图8所示的信号连接装置的300个端口是作为一个示例,本申请实施例对信号连接装置的端口不做任何限制,端口数量可根据实际情况来确定。第一用户设备7051、第二用户设备7052和第三用户设备7053可以是部署在不同地理位置的设备。It should be noted that the 300 ports of the signal connection device shown in FIG. 8 are used as an example, and the embodiment of the present application does not impose any limitation on the ports of the signal connection device, and the number of ports can be determined according to actual conditions. The first user equipment 7051, the second user equipment 7052 and the third user equipment 7053 may be devices deployed in different geographical locations.
请参见图9,图9是本申请实施例提供的一种信号连接装置900的结构示意图,该信号连接装置可以为电子设备,也可以为电子设备中的一个器件,例如芯片、软件模块、集成电控等,该信号连接装置900用于实现前述的信号连接方法,例如图3B所示实施例中的信号连接方法。该信号连接装置900包括控制单元901,处理单元902和连接单元903。Please refer to FIG. 9. FIG. 9 is a schematic structural diagram of a signal connection device 900 provided by an embodiment of the present application. The signal connection device may be an electronic device, or a device in the electronic device, such as a chip, a software module, an integrated Electronic control, etc., the signal connection device 900 is used to implement the aforementioned signal connection method, such as the signal connection method in the embodiment shown in FIG. 3B . The signal connection device 900 includes a control unit 901 , a processing unit 902 and a connection unit 903 .
控制单元901,用于通过信号连接装置配置第一映射关系,第一映射关系包含待测模块和硬件在环HIL设备之间的信号连接关系,HIL设备用于运行对待测模块的功能进行测试的 仿真模型;The control unit 901 is configured to configure the first mapping relationship through the signal connection device, the first mapping relationship includes the signal connection relationship between the module to be tested and the hardware-in-the-loop HIL device, and the HIL device is used to run the function of the module to be tested for testing. simulation model;
处理单元902,用于根据第一映射关系确定第三映射关系,第三映射关系包含第一处理器和HIL设备之间的信号映射关系;The processing unit 902 is configured to determine a third mapping relationship according to the first mapping relationship, where the third mapping relationship includes a signal mapping relationship between the first processor and the HIL device;
连接单元903,用于根据第三映射关系控制HIL测试的连接关系。The connection unit 903 is configured to control the connection relationship of the HIL test according to the third mapping relationship.
在一种可能的实现方式中,该信号连接装置900属于测试系统,例如如图2A所示的系统。In a possible implementation manner, the signal connection device 900 belongs to a test system, such as the system shown in FIG. 2A .
在一种可能的实现方式中,该信号连接装置900还包括获取单元904,用于获取第二映射关系,其中,第二映射关系包含第一处理器与待测模块之间的信号映射关系。In a possible implementation manner, the signal connection device 900 further includes an acquiring unit 904, configured to acquire a second mapping relationship, where the second mapping relationship includes a signal mapping relationship between the first processor and the module under test.
在一种可能的实现方式中,处理单元902,具体用于根据第二映射关系和第一映射关系确定第一处理器和HIL设备之间的第三映射关系。In a possible implementation manner, the processing unit 902 is specifically configured to determine a third mapping relationship between the first processor and the HIL device according to the second mapping relationship and the first mapping relationship.
在一种可能的实现方式中,控制单元901,具体用于:In a possible implementation manner, the control unit 901 is specifically configured to:
通过信号连接装置设置多个待测模块之间的组网模式;Setting the networking mode between multiple modules to be tested through the signal connection device;
通过信号连接装置设置一个或多核待测模块和HIL设备之间的第一链路;Setting the first link between one or multi-core modules under test and the HIL equipment through the signal connection device;
基于设置的组网模式和所述第一链路确定第一映射关系,以实现通过信号连接装置配置第一映射关系。The first mapping relationship is determined based on the set networking mode and the first link, so as to configure the first mapping relationship through the signal connection device.
在一种可能的实现方式中,信号连接装置900包含多个端口,控制单元901,具体用于:In a possible implementation manner, the signal connection device 900 includes multiple ports, and the control unit 901 is specifically used for:
通过信号连接装置设置多个端口对应的多个的端口标识;Setting a plurality of port identifications corresponding to the plurality of ports through the signal connection device;
基于端口标识设置多个待测模块之间的组网模式。Set the networking mode between multiple modules under test based on the port identification.
在一种可能的实现方式中,控制单元901,具体用于:In a possible implementation manner, the control unit 901 is specifically configured to:
基于所述端口标识设置第一待测模块和第二待测模块之间的第二链路,其中,待测模块包括所述第一待测模块和所述第二待测模块,端口标识为信号连接装置的端口对应的标识;Set the second link between the first module to be tested and the second module to be tested based on the port identifier, wherein the module to be tested includes the first module to be tested and the second module to be tested, and the port identifier is The identification corresponding to the port of the signal connection device;
基于所述第二链路设置多个待测模块之间的组网模式。A networking mode among multiple modules to be tested is set based on the second link.
在一种可能的实现方式中,控制单元901,具体用于:In a possible implementation manner, the control unit 901 is specifically configured to:
在第一端口标识与第二端口标识相同的情况下,确定所述第一待测模块和所述第二待测模块之间的信号传输,以实现通过所述端口标识设置所述第一待测模块和所述第二待测模块之间的第二链路;其中,所述第一端口标识为所述信号连接装置的第一端口对应的标识,所述第一端口为与所述第一待测模块连接的端口;所述第二端口标识为所述信号连接装置的第二端口对应的标识,所述第二端口为与所述第二待测模块连接的端口。In the case that the first port identifier is the same as the second port identifier, determine the signal transmission between the first module under test and the second module under test, so as to realize setting the first module under test through the port identifier The second link between the module under test and the second module under test; wherein, the first port identification is the identification corresponding to the first port of the signal connection device, and the first port is the identification corresponding to the first port A port connected to a module to be tested; the second port identification is the identification corresponding to the second port of the signal connection device, and the second port is a port connected to the second module to be tested.
在一种可能的实现方式中,控制单元901,具体用于:In a possible implementation manner, the control unit 901 is specifically configured to:
确定端口连接关系,所述端口连接关系包含第一端口标识和第二端口标识,所述第一端口标识为所述信号连接装置的第一端口对应的标识,所述第一端口为与所述第一待测模块连接的端口;所述第二端口标识为所述信号连接装置的第二端口对应的标识,所述第二端口为与所述第二待测模块连接的端口;Determine the port connection relationship, the port connection relationship includes a first port identifier and a second port identifier, the first port identifier is the identifier corresponding to the first port of the signal connection device, and the first port is the identifier corresponding to the first port of the signal connection device. The port connected to the first module to be tested; the second port identification is the identification corresponding to the second port of the signal connection device, and the second port is a port connected to the second module to be tested;
基于所述端口连接关系设置所述第一待测模块和所述第二待测模块之间的第二链路。Setting a second link between the first module under test and the second module under test based on the port connection relationship.
在一种可能的实现方式中,所述端口包括以太网端口或者控制局域网络CAN端口。In a possible implementation manner, the port includes an Ethernet port or a control area network (CAN) port.
在一种可能的实现方式中,信号连接装置用于模型测试和台架测试,台架测试包含所述仿真模型对应的实体部件信号连接装置信号连接装置。In a possible implementation manner, the signal connecting device is used for model testing and bench testing, and the bench testing includes a signal connecting device for physical components corresponding to the simulation model.
在一种可能的实现方式中,连接单元903,用于根据来自用户设备的测试请求构建测试实例,测试实例用于供用户设备使用测试请求对应的目标待测模块的资源。In a possible implementation manner, the connecting unit 903 is configured to construct a test instance according to the test request from the user equipment, and the test instance is used for the user equipment to use resources of the target module under test corresponding to the test request.
在一种可能的实现方式中,处理单元902,用于根据测试请求为用户设备分配对应的目标待测模块和I/O端口,I/O端口为HIL设备中的端口;In a possible implementation manner, the processing unit 902 is configured to assign a corresponding target module to be tested and an I/O port to the user equipment according to the test request, and the I/O port is a port in the HIL device;
连接单元903,用于根据目标待测模块和I/O端口构建测试实例。The connection unit 903 is configured to construct a test instance according to the target module to be tested and the I/O port.
应理解,相关描述还可以参见图3B所示实施例中的描述,此处不再赘述。It should be understood that for related descriptions, reference may also be made to the descriptions in the embodiment shown in FIG. 3B , and details are not repeated here.
请参见图10,图10是本申请实施例提供的一种计算设备100的结构示意图,该计算设备100可以为独立设备(例如服务器、或用户设备等等中的一个或者多个),也可以为独立设备内部的部件(例如芯片、软件模块或者硬件模块等)。该计算设备100可以包括至少一个处理器1001。可选的还可以包括至少一个存储器1003。进一步可选的,计算设备100还可以包括通信接口1002。更进一步可选的,还可以包含总线1004,其中,处理器1001、通信接口1002和存储器1003通过总线1004相连。Please refer to FIG. 10. FIG. 10 is a schematic structural diagram of a computing device 100 provided by an embodiment of the present application. The computing device 100 may be an independent device (such as one or more of a server, or a user device, etc.), or may be It is an internal component of an independent device (such as a chip, a software module or a hardware module, etc.). The computing device 100 may include at least one processor 1001 . Optionally, at least one memory 1003 may also be included. Further optionally, the computing device 100 may further include a communication interface 1002 . Further optionally, a bus 1004 may also be included, wherein the processor 1001 , the communication interface 1002 and the memory 1003 are connected through the bus 1004 .
其中,处理器1001是进行算术运算和/或逻辑运算的模块,具体可以是中央处理器(central processing unit,CPU)、图片处理器(graphics processing unit,GPU)、微处理器(microprocessor unit,MPU)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程逻辑门阵列(Field Programmable Gate Array,FPGA)、复杂可编程逻辑器件(Complex programmable logic device,CPLD)、协处理器(协助中央处理器完成相应处理和应用)、微控制单元(Microcontroller Unit,MCU)等处理模块中的一种或者多种的组合。Wherein, the processor 1001 is a module for performing arithmetic operations and/or logic operations, specifically, a central processing unit (central processing unit, CPU), a picture processing unit (graphics processing unit, GPU), a microprocessor (microprocessor unit, MPU) ), Application Specific Integrated Circuit (ASIC), Field Programmable Logic Gate Array (Field Programmable Gate Array, FPGA), Complex Programmable Logic Device (Complex programmable logic device, CPLD), coprocessor (assisting central processing One or more combinations of processing modules such as processors to complete corresponding processing and applications), Microcontroller Unit (MCU) and other processing modules.
通信接口1002可以用于为至少一个处理器提供信息输入或者输出。和/或,通信接口1002可以用于接收外部发送的数据和/或向外部发送数据,可以为包括诸如以太网电缆等的有线链路接口,也可以是无线链路(Wi-Fi、蓝牙、通用无线传输、车载短距通信技术以及其他短距无线通信技术等)接口。可选的,通信接口1002还可以包括与接口耦合的发射器(如射频发射器、天线等),或者接收器等。 Communication interface 1002 may be used to provide information input or output to at least one processor. And/or, the communication interface 1002 can be used to receive data sent from the outside and/or send data to the outside, and can be a wired link interface such as an Ethernet cable, or a wireless link (Wi-Fi, Bluetooth, General wireless transmission, vehicle short-range communication technology and other short-range wireless communication technologies, etc.) interface. Optionally, the communication interface 1002 may further include a transmitter (such as a radio frequency transmitter, an antenna, etc.) or a receiver coupled with the interface.
存储器1003用于提供存储空间,存储空间中可以存储操作系统和计算机程序等数据。存储器1003可以是随机存储记忆体(random access memory,RAM)、只读存储器(read-only memory,ROM)、可擦除可编程只读存储器(erasable programmable read only memory,EPROM)、或便携式只读存储器(compact disc read-only memory,CD-ROM)等等中的一种或者多种的组合。The memory 1003 is used to provide a storage space, in which data such as operating systems and computer programs can be stored. Memory 1003 can be random access memory (random access memory, RAM), read-only memory (read-only memory, ROM), erasable programmable read-only memory (erasable programmable read only memory, EPROM), or portable read-only memory One or more combinations of memory (compact disc read-only memory, CD-ROM), etc.
该计算设备100中的至少一个处理器1001用于执行前述的信号连接方法,例如图3B所示实施例所描述的版本管理方法。At least one processor 1001 in the computing device 100 is configured to execute the aforementioned signal connection method, such as the version management method described in the embodiment shown in FIG. 3B .
在一种可能的实施方式中,该计算设备100中的至少一个处理器1001用于执行调用计算机指令,以执行以下操作:In a possible implementation manner, at least one processor 1001 in the computing device 100 is configured to execute calling computer instructions to perform the following operations:
通过信号连接装置配置第一映射关系,第一映射关系包含待测模块和硬件在环HIL设备之间的信号连接关系;Configuring the first mapping relationship through the signal connection device, the first mapping relationship includes the signal connection relationship between the module to be tested and the hardware-in-the-loop HIL device;
根据第一映射关系确定第三映射关系,第三映射关系包含第一处理器和HIL设备之间的第三映射关系,所述第一处理器用于运行仿真模型,所述仿真模型为对所述待测模块的功能进行仿真的模型;Determine a third mapping relationship according to the first mapping relationship, the third mapping relationship includes a third mapping relationship between the first processor and the HIL device, the first processor is used to run a simulation model, and the simulation model is for the described A model for simulating the function of the module under test;
根据第三映射关系确定HIL测试的连接关系。The connection relationship of the HIL test is determined according to the third mapping relationship.
在又一种可能的实施方式中,处理器1001,还用于:In yet another possible implementation manner, the processor 1001 is further configured to:
通过通信接口1002获取第二映射关系,其中,第二映射关系包含第一处理器与待测模块之间的信号映射关系。The second mapping relationship is obtained through the communication interface 1002, wherein the second mapping relationship includes a signal mapping relationship between the first processor and the module under test.
在又一种可能的实施方式中,处理器1001,还用于:In yet another possible implementation manner, the processor 1001 is further configured to:
根据第二映射关系和第一映射关系确定第三映射关系。A third mapping relationship is determined according to the second mapping relationship and the first mapping relationship.
在又一种可能的实施方式中,处理器1001,还用于:In yet another possible implementation manner, the processor 1001 is further configured to:
通过信号连接装置设置多个待测模块之间的组网模式;Setting the networking mode between multiple modules to be tested through the signal connection device;
通过信号连接装置配置一个或多个待测模块和HIL设备之间的第一链路;Configuring the first link between one or more modules to be tested and the HIL device through the signal connection device;
基于设置的组网模式和第一链路得到第一映射关系,以实现通过信号连接装置配置第一映射关系。The first mapping relationship is obtained based on the set networking mode and the first link, so as to configure the first mapping relationship through the signal connection device.
在又一种可能的实施方式中,处理器1001,还用于:In yet another possible implementation manner, the processor 1001 is further configured to:
通过信号连接装置设置多个端口对应的多个端口标识;Setting multiple port identifiers corresponding to multiple ports through the signal connection device;
基于端口标识设置多个待测模块之间的组网模式。Set the networking mode between multiple modules under test based on the port identification.
在又一种可能的实施方式中,处理器1001,还用于:In yet another possible implementation manner, the processor 1001 is further configured to:
通过通信接口1002基于所述端口标识设置第一待测模块和第二待测模块之间的第二链路,其中,多个所述待测模块包括所述第一待测模块和所述第二待测模块,端口标识为信号连接装置的端口对应的标识;Setting the second link between the first module under test and the second module under test based on the port identifier through the communication interface 1002, wherein the plurality of modules under test include the first module under test and the second module under test 2. The module to be tested, the port identification is the identification corresponding to the port of the signal connection device;
基于所述第二链路设置多个待测模块之间的组网模式。A networking mode among multiple modules to be tested is set based on the second link.
在又一种可能的实施方式中,处理器1001,还用于:In yet another possible implementation manner, the processor 1001 is further configured to:
在第一端口标识与第二端口标识相同的情况下,确定所述第一待测模块和所述第二待测模块之间的信号传输,以实现通过所述端口标识设置所述第一待测模块和所述第二待测模块之间的第二链路;其中,所述第一端口标识为所述信号连接装置的第一端口对应的标识,所述第一端口为与所述第一待测模块连接的端口;所述第二端口标识为所述信号连接装置的第二端口对应的标识,所述第二端口为与所述第二待测模块连接的端口。In the case that the first port identifier is the same as the second port identifier, determine the signal transmission between the first module under test and the second module under test, so as to realize setting the first module under test through the port identifier The second link between the module under test and the second module under test; wherein, the first port identification is the identification corresponding to the first port of the signal connection device, and the first port is the identification corresponding to the first port A port connected to a module to be tested; the second port identification is the identification corresponding to the second port of the signal connection device, and the second port is a port connected to the second module to be tested.
在又一种可能的实施方式中,处理器1001,还用于:In yet another possible implementation manner, the processor 1001 is further configured to:
确定端口连接关系,所述端口连接关系包含第一端口标识和第二端口标识,所述第一端口标识为所述信号连接装置的第一端口对应的标识,所述第一端口为与所述第一待测模块连接的端口;所述第二端口标识为所述信号连接装置的第二端口对应的标识,所述第二端口为与所述第二待测模块连接的端口;Determine the port connection relationship, the port connection relationship includes a first port identifier and a second port identifier, the first port identifier is the identifier corresponding to the first port of the signal connection device, and the first port is the identifier corresponding to the first port of the signal connection device. The port connected to the first module to be tested; the second port identification is the identification corresponding to the second port of the signal connection device, and the second port is a port connected to the second module to be tested;
基于所述端口连接关系设置所述第一待测模块和所述第二待测模块之间的第二链路。Setting a second link between the first module under test and the second module under test based on the port connection relationship.
在又一种可能的实施方式中,上述端口包括以太网端口或者控制局域网络CAN端口。In yet another possible implementation manner, the above port includes an Ethernet port or a control area network (CAN) port.
在又一种可能的实施方式中,计算设备可以用于模型测试和台架测试,所述台架测试包含所述仿真模型对应的实体部件。In yet another possible implementation manner, the computing device may be used for model testing and bench testing, and the bench testing includes physical components corresponding to the simulation model.
在又一种可能的实施方式中,处理器1001,还用于:根据来自用户设备的测试请求构建测试实例,测试实例用于供用户设备使用测试请求对应的目标待测模块的资源。In yet another possible implementation manner, the processor 1001 is further configured to: construct a test instance according to the test request from the user equipment, and the test instance is used for the user equipment to use resources of the target module under test corresponding to the test request.
在又一种可能的实施方式中,处理器1001,还用于:根据测试请求中为用户分配对应的目标待测模块和I/O端口;根据目标待测模块和I/O端口构建测试实例。In yet another possible implementation manner, the processor 1001 is also configured to: assign a corresponding target module to be tested and an I/O port to the user according to the test request; construct a test instance according to the target module to be tested and the I/O port .
应理解,相关描述还可以参见图3B所示实施例中的描述,此处不再赘述。It should be understood that for related descriptions, reference may also be made to the descriptions in the embodiment shown in FIG. 3B , and details are not repeated here.
本申请还提供了一种算机可读存储介质,所述计算机可读存储介质中存储有指令,当所述指令在至少一个处理器上运行时,实现前述的版本管理方法,例如图3B所示的信号连接方法。The present application also provides a computer-readable storage medium, where instructions are stored in the computer-readable storage medium, and when the instructions are run on at least one processor, the aforementioned version management method is implemented, such as shown in FIG. 3B The signal connection method shown.
本申请还提供了一种计算机程序产品,该计算机程序产品包括计算机指令,在被计算设备执行时,实现前述的版本管理方法,例如图3B所示的信号连接方法。The present application also provides a computer program product, which includes computer instructions, and when executed by a computing device, realizes the aforementioned version management method, such as the signal connection method shown in FIG. 3B .
本申请实施例中,“示例性的”或者“例如”等词用于表示作例子、例证或说明。本申请中被描述为“示例性的”或者“例如”的任何实施例或设计方案不应被解释为比其他实施例或设计方案更优选或更具优势。确切而言,使用“示例性的”或者“例如”等词旨在以具体方式呈现相 关概念。In the embodiments of the present application, words such as "exemplary" or "for example" are used as examples, illustrations or descriptions. Any embodiment or design described herein as "exemplary" or "for example" is not to be construed as preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "such as" is intended to present related concepts in a concrete manner.
本申请中实施例提到的“至少一个”是指一个或者多个,“多个”是指两个或两个以上。“以下至少一项(个)”或其类似表达,是指的这些项中的任意组合,包括单项(个)或复数项(个)的任意组合。例如,a、b、或c中的至少一项(个),可以表示:a、b、c、(a和b)、(a和c)、(b和c)、或(a和b和c),其中a、b、c可以是单个,也可以是多个。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A、同时存在A和B、单独存在B这三种情况,其中A、B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。The "at least one" mentioned in the embodiments of the present application refers to one or more, and the "multiple" refers to two or more. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c may represent: a, b, c, (a and b), (a and c), (b and c), or (a and b and c), where a, b, c can be single or multiple. "And/or" describes the association relationship of associated objects, indicating that there may be three types of relationships, for example, A and/or B, which may indicate: A exists alone, A and B exist simultaneously, and B exists alone, among which A and B may be singular or plural. The character "/" generally indicates that the contextual objects are an "or" relationship.
以及,除非有相反的说明,本申请实施例使用“第一”、“第二”等序数词是用于对多个对象进行区分,不用于限定多个对象的顺序、时序、优先级或者重要程度。例如,第一用户设备和第二用户设备,只是为了便于描述,而并不是表示这第一用户设备和第二用户设备的结构、重要程度等的不同,在某些实施例中,第一用户设备和第二用户设备还可以是同样的设备。And, unless otherwise stated, the embodiments of the present application use ordinal numerals such as "first" and "second" to distinguish multiple objects, and are not used to limit the order, timing, priority or importance of multiple objects degree. For example, the first user equipment and the second user equipment are only for the convenience of description, and do not represent the differences in structure, importance, etc. between the first user equipment and the second user equipment. In some embodiments, the first user equipment The device and the second user device may also be the same device.
上述实施例中所用,根据上下文,术语“当……时”可以被解释为意思是“如果……”或“在……后”或“响应于确定……”或“响应于检测到……”。以上所述仅为本申请的可选实施例,并不用以限制本申请,凡在本申请的构思和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。As used in the above embodiments, depending on the context, the term "when" may be interpreted to mean "if..." or "after" or "in response to determining..." or "in response to detecting... ". The above are only optional embodiments of the application, and are not intended to limit the application. Any modifications, equivalent replacements, improvements, etc. made within the concept and principles of the application shall be included in the protection of the application. within range.
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。Those of ordinary skill in the art can understand that all or part of the steps for implementing the above embodiments can be completed by hardware, and can also be completed by instructing related hardware through a program. The program can be stored in a computer-readable storage medium. The above-mentioned The storage medium mentioned may be a read-only memory, a magnetic disk or an optical disk, and the like.

Claims (34)

  1. 一种信号连接方法,其特征在于,所述方法包括:A signal connection method, characterized in that the method comprises:
    通过信号连接装置配置第一映射关系,所述第一映射关系包含待测模块和硬件在环HIL设备之间的信号映射关系;Configuring the first mapping relationship through the signal connection device, the first mapping relationship includes the signal mapping relationship between the module to be tested and the hardware-in-the-loop HIL device;
    根据所述第一映射关系确定第三映射关系,所述第三映射关系包含第一处理器和所述HIL设备之间的信号映射关系;其中,所述第一处理器用于运行仿真模型,所述仿真模型为对所述待测模块的功能进行仿真的模型;Determine a third mapping relationship according to the first mapping relationship, the third mapping relationship includes a signal mapping relationship between the first processor and the HIL device; wherein the first processor is used to run a simulation model, the The simulation model is a model for simulating the function of the module to be tested;
    根据所述第三映射关系确定HIL测试的连接关系。Determine the connection relationship of the HIL test according to the third mapping relationship.
  2. 根据权利要求1所述的方法,其特征在于,所述根据所述第一映射关系确定第三映射关系之前,还包括:The method according to claim 1, wherein before determining the third mapping relationship according to the first mapping relationship, further comprising:
    获取第二映射关系,其中,所述第二映射关系包含所述第一处理器与所述待测模块之间的信号映射关系。Acquiring a second mapping relationship, wherein the second mapping relationship includes a signal mapping relationship between the first processor and the module under test.
  3. 根据权利要求1或2所述的方法,其特征在于,所述根据所述第一映射关系确定第三映射关系,包括:The method according to claim 1 or 2, wherein said determining a third mapping relationship according to said first mapping relationship comprises:
    根据所述第二映射关系和所述第一映射关系确定所述第三映射关系。Determine the third mapping relationship according to the second mapping relationship and the first mapping relationship.
  4. 根据权利要求1至3任一项所述的方法,其特征在于,所述通过信号连接装置配置第一映射关系,包括:The method according to any one of claims 1 to 3, wherein configuring the first mapping relationship through the signal connection device includes:
    通过所述信号连接装置设置多个所述待测模块之间的组网模式;Setting a networking mode between a plurality of modules under test through the signal connection device;
    通过所述信号连接装置设置一个或多个所述待测模块和所述HIL设备之间的第一链路;setting a first link between one or more modules under test and the HIL device through the signal connection device;
    基于设置的所述组网模式和所述第一链路确定所述第一映射关系,以实现通过所述信号连接装置配置所述第一映射关系。The first mapping relationship is determined based on the set networking mode and the first link, so as to configure the first mapping relationship through the signal connection device.
  5. 根据权利要求4所述的方法,其特征在于,所述信号连接装置包含多个端口,所述通过所述信号连接装置设置多个所述待测模块之间的组网模式,包括:The method according to claim 4, wherein the signal connection device includes a plurality of ports, and setting a plurality of networking modes between the modules under test through the signal connection device includes:
    通过所述信号连接装置设置所述多个端口对应的多个端口标识;Setting multiple port identifiers corresponding to the multiple ports through the signal connection device;
    基于所述端口标识设置多个所述待测模块之间的组网模式。A networking mode among multiple modules under test is set based on the port identification.
  6. 根据权利要求5所述的方法,其特征在于,所述多个所述待测模块分别通过所述多个端口连接在所述信号连接装置上,所述基于所述端口标识设置多个待测模块之间的组网模式,包括:The method according to claim 5, wherein the plurality of modules to be tested are respectively connected to the signal connection device through the plurality of ports, and the plurality of modules to be tested are set based on the port identification Networking mode between modules, including:
    基于端口标识设置第一待测模块和第二待测模块之间的第二链路,其中,所述多个所述待测模块包括所述第一待测模块和所述第二待测模块,所述端口标识为所述信号连接装置的端口对应的标识;Setting a second link between the first module under test and the second module under test based on the port identifier, wherein the plurality of modules under test include the first module under test and the second module under test , the port identification is the identification corresponding to the port of the signal connection device;
    基于所述第二链路设置多个待测模块之间的组网模式。A networking mode among multiple modules to be tested is set based on the second link.
  7. 根据权利要求6所述的方法,其特征在于,所述基于所述端口标识设置第一待测模块和第二待测模块之间的第二链路,包括:The method according to claim 6, wherein said setting the second link between the first module under test and the second module under test based on the port identifier comprises:
    在第一端口标识与第二端口标识相同的情况下,确定所述第一待测模块和所述第二待测模块之间的信号传输,以实现通过所述端口标识设置所述第一待测模块和所述第二待测模块之间的第二链路;其中,所述第一端口标识为所述信号连接装置的第一端口对应的标识,所述第一端口为与所述第一待测模块连接的端口;所述第二端口标识为所述信号连接装置的第二端口对应的标识,所述第二端口为与所述第二待测模块连接的端口。In the case that the first port identifier is the same as the second port identifier, determine the signal transmission between the first module under test and the second module under test, so as to realize setting the first module under test through the port identifier The second link between the module under test and the second module under test; wherein, the first port identification is the identification corresponding to the first port of the signal connection device, and the first port is the identification corresponding to the first port A port connected to a module to be tested; the second port identification is the identification corresponding to the second port of the signal connection device, and the second port is a port connected to the second module to be tested.
  8. 根据权利要求6所述的方法,其特征在于,所述基于所述端口标识设置第一待测模块和第二待测模块之间的第二链路,包括:The method according to claim 6, wherein said setting the second link between the first module under test and the second module under test based on the port identifier comprises:
    确定端口连接关系,所述端口连接关系包含第一端口标识和第二端口标识,所述第一端口标识为所述信号连接装置的第一端口对应的标识,所述第一端口为与所述第一待测模块连接的端口;所述第二端口标识为所述信号连接装置的第二端口对应的标识,所述第二端口为与所述第二待测模块连接的端口;Determine the port connection relationship, the port connection relationship includes a first port identifier and a second port identifier, the first port identifier is the identifier corresponding to the first port of the signal connection device, and the first port is the identifier corresponding to the first port of the signal connection device. The port connected to the first module to be tested; the second port identification is the identification corresponding to the second port of the signal connection device, and the second port is a port connected to the second module to be tested;
    基于所述端口连接关系设置所述第一待测模块和所述第二待测模块之间的第二链路。Setting a second link between the first module under test and the second module under test based on the port connection relationship.
  9. 根据权利要求5至8任一项所述的方法,其特征在于,所述信号连接装置的端口包括以太网端口或者控制局域网络CAN端口。The method according to any one of claims 5 to 8, characterized in that the port of the signal connection device includes an Ethernet port or a control area network (CAN) port.
  10. 根据权利要求1至9任一项所述的方法,其特征在于,所述方法应用于模型测试和/或台架测试,所述台架测试包含所述仿真模型对应的实体部件,所述实体部件与所述信号连接装置连接。The method according to any one of claims 1 to 9, wherein the method is applied to model testing and/or bench testing, and the bench testing includes physical components corresponding to the simulation model, and the physical A component is connected to the signal connection.
  11. 根据权利要求1至10任一项所述的方法,其特征在于,所述根据所述第三映射关系确定HIL测试中的连接关系之后,还包括:The method according to any one of claims 1 to 10, wherein after determining the connection relationship in the HIL test according to the third mapping relationship, further comprising:
    根据来自用户设备的测试请求构建测试实例。Build test instances based on test requests from user devices.
  12. 根据权利要求11所述的方法,其特征在于,所述根据来自用户设备的测试请求构建测试实例,包括:The method according to claim 11, wherein said constructing a test instance according to a test request from a user equipment comprises:
    根据所述测试请求为所述用户设备分配目标待测模块和I/O端口,所述I/O端口为所述HIL设备上的端口;Allocating a target module to be tested and an I/O port for the user equipment according to the test request, the I/O port being a port on the HIL device;
    根据所述目标待测模块和所述I/O端口构建所述测试实例。Constructing the test instance according to the target module to be tested and the I/O port.
  13. 一种信号连接装置,其特征在于,所述信号连接装置用于配置待测模块和HIL设置之间的连接,所述装置包括第一配置单元和第二配置单元,A signal connection device, characterized in that the signal connection device is used to configure the connection between the module to be tested and the HIL setting, and the device includes a first configuration unit and a second configuration unit,
    所述第一配置单元,用于设置多个所述待测模块之间的组网模式;The first configuration unit is configured to set a networking mode between a plurality of modules to be tested;
    所述第二配置单元,用于设置一个或多个所述待测模块和所述HIL设备之间的第一链路。The second configuration unit is configured to set one or more first links between the modules under test and the HIL device.
  14. 根据权利要求13所述的装置,其特征在于,所述第一配置单元包含多个端口,所述第一配置单元,具体用于:The device according to claim 13, wherein the first configuration unit includes a plurality of ports, and the first configuration unit is specifically used for:
    设置所述多个端口对应的多个端口标识;Setting multiple port identifiers corresponding to the multiple ports;
    基于所述端口标识设置多个所述待测模块之间的组网模式。A networking mode among multiple modules under test is set based on the port identification.
  15. 根据权利要求14所述的装置,其特征在于,所述多个所述待测模块分别通过所述多个端口连接在所述第一配置单元上,所述第一配置单元,具体用于:The device according to claim 14, wherein the plurality of modules to be tested are respectively connected to the first configuration unit through the plurality of ports, and the first configuration unit is specifically used for:
    基于所述端口标识设置第一待测模块和第二待测模块之间的第二链路,其中,所述多个所述待测模块包括所述第一待测模块和所述第二待测模块,所述端口标识为所述信号连接装置的端口对应的标识;Setting a second link between the first module under test and the second module under test based on the port identifier, wherein the plurality of modules under test include the first module under test and the second module under test testing module, the port identification is the identification corresponding to the port of the signal connection device;
    基于所述第二链路设置多个待测模块之间的组网模式。A networking mode among multiple modules to be tested is set based on the second link.
  16. 根据权利要求15所述的装置,其特征在于,所述第一配置单元,具体用于:The device according to claim 15, wherein the first configuration unit is specifically used for:
    在第一端口标识以第二端口标识相同的情况下,确定所述第一待测模块和所述第二待测模块之间的信号传输,以实现通过所述端口标识设置所述第一待测模块和所述第二待测模块之间的第二链路;其中,所述第一端口标识为所述信号连接装置的第一端口对应的标识,所述第一端口为与所述第一待测模块连接的端口;所述第二端口标识为所述信号连接装置的第二端口对应的标识,所述第二端口为与所述第二待测模块连接的端口。In the case that the first port identifier is the same as the second port identifier, determine the signal transmission between the first module under test and the second module under test, so as to realize setting the first module under test through the port identifier The second link between the module under test and the second module under test; wherein, the first port identification is the identification corresponding to the first port of the signal connection device, and the first port is the identification corresponding to the first port A port connected to a module to be tested; the second port identification is the identification corresponding to the second port of the signal connection device, and the second port is a port connected to the second module to be tested.
  17. 根据权利要求15所述的装置,其特征在于,所述第一配置单元,具体用于:The device according to claim 15, wherein the first configuration unit is specifically used for:
    确定端口连接关系,所述端口连接关系包含第一端口标识和第二端口标识,所述第一端口标识为所述信号连接装置的第一端口对应的标识,所述第一端口为与所述第一待测模块连接的端口;所述第二端口标识为所述信号连接装置的第二端口对应的标识,所述第二端口为与所述第二待测模块连接的端口;Determine the port connection relationship, the port connection relationship includes a first port identifier and a second port identifier, the first port identifier is the identifier corresponding to the first port of the signal connection device, and the first port is the identifier corresponding to the first port of the signal connection device. The port connected to the first module to be tested; the second port identification is the identification corresponding to the second port of the signal connection device, and the second port is a port connected to the second module to be tested;
    基于所述端口连接关系设置所述第一待测模块和所述第二待测模块之间的第二链路。Setting a second link between the first module under test and the second module under test based on the port connection relationship.
  18. 一种测试系统,其特征在于,所述系统包括:A test system, characterized in that the system comprises:
    如权利要求13至17任一项所述的信号连接装置;The signal connection device according to any one of claims 13 to 17;
    硬件在环HIL测试设备,与所述信号连接装置连接;Hardware-in-the-loop HIL test equipment, connected to the signal connection device;
    待测模块,与所述信号连接装置连接。The module to be tested is connected with the signal connection device.
  19. 根据权利要求18所述的系统,其特征在于,所述测试系统还包括第一处理器,所述第一处理器用于运行仿真模型,所述仿真模型为对所述待测模块的功能进行仿真的模型;The system according to claim 18, wherein the test system further comprises a first processor, the first processor is used to run a simulation model, and the simulation model is to simulate the function of the module to be tested the model;
    所述测试系统还包括所述第一处理器与所述待测模块之间的信号映射关系。The test system also includes a signal mapping relationship between the first processor and the module under test.
  20. 根据权利要求18或19所述的系统,其特征在于,所述测试系统运行在以下中的至少一种设备中:公有云设备、私有云设备、或者本地设备。The system according to claim 18 or 19, wherein the test system runs on at least one of the following devices: public cloud devices, private cloud devices, or local devices.
  21. 一种信号连接装置,其特征在于,所述设备包括:A signal connection device, characterized in that the device includes:
    控制单元,用于通过信号连接装置配置第一映射关系,所述第一映射关系包含待测模块和硬件在环HIL设备之间的信号连接关系;The control unit is configured to configure a first mapping relationship through the signal connection device, and the first mapping relationship includes a signal connection relationship between the module to be tested and the hardware-in-the-loop HIL device;
    处理单元,用于根据所述第一映射关系确定第三映射关系,所述第三映射关系包含第一处理器和所述HIL设备之间的信号映射关系,其中,所述第一处理器用于运行仿真模型,所述仿真模型为对所述待测模块的功能进行仿真的模型;a processing unit, configured to determine a third mapping relationship according to the first mapping relationship, where the third mapping relationship includes a signal mapping relationship between the first processor and the HIL device, wherein the first processor is used to Running the simulation model, the simulation model is a model for simulating the function of the module to be tested;
    连接单元,用于根据所述第三映射关系确定HIL测试的连接关系。A connection unit, configured to determine a connection relationship of the HIL test according to the third mapping relationship.
  22. 根据权利要求21所述的设备,其特征在于,所述设备还包括:The device of claim 21, further comprising:
    获取单元,用于获取第二映射关系,其中,所述第二映射关系包含所述第一处理器与所述待测模块之间的信号映射关系。An acquiring unit, configured to acquire a second mapping relationship, wherein the second mapping relationship includes a signal mapping relationship between the first processor and the module under test.
  23. 根据权利要求21或22所述的设备,其特征在于,Apparatus according to claim 21 or 22, characterized in that,
    所述处理单元,具体用于根据所述第二映射关系和所述第一映射关系确定所述第三映射关系。The processing unit is specifically configured to determine the third mapping relationship according to the second mapping relationship and the first mapping relationship.
  24. 根据权利要求21至23任一项所述的设备,其特征在于,所述控制单元,具体用于:The device according to any one of claims 21 to 23, wherein the control unit is specifically used for:
    通过所述信号连接装置设置多个所述待测模块之间的组网模式;Setting a networking mode between a plurality of modules under test through the signal connection device;
    通过所述信号连接装置设置一个或多个所述待测模块和所述HIL设备之间的第一链路;setting a first link between one or more modules under test and the HIL device through the signal connection device;
    基于设置的所述组网模式和所述第一链路确定所述第一映射关系,以实现通过所述信号连接装置配置所述第一映射关系。The first mapping relationship is determined based on the set networking mode and the first link, so as to configure the first mapping relationship through the signal connection device.
  25. 根据权利要求24所述的设备,其特征在于,所述设备包含多个端口,所述控制单元,具体用于:The device according to claim 24, wherein the device comprises a plurality of ports, and the control unit is specifically used for:
    通过所述信号连接装置设置所述多个端口对应的多个端口标识;Setting multiple port identifiers corresponding to the multiple ports through the signal connection device;
    基于所述端口标识设置多个所述待测模块之间的组网模式。A networking mode among multiple modules under test is set based on the port identification.
  26. 根据权利要求25所述的设备,其特征在于,所述多个所述待测模块分别通过所述多个端口连接在所述设备上,所述控制单元,具体用于:The device according to claim 25, wherein the plurality of modules to be tested are respectively connected to the device through the plurality of ports, and the control unit is specifically used for:
    基于所述端口标识设置第一待测模块和第二待测模块之间的第二链路,其中,所述多个所述待测模块包括所述第一待测模块和所述第二待测模块,所述端口标识为所述信号连接装置的端口对应的标识;Setting a second link between the first module under test and the second module under test based on the port identifier, wherein the plurality of modules under test include the first module under test and the second module under test testing module, the port identification is the identification corresponding to the port of the signal connection device;
    基于所述第二链路设置多个待测模块之间的组网模式。A networking mode among multiple modules to be tested is set based on the second link.
  27. 根据权利要求26所述的设备,其特征在于,所述控制单元,具体用于:The device according to claim 26, wherein the control unit is specifically used for:
    在第一端口标识与第二端口标识相同的情况下,确定所述第一待测模块和所述第二待测模块之间的信号传输,以实现通过所述端口标识设置所述第一待测模块和所述第二待测模块之间的第二链路;其中,所述第一端口标识为所述信号连接装置的第一端口对应的标识,所述第一端口为与所述第一待测模块连接的端口;所述第二端口标识为所述信号连接装置的第二端口对应的标识,所述第二端口为与所述第二待测模块连接的端口。In the case that the first port identifier is the same as the second port identifier, determine the signal transmission between the first module under test and the second module under test, so as to realize setting the first module under test through the port identifier The second link between the module under test and the second module under test; wherein, the first port identification is the identification corresponding to the first port of the signal connection device, and the first port is the identification corresponding to the first port A port connected to a module to be tested; the second port identification is the identification corresponding to the second port of the signal connection device, and the second port is a port connected to the second module to be tested.
  28. 根据权利要求26所述的设备,其特征在于,所述控制单元,具体用于:The device according to claim 26, wherein the control unit is specifically used for:
    确定端口连接关系,所述端口连接关系包含第一端口标识和第二端口标识,所述第一端口标识为所述信号连接装置的第一端口对应的标识,所述第一端口为与所述第一待测模块连接的端口;所述第二端口标识为所述信号连接装置的第二端口对应的标识,所述第二端口为与所述第二待测模块连接的端口;Determine the port connection relationship, the port connection relationship includes a first port identifier and a second port identifier, the first port identifier is the identifier corresponding to the first port of the signal connection device, and the first port is the identifier corresponding to the first port of the signal connection device. The port connected to the first module to be tested; the second port identification is the identification corresponding to the second port of the signal connection device, and the second port is a port connected to the second module to be tested;
    基于所述端口连接关系设置所述第一待测模块和所述第二待测模块之间的第二链路。Setting a second link between the first module under test and the second module under test based on the port connection relationship.
  29. 根据权利要求25至28任一项所述的设备,其特征在于,所述端口包括以太网端口 或者控制局域网络CAN端口。The device according to any one of claims 25 to 28, wherein the port comprises an Ethernet port or a control area network (CAN) port.
  30. 根据权利要求21至29任一项所述的设备,其特征在于,所述设备用于模型测试和/或台架测试,所述台架测试包含所述仿真模型对应的实体部件信号连接装置信号连接装置。The device according to any one of claims 21 to 29, characterized in that, the device is used for model testing and/or bench testing, and the bench testing includes the physical component signal connection device signal corresponding to the simulation model Connect the device.
  31. 根据权利要求21至30任一项所述的设备,其特征在于,Apparatus according to any one of claims 21 to 30, characterized in that
    所述连接单元,用于根据来自用户设备的测试请求构建测试实例。The connection unit is configured to construct a test instance according to a test request from the user equipment.
  32. 根据权利要求31所述的设备,其特征在于,Apparatus according to claim 31, characterized in that,
    所述处理单元,用于根据所述测试请求为所述用户设备分配对应的目标待测模块和I/O端口,所述I/O端口为所述HIL设备中端口;The processing unit is configured to allocate a corresponding target module to be tested and an I/O port for the user equipment according to the test request, and the I/O port is a port in the HIL device;
    所述连接单元,用于根据所述目标待测模块和I/O端口构建测试实例。The connection unit is configured to construct a test instance according to the target module to be tested and the I/O port.
  33. 一种计算设备,其特征在于,所述计算设备包括第二处理器和存储器;A computing device, characterized in that the computing device includes a second processor and a memory;
    所述存储器中存储有计算机程序;A computer program is stored in the memory;
    所述第二处理器执行所述计算机程序时,所述计算设备执行前述权利要求1至12中任一项所述的方法。When the second processor executes the computer program, the computing device performs the method of any one of the preceding claims 1 to 12.
  34. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有指令,当所述指令至少一个处理器上运行时,实现如权利要求1至12中任一项所述的方法。A computer-readable storage medium, characterized in that instructions are stored in the computer-readable storage medium, and when the instructions are run on at least one processor, the method according to any one of claims 1 to 12 is realized. method.
PCT/CN2021/118868 2021-09-16 2021-09-16 Signal connection method, signal connection apparatus, and test system WO2023039804A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202180029249.3A CN117043699A (en) 2021-09-16 2021-09-16 Signal connection method, signal connection device and test system
PCT/CN2021/118868 WO2023039804A1 (en) 2021-09-16 2021-09-16 Signal connection method, signal connection apparatus, and test system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2021/118868 WO2023039804A1 (en) 2021-09-16 2021-09-16 Signal connection method, signal connection apparatus, and test system

Publications (1)

Publication Number Publication Date
WO2023039804A1 true WO2023039804A1 (en) 2023-03-23

Family

ID=85602309

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/118868 WO2023039804A1 (en) 2021-09-16 2021-09-16 Signal connection method, signal connection apparatus, and test system

Country Status (2)

Country Link
CN (1) CN117043699A (en)
WO (1) WO2023039804A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116909260A (en) * 2023-09-12 2023-10-20 常州星宇车灯股份有限公司 Intelligent driving domain controller test verification method for simulating HIL (high-performance liquid chromatography) rack

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN2758731Y (en) * 2004-12-24 2006-02-15 清华大学 Simulated tester for whole vehicle controller
CN104062969A (en) * 2014-07-04 2014-09-24 清华大学苏州汽车研究院(吴江) Hardware-in-loop simulation testing system and testing method for automobile
CN104731080A (en) * 2013-12-19 2015-06-24 北汽福田汽车股份有限公司 Automatic hardware-in-loop simulation environment model generating system and method
CN108121323A (en) * 2016-11-30 2018-06-05 上海汽车集团股份有限公司 Vehicle testing system, method and switching device
CN111064628A (en) * 2018-10-16 2020-04-24 联合汽车电子有限公司 CAN bus automatic test system
US20200183337A1 (en) * 2017-07-13 2020-06-11 Aversan Inc. Test platform for embedded control system
CN111650925A (en) * 2020-06-18 2020-09-11 中车青岛四方车辆研究所有限公司 dSPACE-based hybrid electric vehicle hardware-in-loop simulation system construction method
CN113167812A (en) * 2021-03-26 2021-07-23 华为技术有限公司 Signal switching control method, signal switching device, test system and platform

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN2758731Y (en) * 2004-12-24 2006-02-15 清华大学 Simulated tester for whole vehicle controller
CN104731080A (en) * 2013-12-19 2015-06-24 北汽福田汽车股份有限公司 Automatic hardware-in-loop simulation environment model generating system and method
CN104062969A (en) * 2014-07-04 2014-09-24 清华大学苏州汽车研究院(吴江) Hardware-in-loop simulation testing system and testing method for automobile
CN108121323A (en) * 2016-11-30 2018-06-05 上海汽车集团股份有限公司 Vehicle testing system, method and switching device
US20200183337A1 (en) * 2017-07-13 2020-06-11 Aversan Inc. Test platform for embedded control system
CN111064628A (en) * 2018-10-16 2020-04-24 联合汽车电子有限公司 CAN bus automatic test system
CN111650925A (en) * 2020-06-18 2020-09-11 中车青岛四方车辆研究所有限公司 dSPACE-based hybrid electric vehicle hardware-in-loop simulation system construction method
CN113167812A (en) * 2021-03-26 2021-07-23 华为技术有限公司 Signal switching control method, signal switching device, test system and platform

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116909260A (en) * 2023-09-12 2023-10-20 常州星宇车灯股份有限公司 Intelligent driving domain controller test verification method for simulating HIL (high-performance liquid chromatography) rack
CN116909260B (en) * 2023-09-12 2023-12-01 常州星宇车灯股份有限公司 Intelligent driving domain controller test verification method for simulating HIL (high-performance liquid chromatography) rack

Also Published As

Publication number Publication date
CN117043699A (en) 2023-11-10

Similar Documents

Publication Publication Date Title
Tuohy et al. Intra-vehicle networks: A review
EP4387175A1 (en) Chip, chip manufacturing method, and related apparatus
EP4280013A1 (en) Controller system and control method
CN112477781B (en) System and method for realizing electronic control function in automobile and automobile
WO2019192343A1 (en) Vehicle diagnosis method, related device and system
CN114629742B (en) Vehicle data communication simulation test platform and method for new energy electric vehicle
CN105922872B (en) Vehicle control system and vehicle
WO2023124597A1 (en) Vehicle development platform, domain controller, whole vehicle control system, and vehicle
WO2023039804A1 (en) Signal connection method, signal connection apparatus, and test system
CN113191652A (en) Vehicle-mounted information interaction system based on Ethernet
CN110727264A (en) Automobile control system
JP2018107533A (en) On-vehicle network system, relay device
CN114764323A (en) Intelligent system and method based on SOA framework and vehicle
CN112477782A (en) System and method for realizing electronic control function in automobile and automobile
CN116709253B (en) Vehicle-mounted gateway and vehicle
Kenjić et al. Connectivity challenges in automotive solutions
WO2021243602A1 (en) Vehicle control system and control subunit
CN115092068A (en) Whole vehicle control system and vehicle
WO2023082184A1 (en) Serial port switching apparatus and method, and device, storage medium, system and vehicle
CN114328229A (en) Over-the-air technology test system
CN115604322A (en) Intelligent cabin domain controller, control method thereof and vehicle
WO2023082199A1 (en) Resource allocation method, hil test device, and related apparatus
CN116634531A (en) Dormancy awakening method, system and device
CN209182710U (en) Test macro
CN109910790A (en) A kind of ADAS domain controller

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 202180029249.3

Country of ref document: CN

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21957091

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE