Model processing method, device, terminal device and storage medium

By determining the connection relationship between the target simulation model and the data port in the HIL system, the problems of strong coupling and low efficiency caused by glue code writing in the existing technology are solved, modularization and hardware adaptability are achieved, and development efficiency is improved. .

CN117971397BActive Publication Date: 2024-09-06KUNYI ELECTRONICS TECHNOLOGY (SHANGHAI) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410217684.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-01-20
Publication Date
2024-09-06
Estimated Expiration
2043-01-20

AI Technical Summary

Technical Problem

In the existing hardware-in-the-loop simulation test system, establishing a direct connection between simulation models requires manual writing of glue code, which results in strong coupling, difficulty in modularization, inability to adapt to various hardware, low efficiency, and impact on development efficiency.

Method used

In the HIL system, by determining the target simulation model and its data port, the port description information is obtained, and the connection relationship between the target data ports is determined according to the preset port connection rules to achieve signal transmission and avoid the use of glue code.

Benefits of technology

It reduces coupling, achieves modularity and hardware adaptability, improves development efficiency, and simplifies the connection process between models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117971397B
    Figure CN117971397B
Patent Text Reader

Abstract

The embodiment of the present application discloses a model processing method, device, terminal equipment and storage medium, wherein the method includes: determining the target simulation model that needs to be port-connected and the data port available for connection in the target simulation model among multiple simulation models of the HIL system; determining the target data port in the data port, and obtaining the port description information of each target data port; determining the connection relationship between the target data ports according to the port description information and the preset port connection rules, so that when the target simulation model is working, the signal is transmitted based on the connection relationship. Through the above method, there is no need to write glue code to realize the connection between models, the coupling is low, modularization is easy to realize and compatible with various hardware, and the development efficiency is effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional case based on the invention patent application with application date of January 20, 2023, application number 202310097835.2, and invention name “Model processing method, device, terminal device and storage medium”. Technical Field

[0002] The present application relates to the field of hardware-in-the-loop simulation technology, and in particular to a model processing method, apparatus, terminal device and storage medium. Background Art

[0003] Hardware-in-the-Loop (HIL) is a hardware-in-the-loop system. It is a hardware-in-the-loop simulation test system that uses a real-time processor to run a simulation model to simulate the operating state of the controlled object, connects to the ECU under test through an I / O interface, and conducts a comprehensive and systematic test on the ECU under test.

[0004] A hardware-in-the-loop test system is generally composed of a simulation model, the test bench's IO hardware, and the object to be tested. The simulation model is generally generated by modeling software and is usually a mathematical model. Its input and output have nothing to do with the test bench's hardware IO board itself. However, due to the need for hardware-in-the-loop testing, the signal of the object to be tested must be given to the simulation model through the test bench's IO hardware board. Therefore, it is necessary to establish a direct connection between simulation models.

[0005] In the prior art, the direct connection between simulation models is established by manually writing glue code. However, this method has strong coupling, is not easy to achieve modularization, is not compatible with various hardware, and is inefficient in manually writing glue code, which is not conducive to improving development efficiency. Summary of the invention

[0006] The embodiments of the present application provide a model processing method, apparatus, terminal device and storage medium for solving the problems in the above-mentioned background technology.

[0007] In a first aspect, an embodiment of the present application provides a model processing method, the method comprising:

[0008] Determine, among multiple simulation models of the HIL system, a target simulation model that needs to be connected to a port, and a data port available for connection in the target simulation model;

[0009] Determine a target data port among the data ports, and obtain port description information of each of the target data ports;

[0010] According to the port description information and the preset port connection rule, the connection relationship between the target data ports is determined, so that when the target simulation model is working, signal transmission is performed based on the connection relationship.

[0011] In a second aspect, an embodiment of the present application further provides a model processing device, the device comprising:

[0012] A first determination module is used to determine a target simulation model that needs to be connected to a port, and a data port available for connection in the target simulation model, among multiple simulation models of the HIL system;

[0013] An acquisition module, used to determine a target data port among the data ports, and acquire port description information of each of the target data ports;

[0014] The second determination module is used to determine the connection relationship between the target data ports according to the port description information and the preset port connection rule, so that when the target simulation model is working, signal transmission is performed based on the connection relationship.

[0015] In a third aspect, an embodiment of the present application further provides a terminal device, comprising a memory and a processor, wherein the memory is used to store instructions and data, and the processor is used to execute the above-mentioned model processing method.

[0016] In a fourth aspect, an embodiment of the present application further provides a storage medium, wherein a plurality of instructions are stored in the storage medium, and the instructions are suitable for being loaded by a processor to execute the above-mentioned model processing method.

[0017] The model processing method in the embodiment of the present application determines the target simulation model that needs to be port-connected and its data port available for connection in the HIL system, determines the target data port in the data port, obtains the port description information of each target data port according to the scene creation requirements, and determines the connection relationship between the target data ports according to the port description information and the preset port connection rules, so that the target simulation model performs signal transmission according to the connection relationship when working. In the embodiment of the present application, there is no need to realize the connection between models through glue code, which can effectively improve the development efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0019] Figure 1It is a flow chart of a model processing method provided in an embodiment of the present application.

[0020] Figure 2 It is a structural schematic diagram of a frame provided in an embodiment of the present application.

[0021] Figure 3 It is a schematic diagram of the connection structure between the frames provided in the embodiment of the present application.

[0022] Figure 4 It is a structural schematic diagram of a model processing device provided in an embodiment of the present application.

[0023] Figure 5 It is a structural diagram of a terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0024] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.

[0025] In the description of the embodiments of the present application, it should be understood that the terms "first" and "second" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present application, the meaning of "multiple" is two or more, unless otherwise clearly and specifically defined.

[0026] In order to enable any person skilled in the art to implement and use the present application, the following description is provided. In the following description, details are listed for the purpose of explanation. It should be understood that those of ordinary skill in the art can recognize that the present application can also be implemented without using these specific details. In other examples, the known process will not be elaborated in detail to avoid unnecessary details that make the description of the present application embodiment obscure. Therefore, the present application is not intended to be limited to the embodiments shown, but is consistent with the widest range of principles and features disclosed in accordance with the embodiments of the present application.

[0027] The embodiments of the present application provide a model processing method, apparatus, terminal device and storage medium, which will be described in detail below.

