A testing method and system, a computing processing terminal and a readable storage medium

By configuring multiple physical channels in the hardware in the ring test system, multiple test tasks are implemented simultaneously, the problems of waste of resources and low testing efficiency in the existing technology are solved, resource utilization and testing efficiency are improved, and multiple users are supported Shared computing processing end.

CN117311313BActive Publication Date: 2024-11-01KUNYI ELECTRONICS TECHNOLOGY (SHANGHAI) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311243702.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2023-03-06
Filing Date
2023-09-25
Publication Date
2024-11-01
Estimated Expiration
2043-09-25

AI Technical Summary

Technical Problem

Existing hardware is usually only used in a single test task in a ring test system, and cannot efficiently utilize computing resources and physical channel resources, resulting in waste of resources and inefficient testing.

Method used

By configuring multiple physical channels on the computing processing end, multiple test tasks are implemented simultaneously, allowing the computing processing end to process multiple test tasks simultaneously for at least part of the time, supporting test tasks of different users in parallel, and using different test processes and namespaces manage computing resources and physical channels.

Benefits of technology

It improves the resource utilization rate of the test system, shortens the test cycle, supports multiple users to share the same computing processing end to perform their respective test tasks, and enhances testing efficiency and flexibility.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117311313B_ABST
    Figure CN117311313B_ABST
Patent Text Reader

Abstract

The embodiments of the present invention provide a test method and system, a computing processing end, and a readable storage medium, which relate to the field of test technology. The test method includes: the computing processing end receives multiple test tasks to be executed; at least part of the time, the computing processing end simultaneously executes multiple test tasks to test the same or different devices under test through the corresponding physical channels. In the present invention, the computing processing end can simultaneously execute multiple test tasks at least part of the time, thereby being able to fully and reasonably use the computing resources and physical channel resources in the test system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of testing technology, and in particular to a testing method and system, a computing processing end, and a readable storage medium. Background Art

[0002] In cars, new energy vehicles and other vehicles, the electronic and electrical architecture of the entire vehicle is becoming more and more complex. The number of electronic control units (ECUs), data bandwidth, and the processing power of CPUs and GPUs have all changed by an order of magnitude compared to before.

[0003] Hardware-in-the-Loop (HIL) testing can verify the functions of various domain controllers, ECUs, CPUs and other controllers in the vehicle in advance to shorten the development cycle of the controllers.

[0004] In the existing HIL test system, the device with data storage and processing capabilities (such as real-time machine, or industrial computer, Real-time Parameter Controls, RTPC) and I / O card in the HIL test system are used to perform test tasks to complete the test of the device under test. Generally speaking, there is only one industrial computer, and one industrial computer is only suitable for a set of test environments for a single test task. Based on the above technical problems, the applicant proposed the technical solution of this application. Summary of the invention

[0005] The purpose of the present invention is to provide a testing method and system, a computing processing end and a readable storage medium, wherein the computing processing end can execute multiple testing tasks simultaneously at least part of the time, thereby being able to fully and reasonably use the computing resources and physical channel resources in the testing system.

[0006] Furthermore, at least two of the multiple test tasks may belong to different users, thereby enabling multiple users to complete their respective test tasks using the same computing and processing end.

[0007] To achieve the above-mentioned purpose, the present invention provides a testing method, which is applied to a computing processing end configured with computing resources in a HIL system, wherein the HIL system also includes multiple physical channels for directly or indirectly connecting to a device under test; the testing method includes: the computing processing end receives multiple test tasks to be executed; at least part of the time, the computing processing end simultaneously executes multiple test tasks to test the same or different devices under test through the corresponding physical channels.

[0008] The present invention also provides a computing processing end, in which computing resources are configured, and the computing processing end is used to execute the above-mentioned testing method.

[0009] The present invention also provides a test system, which is a HIL system, comprising: the above-mentioned computing and processing end, and multiple physical channels, the computing and processing end is connected to the multiple physical communications, and the physical channels are directly or indirectly connected to the device under test; the physical channels are used to exchange data between the computing and processing end and the device under test.

[0010] The present invention also provides a readable storage medium storing a computer program, wherein the computer program implements the above-mentioned test method when running.

[0011] In one embodiment, among the multiple test tasks simultaneously executed by the computing processing end, at least two of the test tasks are test tasks of different users.

[0012] In one embodiment, the computing processing end simultaneously executes multiple test tasks to test the same or different devices under test through corresponding physical channels, including: the computing processing end uses different test processes to execute different test tasks to test the same or different devices under test through corresponding physical channels.

[0013] In one embodiment, the multiple test tasks include a first test task, and the task data of the first test task includes: data describing the relationship between a test simulation model and data transmission; the data transmission relationship includes: a first data transmission relationship between a first physical channel configured for the first test task and / or a first functional channel corresponding to the first physical channel and the test simulation model; the computing processing end simultaneously executes multiple test tasks to test the same or different devices under test through corresponding physical channels, including: the computing processing end runs the test simulation model and exchanges target data with the first physical channel to test the device under test through the first physical channel, and the target data includes first target data generated by the test simulation model, and / or: second target data that needs to be fed back to the test simulation model.

[0014] In one embodiment, the data transmission relationship also includes: a second data transmission relationship between multiple test simulation models; the computing processing end simultaneously executes multiple test tasks to test the same or different test devices through corresponding physical channels, and also includes: based on the second data transmission relationship, exchanging data between the multiple test simulation models.

