Simulation test script generation method, electronic device and storage medium
Patent Information
- Application Number
- CN202210259005.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-09
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2042-03-09
AI Technical Summary
During traditional simulation testing, the real-time monitoring signal cannot match the simulation environment, resulting in inaccurate verification tests, huge workload and inefficient efficiency.
By receiving monitoring signals for new running scenarios, configuring the excitation environment based on its periodic characteristics, and establishing a script band for each exciter, filling in the instruction sequence to form a scene script, realizing the automated generation of the simulation scenario.
It solves the problem that real-time monitoring signals cannot match the simulation environment, improves the accuracy and efficiency of simulation tests, and reduces the workload of manual design and configuration.
Smart Images

Figure CN114706758B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of simulation testing, and in particular to a simulation testing script generation method, electronic equipment and storage medium. Background Art
[0002] At present, with the deepening of digital twin and intelligent manufacturing concepts, the remote centralized monitoring of control systems in complex scenarios is becoming more and more widely used, and the simulation operation capability of control systems in different scenarios is becoming increasingly important. At the same time, as an essential part of control system testing and verification, the stimulus environment has become one of the most important means to ensure the integrated verification of control systems for large industrial projects.
[0003] As the core system in different working scenarios, the control system often gathers the core functions of the system. Generally, for large and complex control systems, the research and development of the control system requires repeated iterations and continuous improvement. Some control systems containing artificial intelligence require multiple optimization trainings through real data. Therefore, for the research and development of complex control systems, it is generally necessary to establish a simulation test environment. The simulation test environment is an excitation response simulation test environment designed for the development of control systems. This environment simulates various scene signals in real scenes and tests the functions and performance of the target control system through simulation excitation. At the same time, it can also train a certain algorithm or optimization and iteration of artificial intelligence and neural networks based on continuous data excitation feedback.
[0004] Since the simulation test environment is often aimed at more than one target system, the simulation capability, signal type, quantity, and time span contained in the simulation test environment should generally be able to cover most of the control system capability boundaries. Therefore, the exciter configuration of the simulation test environment, the excitation process of the test test, the test steps and the test content all require a lot of manual design and configuration. Faced with increasingly complex control systems, the traditional simulation test process contains the following defects: 1. The test content can only be manually edited in advance, and the exciter is responsible for execution. Faced with complex control scenarios, this method is difficult to ensure consistency with the actual environment operation, and the verification test is inaccurate; 2. By manually editing the steps and content of the test, the workload is huge and the simulation test efficiency is low; 3. The exciter signal distribution and layout are complex. Faced with different control systems or the modification and upgrade of the same control system, the mapping of the exciter signal configuration in the simulation test environment and the control system under test needs to be manually adjusted, which is a huge workload and prone to errors. Summary of the invention
[0005] The embodiments of the present invention provide a simulation test script generation method, an electronic device and a storage medium, which are used to solve at least one of the above-mentioned technical problems.
[0006] In a first aspect, an embodiment of the present invention provides a method for generating a simulation test script for a central management system, comprising:
[0007] Receiving a first monitoring signal of a new operation scenario, and configuring an excitation environment for the new operation scenario based on the first monitoring signal, wherein the first monitoring signal has a periodic feature, and the excitation environment configuration includes configuring an exciter participating in the excitation;
[0008] Determining a basic time slice corresponding to the new operation scenario based on a periodic feature of the first monitoring signal;
[0009] A corresponding script tape is established for each of the actuators, and an instruction sequence is filled into each of the script tapes based on the monitoring signal to form a scenario script of the new operating environment.
[0010] In a second aspect, an embodiment of the present invention provides a simulation test method for an actuator, comprising:
[0011] Obtain scenario scripts configured according to the incentive environment sent by the central management system in real time;
[0012] The instruction sequence on the script tape corresponding to the actuator is interpreted, and the excitation signal is started based on the interpretation result and transmitted to the target control system.
[0013] In a third aspect, an embodiment of the present invention provides a storage medium, in which one or more programs including execution instructions are stored, and the execution instructions can be read and executed by an electronic device (including but not limited to a computer, a server, or a network device, etc.) for executing a script generation method for executing any of the above-mentioned simulation tests of the present invention.
[0014] In a fourth aspect, an electronic device is provided, comprising: at least one processor, and a memory communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the script generation method of any one of the simulation tests described above in the present invention.
[0015] In a fifth aspect, an embodiment of the present invention further provides a computer program product, wherein the computer program product comprises a computer program stored on a storage medium, wherein the computer program comprises program instructions, and when the program instructions are executed by a computer, the computer is caused to perform a script generation method for any of the above-mentioned simulation tests.
[0016] The beneficial effect of the embodiment of the present invention is that the present invention solves the problem that the traditional real-time monitoring signal cannot be matched with the simulation environment by automatically generating the script of the simulation scene by using the real-time monitoring signal of the target scene. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying any creative work.
[0018] Figure 1 A flowchart of an embodiment of a method for generating a simulation test script of the present invention for use in a central management system;
[0019] Figure 2 A flowchart of another embodiment of a method for generating a simulation test script of the present invention for use in a central management system;
[0020] Figure 3 A flowchart of another embodiment of the method for generating a simulation test script of the present invention, which is used in a central management system;
[0021] Figure 4 A flow chart of an embodiment of a simulation test method of the present invention for an exciter;
[0022] Figure 5 A schematic diagram of the process of making a new running scenario script of the present invention;
[0023] Figure 6 A schematic diagram of the process of implementing simulation excitation for the scenario script of the present invention;
[0024] Figure 7 A block diagram of the principle of the method for automatically generating a simulation script for real-time monitoring data of the present invention;
[0025] Figure 8 A configuration process diagram of the signal feature matching stimulus environment in the present invention;
[0026] Fig. 9 A process diagram for automatically creating a scenario script for the monitoring signal in the present invention;
[0027] Fig.10 A schematic diagram of the scene script in the present invention stimulating the target control system and capturing the feedback signal;
[0028] Fig.11 It is a schematic structural diagram of an embodiment of an electronic device of the present invention. DETAILED DESCRIPTION
[0029] In order to make the purpose, technical scheme and advantages of the embodiments of the present invention clearer, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention. It should be noted that the embodiments in this application and the features in the embodiments can be combined with each other without conflict.
[0030] In the present invention, "module", "device", "system" and the like refer to related entities applied to computers, such as hardware, a combination of hardware and software, software or software in execution, etc. In detail, for example, an element can be, but is not limited to, a process, a processor, an object, an executable element, an execution thread, a program and / or a computer running on a processor. In addition, an application or script program running on a server, a server can all be an element. One or more elements can be in an execution process and / or thread, and an element can be localized on a computer and / or distributed between two or more computers, and can be operated by various computer-readable media. An element can also communicate through local and / or remote processes according to a signal with one or more data packets, for example, a signal from a data that interacts with another element in a local system, a distributed system, and / or a network on the Internet through a signal to interact with other systems.
[0031] Finally, it should be noted that, in this article, the terms "include" and "comprise" include not only those elements, but also other elements not explicitly listed, or elements inherent to such processes, methods, articles or equipment. In the absence of further restrictions, the elements defined by the sentence "include..." do not exclude the existence of other identical elements in the process, method, article or equipment that includes the elements.
[0032] like Figure 1 The flowchart of an embodiment of a method for generating a script of a simulation test of the present invention for a central management system is shown. In this embodiment, the method for generating a script of a simulation test for a central management system includes:
[0033] S11. Receive a first monitoring signal of a new operating scenario, and configure an excitation environment for the new operating scenario based on the first monitoring signal, wherein the first monitoring signal has a periodic feature, and the excitation environment configuration includes configuring an exciter participating in the excitation.
[0034] Exemplarily, the excitation environment is composed of exciters configured with different signal capabilities. The exciters are composed of different signal acquisition / receiving boards, various bus transceiver boards and industrial control computers. The types and quantities of interfaces of the hardwire boards, bus boards and acquisition boards configured in the exciters are different. The number of exciters and the configured interface capabilities need to be set according to the signal characteristics (number of types) of the operating scenario; the excitation environment is connected to the target control system through a cable, and the target control system is stimulated according to the triggering requirements of the time slice by receiving the scenario script of the management platform, or the expected input of the target system under test is captured and fed back to the central management system.
[0035] S12: Determine a basic time slice corresponding to the new operation scenario based on the periodic characteristics of the first monitoring signal.
[0036] Exemplarily, the central management system receives a first monitoring signal of a new operating scenario, analyzes the first monitoring signal to obtain a periodic characteristic of the first monitoring signal, and determines a basic time slice corresponding to the new operating scenario based on the periodic characteristic of the first monitoring signal.
[0037] S13, establishing a corresponding script band for each of the exciters, and filling in an instruction sequence in each of the script bands based on the monitoring signal to form a scenario script for the new operating environment.
[0038] Exemplarily, the scenario script of the new operating environment is composed of multiple script bands, each of which corresponds to an exciter in the excitation environment configuration, and an instruction sequence is filled in each script band to form the scenario script of the new operating environment, wherein the instruction sequence is a set of time-triggered instruction sequences with time slices as steps.
[0039] The present invention solves the problem that the traditional real-time monitoring signal cannot be matched with the simulation environment by automatically generating the script of the simulation scene by using the real-time monitoring signal of the target scene.
[0040] In some embodiments, determining the basic time slice corresponding to the new operating scenario based on the periodic characteristics of the first monitoring signal includes: analyzing the shortest time period that the first monitoring signal can receive, wherein the time slice is less than the shortest time period; after completing the incentive environment configuration, the central management system determines the basic time slice of the new operating scenario script according to the periodic characteristics of the signal, and the basic time slice selection conditions of the new operating scenario script include analyzing that the shortest time period that the monitoring signal may receive is equivalent to the shortest interval period containing the event signal, wherein the basic time slice must be less than the shortest time period; defining the basic time slice as one of the common factors of the periodic characteristics of the first monitoring signal after rounding; in the present application, the period of the monitoring signal is rounded to the nearest center with units of 1ms, 5ms and N×5ms, where N is a positive integer, and the common factors of all monitoring signals after rounding are extracted, and the basic time slice is one of the common factors.
[0041] In some embodiments, the script band is a set of time-triggered instruction sequences with the basic time slice as the step length, and the script bands are spaced apart by integer multiples of the basic time slice; the scene script is composed of multiple script bands, each of which corresponds to an exciter in the excitation environment configuration; the script band is a set of time-triggered instruction sequences with the time slice as the step length, each script band is a set of excitation instructions triggered at a time point Time, and the script bands are spaced apart by integer multiples of the time slice, the instruction set in the script band is generated by the central management system, and the instruction set includes the excitation signal and its related attributes.
[0042] like Figure 2 The flowchart shown is another embodiment of the method for generating a script for a simulation test of the present invention. In this embodiment, the first monitoring signal includes multiple groups of signals, each group of signals includes multiple signals, and the method further includes:
[0043] S21. Check the duration of each signal in the scenario script of the new operating environment, and set the duration of each signal to be shorter than the interval between two adjacent basic time slices.
[0044] Exemplarily, the script conversion of the signal group of the received monitoring signals Time1, Time2, ...Timei...TimeN is continuously completed until the signal ends or the script production is actively terminated. During the script production process, the central management system needs to check the excitation instructions in the TimeX instruction sequence in each script band. The signal duration duration should be less than the time interval between Time(X+1) and TimeX, otherwise an error will be reported and the production will be terminated.
[0045] S22. When making the scene script, a synchronization frame instruction is added every time interval of a preset multiple of the basic time slice, so as to synchronize the time of the script bands of different stimulators.
[0046] Exemplarily, in the process of making a scene script, a synchronization frame instruction is added at a time interval of every 10 times of the basic time slice to synchronize the time of the script bands of different stimuli. The synchronization frame instruction includes heartbeat information, time trigger frame, timer, priority and debug frame.
[0047] Through the time slice scenario script technology, the automatic simulation test process is realized. At the same time, the automatic adjustment function of the time slice can realize the simulation capabilities of repeated playback, fast playback, pause, insertion, rollback, etc. of classic scenario processes, providing the necessary basic technical means for digital twins, offline training, and data mining and management of complex scenarios.
[0048] like Figure 3 The flowchart of another embodiment of the method for generating a script for a simulation test of the present invention is shown. In this embodiment, before receiving the first monitoring signal of the new operation scenario, the method includes:
[0049] S31, determining whether the operation scenario of the second monitoring signal is an existing operation scenario or a new operation scenario;
[0050] S32: If there is an existing operation scenario, search for an incentive environment configuration corresponding to the existing operation scenario, and convert the second monitoring signal into a scenario script according to the incentive environment configuration.
[0051] Exemplarily, the operation scenario is determined, and the central management system receives a second monitoring signal from the operation scenario. The central management system confirms whether the operation scenario exists based on the operation scenario, and searches the script library to see whether the incentive environment configuration of the corresponding scenario has been previously stored. If a corresponding configuration has been previously stored, the second monitoring signal is converted into a scenario script according to the configuration.
[0052] Determine whether the running scenario is stored in the database based on the received monitoring signal. If it exists, directly call the existing incentive environment configuration of the running scenario, and install the incentive environment configuration to convert it into the corresponding running scenario script. If there is no running scenario in the data, re-establish the incentive environment configuration of the new running scenario and store it in the data.
[0053] like Figure 4 The flowchart of the simulation test method of the present invention is used for an embodiment of an actuator. In this embodiment, the simulation test method is used for a central management system and includes:
[0054] S41, real-time acquisition of the scenario script configured according to the incentive environment sent by the central management system;
[0055] S42, interpreting the instruction sequence on the script tape corresponding to the actuator, starting the excitation signal based on the interpretation result and transmitting it to the target control system.
[0056] For example, when performing a simulation test task, the central management system selects the corresponding scenario script from the script library and transmits it to the corresponding exciter in the excitation environment through the test network. The exciter interprets the instruction sequence in the corresponding script band in the scenario script, parses the corresponding signal name and exciter position channel information in the instruction sequence, and performs excitation output according to the duration of the excitation signal. Similarly, all exciters complete the instruction sequence excitation of each TimeX and transmit the excitation signal to the target control system through the test cable.
[0057] The target control system consists of a controller with acquisition, control, and drive functions, as well as interconnected cables and networks. The network structure, unit composition, and software functions of the control system are basically the same as those of the control system in the actual operation scenario. The target control system is the object of script stimulation, the target platform for simulation testing of new function upgrades, data training, and algorithm optimization of the control system, and the object of scenario script stimulation. Designers can verify, modify, and improve the design of the control system by capturing the performance of the target control system under different scenario script stimulations.
[0058] In some embodiments, the synchronization frame instruction of the central management system is obtained, and the scene script of the exciter is adjusted according to the synchronization frame instruction so that the exciter is synchronized with the central management system. During the excitation process, the exciter adjusts and corrects its own time slice by interpreting the synchronization frame information to ensure time synchronization between multiple exciters.
[0059] The exciter reads and parses the script tape in the scenario script, the excitation instructions in the instruction sequence in TimeX in the script tape, and the attribute information of the excitation signal in the excitation instruction to realize the search and output of the excitation signal, and automatically synchronizes the time between the exciters through the synchronization frame, and realizes the automatic excitation of the target control system through the time triggering script of the central management system. This method can improve the test efficiency and automatically capture the system output for the central management system to analyze the test results.
[0060] In some embodiments, the target control system is monitored in real time to capture feedback signals from the target control system; time marks are made on the script tape corresponding to the actuator based on the start and end times of the feedback signals, and the time marks are fed back to the central management system; after receiving the stimulation of the instruction sequence, the target control system performs output according to its own control logic, and the actuator detects the output signals of the target control system, marks all output signals on the script tape of the scenario script according to the time of occurrence, records information such as the signal names, occurrence locations, and durations of these signals, and sends them to the central management system.
[0061] like Figure 5 The figure shows the script generation method of the simulation test of the present invention, which is a process flow chart for realizing the scenario script triggered by the time slice when the new scenario monitoring signal of the central management system is used.
[0062] The specific implementation steps are as follows: Step 1, determine the operation scenario, and through the monitoring network, the central management system receives the monitoring signal from the operation scenario;
[0063] In the second step, the central management system searches the script library to see if there is a previously stored incentive environment configuration for the corresponding scenario according to the running scenario. If there is a corresponding configuration, the fifth step is to convert the monitoring signal into a scenario script according to the configuration.
[0064] In the third step, when the current operation scenario is a new scenario, the management platform needs to analyze the monitoring signal characteristics. The monitoring signal characteristics include: 1) type characteristics, including hard line and bus signal types;
[0065] 2) Time characteristics, including: minimum signal period, minimum interval time of event-type signals, number of signal period types and number of signals under each period; 3) Detailed interface definition of the signal, including specific attribute definitions such as specific data packets, data bits, periods, formats, pins, connectors, etc. of the monitoring signal transmitted to the central management system;
[0066] The fourth step is to configure the exciter combination participating in the excitation of the target control system in the excitation environment according to the signal characteristics of the scene, so as to support and cover the excitation requirements of all scene signal characteristics, and on this basis, to maintain the exciter configuration optimization as much as possible. The configuration principles are as follows: 1) The selected exciter should meet the excitation (input signal simulation of the target test system) and acquisition (output capture of the target test system) capabilities of all monitoring signals; 2) On the basis of meeting the signal capabilities, the excitation and acquisition task loads of the exciter should be distributed as evenly as possible to avoid excessive peak demand of the central management system calculation case due to unbalanced exciter load;
[0067] Step 5. After completing the configuration of the stimulus environment, the management platform determines the basic time slice of the scenario script according to the periodic characteristics of the signal. The selection conditions include: 1) analyzing the shortest time period that the monitoring signal may receive (including the shortest interval period of the event signal), the basic time slice must be less than the shortest time period; 2) rounding the monitoring signal period to the nearest center with units of 1ms, 5ms and N×5ms (N is a positive integer), extracting the common factors of all rounded monitoring signals, and the basic time slice should be one of the common factors; 3) among all the stimulators configured in the stimulus environment, the maximum clock cycle of the CPU is Tosc, then the basic time slice should be greater than Tosc×103 times;
[0068] Step 6: Establish and initialize the scenario script model; the scenario script consists of several script bands, each of which corresponds to an exciter in the excitation environment configuration; the script band is a set of time-triggered instruction sequences with time slices as the step length, each script band is a set of excitation instructions triggered at a time point Time, and the script bands are separated by integer multiples of time slices. The instruction set in the script band is generated by the management platform, and the instruction set includes the excitation signal and its related attributes; the attributes of the excitation signal are generated by the excitation environment configuration process, including: 1) signal name - the global retrieval ID of the signal, 2) duration of the exciter excitation signal duration and 3) location information - the location channel number of the signal on the exciter location;
[0069] Step 7: The management platform receives monitoring signals and arranges them in chronological order. If the monitoring signals receive signal combinations of Time1, Time2, ... Timei ... TimeN (rounded to the nearest center) in succession, the management platform creates corresponding instruction sequences of Time1, Time2, ... Timei ... TimeN on the script belt of the scene script.
[0070] Step 8. Complete the automatic production of the scene script. The management platform receives the monitoring signal a at Time 1 through the monitoring network, monitors the duration and signal amplitude of signal a, and searches for the script band A, the excitation signal a and its related attributes corresponding to signal a in the excitation environment configuration according to the signal name of signal a. This information is then made into an excitation instruction, which is then filled into the excitation instruction a in the instruction sequence at Time 1 in the script band A, and so on, until the scene script production of all monitoring signals at Time 1 is completed.
[0071] Step 9, repeat step 8, and continue to complete the script conversion of the signal group of the received monitoring signals Time1, Time2, ...Timei...TimeN until the signal ends or the script production is actively terminated. During the script production process, the management platform needs to execute the following: 1) Check the excitation instruction in the TimeX instruction sequence in each script band, and its signal duration duration should be less than the time interval between Time(X+1) and TimeX, otherwise an error will be reported and the production will be terminated; 2) During the script production process, a synchronization frame instruction should be added at the time interval of every 10 times the basic time slice, which is used for different stimulators to synchronize the time of the script band. The synchronization frame instruction includes the management platform heartbeat information, time trigger frame, timer, priority and debug frame;
[0072] After completing the scene script production, the central management system packages the script together with the corresponding stimulus environment configuration information, edits the relevant script information description, and stores it into the script library for subsequent simulation testing.
[0073] like Figure 6 Shown is a simulation test method of the present invention, a flowchart of the process of implementing simulation excitation using a scenario script of an exciter.
[0074] The specific implementation steps are as follows: First, when a simulation test task is required, the management platform selects the corresponding scenario script from the script library and transmits it to the corresponding exciter in the excitation environment through the test network. The exciter interprets the instruction sequence in the corresponding script band in the scenario script, parses the corresponding signal name and exciter location channel information in the instruction sequence, and outputs the excitation according to the duration of the excitation signal. Similarly, all exciters complete the instruction sequence excitation of each TimeX and transmit the excitation signal to the target control system through the test cable; during the excitation process, the exciter adjusts and corrects its own time slice by interpreting the synchronization frame information to ensure time synchronization between multiple exciters;
[0075] In the second step, during the simulation test, after the target control system receives the stimulus of the instruction sequence, it outputs according to its own control logic. The stimulator detects the output signal of the target control system, marks all the output signals according to the occurrence time on the script tape of the scenario script, records the signal name, occurrence location, duration and other information of these signals, and sends them back to the management platform for subsequent simulation analysis by the management platform.
[0076] like Figure 7 Shown is a principle block diagram of a method for automatically generating a simulation script for real-time monitoring data based on time triggering in a simulation test method of the present invention.
[0077] The objects involved in this method include four parts: (1) operation scenario (2) central management system (3) incentive environment (4) target control system; among which:
[0078] The operation scenario refers to the actual working environment in which the target control system operates. It is the actual working operating scenario environment. The instructions, environment and parameter information of the target control system are remotely transmitted to the central management system through the monitoring network to realize signal monitoring and remote control.
[0079] The central management system is the main operation center system of the present invention, which is composed of a script library and a management platform, wherein the script library is used to store scenario scripts for different purposes; the management platform is responsible for reading the real-time monitoring signal transmitted by the running scenario, and matching the configuration of the stimulus environment according to the data characteristics of the scenario. The management platform is also responsible for making the real-time monitoring signal into a scenario script and storing it in the script library; when executing the test simulation task, the management platform reads the corresponding scenario script from the script library, and sends the script to the corresponding exciter in the stimulus environment with a time trigger mechanism, and the exciter matches the scenario script with the signal interface for excitation; the script library is used to store and manage scenario scripts for different purposes.
[0080] The stimulus environment is composed of stimulators with different signal capability configurations. The stimulators are composed of different signal acquisition / receiving boards, various bus transceiver boards, and industrial control computers. The types and quantities of interfaces of the hardwire boards, bus boards, and acquisition boards configured by the stimulators are different. The number of stimulators and the configured interface capabilities need to be set according to the signal characteristics (number of types) required by the operating scenario; the stimulus environment is connected to the target control system through a cable, and by receiving the scenario script of the management platform, the target control system is stimulated according to the triggering requirements of the time slice, or the expected input of the target system under test is captured and fed back to the management platform.
[0081] The target control system consists of a controller with acquisition, control, and drive functions, as well as interconnected cables and networks. The network structure, unit composition, and software functions of the control system are basically the same as those of the control system in the actual operation scenario. The target control system is the object of script stimulation, the target platform for simulation testing of new function upgrades, data training, and algorithm optimization of the control system, and the object of scenario script stimulation. Designers can verify, modify, and improve the design of the control system by capturing the performance of the target control system under different scenario script stimulations.
[0082] like Figure 8 Shown is a configuration process diagram of the signal feature matching stimulus environment of the running scenario in the simulation test method of the present invention.
[0083] The selected industrial and mining scene Y is used as the target scene for this script conversion. The monitoring signals of this scene will generate N groups of signals. For example, the signal groups at Time1, Time2, Timei, and TimeN are given (2 < i < N, i and N are integers). Among them, the monitoring signals at Time1 are signal a, signal b, signal c, signal d, signal e, signal f, signal g; the monitoring signals at Time2 are signal b, signal h, signal i, signal e, signal c, signal g, signal j; the monitoring signals at Timei are signal c, signal d, signal o, signal p, signal q, signal a; the monitoring signals at TimeN are signal f, signal j, signal k, signal m, signal d.
[0084] Based on the characteristics of the signals, the central management system determines that the types of monitoring signals for this working condition scene include: ground / open, high / open, 4 - 20mA three total hard - wire signals, and three bus signals of CAN, RS485, and TCP. Select exciters A, B, and D in the excitation environment to form the excitation environment configuration of this scene script. Determine that the periods of the monitoring signals for this working condition scene include: 50ms, 100ms, 200ms, 500ms, and the minimum event signal interval period is 10ms. Therefore, the basic time slice of the scene script is determined to be 5ms.
[0085] Establish script tapes A, B, and D according to the excitation environment configuration, and initialize the instruction sequence of Time1.
[0086] The central management system receives the monitoring signal group of Time1. According to the excitation environment configuration, the management platform fills the signals a, b, e and their related attributes in the Time1 group into the Time1 instruction sequence in script tape A; fills the signals c, d and their related attributes in the Time1 group into the Time1 instruction sequence in script tape B; fills the signals f, g and their related attributes in the Time1 group into the Time1 instruction sequence in script tape D.
[0087] As Fig. 9 shown is the process diagram of automatically generating a scene script according to the monitoring signals of the scene in the simulation test method of the present invention.
[0088] Complete the filling of the script information for all groups of monitoring signals of Time2, Timei, and TimeN, check the duration of each signal, ensure that each duration is less than the time - slice interval between two adjacent time slices, and finally the management platform converts all monitoring signals into a scene script.
[0089] Start the simulation test of the target system, send the corresponding scenario script to the exciter (configured according to the excitation environment) through the management platform, and the exciter interprets the instruction information of each TimeX time slice. For example, exciter A interprets the instruction information of the time slice Time1 on script band A in the scenario script, parses the instruction information, finds its own excitation channel according to signal a, signal b, signal e and their related attributes, starts the excitation signal, and transmits it to the target control system. Similarly, exciter B and exciter D also complete the instruction information parsing of the time slice Time1 of script band B and script band D at the same time, and output the excitation signal.
[0090] like Fig.10 It is a process diagram of automatically making a scene script according to the monitoring signal of the scene in the simulation test method of the present invention.
[0091] The exciter receives the synchronization frame sent by the management platform, and adjusts the time slice of its own scene script according to the information content of the synchronization frame to synchronize it with the management platform.
[0092] The target control system receives the excitation signal at Time 1 through the test cable and responds. The response results are monitored in real time by exciters A, B and D. These captured feedback signals are time-stamped (starting time, duration) on their corresponding scripts, and the relevant information is fed back to the management platform; for example, if exciter A captures the output signal y near the Time 2 time slice, captures the output signal x near the Time 2 time slice + 5 times the basic time slice, and exciter B captures the output signal z near the Time i time slice, exciter A and exciter B respectively feed back the captured signals and related detailed attribute information such as the channel number of the captured signals to the management platform.
[0093] The management platform makes further simulation test judgments based on the feedback signals and scenario scripts.
[0094] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of combined actions, but those skilled in the art should be aware that the present invention is not limited by the described order of actions, because according to the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention. In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0095] In some embodiments, an embodiment of the present invention provides a non-volatile computer-readable storage medium, which stores one or more programs including execution instructions, and the execution instructions can be read and executed by an electronic device (including but not limited to a computer, a server, or a network device, etc.) to execute the script generation method of any of the above-mentioned simulation tests of the present invention.
[0096] In some embodiments, an embodiment of the present invention also provides a computer program product, which includes a computer program stored on a non-volatile computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer executes the script generation method of any of the above-mentioned simulation tests.
[0097] In some embodiments, an embodiment of the present invention also provides an electronic device, comprising: at least one processor, and a memory communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform a script generation method for a simulation test.
[0098] In some embodiments, an embodiment of the present invention further provides a storage medium having a computer program stored thereon, wherein the program, when executed by a processor, implements a script generation method for a simulation test.
[0099] Fig.11 FIG. 1 is a schematic diagram of the hardware structure of an electronic device for executing a simulation test script generation method provided by another embodiment of the present application. Fig.11 As shown, the device includes:
[0100] One or more processors 1110 and memory 1120, Fig.11 A processor 1110 is taken as an example.
[0101] The device for executing the script generation method for simulation testing may further include: an input device 1130 and an output device 1140 .
[0102] The processor 1110, the memory 1120, the input device 1130 and the output device 1140 may be connected via a bus or other means. Fig.11 The example of connecting through bus is taken in the following.
[0103] The memory 1120, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer executable programs and modules, such as program instructions / modules corresponding to the script generation method for simulation testing in the embodiment of the present application. The processor 1110 executes various functional applications and data processing of the server by running the non-volatile software programs, instructions and modules stored in the memory 1120, that is, the script generation method for simulation testing in the above method embodiment is implemented.
[0104] The memory 1120 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the script generation device of the simulation test, etc. In addition, the memory 1120 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 1120 may optionally include a memory remotely arranged relative to the processor 1110, and these remote memories may be connected to the script generation device of the simulation test via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0105] The input device 1130 can receive input digital or character information and generate signals related to user settings and function control of the script generation device for simulation test. The output device 1140 can include display devices such as display screens.
[0106] The one or more modules are stored in the memory 1120, and when executed by the one or more processors 1110, the script generation method for the simulation test in any of the above method embodiments is executed.
[0107] The above-mentioned product can execute the method provided in the embodiment of the present application, and has the functional modules and beneficial effects corresponding to the execution method. For technical details not fully described in this embodiment, please refer to the method provided in the embodiment of the present application.
[0108] The electronic devices of the embodiments of the present application exist in various forms, including but not limited to:
[0109] (1) Mobile communication devices: These devices are characterized by their mobile communication functions and their main purpose is to provide voice and data communications. These terminals include: smart phones (such as iPhone), multimedia phones, functional phones, and low-end phones.
[0110] (2) Ultra-mobile personal computer devices: These devices fall into the category of personal computers, have computing and processing capabilities, and generally also have mobile Internet access features. These terminals include: PDA, MID and UMPC devices, such as iPad.
[0111] (3) Portable entertainment devices: These devices can display and play multimedia content. They include audio and video players (such as iPods), handheld game consoles, e-books, as well as smart toys and portable car navigation devices.
[0112] (4) Server: A device that provides computing services. The server consists of a processor, hard disk, memory, system bus, etc. The server is similar to a general computer architecture, but because it needs to provide highly reliable services, it has higher requirements in terms of processing power, stability, reliability, security, scalability, and manageability.
[0113] (5) Other electronic devices with data interaction functions.
[0114] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0115] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a general hardware platform, and of course, by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0116] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for generating a simulation test script for a central management system, comprising: Receiving a first monitoring signal of a new operation scenario, and configuring an excitation environment for the new operation scenario based on the first monitoring signal, wherein the first monitoring signal has a periodic feature, and the excitation environment configuration includes configuring an exciter participating in the excitation; Determining the basic time slice corresponding to the new operation scenario based on the periodic characteristics of the first monitoring signal includes: analyzing the shortest time period that the first monitoring signal can receive, wherein the time slice is less than the shortest time period; defining the basic time slice as one of the common factors of the periodic characteristics of the first monitoring signal after rounding; A corresponding script band is established for each of the stimulators, and an instruction sequence is filled into each of the script bands based on the monitoring signal to form a scenario script for a new operating environment, wherein the script band is a set of time-triggered instruction sequences with the basic time slice as a step length, and the script bands are spaced apart by integer multiples of the basic time slice.
2. The method according to claim 1, wherein: The first monitoring signal includes multiple groups of signals, each group of signals includes multiple signals, and the method further includes: Checking the duration of each signal in the scenario script of the new operating environment, and setting the duration of each signal to be shorter than the interval between two adjacent basic time slices; When making the scene script, a synchronization frame instruction is added at every time interval of a preset multiple of the basic time slice, so as to synchronize the time of the script bands of different stimulators.
3. The method according to claim 1, before receiving the first monitoring signal of the new operation scenario, the method comprises: Determining whether the operation scenario of the second monitoring signal is an existing operation scenario or a new operation scenario; If there is an existing operation scenario, search for an incentive environment configuration corresponding to the existing operation scenario, and convert the second monitoring signal into a scenario script according to the incentive environment configuration.
4. A simulation test method for an actuator, comprising: Real-time acquisition of the scenario script configured according to the incentive environment sent by the central management system, wherein the scenario script configured according to the incentive environment includes: receiving a first monitoring signal of a new operating scenario, configuring the incentive environment for the new operating scenario based on the first monitoring signal, wherein the first monitoring signal has a periodic characteristic, and the incentive environment configuration includes configuring an exciter participating in the excitation; determining the basic time slice corresponding to the new operating scenario based on the periodic characteristic of the first monitoring signal includes: analyzing the shortest time period that the first monitoring signal can receive, wherein the time slice is less than the shortest time period; defining the basic time slice as one of the common factors of the periodic characteristic of the first monitoring signal after rounding; establishing a corresponding script band for each of the exciters, and filling in an instruction sequence in each of the script bands based on the monitoring signal to form a scenario script for the new operating environment, wherein the script band is a set of time-triggered instruction sequences with the basic time slice as a step length, and the script bands are separated by integer multiples of the basic time slice; The instruction sequence on the script tape corresponding to the actuator is interpreted, and the excitation signal is started based on the interpretation result and transmitted to the target control system.
5. The method according to claim 4, further comprising: The synchronization frame instruction of the central management system is obtained, and the scene script of the actuator is adjusted according to the synchronization frame instruction so that the actuator is synchronized with the central management system.
6. The method according to claim 4, further comprising: Performing real-time monitoring on the target control system and capturing feedback signals of the target control system; A time stamp is made on the script tape corresponding to the actuator based on the start and end time of the feedback signal, and the time stamp is fed back to the central management system.
7. An electronic device, comprising: At least one processor, and a memory communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can perform the steps of the method described in any one of claims 1 to 6.
8. A storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method described in any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
A space navigation component and part application verification platform based on an equivalent excitation testing module
CN107894760A
Embedded system test environment construction method based on dynamic configurable framework
CN110879769A