[0028] See also Figure 1 , Figure 1 It is a flow chart of a model processing method provided in an embodiment of the present application, including the following contents:

[0029] 101. Determine, among multiple simulation models of a HIL system, a target simulation model that needs to be connected to a port, and a data port available for connection in the target simulation model.

[0030] The embodiments of the present application are directed to the port connection of the simulation model in the HIL system, which can be the port connection between the ports of the simulation model and the simulation model, or the port connection between the ports of the same simulation model. The HIL system includes multiple simulation models, and the simulation model that needs to be port-connected is used as the target simulation model to realize the port connection of the target simulation model. The target simulation model can work on the host computer, can also work on the simulation board, and can also work on any device of the HIL system.

[0031] In some embodiments of the present application, the target simulation model that needs to be connected to a port is determined, and the target simulation model can be determined according to conditions such as scenario creation requirements and scenario creation specifications. Before determining the target simulation model that needs to be connected to a port, the simulation model to be included in the scene and the model type of the simulation model are determined according to the scenario creation requirements, and the JSON file with unconfigured parameters corresponding to the simulation model is determined according to the model type. According to the scenario requirements and the functional requirements of the simulation model, the JSON file is parameterized to obtain a JSON file with completed parameter configuration. After the JSON file with completed parameter configuration is mutated, compiled, and other processing is performed, a model instance of the corresponding simulation model can be generated, that is, a final model file corresponding to the model instance is obtained, in which the simulation model can include, for example, at least one of the following:

[0032] Analog input model, analog output model, digital input model, digital output model, PWM input model, PWM output model, CAN model, LIN model, timer model, expressor model, sensor model, BSU model, BMS model, etc.

[0033] It can be seen that the simulation model can be an environment channel model, a Simulink model, a general model or other custom models.

[0034] After generating a specific simulation model, when performing port connection between simulation models, or when performing connection between ports of the simulation model itself, the target simulation model for port connection is determined as needed. After determining the target simulation model, the final model file corresponding to the target simulation model is obtained from the database or disk of the HIL system through a pre-set association relationship, or the final model file corresponding to the target simulation model is obtained from the database or disk connected to the HIL system. The final model file may record information corresponding to the target simulation model, including model characteristics, data ports, and port description information. In addition, information such as port description information may also be derived from a model description file that describes the simulation model, and then, the information described in the model description file includes at least data ports and port description information, and may also include model characteristics, etc.

[0035] Optionally, in some embodiments, step 101 includes:

[0036] 101a: Obtain a model description file of a target simulation model, compile the model description file, and generate a final model file corresponding to a model instance of the target simulation model.

[0037] 101b: Import the final model file into the connection tool for file reading;

[0038] 101c: Based on the result of reading the file, the display interface of the connection tool displays the data port and the frame corresponding to the data port.

[0039] 101a can be executed at any time. For example, a final model file can be generated for each simulation model in advance, which naturally includes the final model file of the target simulation model. Furthermore, the final model file can be generated by compilation and other processes before the target simulation model is determined. Then, after the target simulation model is determined, the final model file of the target simulation model is imported into the connection tool. In addition, in some examples, the final model file can be generated only after determining which simulation models are the target simulation model.

[0040] 101b can also be executed at any time after 101a. For example, the final model file can be imported into the connection tool for reading after it is generated. However, 101c is only executed in response to the user's operation when the target simulation model is determined and a connection relationship needs to be established, and the corresponding data ports and frames are displayed. In addition, in some examples, the final model files of all simulation models can be imported for file reading before the target simulation model is determined, and then 101c is executed after the target simulation model is determined.

[0041] Since the model description file has pre-defined and recorded the relevant information of the data ports of the target simulation model, after compiling the model description file to obtain the corresponding final model file, the final model file can be read by the connection tool to generate a corresponding framework. The framework can display the included data ports and the port name of each data port and / or the display name of the data port on the display interface of the connection tool, which is also recorded in the file reading results.

[0042] like Figure 2 As shown, the frame tool in the embodiment of the present application is used to describe the setting mode of the data port contained in the model description file and the final model file, and the setting mode includes the port direction, the position of the port relative to the frame tool, the port number of the data port and the port function, etc. These can also be understood as the result of file reading.

[0043] It should be noted that Figure 2 The structural diagram of the frame shown is only an example provided in the embodiment of the present application, and the structure of the frame is not limited to Figure 2 In other embodiments, the structure of the frame can be changed.

[0044] Optionally, the connection tool is a connection setter, which is a tool for connecting data ports on the frame corresponding to the target simulation model. After the final model file is imported into the connection tool, the corresponding frame can be determined by reading the file, and the frame is displayed on the display interface, so that the port connection is realized through operations on the display interface.

[0045] If there is only one target simulation model for port connection, the final model file corresponding to the target simulation model is imported into the connection tool, and the display interface of the connection tool displays the frame corresponding to the imported final model file. The port connection is achieved by connecting the data port of the frame itself on the display interface.

[0046] If there are multiple target simulation models for port connection, the final model files corresponding to each target simulation model are imported into the connection tool, and the display interface of the connection tool displays the frame corresponding to each final model file. By connecting the frame itself or the data ports between the frames on the display interface, the port connection is realized, and the connection between the target simulation models is realized.

[0047] 102. Determine a target data port among the data ports, and obtain port description information of each of the target data ports.

[0048] Data ports include input ports, output ports, and data ports of other functional types. In the embodiments of the present application, based mainly on the port connection between the output port and the input port, the target data port includes at least one target output port and at least one target input port, and the port connection between the target data ports is a connection from the target output port to the target input port.

[0049] Optionally, the included data ports can be known through the structure of the frame, and the corresponding port description information can be displayed by clicking on the data port on the frame.

[0050] For example, the frame displayed on the display interface includes an input port and an output port. By clicking the position of the input port on the frame, the port description information of the input port is displayed in a small window at the position corresponding to the input port on the display interface.

[0051] For example, the frame displayed on the display interface includes an input port and an output port. By clicking the position of the output port on the frame, the display interface switches to the corresponding interface displaying the port description information, on which the port description information of the input port is displayed.

[0052] After the frame is displayed on the display interface of the connection tool, the data ports included can be known through the structure of the frame. However, when making port connections, not all data ports on the frame need to be connected. Instead, according to the scene creation requirements and the port functions of the data ports, the data ports that need to be connected are determined from these data ports as the target data ports, and the target data ports can be connected.