[0015] In one embodiment, each of the test tasks has a corresponding test container; the method also includes: creating a namespace corresponding to each of the test containers; the computing processing end uses different test processes to execute different test tasks, including: the computing processing end uses different test processes to call test containers in different namespaces to execute different test tasks.

[0016] In one embodiment, each of the test tasks has a corresponding test container; the namespace corresponding to each of the test containers defines resource information for executing the test task corresponding to the test container, and the resource information includes: computing resource information and channel resource information; each of the test processes uses the computing resources and physical channels of the computing processing end based on the resource information defined in the namespace. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 is a schematic diagram of a test system used in a test method according to a first embodiment of the present invention. Figure 1 ;

[0018] Figure 2 is a schematic diagram of a test system used in a test method according to a first embodiment of the present invention. Figure 2 ;

[0019] Figure 3 is a schematic diagram of a test system applied to the test method according to the first embodiment of the present invention, wherein the test system further includes an I / O control module;

[0020] Figure 4 is a specific flow chart of the testing method according to the first embodiment of the present invention;

[0021] Figure 5 is a specific flow chart of the testing method in the second embodiment of the present invention. DETAILED DESCRIPTION

[0022] The following will be described in detail with reference to the accompanying drawings to provide a clearer understanding of the purpose, features and advantages of the present invention. It should be understood that the embodiments shown in the accompanying drawings are not intended to limit the scope of the present invention, but are only intended to illustrate the essential spirit of the technical solution of the present invention.

[0023] In the following description, certain specific details are set forth for the purpose of illustrating various disclosed embodiments to provide a thorough understanding of the various disclosed embodiments. However, those skilled in the relevant art will recognize that the embodiments may be practiced without one or more of these specific details. In other cases, well-known devices, structures, and techniques associated with the present application may not be shown or described in detail to avoid unnecessarily obscuring the description of the embodiments.

[0024] Unless the context requires otherwise, throughout the specification and claims, the word "comprise" and variations such as "include" and "have" should be construed in an open, inclusive sense, ie, should be interpreted as "including, but not limited to."

[0025] References throughout the specification to "one embodiment" or "an embodiment" indicate that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment. Thus, the appearances of "in one embodiment" or "in an embodiment" in various places throughout the specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any manner in one or more embodiments.

[0026] As used in this specification and the appended claims, the singular forms "a", "an", and "the" include plural referents unless the context clearly dictates otherwise. It should be noted that the term "or" is generally employed in its sense including "or / and" unless the context clearly dictates otherwise.

[0027] In the following description, in order to clearly show the structure and working mode of the present invention, many directional words will be used for description, but the words "front", "back", "left", "right", "outside", "inside", "outward", "inward", "up", "down", etc. should be understood as convenient terms and should not be understood as restrictive terms.

[0028] The first embodiment of the present invention relates to a test method, which is applied to the computing processing end in the HIL hardware-in-the-loop test system, and the HIL system also includes multiple physical channels; the computing processing end is configured with at least one computing resource such as a CPU and a memory, and the computing processing end is directly or indirectly connected to the multiple physical channels for communication, and each physical channel is directly or indirectly connected to the device under test. The HIL system can be used to test the ECU, domain controller and other devices under test DUT in vehicles (including but not limited to new energy vehicles, fuel vehicles, etc.), and common devices under test in vehicles include vehicle controllers, battery management system controllers, electric drive controllers, body controllers, chassis suspension controllers, assisted driving controllers, etc. The test items include but are not limited to operation stability tests and control algorithm tests in various scenarios.

[0029] The computing and processing end of the HIL system can be understood as an industrial computer, which is equipped with computing resources (including but not limited to CPU and memory).

[0030] For an example, see Figure 1 The HIL system includes an industrial computer 11 and a plurality of physical channels, and the plurality of physical channels can constitute an I / O pool 2.

[0031] In another example, see Figure 2The HIL system includes: an industrial computer pool 1 and an I / O pool 2; the industrial computer pool 1 and the I / O pool 2 can be set in the same cabinet or in different cabinets. Specifically, the industrial computer pool 1 can include multiple industrial computers 11, the number of which can be fixed or expandable, and the industrial computers 11 in the industrial computer pool 1 can be set in the same cabinet or in different cabinets. The I / O pool 2 can include at least one physical channel 21, the number of which can be fixed or expandable, and the physical channel 21 in the I / O pool 2 can be set in the same cabinet or in different cabinets.

[0032] In one example, the industrial computer pool 1 includes at least one configurable number of industrial computers 11, that is, the number of industrial computers 11 in the industrial computer pool 1 is expandable, and the number can be configured according to demand, site, cost, etc. Among them, the industrial computers 11 in the industrial computer pool 1 are connected to each other in communication, and each industrial computer 11 includes one CPU or multiple CPUs. In the industrial computer pool 1, multiple industrial computers 11 are connected to each other in communication, that is, multiple industrial computers 11 are pooled to form the industrial computer pool 1; however, it is not limited to this, and multiple industrial computers 11 can also be independent of each other, and no communication connection is established between the industrial computers 11.

