Test method and system, equipment and readable storage medium

By dynamically configuring the CPU and I/O units in the HIL test system, flexibly configuring and releasing resources according to the test requirements, the problems of low testing efficiency and insufficient resource utilization in the existing technology are solved, and efficient testing resource management is achieved.

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

Patent Information

Application Number
CN202410958364.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2023-03-06
Filing Date
2023-03-17
Publication Date
2024-11-08

AI Technical Summary

Technical Problem

The existing HIL testing system needs to build different systems under different testing needs, resulting in low testing efficiency and insufficient resource utilization, so that the industrial control machine and I/O unit cannot be flexibly configured.

Method used

By dynamically configuring idle state CPU and I/O units according to the requirements information of the test task, performing test tasks, and releasing resources after the task is completed, so as to achieve flexible configuration and efficient utilization of resources.

Benefits of technology

Improve testing efficiency, ensure full utilization of resources, and avoid the impact of resource occupation on other testing tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118915689A_ABST
    Figure CN118915689A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a testing method and system, equipment and a readable storage medium, and relates to the technical field of testing. The test method comprises the following steps: determining test demand information of a first test task to be executed currently, wherein the test demand information is at least used for determining quantity information of CPUs and quantity information of I / O units required for executing the corresponding test task; selecting N1 CPUs from the CPUs in the idle state at present and selecting N2 I / O units from the I / O units in the idle state at present on the basis of the test demand information of the first test task, and executing the first test task by using the N1 CPUs and the N2 I / O units to test the first tested piece, so that the first tested piece interacts with the N1 CPUs through the N2 I / O units; after the first test task is executed, the N1 CPUs and the N2 I / O units executing the first test task are released, so that the released CPUs and the released I / O units enter the idle state again. According to the invention, the resources of the industrial personal computer and the I / O unit in the test system are fully utilized.
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, equipment 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 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 industrial computer (i.e., real-time machine, 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. For different test requirements (such as different users, different controllers, etc.), different HIL systems are often required to be built, wired and assembled; such a test method has problems such as low test efficiency. 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 test method and system, equipment and readable storage medium, in which the number of industrial computers and I / O units contained in the HIL system is no longer limited to the needs of a single test. On this basis, the CPU and I / O units of the industrial computer that executes the test task can be configured based on the test requirement information of the test task, and the corresponding CPU and I / O units are determined to be idle after the test to avoid occupying them and affecting the development of other test tasks. Therefore, on the basis of completing the test task, the resources of the industrial computer and I / O units in the test system can be fully utilized, flexible configuration is achieved, and test efficiency is improved.

[0006] To achieve the above-mentioned object, the present invention provides a testing method, which is applied to a preset device in a HIL system, wherein the HIL system further comprises a plurality of industrial computers equipped with CPUs and a plurality of I / O units for directly or indirectly connecting to a device under test; the testing method comprises: determining test requirement information of a first test task to be executed, wherein the test requirement information is at least used to characterize the number information of the CPUs and the number information of the I / O units required to execute the corresponding test task; based on the test requirement information of the first test task, selecting N1 CPUs, N2 I / O units are selected from the I / O units that are currently in an idle state, and the N1 CPUs and the N2 I / O units are used to execute the first test task to test the first device under test, so that the first device under test interacts with the N1 CPUs through the N2 I / O units; N1 and N2 are both arbitrary integers greater than or equal to 1; after the first test task is completed, the N1 CPUs and the N2 I / O units that execute the first test task are released, so that the released CPUs and the I / O units re-enter the idle state.

[0007] The present invention also provides a device used for the above-mentioned testing method.

[0008] The present invention also provides a test system, comprising the above-mentioned device, an industrial computer pool and an I / O pool; the industrial computer pool includes at least one industrial computer, and the I / O pool includes at least one I / O unit; the I / O unit is used to directly or indirectly connect to the device under test.

[0009] 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.

[0010] In one embodiment, the HIL system also includes: an I / O control module connected to the preset device; before using the N1 CPUs and the N2 I / O units to execute the first test task to test the first device under test, it also includes: determining the data transmission relationship between the target industrial computer including the N1 CPUs and the N2 I / O units; using the N1 CPUs and the N2 I / O units to execute the first test task to test the first device under test, including: sending task information of the first test task to each of the target industrial computers, so that each of the target industrial computers generates the sending information to be sent to the first device under test and / or the selected I / O unit based on the task information, and the I / O control module transmits the target data between the target industrial computer and the N2 I / O units based on the data transmission relationship, and performs the test corresponding to the first test task on the first device under test.

[0011] In one embodiment, based on the test requirement information, selecting N1 CPUs from the CPUs currently in an idle state, selecting N2 I / O units from the I / O units currently in an idle state, and using the N1 CPUs and the N2 I / O units to execute the first test task to test the first device under test, includes: based on the test requirement information, selecting N1 CPUs from the CPUs currently in an idle state, selecting N2 I / O units from the I / O units currently in an idle state, obtaining a target industrial computer and the I / O unit corresponding to a test container corresponding to the first test task, wherein the target industrial computer includes at least one selected CPU; using the target industrial computer and the I / O unit corresponding to the test container to execute the first test task to test the first device under test; and releasing the N1 CPUs and the N2 I / O units that execute the first test task includes: releasing the target industrial computer and the I / O unit corresponding to the test container.

[0012] In one embodiment, determining the test requirement information of the first test task currently to be executed includes: determining the number information of CPUs required to execute the first test task and the number information of the I / O units according to the task information of the first test task to obtain the test requirement information; the task information includes at least one of the following or any combination: test cases, test simulation models, and test parameters.

[0013] In one embodiment, determining the test requirement information of the first test task currently to be executed includes: obtaining the number N1 of CPUs and the number N2 of I / O units required to execute the first test task from the setting parameters of the first test task received, and the setting parameters include: user-specified CPU number information, and I / O unit number information.

[0014] In one embodiment, the I / O unit and the first device under test are communicatively connected via a switching matrix, the switching matrix comprising: at least one first port and at least one second port; each of the first ports is respectively connected to each of the I / O units, and each of the second ports is respectively connected to each of the first devices under test; after selecting N2 I / O units from the I / O units currently in an idle state, the method further comprises: configuring the first ports in the switching matrix connected to the selected N2 I / O units to form a connection channel with the second ports connected to the first device under test, and establishing a communication connection between the N2 I / O units and the first device under test.

[0015] In one embodiment, the testing method further includes: before the first testing task is completed, using N3 CPUs among the CPUs of the multiple industrial computers and N4 I / O units among the multiple I / O units, executing another second testing task to test another second device under test, so that the second device under test interacts with the N3 CPUs through the N4 I / O units; N3 and N4 are both arbitrary integers greater than or equal to 1; wherein the N3 CPUs and the N1 CPU are different CPUs among the CPUs of the multiple industrial computers, and the N2 I / O units and the N4 I / O units are different I / O units among the multiple I / O units; and / or: releasing the CPUs executing the first testing task. After the N1 CPUs and the N2 I / O units, based on the test requirement information of another third test task, select N5 CPUs from the CPUs that are currently in an idle state, select N6 I / O units from the I / O units that are currently in an idle state, and use the N5 CPUs and the N6 I / O units to execute the third test task to test the third device under test, so that the third device under test interacts with the N5 CPUs through the N6 I / O units; N5 and N6 are both arbitrary integers greater than or equal to 1; wherein the N5 CPUs have overlapping CPUs with the N1 CPUs, and / or: the N2 I / O units have overlapping I / O units with the N6 I / O units. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 is a block diagram of a HIL system applied by the testing method in the first embodiment of the present invention;

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

[0018] Figure 3 is a specific flow chart of the testing method according to the second embodiment of the present invention;

[0019] Figure 4 is a block diagram of a HIL system applied by the test method in the first embodiment of the present invention, wherein there are multiple I / O control modules, and each I / O control module is connected to a corresponding I / O unit in a cascade manner;

[0020] Figure 5 is a block diagram of a HIL system applied by the test method in the first embodiment of the present invention, wherein there are multiple I / O control modules, and each I / O control module is directly connected to corresponding I / O units;

[0021] Figure 6is a specific flow chart of the testing method according to the third embodiment of the present invention, wherein the test requirement information is determined according to the task information of the test task;

[0022] Figure 7 is a specific flow chart of the test method in the third embodiment of the present invention, wherein the test requirement information is obtained from the setting parameters of the received test task;

[0023] Figure 8 is a specific flow chart of the testing method according to the fourth embodiment of the present invention;

[0024] Fig. 9 is a block diagram of a HIL system used in a testing method according to a fifth embodiment of the present invention;

[0025] Fig.10 is a specific flow chart of the testing method in the fifth embodiment of the present invention. DETAILED DESCRIPTION

[0026] 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.

[0027] 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.

[0028] 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."

[0029] 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.

[0030] 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.

[0031] 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.

[0032] The first embodiment of the present invention relates to a testing method, which is applied to a device preset in a HIL hardware-in-the-loop testing system. The HIL system can be used to test ECUs, domain controllers and other DUTs in vehicles (including but not limited to new energy vehicles, fuel vehicles, etc.). Common DUTs for 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.

[0033] Please refer to Figure 1 The HIL system includes: an industrial computer pool 1, an I / O control module 2, an I / O pool 3 and a cluster control module 4. The industrial computer pool 1 and the I / O pool 3 can be arranged in the same cabinet or in different cabinets. Specifically, the industrial computer pool 1 can include at least one industrial computer 11, the number of which can be fixed or expandable, and the industrial computers 11 in the industrial computer pool 1 can be arranged in the same cabinet or in different cabinets. The I / O pool 3 can include at least one I / O unit 31, the number of which can be fixed or expandable, and the I / O units 31 in the I / O pool 3 can be arranged in the same cabinet or in different cabinets.

[0034] In one example, the industrial computer pool 1 includes a configurable number of at least one industrial computer 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 interconnected for communication, and each industrial computer 11 includes one CPU or multiple CPUs. The I / O pool 3 includes a configurable number of at least one I / O unit 31, that is, the number of I / O units 31 in the I / O pool 3 is expandable, and the number can be configured according to demand, site, cost, etc. Among them, the I / O units 31 in the I / O pool 3 are interconnected for communication.

[0035] The I / O control module 2 is connected in communication with the industrial computer 11 in the industrial computer pool 1, and the I / O control module 2 is also connected in communication with multiple I / O units 31 in the I / O pool 3. For example, the control module 4 is connected to each I / O unit 31 as the same EtherCAT network, wherein the I / O unit 31 is connected to the control module 4 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 31 can also be plugged into the control module 4, for example, the I / O unit 31 is connected to the control module 4 via the data bus (such as PCIe bus) of the control module 4. Among them, the I / O control module 2 can be a computer including an I / O controller.

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

[0037] In this embodiment, each I / O unit 31 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 1 In the example, the direct connection between the I / O unit 31 and the device under test 5 is taken as an example, that is, the device under test 5 is directly connected to the port of each I / O unit 31 through a connector to realize signal transmission; each I / O unit 31 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.

[0038] The industrial computer 11 can be understood as part or all of the real-time simulator RTPC in the HIL system.

[0039] The I / O unit 31 can be understood as an input / output unit.

[0040] Specifically, it can be understood that: the I / O unit 31 satisfies: being able to input and / or output data relative to the device under test 5, and / or: being able to input and / or output data relative to the industrial computer;

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

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

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

[0044] 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 31 to generate a certain Sign1 signal and the Sign1 signal. For another example, the I / O unit 31 needs to obtain a certain conditional signal from the industrial computer 11 to simulate the Sign2 signal to be sent to the device under test. In this case, the conditional signal and the Sign2 signal are respectively data A and data B.

[0045] The I / O unit 31 may refer to a circuit, a circuit board, or a device including a circuit board and other assemblies.

[0046] In one example, the I / O unit 31 can interact with the industrial computer 11 via the I / O control module 2, and can also interact with the device under test 5 (such as a vehicle controller) directly or via a switching matrix. The interaction can be unidirectional or bidirectional.

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

[0048] The I / O unit 31 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. The acquisition and output of high-speed signals can be further realized. In addition, the flexible configuration of board resources can be realized according to the needs. The board accuracy and sampling frequency indicators brought by this technology have reached the industry-leading level.

[0049] 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.

[0050] 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.

[0051] In this embodiment, the I / O control module 2 is used to transmit target data between the K industrial computers 11 in the industrial computer pool 1 and the L I / O units 31 in the I / O pool 3; K and L are both arbitrary integers greater than or equal to 1.

[0052] In a specific example, corresponding to the above I / O board, the target data may include at least one of the following: the downlink information generated by the industrial computer 11 to be sent to the device under test 5; and the uplink information from the device under test 5 to be sent to the industrial computer.

[0053] Furthermore, based on the diversity of I / O board functions, the target data may also include at least one of the following: downlink information generated by the industrial computer 11 that needs to be sent to the I / O unit 31 for processing; and uplink information generated by the I / O unit 31 that needs to be sent to the industrial computer 11.

[0054] It should be noted that the preset device in the HIL system applied to the test method in this embodiment is the above-mentioned cluster control module 4. This embodiment and subsequent embodiments all take the example of setting up a single device in the HIL system as the cluster control module 4. However, it is not limited to this. Any industrial computer 11 can also be configured as a preset device to execute the test method, that is, any industrial computer 11 can be configured as a cluster control module to execute the test method, so there is no need to set up a single device as a cluster control module.

[0055] Combine the following Figure 1 The HIL system in the present embodiment is used to illustrate the test method. The specific process of the test method is as follows: Figure 2 shown.

[0056] Step 101, determine the test requirement information of the first test task to be executed, the test requirement information is at least used to characterize the number information of CPUs required to execute the first test task, and the number information of I / O units. Specifically, the host computer 6 can generate a test task based on the user's configuration, and send the task information of the generated test task to the cluster control module 4. When the cluster control module 4 receives the first test task to be executed, it first determines the test requirement information of the first test task, and the test requirement information is at least used to characterize the number information of CPUs required to execute the first test task, and the number information of I / O units 31. Among them, the quantity information is a quantity value or a quantity range; in addition, the test requirement information can also include the memory required for the test, the occupied space of the storage device, etc., that is, the selection of the CPU and I / O unit 31 also needs to consider whether the occupied space of the memory and storage device that can be used meets the test requirements.

[0057] In a specific example, the test requirement information can also be used to characterize information such as the quantity and / or type of required memory, GPU, bus interface, sensor interface, simulation board, etc.

[0058] In another specific example, the test requirement information can also be used to characterize various information such as various parameters of the CPU, GPU, memory, etc., model, brand, attributes, etc.

[0059] In one example, after determining the test requirement information of the first test task, the cluster control module 4 is equivalent to determining the test container for executing the first test task. The test container at least represents the number information of CPUs required to execute the first test task, and the number information of I / O units 31, and can also represent other contents of the test requirement information mentioned above.

[0060] Step 102, based on the test requirement information, select N1 CPUs from the CPUs that are currently in an idle state, select N2 I / O units from the I / O units that are currently in an idle state, and use the N1 CPUs and the N2 I / O units to execute the first test task to test the first device under test, so that the first device under test interacts with the N1 CPUs through the N2 I / O units; N1 and N2 are both arbitrary integers greater than or equal to 1.

[0061] Specifically, taking the selection of N CPUs from the CPUs currently in an idle state as an example, the cluster control module 4 can read the number information of CPUs required to execute the first test task from the test requirement information of the first test task. If the number information is a quantity value, then the CPUs of the quantity value can be directly selected from the CPUs in the idle state, or N CPUs greater than the quantity value can be selected from the CPUs in the idle state; if the quantity information is a quantity range, the number of CPUs in the idle state can be obtained first. If the number of CPUs in the idle state is greater than or equal to the lower limit value of the quantity range value, then a quantity value can be selected within the quantity range, and the selected quantity value is less than or equal to the number of CPUs in the idle state, and then the CPUs of the quantity value are selected from the CPUs in the idle state; for example, on the premise of ensuring that the quantity value selected from the quantity range is less than or equal to the number of CPUs in the idle state, the largest quantity value is preferentially selected, thereby enabling a larger number of CPUs to execute the first test task, providing a certain redundant processing capability.

[0062] The specific method of selecting N2 I / O units 31 from the I / O units 31 that are currently in an idle state is similar to the aforementioned method of selecting the CPU, which will not be repeated here.

[0063] In an example, when selecting N CPUs from the CPUs that are currently in an idle state, the CPU can be selected from an industrial computer 11 first. After there is no idle CPU in the single industrial computer 11, if N1 CPUs have not been selected, the CPU can be selected from the next industrial computer 11 until N1 CPUs are selected.

[0064] In addition, if the test requirement information can also include the memory and storage space required for the test, then when selecting the CPU and I / O unit 31, you can also refer to the memory and storage space required for the test, that is, you need to ensure that the selected CPU and I / O unit 31 meet the requirements of memory and storage space.

[0065] The idle state referred to in this embodiment means that there is no first test task currently being executed or to be executed. In addition, the cluster control module 4 will also determine the newly expanded industrial computer 11 in the industrial computer pool 1 and the newly expanded I / O unit 31 in the I / O pool 3 as being in an idle state.

[0066] After the cluster control module 4 determines the N1 CPUs and N2 I / O units 31 required to execute the first test task, the target industrial computer is the industrial computer 11 that contains one less CPU among the selected N1 CPUs, thereby being able to determine the target industrial computer and I / O unit 31 corresponding to the test container of the first test task.

[0067] Subsequently, the cluster control module 4 can use the target industrial computer and the I / O unit 31 corresponding to the test container to execute the first test task to test the first device under test, so that the first device under test can interact with N1 CPUs through N2 I / O units 31 .

[0068] It should be noted that each test task can test one or more DUTs of the same type. The first DUT tested by the first test task is Figure 1 Among the tested devices 5, the number of the first tested devices can be one or more.

[0069] Step 103, after the first test task is executed, the N1 CPUs and N2 I / O units executing the first test task are released, so that the released CPUs and I / O units enter the idle state again.

[0070] Specifically, after the test completion conditions are met (such as the set test time or the set number of cycles, etc.), the cluster control module 4 stops the execution of the first test task. After the first test task is completed, the cluster control module 4 releases the selected CPU and I / O unit 31 in each target industrial computer corresponding to the test container that executes the first test task. The released CPU and I / O unit 31 re-enter the idle state and can be used to execute other test tasks later.

[0071] In this embodiment, the CPU and I / O units of the industrial computer that executes the test task can be configured based on the test requirement information of the test task, and the corresponding CPU and I / O units can be determined to be in an idle state after the test to avoid occupying them and affecting the implementation of other test tasks. This allows full utilization of the resources of the industrial computer and I / O units in the test system on the basis of completing the test task, thereby achieving flexible configuration and improving test efficiency.

[0072] The second embodiment of the present invention relates to a testing method. Compared with the first embodiment, the main improvement of this embodiment is that: this embodiment provides a specific implementation method of using N1 CPUs and N2 I / O units to execute a first test task to test a first device under test.

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

[0074] Step 201, determine the test requirement information of the first test task to be executed, the test requirement information is used to characterize at least the number of CPUs and the number of I / O units required to execute the first test task. Similar to step 101 in the first embodiment, it will not be repeated here.

[0075] Step 202 includes the following sub-steps:

[0076] Sub-step 2021, based on the test requirement information, select N1 CPUs from the CPUs that are currently in an idle state, and select N2 I / O units from the I / O units that are currently in an idle state.

[0077] Sub-step 2022, determining the data transmission relationship between the target industrial computer including N1 CPUs and N2 I / O units.

[0078] Sub-step 2023, sends the task information of the first test task to each target industrial computer, so that each target industrial computer generates the downlink information to be sent to the first device under test or the selected I / O unit based on the task information, and the I / O control module transmits the target data between the target industrial computer and N2 I / O units based on the data transmission relationship, and performs the test corresponding to the first test task on the first device under test.

[0079] The feedback of the data transmission relationship in sub-step 2022 may be to directly send the data transmission relationship to the I / O control module, or to send the identifier of the data transmission relationship to the I / O control module.

[0080] Specifically, the process in which the cluster control module 4 selects N1 CPUs and N2 I / O units 31 is similar to that in the first embodiment, and will not be described in detail herein.

[0081] The data transmission relationship therein can be understood as: at least it can indicate: a relationship between one or more industrial computers 11 (i.e. at least some of the industrial computers 11) and one or more I / O units 31 (i.e. at least some of the I / O units 31) that allows data transmission, that is, at least the scope of the industrial computers 11 and I / O units 31 that allow data transmission can be determined.

[0082] In one example, the data transmission relationship can further determine to which I / O unit 31 the data transmitted from the industrial computer 11 should be synchronized, and to which industrial computer 11 the data transmitted from the I / O unit 31 should be synchronized, that is, the mapping relationship between the industrial computer 11 and the I / O unit 31 is defined in detail, and further, the mapping relationship between the port in the industrial computer 11 and the port of the I / O unit 31 can also be defined in detail; then, the I / O control module 2 can transmit the transmitted data based on this mapping relationship; further, when the mapping relationship is described, it can also indicate the industrial computer 11 and the I / O unit 31 that allow data transmission;

[0083] In another example, the data transmission relationship is mainly used to define the range of industrial computers 11 and I / O units 31 that are allowed to transmit data. As for which I / O unit 31, device under test 5, and port (port of I / O unit or device under test) the industrial computer 11 should transmit to each time data is transmitted, and which industrial computer 11 or port in the industrial computer 11 should the data transmitted from the I / O unit 31 be transmitted to, other means can be used to assist in determining. For example, a corresponding identifier can be carried during the transmission process, and the I / O control module 2 can determine whether the data transmission relationship is satisfied based on the carried identifier, and only if it is satisfied, the transmission is performed.

[0084] In addition, if there are multiple I / O control modules 2, and different I / O control modules 2 are connected to different I / O units 31, then in one example, the data transmission relationship obtained and used by the I / O control module 2 can be a partial data transmission relationship, that is, a secondary data transmission relationship corresponding to the I / O unit 31 connected to the I / O control module 2, and further, the secondary data transmission relationship can be understood as: at least used to determine the range of the industrial computer 11 and the I / O unit 31 that are allowed to transmit data in the industrial computer 11 and the I / O unit 31 connected to the I / O control module 2. In a further example, the mapped ports can be determined in the industrial computer 2 and the I / O unit 31 connected to the I / O control module 2.

[0085] The data transmission relationships received by different I / O control modules 2 can be partial data transmission relationships, that is, secondary data transmission relationships, and they are different secondary data transmission relationships. Of course, all data transmission relationships can also be sent to all I / O control modules 2, that is: the data transmission relationships received by different I / O control modules 2 can also be the same.

[0086] The ports involved may refer to hardware ports, software ports, port addresses, etc. (for example, an output port or input port of a model running in an industrial computer).

[0087] The I / O control module 2 may obtain part or all of the data transmission relationship, or other information used to determine the data transmission relationship, from the cluster control module 4 . This process may be obtained, for example, via Ethernet.

[0088] In addition, at the same time, the I / O units 31 connected to a single I / O control module 2 may all be used for the same test task, or may be partially used for one test task and partially used for other test tasks. The I / O control modules can obtain the required data transmission relationship separately or together.

[0089] In a specific example, after determining the N1 CPUs and N2 I / O units 31 required to execute the first test task, the cluster control module 4 can determine the target industrial computer and the I / O unit 31 corresponding to the test container of the first test task. Subsequently, the cluster control module 4 can determine the data transmission relationship between the target industrial computer and the N2 I / O units, and determine the data transmission relationship between the selected CPU in the target industrial computer corresponding to the test container and the N2 I / O units 31. For example, the data transmission relationship defines the flow direction of the target data between the target industrial computer and the I / O unit 31, that is, the data from the first device under test or the I / O unit 31 to be sent to the target industrial computer. After the reporting information is transmitted to the I / O unit 31, each I / O unit 31 sends the reporting information to the I / O control module 2. The data transmission relationship determines the target industrial computer (or its port) to which the I / O control module 2 needs to send the reporting information of each I / O unit 31; and after the downlink information generated by the target industrial computer to be sent to the first device under test or the I / O unit 31 is transmitted to the I / O control module 2, the data transmission relationship determines that the I / O control module 2 sends the downlink information originating from each target industrial computer to the first device under test or the I / O unit 31 by the corresponding I / O unit 31, wherein the first device under test can receive different information through different pins.

[0090] In a specific example, when testing the first device under test, the N1 CPUs selected in the target industrial computer can respectively perform a complete test on the first device under test, or the N1 CPUs selected in the target industrial computer can cooperate to implement the test of the first device under test. Each test part can be implemented by one or more selected CPUs in at least one target industrial computer. For example, taking the industrial computer as a unit, the selected CPUs in each target industrial computer jointly run a corresponding test simulation model; each target industrial computer can receive reporting information from the first device under test or the I / O unit 31; and / or, test signals generated by other target industrial computers when running the corresponding test simulation model, and generate test signals to be sent to other target industrial computers and / or downlink information to be sent to the first device under test or the I / O unit 31.

[0091] In a specific example, the cluster control module 4 uses the N1 CPUs and N2 I / O units 31 selected from the target industrial computer corresponding to the test container to execute the first test task to test the first device under test. During the test, each industrial computer 11 uses the selected CPUs contained therein to execute the corresponding test part. The CPUs used for testing in each target industrial computer can generate the downlink information to be sent to the first device under test, and send the downlink information to the I / O control module 2. The I / O control module 2 sends the downlink information of each CPU to the first device under test through the designated I / O unit 31 based on the data transmission relationship. During the test, the first device under test can generate the reporting information to be sent to the target industrial computer. The I / O control module 2 receives the reporting information through the N2 I / O units 31. The I / O control module 2 sends the reporting information from each I / O unit 31 to the CPU of the designated target industrial computer based on the above-mentioned data transmission relationship. In particular, during the test, only the selected CPU in each target industrial computer participates in the execution of the first test task.

[0092] In one example, the cluster control module 4, the target industrial computer and the I / O control module 2 are connected through Ethernet communication, that is, the computer where the cluster control module 4 is located, the target industrial computer and the computer where the I / O control module 2 is located are connected through Ethernet communication, which can meet the communication needs of the three parties. For example, the cluster control module 4 can send the above-mentioned data transmission relationship to the target industrial computer and / or I / O control module 2 through Ethernet. In addition, the industrial computer and the I / O control module 2 can also communicate through a method 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.

[0093] It should be noted that, in the embodiment and the following embodiments, the number of I / O control modules 2 is taken as an example, but it is not limited thereto. The number of I / O control modules 2 can also be multiple, each I / O control module 2 corresponds to one or more I / O units 31, each I / O unit 31 corresponds to only one I / O control module 2, and each I / O control module 2 is connected to the corresponding I / O unit 31. Among them, each I / O control module 2 and the corresponding I / O unit 31 can be connected in a cascade manner, such as Figure 4 As shown, each I / O control module 2 corresponds to three I / O units 31 as an example; or each I / O control module 2 is directly connected to each corresponding I / O unit 31, such as Figure 5 As shown, it is taken as an example that each I / O control module 2 corresponds to a plurality of I / O units 31 .

[0094] For the current first test task, if the N2 I / O units selected by the cluster control module 4 correspond to multiple I / O control modules 2, that is, in the process of executing the first test task to test the first device under test, multiple I / O control modules 2 complete the data interaction between N1 CPUs and N2 I / O units 31. At this time, each I / O control module 2 has a secondary data transmission relationship corresponding to itself. The specific determination methods of the secondary data transmission relationship corresponding to each I / O control module 2 are, for example (but not limited to), the following two:

[0095] First, the cluster control module 4 presets the correspondence between the I / O control module 2 and the I / O unit 31. After selecting N1 CPUs and N2 I / O units 31 and determining the data transmission relationship between the target industrial computer and the N2 I / O units, that is, determining the data transmission relationship between the target industrial computer corresponding to the test container and the N2 I / O units 31, the cluster control module 4 determines that the selected N2 I / O units 31 correspond to multiple I / O control modules 2 based on the correspondence between the I / O control module 2 and the I / O unit 31. Taking any one of the multiple I / O control modules 2 as an example, for all the target I / O units (which may be one or more) corresponding to the I / O control module 2 in the N2 I / O units 31, based on the data transmission relationship between the target industrial computer to which the N1 CPUs belong and the N2 I / O units 31, at least one target CPU having data transmission with the target I / O unit is selected from the N1 CPUs, and then a secondary data transmission relationship is established between the target industrial computer to which the target CPU belongs and the target I / O unit, and the secondary data transmission relationship is the data transmission relationship corresponding to the I / O control module 2. Based on the above process, the cluster control module 4 can determine the secondary data transmission relationship corresponding to each of the multiple I / O control modules 2, and send each secondary data transmission relationship to the corresponding I / O control modules 2, so that during the test process, each I / O control module 2 can perform data transmission between the CPU and the corresponding target I / O unit based on the corresponding secondary data transmission relationship.

[0096] Second, after the cluster control module 4 selects N1 CPUs and N2 I / O units 31 and determines the data transmission relationship between the target industrial computer and the N2 I / O units, that is, after determining the data transmission relationship between the target industrial computer corresponding to the test container and the N2 I / O units 31, it is determined that the selected N2 I / O units 31 correspond to multiple I / O control modules 2 based on the corresponding relationship between the I / O control module 2 and the I / O unit 31; and then the determined data transmission relationship is sent to these multiple I / O control modules 2 respectively. Each I / O control module 2 presets the identification information of the I / O unit 31 corresponding to itself, that is, each I / O control module 2 is set with the target I / O unit of interest; taking any I / O control module 2 as an example, after receiving the data transmission relationship sent by the cluster control module 4, the I / O control module 2 determines the target I / O unit of interest from the N2 I / O units 31, and based on the data transmission relationship between the target industrial computer belonging to the N1 CPU and the N2 I / O units 31; then establishes a secondary data transmission relationship between the target industrial computer and the target I / O unit, and the secondary data transmission relationship is the data transmission relationship corresponding to the I / O control module 2. Based on the above process, each I / O control module 2 can determine its corresponding secondary data transmission relationship based on the data transmission relationship sent by the cluster control module 4, so that during the test process, each I / O control module 2 can perform data transmission between the CPU and the corresponding target I / O unit based on the corresponding secondary data transmission relationship.

[0097] Step 203, after the first test task is executed, the N1 CPUs and N2 I / O units executing the first test task are released, so that the released CPUs and I / O units re-enter the idle state. This is similar to step 103 in the first embodiment and will not be described in detail here.

[0098] The third embodiment of the present invention relates to a testing method. The main difference between this embodiment and the first embodiment is that this embodiment provides multiple implementation methods for determining the test requirement information of the first test task to be executed.

[0099] Method 1: The specific process of the test method is as follows Figure 6 As shown, the details are as follows:

[0100] Step 301, determine the number of CPUs and I / O units required to execute the first test task according to the task information of the first test task, and obtain test requirement information; the task information includes at least one or any combination of the following: test cases, test simulation models, and test parameters.

[0101] Specifically, the cluster control module 4 calculates the resource consumption of executing the first test task based on the task information of the first test task, thereby determining the test requirement information of the first test task; or, queries the test history data based on the task information of the first test task, and searches the test history data for the test requirement information of the previously executed same first test task as the test requirement information of the first test task.

[0102] Step 302, based on the test requirement information, select N1 CPUs from the CPUs currently in an idle state, select N2 I / O units from the I / O units currently in an idle state, and use the N1 CPUs and the N2 I / O units to execute the first test task to test the device under test; N1 and N2 are both any integers greater than or equal to 1. This is similar to step 102 in the first embodiment and will not be described in detail here.

[0103] Step 303, after the first test task is executed, the N1 CPUs and N2 I / O units executing the first test task are released, so that the released CPUs and I / O units re-enter the idle state. This is similar to step 103 in the first embodiment and will not be described in detail here.

[0104] Method 2: The specific process of the test method is as follows Figure 7 As shown, the details are as follows:

[0105] Step 401, obtain the number N1 of CPUs and the number N2 of I / O units required to execute the first test task from the received setting parameters of the first test task, the setting parameters including: the number of CPUs required to execute the first test task and the number of I / O units.

[0106] Specifically, the user can configure the setting parameters for each first test task in the host computer 6, and send the setting parameters of the first test task to the cluster control module 4, so that the cluster control module 4 can obtain the test requirement information of the first test task from the setting parameters, that is, the setting parameters can be specified by the user.

[0107] Step 402, based on the test requirement information, select N1 CPUs from the CPUs currently in an idle state, select N2 I / O units from the I / O units currently in an idle state, and use the N1 CPUs and the N2 I / O units to execute the first test task to test the device under test; N1 and N2 are both any integers greater than or equal to 1. This is similar to step 102 in the first embodiment and will not be repeated here.

[0108] Step 403, after the first test task is executed, the N1 CPUs and N2 I / O units executing the first test task are released, so that the released CPUs and I / O units re-enter the idle state. This is similar to step 103 in the first embodiment and will not be described in detail here.

[0109] Method three, the cluster control module 4 performs a pre-test based on the task information of the received first test task, and determines the test requirement information of the first test task based on the test situation of the pre-test process. For example, one or more test simulation models are selected from the task information of the first test task, and the pre-test is to test the test simulation model, select an industrial computer 11 from the industrial computer pool 1 to run the test simulation model, and select an I / O unit 31 from the I / O pool 3 to perform a pre-test together with the selected industrial computer 11, obtain the test information in the pre-test process, and determine the test requirement information of the first test task based on the test information, and the test information includes any one or any combination of the following: test time, operating status of the industrial computer 11, operating status of the I / O unit 31, etc., wherein the operating status includes but is not limited to: CPU occupancy rate, memory occupancy rate, etc. Alternatively, the pre-test is to use all or a specified number of industrial computers 11 that are currently in an idle state and all or a specified number of I / O units 31 that are in an idle state to execute the first test task within a certain period of time, then obtain test information during the test process, and determine the test requirement information of the first test task based on the test information.

[0110] While, before or after determining the test requirement information, the host computer 6 can also configure at least one of the following as reference information: how many input and output ports will be generated by the simulation model run by the industrial computer 11 in the test task, which ports of which types of I / O units 31 need to be used, and the connection relationship between the I / O unit 31 and the device under test 5. Further, the data transmission relationship can be determined based on this reference information and the quantity represented by the test requirement information.

[0111] The fourth embodiment of the present invention relates to a testing method. Compared with the first embodiment, the main improvement of this embodiment is that multiple testing tasks can be executed in parallel.

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

[0113] Step 501, determine the test requirement information of the first test task to be executed, the test requirement information is used to characterize at least the number of CPUs and the number of I / O units required to execute the first test task. Similar to step 101 in the first embodiment, it will not be repeated here.

[0114] Step 502, based on the test requirement information, select N1 CPUs from the CPUs that are currently in an idle state, select N2 I / O units from the I / O units that are currently in an idle state, and use the N1 CPUs and N2 I / O units to execute the first test task to test the device under test; N1 and N2 are both arbitrary integers greater than or equal to 1.

[0115] Step 503, based on the test requirement information of another second test task, utilize N3 CPUs among the CPUs of multiple industrial computers and N4 I / O units among the multiple I / O units to execute the second test task to test another second device under test, so that the second device under test interacts with the N3 CPUs through the N4 I / O units; N3 and N4 are both arbitrary integers greater than or equal to 1; wherein, the N3 CPUs and the N1 CPUs are different CPUs among the CPUs of multiple industrial computers, and the N2 I / O units and the N4 I / O units are different I / O units among the multiple I / O units.

[0116] Step 504, after the first test task is executed, the N1 CPUs and N2 I / O units executing the first test task are released, so that the released CPUs and I / O units enter the idle state again.

[0117] Step 505, after releasing the N1 CPUs and N2 I / O units that execute the first test task, based on the test requirement information of another third test task, select N5 CPUs from the CPUs that are currently in an idle state, select N6 I / O units from the I / O units that are currently in an idle state, and use the N5 CPUs and N6 I / O units to execute the third test task to test the third device under test, so that the third device under test interacts with the N5 CPUs through the N6 I / O units; N5 and N6 are both arbitrary integers greater than or equal to 1; wherein the N5 CPUs have overlapping CPUs with the N1 CPUs, and / or: the N2 I / O units have overlapping I / O units with the N6 I / O units.

[0118] The second device under test tested by the second test task and the third device under test tested by the third test task are both Figure 1 The device under test 5.

[0119] Specifically, there are multiple test tasks to be executed, and the multiple test tasks can be used to test the same type of device under test 5 or different types of devices under test 5. The multiple test tasks are arranged in the task queue in sequence, and the cluster control module 4 configures the corresponding test containers in sequence based on the order of the test tasks to be executed in the task queue. After the cluster control module 4 determines the N1 CPUs and N2 I / O units 31 corresponding to the test container corresponding to the current first test task based on the aforementioned process, the cluster control module 4 can immediately use the N1 CPUs and N2 I / O units 31 to execute the first test task to test the first device under test.

[0120] In an example, if during the execution of the first test task, there are still test tasks to be executed in the task queue, another test task in the task queue, namely the second test task, is obtained. If the CPU currently in an idle state and the I / O unit 31 currently in an idle state meet the test requirements of the second test task, the N3 CPUs corresponding to the test container of the second test task and the N4 I / O units 31 among the multiple I / O units 31 are determined based on the test requirement information of the second test task, and the N3 CPUs and the N4 I / O units 31 are used to execute the second test task to test another second device under test, so that the second device under test interacts with the N3 CPUs through the N4 I / O units 31; N3 and N4 are both arbitrary integers greater than or equal to 1. Among them, the N3 CPUs and the N1 CPUs are different CPUs in the CPUs of the multiple industrial computers 11, and the N2 I / O units 31 and the N4 I / O units 31 are different I / O units 31 in the multiple I / O units 31, that is, during the execution of the first test task, the CPUs and I / O units 31 that are not involved in the execution of the first test task can be selected to execute another second test task, that is, multiple test tasks are executed in parallel. Among them, the multiple CPUs contained in a single industrial computer 11 can be divided into multiple test containers at the same time for executing different test tasks in parallel.

[0121] The second test task is a test task different from the first test task, and the second device under test is a device under test different from the first device under test. The first test task and the second test task can be from the same user or different users. The process of determining the CPU, I / O unit 31 and performing the test for the second test task can be understood by referring to the relevant descriptions of other embodiments of this specification, and will not be repeated here.

[0122] It can be seen that during the execution of the first test task, other test tasks can also be executed in parallel, effectively ensuring the efficient execution of the test.

[0123] In another example, after the first test task is executed and the N1 CPUs and N2 I / O units executing the first test task are released, there are still test tasks to be executed in the task queue, and another test task in the task queue, namely the third test task, is obtained. Based on the test requirement information of the other third test task, N5 CPUs are selected from the CPUs that are currently in an idle state, and N6 I / O units 31 are selected from the I / O units 31 that are currently in an idle state. The third test task is executed to test the third device under test using the N5 CPUs and the N6 I / O units 31, so that the third device under test interacts with the N5 CPUs through the N6 I / O units 31; N5 and N6 are both arbitrary integers greater than or equal to 1; wherein the N5 CPUs have overlapping CPUs with the N1 CPUs, and / or: the N2 I / O units 31 have overlapping I / O units 31 with the N6 I / O units; that is, the released CPUs and I / O units 31 can be used to execute other test tasks.

[0124] The third test task is a test task different from the first test task, and the third device under test can be the first device under test or a device under test different from the first device under test. The first test task and the third test task can be from the same user or different users. The process of determining the CPU, I / O unit and performing the test for the third test task can be understood by referring to the relevant descriptions of other embodiments of this specification, and will not be repeated here.

[0125] It can be seen that after the first test task is completed, the CPU, I / O unit 31, etc. used therein can also be used to execute other test tasks, effectively ensuring full and effective utilization of resources.

[0126] The cluster control module 4 may also determine the data transmission relationship between the selected CPU in the industrial computer corresponding to each test container and the I / O unit 31 , and send the data transmission relationship of each test container to the I / O control module 2 .

[0127] As can be seen from the above, the cluster control module 4 can immediately use the selected CPU and I / O unit 31 in the industrial computer 11 corresponding to the test container to execute the current test task to test the device under test 5 after completing the configuration of the test container of the current test task each time. If the CPU currently in an idle state and the I / O unit 31 currently in an idle state can meet the test requirements of another test task in the task queue, the above process is repeated to select the CPU and I / O unit 31 to execute the test task whose test requirements are met; if the CPU currently in an idle state and the I / O unit 31 currently in an idle state cannot meet the test requirements of the remaining test tasks in the task queue, after any test task in the execution state is completed and the corresponding CPU and I / O unit 31 are released, the CPU and I / O unit 31 are selected again to execute the test task whose test requirements are met until there is no test task to be executed in the task queue; that is, after the CPU and I / O unit 31 are released, they can be quickly used to execute another test task, so that the CPU and I / O unit 31 can be fully and efficiently utilized.

[0128] In this embodiment, multiple test containers are set to execute tests for multiple test tasks in parallel at the same time. When the test containers execute the test tasks, there is no influence on each other, thereby improving the test efficiency.

[0129] The fifth embodiment of the present invention relates to a testing method. The main difference between this embodiment and the first embodiment is that this embodiment provides a specific way to configure the connection between the I / O unit and the device under test.

[0130] In this embodiment, please refer to Fig. 9 , the test system further includes: a switching matrix 7 connected between the I / O unit 31 and the device under test 5, that is, each I / O unit 31 is indirectly connected to the corresponding device under test 5 through the switching matrix 7. The switching matrix 7 includes: at least one first port and at least one second port; each first port is respectively connected to each I / O unit 31, and each second port is respectively connected to each device under test 5. A switchable connection channel is arranged inside the switching matrix 7, and the connection channel can connect the first port and the second port on both sides of the switching matrix 7. Among them, different connection channels in the switching matrix 7 can be used to transmit different signals, and an Ethernet module can also be arranged inside the switching matrix 7 to realize the exchange of digital signals.

[0131] The specific process of the testing method of this embodiment is as follows Fig.10 shown.

[0132] Step 601, determine the test requirement information of the first test task to be executed, the test requirement information is used to characterize at least the number of CPUs and the number of I / O units required to execute the first test task. Similar to step 101 in the first embodiment, it will not be repeated here.

[0133] Step 602 includes the following sub-steps:

[0134] Sub-step 6021, based on the test requirement information, select N1 CPUs from the currently idle CPUs and select N2 I / O units from the currently idle I / O units. Step 102 in the first embodiment is described in detail and will not be repeated here.

[0135] Sub-step 6022, configure the switching matrix to form a connection channel between the first port connected to the selected N2 I / O units and the second port connected to the device under test, and establish a communication connection between the N2 I / O units and the device under test.

[0136] Specifically, after selecting N2 I / O units, the cluster control module 4 configures the first port connected to the N2 I / O units in the switching matrix 7 to form a connection channel with the second port connected to the device under test 5, and establishes a communication connection between the N2 I / O units 31 and the device under test 5, so that the switching matrix 7 can transmit data during the test between the N2 I / O units 31 and the device under test 51 through the configured connection channel.

[0137] Sub-step 6023: Utilize N1 CPUs and N2 I / O units to execute the first test task to test the device under test. Step 102 in the first embodiment has been described in detail and will not be repeated here.

[0138] Step 603, after the first test task is executed, the N1 CPUs and N2 I / O units executing the first test task are released, so that the released CPUs and I / O units re-enter the idle state. This is similar to step 103 in the first embodiment and will not be described in detail here.

[0139] It can be seen that in order to achieve the corresponding communication between the industrial computer, I / O unit, and the device under test, and to achieve the transmission of the target information, when a switching matrix is ​​set, it is necessary to configure the switching matrix and the data transmission relationship of the I / O control module, so as to achieve the data transmission required for the test 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 units 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. .

[0140] A sixth embodiment of the present invention relates to a device, which is Figure 1 The cluster control module 4 in the HIL system shown is used to execute the test method of any one of the first to fifth embodiments.

[0141] It should be noted that Figure 1 In the example, a single device is set as a cluster control module 4 in the HIL system. However, it is not limited to this. Any industrial computer 11 can also be configured as the device in this embodiment to execute the test method, that is, any industrial computer 11 can be configured as a cluster control module to execute the test method, so there is no need to set up a single device as a cluster control module.

[0142] A seventh embodiment of the present invention relates to a test system, which is Figure 1 The HIL test system shown in the figure comprises: an industrial computer pool 1, an I / O control module 2, an I / O pool 3 and a cluster control module 4 (i.e., the device in the sixth embodiment); the industrial computer pool 1 comprises at least one industrial computer 11, and the I / O pool 3 comprises at least one I / O unit 31; the detailed introduction of the HIL system can refer to the first embodiment, and will not be repeated here.

[0143] An eighth embodiment of the present invention relates to a readable storage medium storing a computer program, and the above-mentioned test method is implemented when the computer program is executed.

[0144] 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.

[0145] 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, It is characterized in that The HIL system includes multiple industrial computers equipped with CPUs and multiple I / O units for directly or indirectly connecting to the DUT; The testing method comprises: Determine the test requirement information of the first test task to be executed currently; Based on the test requirement information of the first test task, a target industrial computer and N2 I / O units in an idle state are selected; the target industrial computer includes N1 CPUs in an idle state, and the target industrial computer and the N2 I / O units are used to execute the first test task to test the first device under test, so that the first device under test interacts with the target industrial computer through the N2 I / O units; N1 and N2 are both arbitrary integers greater than or equal to 1; After the first test task is completed, the target industrial computer and the N2 I / O units that execute the first test task are released, so that: if no other test tasks other than the first test task are arranged to be executed after being released, the CPU of the released target industrial computer and the I / O units re-enter the idle state.

2. The test method according to claim 1, It is characterized in that The HIL system further includes: an I / O control module connected to the I / O unit; and before the N1 CPUs and the N2 I / O units are used to execute the test task to test the first device under test, the system further includes: Determine the data transmission relationship between the target industrial computer and the N2 I / O units; The using the target industrial computer and the N2 I / O units to execute the first test task to test the first device under test includes: The task information of the first test task is sent to each of the target industrial computers, so that each of the target industrial computers generates the downlink information to be sent to the first device under test and / or the selected I / O unit based on the task information, and the I / O control module transmits the target data between the target industrial computer and the N2 I / O units, and performs the test corresponding to the first test task on the first device under test, and the target data is transmitted based on the data transmission relationship.

3. The testing method according to claim 1, It is characterized in that The method of selecting a target industrial computer and N2 I / O units in an idle state based on the test requirement information of the first test task; wherein the target industrial computer includes N1 CPUs in an idle state, and using the target industrial computer and the N2 I / O units to execute the first test task to test the first device under test includes: Based on the test requirement information, select N1 CPUs from the idle CPUs and select N2 I / O units from the idle I / O units to obtain the target industrial computer and the I / O unit corresponding to the test container corresponding to the first test task; Utilizing the target industrial computer and the I / O unit corresponding to the test container to execute the first test task to test the first device under test; The releasing the N1 CPUs and the N2 I / O units that execute the first test task includes: The target industrial computer and the I / O unit corresponding to the test container are released.

4. The testing method according to claim 1, It is characterized in that The step of determining the test requirement information of the first test task to be executed currently includes: Determine the number of CPUs and the number of I / O units required to execute the first test task according to the task information of the first test task to obtain the test requirement information; the task information includes at least one or any combination of the following: test cases, test simulation models, and test parameters.

5. The testing method according to claim 1, It is characterized in that The step of determining the test requirement information of the first test task to be executed currently includes: The number N1 of CPUs and the number N2 of I / O units required to execute the first test task are obtained from the received setting parameters of the first test task, wherein the setting parameters include: the number of CPUs specified by the user, and the number of I / O units.

6. The testing method according to claim 1, It is characterized in that The I / O unit and the first device under test are communicatively connected via a switching matrix, wherein the switching matrix comprises: at least one first port and at least one second port; each of the first ports is respectively connected to each of the I / O units, and each of the second ports is respectively connected to each of the first devices under test; The testing method further comprises: A connection channel is formed between the first port connected to the selected N2 I / O units in the switching matrix and the second port connected to the first device under test, so as to establish a communication connection between the N2 I / O units and the first device under test.

7. The testing method according to claim 1, It is characterized in that The test method also includes: Before the first test task is completed, based on the test requirement information of another second test task, the second test task is executed to test another second device under test by using the industrial computer including N3 CPUs among the multiple industrial computers and N4 I / O units among the multiple I / O units, so that the second device under test interacts with the industrial computer including the N3 CPUs through the N4 I / O units; N3 and N4 are both arbitrary integers greater than or equal to 1; wherein the N3 CPUs and the N1 CPUs are different CPUs among the CPUs of the multiple industrial computers, and the N2 I / O units and the N4 I / O units are different I / O units among the multiple I / O units; and / or: After releasing the target industrial computer and the N2 I / O units executing the first test task, based on the test requirement information of another third test task, at least one industrial computer including N5 CPUs is selected from the CPUs in the idle state, and N6 I / O units are selected from the I / O units in the idle state, and the third test task is executed to test the third device under test using at least one industrial computer including the N5 CPUs and the N6 I / O units, so that the third device under test interacts with at least one industrial computer including the N5 CPUs through the N6 I / O units; N5 and N6 are both arbitrary integers greater than or equal to 1; wherein the N5 CPUs have overlapping CPUs with the N1 CPUs, and / or: the N2 I / O units have overlapping I / O units with the N6 I / O units.

8. A device, It is characterized in that Used to perform the test method according to any one of claims 1 to 7.

9. A test system, It is characterized in that It comprises the device as claimed in claim 8, an industrial computer pool and an I / O pool; the industrial computer pool comprises at least one industrial computer, and the I / O pool comprises at least one I / O unit; the I / O unit is used to directly or indirectly connect to the device under test.

10. A readable storage medium, It is 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.