[0053] If, according to the scene creation requirements and the port functions of the data ports, it is determined that only some of the data ports of the frame need to be connected, the data ports determined on the frame are used as the target data ports for port connection. If, according to the scene creation requirements and the port functions of each data port, it is determined that all the data ports of the frame need to be connected, all the data ports on the frame are used as the target data ports for port connection.

[0054] Optionally, in an embodiment of the present application, the port description information includes port name, byte order, number of items, display name on the display interface, port type, queue attributes, structure attributes, port direction and path information, etc.

[0055] As shown in Table 1 below, Table 1 below is an example of port description information:

[0056]

[0057] Table 1

[0058] Among them, the byte order describes whether the sequence during storage and the sequence during input (output) are first-arrived first or last-arrived first, the number of items describes the number of settings of the target data port in the corresponding frame, whether it is a queue describes whether the target data port has a queue attribute, whether it is a structure describes whether the target data port has a structure attribute, and the port type describes the type of the target data port. It should be noted that in other embodiments, the port description information can be set separately.

[0059] Optionally, the port type of the target data port (ie, the data type of the data transmitted by the target data port) may include Int type, Uint type, Float type, Double type, Same struct type, Diff struct type, and the like.

[0060] 103. Determine a connection relationship between the target data ports according to the port description information and a preset port connection rule, so that when the target simulation model is working, signal transmission is performed based on the connection relationship.

[0061] After determining the connection relationship between the target data ports of the target simulation model, the target data ports with the connection relationship are port-connected, that is, the target data ports of the target simulation model itself are port-connected, or the target data ports of the target simulation model are port-connected with the target data ports of other target simulation models.

[0062] For example, it is determined that there is one target simulation model that needs to be port-connected, and it is determined that the target simulation model includes two target data ports, which are a target output port and a target input port, respectively. Then, the target output port and the target input port are port-connected to achieve data transmission.

[0063] For example, it is determined that the target simulation model that needs to be port-connected includes a first target simulation model and a second target simulation model, the target data port of the first target simulation model is determined to be the first target data port, the target data port of the second target simulation model is determined to be the second target data port, the first target data port is the target output port, and the second target data port is the target input port. Then, the target output port and the target input port are port-connected to realize data transmission and realize the connection between the simulation models.

[0064] In the embodiment of the present application, the port connection rules are preset, and when the port connection is performed, it is implemented in combination with the port connection rules.

[0065] The port connection rule can be understood as a relationship between the result of defining whether a connection is allowed and / or recommended between ports and the port description information; furthermore, any rule based on the port description information and having as a result whether a connection is allowed and / or recommended between ports can be used as an implementation method of the port connection rule;

[0066] The port description information may be understood as any information describing the corresponding port; for example, it may include information describing or reflecting at least one of the following:

[0067] The data type of the data transmitted by the corresponding data port;

[0068] The data transmission direction of the corresponding data port;

[0069] Whether the corresponding data port has queue attributes (or can be understood as queue identification);

[0070] Whether the corresponding data port has a structural attribute; and the specific content of the structural attribute;

[0071] The structural attribute is used to indicate that the data that can be transmitted by the corresponding target data port includes multiple groups of data transmitted in a specified order, and each group of data has a corresponding data type.

[0072] As shown in Table 2 below, Table 2 is a partial example of port connection rules:

[0073]

[0074] Table 2

[0075] As shown in Table 2, Table 2 defines the collocation rules of different port types. Among them, "√" means that it can be connected, which can be understood as allowing the connection, "!" means that it can be connected but a warning is generated, which can be understood as not recommending the connection, and "×" means that it cannot be connected, which can be understood as not allowing the connection.

[0076] Optionally, in some embodiments, step 103 includes: in response to a connection operation performed on the target data port on the display interface, forming the connection relationship, and determining that the connection relationship and the port description information satisfy the port connection rule.

[0077] The target data port having a connection relationship may be a connection between a data port and a data port of a frame tool corresponding to a target simulation model, or may be a connection between data ports of frame tools corresponding to multiple target simulation models.

[0078] like Figure 3 As shown, Figure 3 The example in FIG. 1 shows the connection between the target data ports of two frames to illustrate the connection between the two frames.

[0079] For example, the target simulation model that needs to be port-connected includes a first target simulation model and a second target simulation model, and it is determined that there is a connection relationship between the first target data port of the first target simulation model and the second target data port of the second target simulation model, and the first target data port is a target output port, and the second target data port is a target input port. After the frames corresponding to the two target simulation models are displayed on the display interface of the connection tool, the first target data port and the second target data port are connected by a connection operation performed on the display interface to achieve the port connection between the target output port and the target input port.

[0080] Due to the restrictions of the preset port connection rules, after the connection operation, there will be operation results such as correct connection, failure to connect, or warning line connection. Among them, if the operation result is a warning line connection, the display interface of the connection tool will display a corresponding prompt message, and the content of the prompt message may be "Warning line connection, please check".

[0081] The display setting method for the operation results of the connection operation, for example, when the connection is correct, the connection line is displayed on the display interface, but no prompt information is displayed; when the warning line is connected, the connection line is displayed on the display interface, but a prompt information is displayed; if the connection cannot be made, the display interface will automatically clear the invalid connection and display the corresponding prompt information.

[0082] In the case of warning line connection or failure to connect, in addition to displaying the corresponding prompt information, it can also automatically analyze according to the corresponding port description information and port connection rules, and display the analysis results on the display interface for reference by the connection personnel.

[0083] Optionally, in some embodiments, step 103 includes: determining the data type and data transmission direction of the data transmitted by the target data port based on the port description information, and determining that the data types of the target data ports connected in the connection relationship are the same and the data transmission directions are corresponding based on the port connection rules.

[0084] This process can be understood as an implementation method of "determining that the connection relationship and the port description information satisfy the port connection rules", that is, "the data type is the same and the data transmission direction corresponds" is a sufficient and necessary condition or a necessary condition for "the connection relationship and the port description information satisfy the port connection rules".

[0085] In some other implementations, this process can also be understood as an implementation method of automatically determining the connection relationship in step 103 .

[0086] The data transmission direction can be understood as follows: one of the two connected target data ports is an input port and the other is an output port.