[0033] In one example, the I / O pool 2 includes multiple physical channels 21, the number of which can be fixed or can be configured to change, that is, the number of physical channels 21 in the I / O pool 2 can be expandable to achieve the expansion of the number of physical channels 21, and the number can be configured according to demand, site, cost, etc.; in an example, the physical channels 21 in the I / O pool 2 can be derived from different I / O units respectively, and each I / O unit can include one or more physical interfaces in the I / O cabinet for setting the I / O unit, and the I / O unit can be detachably installed and connected to the interface in the I / O cabinet, for example, the I / O unit is an I / O board, which can be directly plugged into the interface in the I / O cabinet; thereby, the number of I / O units in the I / O cabinet can be configured according to demand, site, cost, etc., that is, the number of physical channels 21 in the cabinet can be configured, and the physical channels 21 connected to the I / O cabinet interface form the I / O pool 2.

[0034] exist Figure 2 In the example, each industrial computer 11 is directly connected to one or more corresponding physical channels 21.

[0035] In another example, see Figure 3 The HIL system also includes: an I / O control module 3 and a cluster control module 4.

[0036] The I / O control module 3 is connected to the industrial computer 11 in the industrial computer pool 1, and the I / O control module 3 is also connected to the multiple physical channels 21 in the I / O pool 2. For example, the I / O control module 3 is connected to each physical channel 21 as the same EtherCAT network, wherein the physical channel 21 is connected to the I / O control module 3 in a cascade manner, and communicates based on EtherCAT, and the use of EtherCAT can basically meet the demand for low latency. In addition, the I / O unit including the physical channel 21 can also be plugged into the I / O control module 3, for example, the I / O unit is connected to the I / O control module 3 through the data bus (such as PCIe bus) of the I / O control module 3. Among them, the I / O control module 3 can be a computer including an I / O controller.

[0037] The number of I / O control modules 3 can be one, and then the I / O control module 3 can be directly connected to all physical channels 21, or cascaded with all physical channels 21. The number of I / O control modules 3 can also be multiple, and each I / O control module 3 is connected to the corresponding multiple physical channels 21. Each I / O control module 3 can also be connected to the same Ethernet as the cluster I / O control module 3, and then interact with the cluster I / O control module 3. Information (such as feedback data transmission relationship).

[0038] In this embodiment, each physical channel 21 is directly or indirectly connected to the device under test 5, and the number of the device under test 5 can be one or more. Figure 3 In the example, the physical channel 21 is directly connected to the device under test 5, that is, the device under test 5 is directly connected to the port of each physical channel 21 through a connector to realize signal transmission; each physical channel 21 can be connected to a different pin of the device under test 5 to transmit different information. The cluster control module 4 is respectively connected to each industrial computer 11 for communication. The cluster control module 4 can be a computer including a cluster controller, which is respectively connected to each industrial computer 11 for communication via wired or wireless. In addition, the cluster control module 4 can be connected to the host computer 6 for communication via wired or wireless.

[0039] exist Figure 2 and Figure 3 In the embodiment, the industrial computer 11 can be understood as part or all of the real-time simulator RTPC in the HIL system. The industrial computer 11 and the I / O control module 3 can be different computers, or different circuit boards, circuits, etc.

[0040] An I / O unit, which contains one or more physical channels, can be understood as an input / output unit.

[0041] Specifically, it can be understood that the I / O unit satisfies at least one of the following:

[0042] Able to input data relative to the device under test 5;

[0043] Capable of outputting data relative to the device under test 5;

[0044] Able to input data relative to the industrial computer 11;

[0045] Able to output data relative to the industrial computer 11;

[0046] The data A input and / or output of the I / O unit relative to the device under test 5 and the data B input and / or output of the I / O unit relative to the industrial computer may be related or unrelated.

[0047] Specifically, data A and data B may be data of the same content in different forms, for example, a digital signal of a certain content is received from the industrial computer 11, and an analog signal of the same content is sent to the device under test 5, or vice versa, for another example, a signal before the fault is injected is received from the industrial computer 11, and a signal after the fault is injected into the I / O unit is sent to the device under test 5;

[0048] Data A and data B may also be data with the same content and the same format;

[0049] Data A and data B may also be data of different contents. For example, data A and data B are respectively a trigger signal for triggering the I / O unit to generate a certain Sign1 signal and the Sign1 signal. For another example, the I / O unit needs to obtain a certain conditional signal from the industrial computer 11 to simulate the Sing2 signal that needs to be sent to the device under test 5. At this time, the conditional signal and the Sign2 signal are respectively data A and data B.

[0050] An I / O unit can refer to a circuit, a circuit board, or a device containing a circuit board and other assemblies.

[0051] In one example, the I / O unit can interact with the industrial computer 11 via the I / O control module 3, and can also interact with the device under test 5 (such as a vehicle controller) directly or via a switching matrix.

[0052] The I / O unit can only realize the input and / or output functions. In some examples, the transmitted signals can also be processed during the input and / or output process, such as signal conversion, fault simulation, information simulation, signal generation, on-off control, etc. It can be seen that whether other functions are integrated or not can be used as an implementation method of the I / O unit.

[0053] The I / O unit may be an I / O board, for example, a board supporting at least one of the following functions: digital signal input, analog signal input, digital signal output, analog signal output, PWM signal input, PWM signal output, high-side power output, and low-side power output. It can further realize the acquisition and output of high-speed signals. In addition, it can realize flexible configuration of board resources according to needs. The board accuracy and sampling frequency indicators brought by this technology have reached the industry-leading level.

[0054] The I / O boards include at least one of the following: AD PWM-IN board, DAC board, FIU board, PWM-OUT board, RELAY-IO board, RC board, PSI5&DSI3&SENT board, multi-bus board (Flexray / CANFD / LIN), Eth (vehicle-mounted Ethernet) board, etc.

[0055] The I / O board may also be, for example, at least one of the following special boards: a current output board, a thermocouple board, a battery simulator, a temperature simulator, a motor board, and an IO_HUB board.

[0056] Furthermore, the I / O unit can be understood as including one or more physical channels, and the I / O unit can also be understood as a physical channel of an I / O board.

[0057] It should be noted that Figure 3 In the example, a single device is set as the cluster control module 4 in the HIL system. However, it is not limited thereto. Any industrial computer 11 can also be configured as the cluster control module 4, so there is no need to set a single device as the cluster control module 4.

[0058] exist Figure 2 and Figure 3 In the HIL test system, target data is transmitted between K industrial computers 11 in the industrial computer pool 1 and L physical channels in the I / O pool 2, and each I / O unit may have one or more physical channels for transmitting target data.

[0059] In a specific example, corresponding to the above I / O board, the target data may include at least one of the following: downward information generated by the industrial computer 11 that needs to be sent to the device under test 5 (for example, part or all of the first target data generated by the test simulation model); and upward information from the device under test 5 that needs to be sent to the industrial computer (for example, part or all of the second target data that needs to be fed back to the test simulation model).

[0060] Furthermore, based on the diversity of I / O board functions, the target data may also include at least one of the following: downward information generated by the industrial computer 11 that needs to be sent to the physical channel 21 for processing (for example, part or all of the first target data generated by the test simulation model); and upward information generated by the physical channel 21 that needs to be sent to the industrial computer 11 (for example, part or all of the second target data that needs to be fed back to the test simulation model).

[0061] The specific process of the testing method in this embodiment is as follows Figure 4 shown.

[0062] Step 101: The computing processing end receives a plurality of test tasks to be executed.

[0063] Step 102: At least part of the time, the computing processing end simultaneously executes multiple test tasks to test the same or different DUTs through corresponding physical channels.

[0064] by Figures 1 to 3 For example, the industrial computer in the computing and processing end can receive the test task from the connected host computer or cluster control module, or the test user can directly configure the test task in the industrial computer.

[0065] For an industrial computer, if the industrial computer currently receives multiple test tasks to be executed, it can execute multiple test tasks at the same time if the resources of the industrial computer (including but not limited to computing resources and channel resources) allow. Of course, whether it needs to be executed simultaneously can be determined according to the time selected by the user to execute the test task, or the user can actively start the execution of the test task at the time required by the user, or it can be automatically configured; for example, when the industrial computer has not yet executed any test task, it selects multiple test tasks to be executed simultaneously according to the order of receiving the test tasks or the priority of the test tasks, and after a test task is completed, it can continue to select a test task to start execution; or, when the industrial computer receives a test task, it immediately starts to execute the test task; then, during the execution of the test task, another test task is received. At this time, the computing and processing end can execute the other test task at the same time, and when other test tasks are received later, the received test task can still be executed; thus, the industrial computer can execute multiple test tasks at the same time at least part of the time; each test task corresponds to one or more physical channels, and when the industrial computer executes each test task, it can test the device under test through the physical channel corresponding to the test task. In addition, multiple test tasks may be targeted at the same device under test (the number may be one or more), or multiple test tasks may be targeted at different devices under test, and the number of devices under test targeted by each test task may be one or more.

[0066] In addition, the industrial computer on the computing resource side stops executing each test task after it reaches the completion condition (such as the set test time or the set number of cycles, etc.), and the computing resources and channel resources executing the test task are released and re-enter the idle state, and can be used to execute other test tasks later.

[0067] In this embodiment, among the multiple test tasks simultaneously executed by the computing and processing end, at least two test tasks are test tasks of different users. That is to say, the multiple test tasks simultaneously executed by a single industrial computer can come from different users, that is, multiple users can use the same industrial computer to complete their respective test tasks; in the industrial computer, different test environments can be configured for different users, thereby making full use of the computing resources in the industrial computer.

[0068] For each industrial computer in the computing and processing end, when executing multiple test tasks at the same time, a corresponding test process is created for each test task, so as to use different test processes to execute different test tasks, that is, a corresponding test is created for each test task in the industrial computer to execute the corresponding test task, and the computing resources and channel resources occupied by different test processes are also separated, so that the computing resources used to execute the test tasks and the test environment formed by the physical channel can be isolated, and the test processes of different test tasks are independent of each other, and the creation, execution and termination of the test process of a certain test task do not affect the test process of another test task, that is, the execution of a certain test task will not affect the execution of another test task; thereby, the isolation of the test environment between different test tasks is achieved by utilizing the separation of resources occupied by the test processes executing different test tasks, that is, when a single industrial computer executes multiple test tasks at the same time, multiple tests are used to isolate the multiple test tasks, so that multiple test tasks can be executed simultaneously in the industrial computer, and multiple test tasks can belong to the same user or to different users, so that multiple users can access the same industrial computer to complete their respective test tasks.

[0069] In one embodiment, during the configuration of each test task (which may be configured in a host computer, a cluster control module, or a computing processing end), a corresponding test container is deployed for the test task. The test container is used to encapsulate the data that forms the test task. Specifically, the data set of the test task can be encapsulated in the image file of the corresponding test container.