[0087] like Figure 3 As shown, Figure 3 The structure of two frames is shown in the figure. The frame on the left is set as the first frame, and the frame on the right is set as the second frame. The first target data port on the first frame is AIN[2], and the second target data port on the second frame is AOUT[2]. When there is a connection relationship between the first target data port and the second target data port, the port direction of the first target data port in the figure is the right side, and the port direction of the second target data port is the left side, then the port directions of the first target data port and the second target data port correspond to each other, and the port types of the first target data port and the second target data port are the same, both of which are input and output ports.

[0088] Optionally, after determining the port type and port direction, port connection is performed in combination with the port connection rule. For example, Figure 3 The first target data port AIN[2] shown in FIG. 1 is the output port of Int8, and the second target data port AOUT[2] is the input port of Int16. Then the first target data port and the second target data port can be connected. The display after the connection operation is as follows: Figure 3 As shown, Figure 3 The two target data ports in are connections from output ports to input ports.

[0089] Optionally, in some embodiments, step 103 includes: determining whether the target data port has a queue attribute based on the port description information, and determining, based on the port connection rule, that the target data port in the connection relationship does not have a queue attribute and is an input port that is only connected to one target data port.

[0090] This process can be understood as an implementation method of "determining that the connection relationship and the port description information satisfy the port connection rule", that is, "the target data port that does not have a queue attribute and is an input port is only connected to one target data port" is a sufficient and necessary condition or a necessary condition for "the connection relationship and the port description information satisfy the port connection rule".

[0091] In some other implementations, this process can also be understood as an implementation method of automatically determining the connection relationship in step 103 .

[0092] At the same time, according to the port connection rules, the target data port having queue attributes in the connection relationship and serving as an input port can be connected to one target data port or multiple target data ports; in addition, generally speaking, the input port can be selectively configured to have queue attributes.

[0093] In some examples, the output port may not be configured. For example, the target data port as an output port can be connected to one target data port or multiple target data ports. In other examples, the output port can also be selectively configured to have a queue attribute.

[0094] The queue attribute can also be understood as a queue identifier, which is used to identify whether the corresponding port allows multiple target data ports to be connected. Furthermore, it can also be understood as whether such a mechanism is designed in the corresponding simulation model, that is, a mechanism for sequentially processing the input (or output) data of different connected data ports based on the queue;

[0095] In some implementations, the queue attribute can also be understood as describing the port connection mode of the data port. After determining the target data port, it can be known whether it has the queue attribute through the port description information of the target data port. If it does, the port connection is performed according to the queue attribute and the port connection rule. If not, the target data port is determined to be able to perform port connection through a one-to-one port connection mode.

[0096] For example, the target simulation model that needs to be connected to a port includes a first target simulation model, a second target simulation model and a third target simulation model, the first target simulation model includes a first target data port, the second target simulation model includes a second target data port, and the third target simulation model includes a third target data port. There is a connection relationship between the first target data port, the second target data port and the third target data port, wherein the first target data port is an output port, and the second target data port and the third target data port are both input ports. If the first target data port has a queue attribute, the port connection mode corresponding to the queue attribute is a one-to-many connection. Then, when the port connection is performed according to the connection relationship, the first target data port is connected to the second target data port and the third target data port respectively.

[0097] For example, the target simulation model that needs to be port-connected includes a first target simulation model and a second target simulation model, the first target simulation model includes a first target data port, and the second target simulation model includes a second target data port. There is a connection relationship between the first target data port and the second target data port, wherein the first target data port is an output port and the second target data port is an input port. If the first target data port does not have a queue attribute, the port connection mode of the first target data port is a one-to-one connection. Then, when the port connection is performed according to the connection relationship, the first target data port and the second target data port are connected.

[0098] Optionally, in some embodiments, step 103 includes: determining whether the target data port has structural attributes and attribute information of the structural attributes of the target data port based on the port description information, and determining that the structural attributes of the target data ports with structural attributes connected in the connection relationship are the same based on preset port connection rules.

[0099] This process can be understood as an implementation method of "determining that the connection relationship and the port description information satisfy the port connection rules", that is, "the structural attributes of the target data ports with structural attributes connected in the connection relationship are the same" is a sufficient and necessary condition or a necessary condition for "the connection relationship and the port description information satisfy the port connection rules".

[0100] In some other implementations, this process can also be understood as an implementation method of automatically determining the connection relationship in step 103. For example, after determining the two simulation models that need to be connected, the data ports with the same structural attributes can be automatically connected together;

[0101] The attribute information of the structural attribute is used to characterize that the data that can be transmitted by the corresponding target data port includes multiple groups of data transmitted in a specified order, and each group of data has a corresponding data type. In addition, the data port with structural attributes is usually more complex and needs to transmit multiple groups of data of different data types. At this time, the judgment result of whether there is a structural attribute and whether the attribute information of the structural attribute is the same are used as the basis for judging whether to allow the connection. It can ensure that only data ports with exactly the same structural attributes can be connected, and avoid that the data output by one data port cannot be effectively and accurately received and processed by another data port. In other words, for two data ports with exactly the same attribute information of the structural attributes, the corresponding simulation model processes and writes data when outputting data and the corresponding simulation model extracts and parses data when receiving data. That is, for any group of data, the simulation model will write and extract the group of data at the same data bit, and perform the processing before writing and the parsing after extraction of the group of data in the same data type processing method.

[0102] The structure attribute can also be understood as describing whether the corresponding target data port has a structure. Regarding the definition of the structure, it can be understood that the structure contains multiple members (that is, each group of data transmitted in a specified order can be regarded as a member), and each member has a corresponding data type. For example, a structure includes a group of Int8 data type data, a group of Uint8 data type data, and a group of Uint16 data type data. If there are three groups of data to be transmitted, then this structure contains three members.

[0103] When determining the connection relationship between target data ports with structural attributes, the target data ports with the connection relationship have the same structural attributes to connect the ports. The same structural attributes are defined as the structure name, number of structure ports, type of structure ports, and order of structure ports of the target data ports to be connected are all the same.

[0104] Multiple types of structures can be predefined, and corresponding names are set for each type. When determining whether the structural attributes of the target data port to be connected are the same structural attributes, it can also be determined by judging the structure name.

[0105] In one implementation manner, after determining two target simulation models that need to be connected, if it is assumed that the two target simulation models are a fourth target simulation model and a fifth target simulation model, the target data port can also be determined by the following steps:

[0106] Obtain one or more historical connection records of the fourth target simulation model (i.e., the first type of simulation model) and the fifth target simulation model (i.e., the second type of simulation model); the historical connection record represents a connection relationship that occurred in the past between the data ports of the first type of simulation model and the second type of simulation model; for example, the first type of simulation model has three input ports, namely, input ports x, y, and z, and the second type of simulation model has five output ports, namely, output ports a, b, c, d, and e. In one past historical connection record, x was connected to a, y was connected to b, and z was connected to c. In another past historical connection record, x was connected to a, y was connected to c, and z was connected to e. In another past historical connection record, x was connected to a, y was connected to c, and z was connected to e. In another past historical connection record, x was connected to a, and the others were not connected.

[0107] If there are multiple historical connection records, the number of times each historical connection record occurs can be counted; based on the number of times, a recommended connection is formed in the interface; further, the final connection can be determined in response to the user's operation on the recommended connection, that is, the connection operation involved above can be the user's operation on the recommended connection.

[0108] In one example, a connection mode of a historical connection record with the highest number of times may be used as a recommended connection; further, a connection may be formed between the frames of two simulation models in the interface with a dotted line and / or a colored line, which is the recommended connection, and the user may click on any part of the recommended connection to indicate that the recommended connection is used as the final connection;

[0109] In another example, the connection method of multiple historical connection records with the highest number of times (for example, three) can be used as three recommended connections; then, in order of the number of times, dotted lines and / or colored lines can be used to form connections between the boxes of two simulation models in the interface, and then, the user can indicate which recommended connection he wants to use as the final connection by selecting an option box or other operations.

[0110] If the number of historical connection records is one, you can directly select its connection method as the recommended connection.

[0111] Through the above methods, we can learn from the connection experience of past connection relationships to improve the efficiency of connection. At the same time, we can avoid or reduce the errors and omissions when connecting by inexperienced engineers.

[0112] In a further example, each historical connection record can also be configured with a mapped scenario identifier to identify the characteristics of the test scenario, such as the scenario of testing the chassis domain controller, the scenario of testing the intelligent driving domain controller, etc. The characteristics of the scenario are not limited to domain-based distinctions, for example, it can also include the manufacturer and purpose of the controller being tested.

[0113] Furthermore, in the process of obtaining one or more historical connection records of the fourth target simulation model (i.e., the first type of simulation model) and the fifth target simulation model (i.e., the second type of simulation model), only the historical connection records whose scene identifiers are completely or partially identical to the scenes currently being tested can be obtained.

[0114] Furthermore, the connection records with strong correlation can be applied to this test to ensure that the recommended connections are helpful.

[0115] The model processing method of the embodiment of the present application includes: determining the target simulation model that needs to be connected to the port and the data port available for connection in the target simulation model among multiple simulation models of the HIL system; determining the target data port in the data port and obtaining the port description information of each target data port; determining the connection relationship between the target data ports according to the port description information and the preset port connection rules, so that when the target simulation model is working, the signal transmission is based on the connection relationship. It can be seen that there is no need to write glue code to realize the connection between models, but to establish the connection between models by determining the connection relationship and connecting the ports according to the connection relationship, which has low coupling, is easy to realize modularization and compatibility with various hardware, and effectively improves development efficiency.

[0116] See also Figure 4 , Figure 4 2 is a schematic diagram of a model processing device provided in an embodiment of the present application. The model processing device 200 includes the following modules:

[0117] The first determination module 201 is used to determine, among multiple simulation models of the HIL system, a target simulation model that needs to be connected to a port, and a data port available for connection in the target simulation model.

[0118] The acquisition module 202 is used to determine the target data port among the data ports and acquire the port description information of each target data port.

[0119] The second determination module 203 is used to determine the connection relationship between the target data ports according to the port description information and the preset port connection rule, so that when the target simulation model is working, signal transmission is performed based on the connection relationship.

[0120] Optionally, the second determining module 203 may include the following submodules:

[0121] The file compilation submodule is used to obtain the model description file of the target simulation model, compile the model description file, and generate a final model file corresponding to the model instance of the target simulation model.

[0122] The reading submodule is used to import the final model file into the connection tool for file reading.

[0123] The display submodule is used to display the data port and the frame corresponding to the data port on the display interface of the connection tool based on the result of the file reading.

[0124] Accordingly, the second determining module 203 may include the following submodules:

[0125] The relationship forming submodule is used to form a connection relationship in response to the connection operation performed on the target data port on the display interface, and determine whether the connection relationship and the port description information meet the port connection rule.

[0126] The operation results of the connection operation include correct connection, failure to connect and warning line connection. When the operation result is warning line connection, a prompt message is displayed on the display interface.

[0127] Optionally, the second determining module 203 may further include the following submodules:

[0128] The first determination submodule is used to determine the data type and data transmission direction of the data transmitted by the target data port according to the port description information.

[0129] The second determination submodule is used to determine, according to the port connection rule, that the data types of the target data ports connected in the connection relationship are the same and the data transmission directions are corresponding.

[0130] Optionally, the second determining module 203 may further include the following submodules:

[0131] The third determination submodule is used to determine whether the target data port has a queue attribute according to the port description information.

[0132] The fourth determination submodule is used to determine, according to the port connection rule, that a target data port that does not have a queue attribute in the connection relationship and is an input port is only connected to one target data port.

[0133] Optionally, the second determining module 203 may further include the following submodules:

[0134] The fifth determination submodule is used to determine whether the target data port has structural attributes and the attribute information of the structural attributes of the target data port based on the port description information; the attribute information of the structural attributes is used to characterize that: the data that can be transmitted by the corresponding target data port includes multiple groups of data transmitted in a specified order, and each group of data has a corresponding data type.

[0135] The sixth determining submodule is used to determine, according to a preset port connection rule, that the structure attributes of the target data ports with structure attributes connected in the connection relationship are the same.

[0136] Optionally, the model processing device 200 of the embodiment of the present application may also include other modules and sub-modules, which will not be described in detail here.