[0070] When the computing and processing end executes multiple test tasks at the same time, it creates a namespace corresponding to the test container of each test task, so that the industrial computer can use different test processes to call test containers of different namespaces to execute different test tasks; that is, when the industrial computer uses the test process to execute the corresponding test task, the test process can call the test container of the corresponding namespace to retrieve and use the data related to the test task in the test container of the test task. Among them, the process ID of the test process corresponding to the test task can be defined in the namespace corresponding to the test container of the created test task, so that the test process of the test task can be associated with the namespace corresponding to the test container of the test task. In addition, the user information (such as the user name) of the user to whom the test task belongs can also be defined in the namespace corresponding to the test container of the test task.

[0071] Furthermore, the namespace corresponding to each test container defines resource information for executing the test task corresponding to the test container, and the resource information includes: computing resource information and channel resource information; at this time, each test process uses the computing resources and physical channels of the computing processing end based on the resource information defined in the namespace.

[0072] The test process corresponding to each test task runs in the namespace of the test container of the test task. The namespace mechanism implements the isolation of system resources (including computing resources and physical channel resources) of different test processes. The test process in the namespace has independent global system resources. Changing the system resources in the namespace will only affect the test process in the current namespace, and will not affect the test processes in other namespaces. Therefore, each test process can seize and use the computing resources and physical channels in the computing processing end within the resource limit specified by the resource information defined in the namespace to execute the corresponding test task to test the device under test.

[0073] The resource information of each test task can be configured by the user in the task data of the test task when configuring the test task, or can be obtained by the host computer, cluster control module or computing processing end based on the task data of the test task. The resource information of the test task includes at least computing resource information and channel resource information.

[0074] The computing resource information at least represents the restriction conditions for using various computing resources when executing the test task, for example, at least one of the following may be used:

[0075] The range or value of the CPU usage when executing the test task; for example, the upper limit value;

[0076] The range or value of the number of CPUs occupied when executing the test task; for example, the upper limit value;

[0077] The size range or value of the memory occupied when executing the test task, such as the upper limit value;

[0078] For another example, it may also include the range or value of the occupied space of the memory;

[0079] The channel resource information represents the type of physical channels or functional channels used to execute the test task and the number of channels of each type.

[0080] For example, taking any test task among multiple test tasks (recorded as the first test task) as an example, the task data of the first test task includes: data describing the relationship between the test simulation model and the data transmission; the data transmission relationship includes: the first physical channel configured for the first test task and / or the first functional channel corresponding to the first physical channel and the first data transmission relationship between the test simulation model; then, based on the first physical channel or the first functional channel used, the type of physical channel or functional channel used to execute the test task and the number of each type of channels can be determined.

[0081] The second embodiment of the present invention relates to a test method. In this embodiment, a test task is taken as an example to further illustrate the test method, which is as follows:

[0082] The specific process of the testing method of this embodiment is as follows Figure 5 shown.

[0083] Step 201: The computing processing end receives a plurality of test tasks to be executed.

[0084] In step 202, the computing processing end runs the test simulation model, and based on the first data transmission relationship, exchanges target data with the first physical channel to test the device under test through the first physical channel. The target data includes first target data generated by the test simulation model, and / or: second target data that needs to be fed back to the test simulation model.

[0085] In this example, when a single industrial computer executes multiple test tasks simultaneously, any one of the multiple test tasks (recorded as the first test task) is taken as an example for description.

[0086] The task data of the first test task includes: data describing the relationship between the test simulation model and the data transmission; the data transmission relationship includes: the first data transmission relationship between the first physical channel configured for the first test task and / or the first functional channel corresponding to the first physical channel and the test simulation model. Wherein, in the HIL system, the physical channel can be configured as one of the functional channel types supported by the physical channel, for example, if the I / O channel supports two functional channel types of voltage input (Valtage Input) and PWM signal input (PWM Input), the I / O channel can be configured as a Valtage Input functional channel or a PWM Input functional channel; thus, after the user configures the first functional channel of the type required to execute the first test task, the first data transmission relationship between the first functional channel and the test simulation model can be obtained; or, when configuring the first test task, the user directly selects the first physical channel of the type required to execute the test task from the physical channels in the idle state, and at this time, the selected first physical channel is configured as a non-idle state (i.e., it can no longer be selected for executing other test tasks), thus obtaining the first data transmission relationship between the first physical channel and the test simulation model.

[0087] The first data transmission relationship may be understood as a data transmission relationship between a model port (ie, an interface for transmitting data) of a test simulation model and a first physical channel or a first functional channel corresponding to the first physical channel.

[0088] Before executing the first test task, the CPU and memory used to execute the test task can be selected from the CPU and memory currently in an idle state based on the computing resource information of the resource information of the first test task. If the channel resource information only indicates the type of the first functional channel required to execute the first test task and the number of each type of first functional channels, and the first data transmission relationship only indicates the first data transmission relationship between the first functional channel and the test simulation model, then the industrial computer selects the first physical channel that can be configured with the first functional channel from the physical channels currently in an idle state and configures it to obtain the first physical channel used to execute the first test task, and forms a corresponding relationship between the first functional channel and the first physical channel. Thus, combined with the above-mentioned first data transmission relationship, the data transmission relationship between each first physical channel and the test simulation model can be obtained. If the first data transmission relationship has determined the first physical channel used to execute the first test task, there is no need to perform the above-mentioned step of selecting the first physical channel, and the first data transmission relationship between the first physical channel and the test simulation model can be directly determined.

[0089] The idle state referred to in this embodiment means that there is no test task currently being executed or to be executed. In addition, the cluster control module will also determine the CPU, memory in the newly expanded industrial computer in the industrial computer pool and the newly expanded physical channel in the I / O pool as idle.

[0090] The industrial computer then calls the selected CPU to run the test simulation model of the first test task, and the selected memory caches all test-related data for calling or forwarding. The data cached in the memory may be, for example, data generated by the test simulation model, data that needs to be fed back to the test model, etc.

[0091] Specifically, during the process of executing the first test task to test the device under test, the industrial computer in the computing and processing end creates a test process for executing the test task. The test process can run the test simulation model to test the device under test, and can call the image file data of the test container of the first test task during the test process. The test simulation model can generate first target data during the operation process. The first target data can be sent to the first physical channel. For part or all of the data, the first physical channel can send a corresponding signal to the device under test based on the first target data. At this time, the test process can send the first target data to the first physical channel based on the first data transmission relationship. In addition, during the test process, the first physical channel or the device under test connected to the first physical channel can also generate data that needs to be fed back to the test simulation model (i.e., the second target data or the data used to make the first physical channel generate the second target data), and then the second target data can be fed back to the test simulation model through the first physical channel. The second target data is fed back to the test simulation model from the first physical channel based on the first data transmission relationship. For example, the industrial computer reads the second target data of the specified first physical channel based on the first data transmission relationship.

[0092] In one example, the number of test simulation models can be multiple, and the target industrial computer including the selected CPU runs these multiple test simulation models, then the data transmission relationship also includes: a second data transmission relationship between the multiple test simulation models; the second data transmission relationship can be understood as the data transmission relationship between the model port (i.e., the interface for transmitting data) of each test simulation model and the model port (i.e., the interface for transmitting data) of one or more other second test simulation models.

[0093] During the process of executing the first test task to test the device under test, the industrial computer will also test the interaction data between simulation models (recorded as the third target data). The third target data is the data generated by the test simulation model that needs to be sent to other test simulation models. For example, the test simulation model model1 run by the industrial computer generates data that needs to be shared with the test simulation model model2. The industrial computer can feed back the data to the test simulation model model2 running in the same or different industrial computers based on the second data transmission relationship.

[0094] As can be seen from the above, before the industrial computer executes each test task to test the device under test, it will first determine the data transmission relationship of the test task; the data transmission relationship can be understood as: used to determine the test simulation model and the first physical channel that need to directly or indirectly share data with each other when executing the corresponding test task;

[0095] Furthermore, the data transmission may at least indicate: a relationship between the test simulation model and one or more first physical channels that allows data transmission, that is, used to define the test simulation model and the first physical channel that allow data transmission.

[0096] In one example, the data transmission relationship can further determine which physical channel the data transmitted from the test simulation model should be synchronized to, that is, the mapping relationship between the test simulation model and the physical channel is defined in detail. Furthermore, the data transmission relationship can define in detail the mapping relationship between the ports in the test simulation model and the ports of the physical channel; the ports can refer to hardware ports, or software ports, addresses, etc. (for example, an output port or input port of a model running in an industrial computer); further, when the mapping relationship is described, the test simulation model and the first physical channel that allow data transmission can be represented.

[0097] by Figures 1 to 3 Taking the HIL system in as an example, when the target industrial computer executes the first test task, based on the data transmission relationship of the first test task, when the first target data needs to be sent, it can know which first physical channel to send the first target data to; when the second target data needs to be obtained, it can know which first physical channel to obtain the first target data; when the third target data needs to be obtained, it can know which test simulation model to obtain the third target data. If the first test task is executed by multiple target industrial computers, each target industrial computer can only focus on part of the first data transmission relationship between the test simulation model it runs and the corresponding first physical channel, and part of the second data transmission relationship of the test simulation model that has data interaction with the test simulation model it runs.

[0098] Please refer to Figure 3For the HIL system, take the number of target industrial computers (including the industrial computer of the selected CPU) selected for executing the first test task as K and the number of first physical channels as L as an example.

[0099] In one example, the data transmission relationship of the first test task is sent to K target industrial computers respectively, so that the target industrial computers can know which first physical channel to go to to obtain the second target data when running a test simulation model based on the data transmission relationship; when it is necessary to send the first target data to the device under test, it can know which first physical channel to send the first target data to; and the connection relationship between the I / O control module and the first physical channel is fixed, so the industrial computer 11 can know which I / O control module to obtain the required second target data from, and also know which I / O control module to send the first target data to; when it is necessary to obtain the third target data when running a test simulation model, it can know which test simulation model to go to to obtain the third target data. Specifically: when the test simulation model running in the target industrial computer needs to send the first target data to the device under test, based on the data transmission relationship, the first physical channel for receiving each first target data is specified, and then the I / O control module sends each first target data to the device under test through the specified first physical channel. In addition, when the device under test needs to send second target data to the target industrial computer, the I / O control module receives the second target data through L first physical channels. The first physical channel can mark the first physical channel for sending each second target data, thereby each target industrial computer receives the second target data from the designated first physical channel based on the above-mentioned data transmission relationship.

[0100] Assume that data needs to be transmitted between a target industrial computer and a first physical channel connected to an I / O control module, and the target industrial computer is recorded as device A and the I / O control module is recorded as device B.