[0137] The model processing device 200 of the embodiment of the present application includes: a first determination module 201, which is used to determine the target simulation model that needs to be port-connected and the data port available for connection in the target simulation model among multiple simulation models of the HIL system; an acquisition module 202, which is used to determine the target data port in the data port and obtain the port description information of each target data port; a second determination module 203, which is used to determine the connection relationship between the target data ports according to the port description information and the preset port connection rules, so that when the target simulation model is working, the signal transmission is based on the connection relationship. In the present application, there is no need to write glue code to realize the connection between models, but to establish the connection between models by determining the connection relationship and connecting the ports according to the connection relationship, which has low coupling, is easy to realize modularization and compatible with various hardware problems, and effectively improves development efficiency.

[0138] Optionally, the model processing device 200 includes a memory 120, one or more processors 180, and one or more applications, wherein the one or more applications are stored in the memory 120 and configured to be executed by the processor 180; the processor 180 may include a first determination module 201, an acquisition module 202, and a second determination module 203. For example, the structure and connection relationship of the above components may be as follows:

[0139] The memory 120 can be used to store applications and data. The applications stored in the memory 120 include executable codes. The applications can be composed of various functional modules. The processor 180 executes various functional applications and various steps of the model processing method by running the applications stored in the memory 120. In addition, the memory 120 may include a high-speed random access memory and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 120 may also include a memory controller to provide the processor 180 with access to the memory 120.

[0140] The processor 180 is the control center of the device, and uses various interfaces and lines to connect various parts of the entire terminal, and executes various functions of the device and processes data by running or executing applications stored in the memory 120, and calling data stored in the memory 120, so as to monitor the device as a whole. Optionally, the processor 180 may include one or more processing cores; preferably, the processor 180 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs.

[0141] Specifically in this embodiment, the processor 180 will load the executable code corresponding to the process of one or more applications into the memory 120 according to the following instructions, and the processor 180 will run the application stored in the memory 120 to implement various functions:

[0142] Determine, among multiple simulation models of the HIL system, a target simulation model that needs to be connected to a port, and a data port available for connection in the target simulation model;

[0143] Determine a target data port among the data ports, and obtain port description information of each of the target data ports;

[0144] According to the port description information and the preset port connection rule, the connection relationship between the target data ports is determined, so that when the target simulation model is working, signal transmission is performed based on the connection relationship.

[0145] In some embodiments, determining, among multiple simulation models of the HIL system, a target simulation model that needs to be connected to a port, and a data port available for connection in the target simulation model, includes:

[0146] Obtaining a model description file of the target simulation model, compiling the model description file, and generating a final model file corresponding to a model instance of the target simulation model;

[0147] Importing the final model file into the connection tool for file reading;

[0148] Based on the result of the file reading, the data port and a frame corresponding to the data port are displayed on a display interface of the connection tool.

[0149] In some embodiments, determining the connection relationship between the target data ports according to the port description information and a preset port connection rule includes:

[0150] In response to a connection operation performed on the target data port on the display interface, the connection relationship is formed, and it is determined that the connection relationship and the port description information satisfy the port connection rule.

[0151] In some embodiments, the operation results of the connection operation include correct connection, failure to connect and warning line connection, wherein when the operation result is warning line connection, prompt information is displayed on the display interface.

[0152] In some embodiments, determining the connection relationship between the target data ports according to the port description information and a preset port connection rule includes:

[0153] Determine the data type and data transmission direction of the data transmitted by the target data port according to the port description information;

[0154] According to the port connection rule, it is determined that the data types of the target data ports connected in the connection relationship are the same and the data transmission directions are corresponding.

[0155] In some embodiments, determining the connection relationship between the target data ports according to the port description information and a preset port connection rule includes:

[0156] Determining whether the target data port has a queue attribute according to the port description information;

[0157] According to the port connection rule, it is determined that the target data port in the connection relationship does not have a queue attribute and is an input port and is connected to only one target data port.

[0158] In some embodiments, determining the connection relationship between the target data ports according to the port description information and a preset port connection rule includes:

[0159] Determine whether the target data port has a structural attribute and attribute information of the structural attribute of the target data port according to the port description information; the attribute information of the structural attribute is used to characterize that: the data that can be transmitted by the corresponding target data port includes multiple groups of data transmitted in a specified order, and each group of data has a corresponding data type;

[0160] According to a preset port connection rule, it is determined that the target data ports with structural attributes connected in the connection relationship have the same structural attributes.

[0161] The embodiment of the present application also provides a terminal device, which can be a computer, a server, a smart phone, a computer, a tablet computer, or other device.

[0162] See also Figure 5 , Figure 5 1 is a schematic diagram of a terminal device provided in an embodiment of the present application, and the terminal device 1200 can be used to implement the model processing method provided in the above embodiment. The terminal device 1200 can be a computer, a smart phone or a tablet computer.

[0163] like Figure 5 As shown, the terminal device 1200 may include an RF (Radio Frequency) circuit 110, a memory 120 including one or more (only one is shown in the figure) computer-readable storage media, an input unit 130, a display unit 140, a sensor 150, an audio circuit 160, a transmission module 170, a processor 180 including one or more (only one is shown in the figure) processing cores, and a power supply 190. Those skilled in the art will understand that Figure 5 The structure of the terminal device 1200 shown in the figure does not constitute a limitation on the terminal device 1200, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0164] The RF circuit 110 is used to receive and send electromagnetic waves, realize the mutual conversion between electromagnetic waves and electrical signals, and thus communicate with a communication network or other devices. The RF circuit 110 may include various existing circuit elements for performing these functions, such as antennas, radio frequency transceivers, digital signal processors, encryption / decryption chips, user identity module (SIM) cards, memories, etc. The RF circuit 110 can communicate with various networks such as the Internet, corporate intranets, wireless networks, or communicate with other devices through wireless networks.

[0165] The memory 120 can be used to store software programs and modules, such as program instructions / modules corresponding to the model processing method in the above-mentioned embodiment. The processor 180 executes various functional applications and various steps of the model processing method by running the software programs and modules stored in the memory 120. The memory 120 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 120 may further include a memory remotely arranged relative to the processor 180, and these remote memories may be connected to the terminal device 1200 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0166] The input unit 130 can be used to receive input digital or character information, and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control. Specifically, the input unit 130 may include a touch-sensitive surface 131 and other input devices 132. The touch-sensitive surface 131, also known as a touch display screen or a touch pad, can collect the user's touch operations on or near it (such as the user's operation on or near the touch-sensitive surface 131 using any suitable object or accessory such as a finger, a stylus, etc.), and drive the corresponding connection device according to a pre-set program. Optionally, the touch-sensitive surface 131 may include a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch position, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into touch point coordinates, and then sends it to the processor 180, and can receive and execute commands sent by the processor 180. In addition, the touch-sensitive surface 131 may be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch-sensitive surface 131, the input unit 130 may further include other input devices 132. Specifically, the other input devices 132 may include, but are not limited to, one or more of a physical keyboard, a function key (such as a volume control key, a switch key, etc.), a trackball, a mouse, a joystick, and the like.