[0101] For example, the address space of each device is preset in the memory of each device (including the above-mentioned target industrial computer and I / O control module). When device A runs the test simulation model and wants to transfer the target data that needs to be shared to device B, it can write the target data to the corresponding address space in the memory of device B. Device B can periodically obtain data from its own corresponding address space in the memory. At this time, if device B wants to distribute the obtained data to the first physical channel, under one scheme, device A can write the identifier of the first physical channel in the shared target data, and device B allocates it according to the identifier contained in the obtained data; under another scheme, different first physical channels of device B can be assigned different address subspaces. Device A can instruct to write the target data to the corresponding address subspace when sharing the target data, and device B only needs to read it from the address subspace and give it to the corresponding first physical channel.

[0102] When device A obtains target data from device B, it can also directly obtain data from the corresponding address space or address subspace of device B based on the data transmission relationship, and then give it to the corresponding port of the corresponding model according to the data transmission relationship; the model mentioned here can refer to the test simulation model running in device A. Or,

[0103] When device A obtains target data from device B, device B can also write the target data to the corresponding address space of device A. Device A can periodically obtain the target data from its corresponding address space in the memory. At this time, if the target data is to be given to the corresponding model and its port; under one solution, device B can write the identifier of the first physical channel in the shared target data. Based on this identifier and the data transmission relationship, device A knows which port of which test simulation model the data from the first physical channel should be given to.

[0104] In another example, the data transmission relationship of the first test task is sent to one or more I / O control modules connected to the L first physical channels respectively. When each target industrial computer needs to send downlink information to the device under test when running the test simulation model, the downlink information is directly sent to the I / O control module, and the I / O control module sends each downlink information to the device under test through the designated first physical channel based on the data transmission relationship. Similarly, when the device under test needs to send reporting information to the designated test simulation model running in the target industrial computer, the I / O control module receives the reporting information through the L first physical channels, and the I / O control module sends the reporting information from each target industrial computer to the designated test simulation model running in the target industrial computer based on the above data transmission relationship.

[0105] For example, in the process of executing the first test task, K target industrial computers and L first physical channels are used to test the device under test, and the L first physical channels are connected to the device under test; the data transmission relationship defines the flow direction of the target data between the test simulation models run by the K target industrial computers and the L first physical channels, that is, after the reporting information from the device under test or the first physical channel that needs to be sent to the specified test simulation model run by the target industrial computer is transmitted to the first physical channel, each first physical channel sends the reporting information to the I / O control module, and the data transmission relationship determines that the I / O control module sends the reporting information from each first physical channel to the test simulation model (or its port) of the target industrial computer; and after the downlink information generated by the target industrial computer running the test simulation model is transmitted to the I / O control module 13, the data transmission relationship determines that the I / O control module 13 sends the downlink information from each test simulation model to the device under test or the first physical channel, wherein the device under test can receive different information through different pins. Among them, when the target industrial computer transmits the downlink information to the I / O control module, the identifier of the test simulation model that generates the downlink information or the identity identifier of the first physical channel that receives the data can be added to the downlink information; when the first physical channel transmits the reporting information to the I / O control module, the identifier of its own or the identity identifier of the test simulation model that receives the reporting information can be added to the reporting information; thereby, the I / O control module can forward data between the target industrial computer and the first physical channel.

[0106] It can be seen that the I / O control module can be used to realize the selectability of the interaction path between the test simulation model running in the target industrial computer and the first physical channel.

[0107] It should be noted that Figure 3 The number of I / O control modules is used as an example, but it is not limited to this. The number of I / O control modules can also be multiple, each I / O control module corresponds to one or more physical channels, each physical channel corresponds to only one I / O control module, and each I / O control module is connected to the corresponding physical channel; for the first test task, each I / O control module can obtain the data transmission relationship corresponding to itself. Taking any I / O control module as an example, the data transmission relationship determined by the I / O control module defines the data transmission relationship between the test simulation model run by at least part of the target industrial computer and all the first physical channels corresponding to it, that is, the I / O control module determines which test simulation model the data transmitted from each first physical channel should be synchronized to, and which physical channel the data transmitted from the test simulation model should be synchronized to. Among them, each I / O control module and the corresponding physical channels can be connected in a cascade manner, or each I / O control module is directly connected to the corresponding physical channels respectively.

[0108] In this embodiment, each physical channel is directly or indirectly connected to the device under test, and the number of the device under test can be one or more. Figure 3 In the example, the direct connection between the physical channel and the DUT is taken as an example, that is, the DUT is directly connected to the port of each physical channel through a connector to realize signal transmission; different physical channels can be connected to different pins of the DUT to transmit different information. In another example, a switching matrix can also be set in the HIL system, and the switching matrix is ​​connected between the physical channel and the DUT, that is, each physical channel is indirectly connected to the corresponding DUT through the switching matrix. Among them, all physical channels can be set to be connected to the DUT through the same switching matrix, or all physical channels connected to the same I / O control module can be set to be connected to the DUT through the same switching matrix.

[0109] It can be seen that in order to achieve the corresponding communication between the industrial computer, I / O control module, physical channel, and the device under test, and to achieve the transmission of the target data, when a switching matrix is ​​provided, it is necessary to configure the switching matrix and the data transmission relationship of the I / O control module. Then the data transmission required for the test is realized between the industrial computer and the device under test, such as the data transmission between the port of the simulation model in the industrial computer and the port of the device under test. In this way, the connection method of the device under test is more flexible and free when it is connected. It only needs to configure the switching matrix according to the actual access situation. For example, after the I / O control module is configured, if the switching matrix is ​​not set, it is necessary to find out which I / O control modules the device under test should be connected to and how to connect them according to the configuration results. When the switching matrix is ​​set, the device under test can be connected to the switching matrix more freely, and then the data transmission required for the test can be achieved by simply configuring the switching matrix.

[0110] In one example, the cluster control module, the industrial computer and the I / O control module are connected via Ethernet communication, that is, the computer where the cluster control module is located, the industrial computer and the computer where the I / O control module is located are connected via Ethernet communication, which can meet the communication needs of the three parties. For example, the cluster control module can send the above-mentioned data transmission relationship to the second target industrial computer and / or I / O control module via Ethernet. In addition, the industrial computer and the I / O control module can also communicate in a way other than Ethernet (such as reflective memory, or other means) to achieve data sharing, and this communication method can be selected from the communication method of Ethernet, or can coexist.

[0111] The third embodiment of the present invention relates to a computing processing end, which is configured with at least one computing resource such as a CPU and a memory. The computing processing end is applied in a HIL test system. The computing processing end includes: an industrial computer, which is configured with computing resources such as a CPU and a memory. The computing processing end is used to execute the test method in the first or second embodiment.

[0112] A fourth embodiment of the present invention relates to a test system, which is a HIL test system. The HIL system comprises: the computing processing end in the third embodiment, and a plurality of physical channels, the computing processing end is connected to the plurality of physical communication connections, and the physical channels are directly or indirectly connected to a device under test;

[0113] The physical channel is used to exchange data between the computing processing end and the device under test.

[0114] A fifth embodiment of the present invention relates to a readable storage medium storing a computer program, and the computer program implements the above-mentioned test method when it is executed.

[0115] Preferred embodiments of the present invention have been described above in detail, but it should be understood that aspects of the embodiments can be modified, if necessary, to employ aspects, features and concepts of the various patents, applications and publications to provide further embodiments.

[0116] These and other changes can be made to the embodiments in light of the above detailed description.In general, in the claims, the terms used should not be considered limited to the specific embodiments disclosed in the specification and the claims, but should be construed to include all possible embodiments along with the full scope of equivalents to which these claims are entitled.

Claims

1. A testing method, characterized in that: Applied to a computing processing end configured with computing resources in a HIL system, the HIL system further comprising a plurality of physical channels for directly or indirectly connecting to a device under test; The testing method comprises: The computing processing end receives a plurality of test tasks to be executed; At least part of the time, the computing processing end simultaneously executes a plurality of testing tasks to test different devices under test through the corresponding physical channels.

2. The testing method according to claim 1, characterized in that: Among the multiple test tasks simultaneously executed by the computing processing end, at least two of the test tasks are test tasks of different users.

3. The testing method according to claim 1, characterized in that: The multiple test tasks include a target test task and other test tasks received by the computing processing end during the execution of the target test task; The computing and processing end executes multiple test tasks simultaneously to test different DUTs through corresponding physical channels, including: The computing and processing end uses different test processes to execute different test tasks, so as to test different devices under test through corresponding physical channels.

4. The testing method according to claim 1, characterized in that: The multiple test tasks include a first test task, and the task data of the first test task includes: data describing the relationship between the test simulation model and the data transmission; the data transmission relationship includes: a first data transmission relationship between the first physical channel configured for the first test task and / or the first functional channel corresponding to the first physical channel and the test simulation model; The computing and processing end executes multiple test tasks simultaneously to test the same or different DUTs through corresponding physical channels, including: The computing processing end runs the test simulation model and exchanges target data with the first physical channel to test the device under test through the first physical channel. The target data includes first target data generated by the test simulation model and / or second target data that needs to be fed back to the test simulation model.

5. The testing method according to claim 4, characterized in that: The data transmission relationship also includes: a second data transmission relationship between a plurality of test simulation models; The computing and processing end executes multiple test tasks simultaneously to test the same or different DUTs through corresponding physical channels, and also includes: Based on the second data transmission relationship, data is exchanged between the multiple test simulation models.

6. The testing method according to claim 3, characterized in that: Each of the test tasks has a corresponding test container; the method further includes: Create a namespace corresponding to each of the test containers; The computing processing end uses different test processes to perform different test tasks, including: The computing processing end uses different test processes to call test containers in different namespaces to execute different test tasks.

7. The testing method according to claim 3, characterized in that: Each of the test tasks has a corresponding test container; the namespace of each of the test containers defines resource information for executing the test task corresponding to the test container, the resource information including: computing resource information and channel resource information; Each of the test processes uses the computing resources and physical channels of the computing processing end based on the resource information defined in the namespace.

8. A computing processing terminal, characterized in that: The computing processing end is configured with computing resources, and the computing processing end is used to execute the testing method according to any one of claims 1 to 7.

9. A testing system, characterized in that: The test system is a HIL system, comprising: the computing processing end as claimed in claim 8, and a plurality of physical channels, the physical channels being directly or indirectly connected to the device under test; The physical channel is used to exchange data between the computing and processing end and the device under test.

10. A readable storage medium, characterized in that: A computer program is stored, and when the computer program is executed, the test method according to any one of claims 1 to 7 is implemented.