[0167] The display unit 140 can be used to display information input by the user or information provided to the user and various graphical user interfaces of the terminal device 1200, which can be composed of graphics, text, icons, videos and any combination thereof. The display unit 140 may include a display panel 141. Optionally, the display panel 141 may be configured in the form of LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), etc. Further, the touch-sensitive surface 131 may cover the display panel 141. When the touch-sensitive surface 131 detects a touch operation on or near it, it is transmitted to the processor 180 to determine the type of touch event. Subsequently, the processor 180 provides corresponding visual output on the display panel 141 according to the type of touch event. Although in Figure 5 In the embodiment, the touch-sensitive surface 131 and the display panel 141 are implemented as two independent components to realize the input and output functions. However, in some embodiments, the touch-sensitive surface 131 and the display panel 141 can be integrated to realize the input and output functions.

[0168] The terminal device 1200 may also include at least one sensor 150, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 141 according to the brightness of the ambient light, and the proximity sensor may turn off the display panel 141 and / or the backlight when the terminal device 1200 is moved to the ear. As a type of motion sensor, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (generally three axes), and can detect the magnitude and direction of gravity when stationary, which can be used for applications that identify the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; As for other sensors such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc. that can also be configured in the terminal device 1200, they will not be repeated here.

[0169] The audio circuit 160, the speaker 161, and the microphone 162 can provide an audio interface between the user and the terminal device 1200. The audio circuit 160 can transmit the received audio data to the speaker 161 after converting the received audio data into an electrical signal, which is converted into a sound signal for output by the speaker 161; on the other hand, the microphone 162 converts the collected sound signal into an electrical signal, which is received by the audio circuit 160 and converted into audio data, and then the audio data is output to the processor 180 for processing, and then sent to another terminal through the RF circuit 110, or the audio data is output to the memory 120 for further processing. The audio circuit 160 may also include an earplug jack to provide communication between an external headset and the terminal device 1200.

[0170] The terminal device 1200 can help users send and receive emails, browse web pages, and access streaming media through the transmission module 170 (such as a Wi-Fi module), which provides users with wireless broadband Internet access. Figure 5 The transmission module 170 is shown, but it is understandable that it is not a necessary component of the terminal device 1200 and can be omitted as needed without changing the essence of the invention.

[0171] The processor 180 is the control center of the terminal device 1200. It uses various interfaces and lines to connect various parts of the entire mobile phone. By running or executing software programs and / or modules stored in the memory 120, and calling data stored in the memory 120, it executes various functions of the terminal device 1200 and processes data, thereby monitoring the mobile phone as a whole. Optionally, the processor 180 may include one or more processing cores; in some embodiments, the processor 180 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 180.

[0172] The terminal device 1200 also includes a power supply 190 for supplying power to various components. In some embodiments, the power supply can be logically connected to the processor 180 through a power management system, so that the power management system can realize functions such as managing discharge and power consumption. The power supply 190 can also include any components such as one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, and power status indicators.

[0173] Although not shown, the terminal device 1200 may also include a camera (such as a front camera, a rear camera), a Bluetooth module, etc., which will not be described in detail here. Specifically in this embodiment, the display unit 140 of the terminal device 1200 is a touch screen display, and the terminal device 1200 also includes a memory 120 and one or more programs, wherein one or more programs are stored in the memory 120 and are configured to be executed by one or more processors 180. The one or more programs include steps for performing the following operations:

[0174] Determine, among multiple simulation models of the HIL system, a target simulation model that needs to be connected to a port, and a data port available for connection in the target simulation model;

[0175] Determine a target data port among the data ports, and obtain port description information of each of the target data ports;

[0176] According to the port description information and the preset port connection rule, the connection relationship between the target data ports is determined, so that when the target simulation model is working, signal transmission is performed based on the connection relationship.

[0177] In some embodiments, determining, among multiple simulation models of the HIL system, a target simulation model that needs to be connected to a port, and a data port available for connection in the target simulation model, includes:

[0178] Obtaining a model description file of the target simulation model, compiling the model description file, and generating a final model file corresponding to a model instance of the target simulation model;

[0179] Importing the final model file into the connection tool for file reading;

[0180] Based on the result of the file reading, the data port and a frame corresponding to the data port are displayed on a display interface of the connection tool.

[0181] In some embodiments, determining the connection relationship between the target data ports according to the port description information and a preset port connection rule includes:

[0182] In response to a connection operation performed on the target data port on the display interface, the connection relationship is formed, and it is determined that the connection relationship and the port description information satisfy the port connection rule.

[0183] In some embodiments, the operation results of the connection operation include correct connection, failure to connect and warning line connection, wherein when the operation result is warning line connection, prompt information is displayed on the display interface.

[0184] In some embodiments, determining the connection relationship between the target data ports according to the port description information and a preset port connection rule includes:

[0185] Determine the data type and data transmission direction of the data transmitted by the target data port according to the port description information;

[0186] According to the port connection rule, it is determined that the data types of the target data ports connected in the connection relationship are the same and the data transmission directions are corresponding.

[0187] In some embodiments, determining the connection relationship between the target data ports according to the port description information and a preset port connection rule includes:

[0188] Determining whether the target data port has a queue attribute according to the port description information;

[0189] According to the port connection rule, it is determined that the target data port in the connection relationship does not have a queue attribute and is an input port and is connected to only one target data port.

[0190] In some embodiments, determining the connection relationship between the target data ports according to the port description information and a preset port connection rule includes:

[0191] Determine whether the target data port has a structural attribute and attribute information of the structural attribute of the target data port according to the port description information; the attribute information of the structural attribute is used to characterize that: the data that can be transmitted by the corresponding target data port includes multiple groups of data transmitted in a specified order, and each group of data has a corresponding data type;

[0192] According to a preset port connection rule, it is determined that the target data ports with structural attributes connected in the connection relationship have the same structural attributes.

[0193] An embodiment of the present application further provides a storage medium, in which a computer program is stored. When the computer program runs on a computer, the computer executes the model processing method described in any of the above embodiments.

[0194] It should be noted that, for the model processing method described in the present application, ordinary testers in the field can understand that the whole or part of the process of implementing the model processing method described in the embodiment of the present application can be completed by controlling the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium, such as stored in the memory of a terminal device, and executed by at least one processor in the terminal device, and the execution process may include the process of the embodiment of the model processing method. Among them, the storage medium can be a disk, an optical disk, a read-only memory (ROM, ReadOnly Memory), a random access memory (RAM, Random Access Memory), etc.

[0195] For the model processing device of the embodiment of the present application, each functional module can be integrated into a processing chip, or each module can exist physically separately, or two or more modules can be integrated into one module. The above-mentioned integrated module can be implemented in the form of hardware or in the form of software functional modules. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium, such as a read-only memory, a disk or an optical disk.

[0196] The above describes in detail the model processing method, device, terminal device and storage medium provided in the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core idea of ​​the present application. At the same time, for those skilled in the art, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A model processing method, It is characterized in that The method comprises: Determine, among multiple simulation models of the HIL system, a target simulation model that needs to be connected to a port, and a data port available for connection in the target simulation model, wherein the simulation model is at least one of an analog input model, an analog output model, a digital input model, a digital output model, a PWM input model, a PWM output model, a CAN model, a LIN model, a timer model, an expressor model, a sensor model, a BSU model, and a BMS model; wherein, among multiple simulation models of the HIL system, determine, among multiple simulation models of the HIL system, a target simulation model that needs to be connected to a port, and a data port available for connection in the target simulation model, comprising: obtaining a model description file of the target simulation model, compiling the model description file, and generating a final model file corresponding to a model instance of the target simulation model; Importing the final model file into a connection tool for file reading; based on the result of the file reading, displaying the data port and the frame corresponding to the data port on the display interface of the connection tool; Determine a target data port among the data ports, and obtain port description information of each of the target data ports; Determine the connection relationship between the target data ports according to the port description information and the preset port connection rule, so that when the target simulation model works, signal transmission is performed based on the connection relationship; Determining the connection relationship between the target data ports according to the port description information and the preset port connection rule includes: Determining whether the target data port has a queue attribute according to the port description information; According to the port connection rule, determining that the target data port in the connection relationship does not have a queue attribute and is an input port is connected to only one target data port; In response to the connection operation performed on the target data port on the display interface, forming the connection relationship, and determining that the connection relationship and the port description information satisfy the port connection rule; Determine whether the target data port has a structural attribute and attribute information of the structural attribute of the target data port according to the port description information; the attribute information of the structural attribute is used to characterize that: the data that can be transmitted by the corresponding target data port includes multiple groups of data transmitted in a specified order, and each group of data has a corresponding data type; According to a preset port connection rule, it is determined that the target data ports with structural attributes connected in the connection relationship have the same structural attributes.

2. The model processing method according to claim 1, It is characterized in that The operation results of the connection operation include correct connection, failure to connect and warning line connection, wherein when the operation result is warning line connection, prompt information is displayed on the display interface.

3. The model processing method according to claim 1, It is characterized in that Determining the connection relationship between the target data ports according to the port description information and the preset port connection rule includes: Determine the data type and data transmission direction of the data transmitted by the target data port according to the port description information; According to the port connection rule, it is determined that the data types of the target data ports connected in the connection relationship are the same and the data transmission directions are corresponding.

4. The model processing method according to any one of claims 1 to 3, It is characterized in that The target simulation model that needs to be port-connected includes a first type of simulation model and a second type of simulation model, and the method further includes: Obtaining one or more historical connection records between the first type of simulation model and the second type of simulation model; the historical connection record represents a connection relationship that occurred in the past between the data ports of the first type of simulation model and the second type of simulation model; If there are multiple historical connection records, the number of occurrences of each historical connection record is counted, and based on the number of occurrences, one or more connection modes of the historical connection records are selected from the connection modes of the multiple historical connection records as recommended connections for the first type of simulation model and the second type of simulation model; If the number of the historical connection record is one, the connection mode of the historical connection record is used as the recommended connection between the first type of simulation model and the second type of simulation model.

5. A model processing device, It is characterized in that The device comprises: A first determination module is used to determine, among multiple simulation models of the HIL system, a target simulation model that needs to be connected to a port, and a data port available for connection in the target simulation model, wherein the simulation model is at least one of an analog input model, an analog output model, a digital input model, a digital output model, a PWM input model, a PWM output model, a CAN model, a LIN model, a timer model, an expressor model, a sensor model, a BSU model, and a BMS model; wherein, among multiple simulation models of the HIL system, determining the target simulation model that needs to be connected to a port, and a data port available for connection in the target simulation model comprises: obtaining a model description file of the target simulation model, compiling the model description file, and generating a final model file corresponding to a model instance of the target simulation model; Importing the final model file into a connection tool for file reading; based on the result of the file reading, displaying the data port and the frame corresponding to the data port on the display interface of the connection tool; An acquisition module, used to determine a target data port among the data ports, and acquire port description information of each of the target data ports; A second determination module, configured to determine a connection relationship between the target data ports according to the port description information and a preset port connection rule, so that when the target simulation model is working, signal transmission is performed based on the connection relationship; Determining the connection relationship between the target data ports according to the port description information and the preset port connection rule includes: Determining whether the target data port has a queue attribute according to the port description information; According to the port connection rule, determining that the target data port in the connection relationship does not have a queue attribute and is an input port is connected to only one target data port; In response to the connection operation performed on the target data port on the display interface, forming the connection relationship, and determining that the connection relationship and the port description information satisfy the port connection rule; Determine whether the target data port has a structural attribute and attribute information of the structural attribute of the target data port according to the port description information; the attribute information of the structural attribute is used to characterize that: the data that can be transmitted by the corresponding target data port includes multiple groups of data transmitted in a specified order, and each group of data has a corresponding data type; According to a preset port connection rule, it is determined that the target data ports with structural attributes connected in the connection relationship have the same structural attributes.

6. A terminal device, It is characterized in that It comprises a memory and a processor, wherein the memory is used to store instructions, and the processor is used to execute the model processing method according to any one of claims 1 to 4.

7. A storage medium, It is characterized in that The storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute the model processing method according to any one of claims 1 to 4.