CN117390853A - Simulation method, device, equipment and storage medium based on man-machine interaction - Google Patents

Simulation method, device, equipment and storage medium based on man-machine interaction Download PDF

Info

Publication number
CN117390853A
CN117390853A CN202311329412.5A CN202311329412A CN117390853A CN 117390853 A CN117390853 A CN 117390853A CN 202311329412 A CN202311329412 A CN 202311329412A CN 117390853 A CN117390853 A CN 117390853A
Authority
CN
China
Prior art keywords
hardware
communication
simulation
data
simulation software
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311329412.5A
Other languages
Chinese (zh)
Inventor
杨其康
李凯文
黎祖维
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Invic Software Technology Co ltd
Original Assignee
Shenzhen Invic Software Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Invic Software Technology Co ltd filed Critical Shenzhen Invic Software Technology Co ltd
Priority to CN202311329412.5A priority Critical patent/CN117390853A/en
Publication of CN117390853A publication Critical patent/CN117390853A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/011Arrangements for interaction with the human body, e.g. for user immersion in virtual reality
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/10Geometric CAD
    • G06F30/12Geometric CAD characterised by design entry means specially adapted for CAD, e.g. graphical user interfaces [GUI] specially adapted for CAD

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Geometry (AREA)
  • General Engineering & Computer Science (AREA)
  • Evolutionary Computation (AREA)
  • Computer Hardware Design (AREA)
  • Human Computer Interaction (AREA)
  • Architecture (AREA)
  • Computational Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a simulation method, a device, equipment and a storage medium based on man-machine interaction, wherein the method comprises the steps of obtaining simulation software configuration data; generating man-machine interaction simulation software based on the simulation software configuration data; acquiring an interactive interface; acquiring selected hardware based on the interactive interface; based on the interactive interface, acquiring communication data of the selected hardware; based on the communication data of the selected hardware, establishing communication between the man-machine interaction simulation software and the selected hardware; operational state data of the selected hardware is obtained.

Description

Simulation method, device, equipment and storage medium based on man-machine interaction
Technical Field
The present invention relates to the field of simulation technologies, and in particular, to a simulation method, apparatus, device, system, and computer readable storage medium based on man-machine interaction.
Background
At present, in the process of developing application software through man-machine interaction (Human Machine Interface, HMI), the application software is usually developed on an upper computer, and then the developed application software is downloaded to a lower computer to run. In the prior art, because the running environment of the application software is on the lower computer, the developer cannot directly check the effect of the application software. This presents a certain trouble to the application development process, not only increasing the difficulty of debugging, but also possibly leading to the development of unexpected application software.
The HMI simulation software in the prior art lacks real hardware and cannot simulate the actual running environment of the HMI application software. The HMI simulation software of the existing scheme does not simulate a hardware environment, and the HMI application software cannot simulate a real running condition.
Disclosure of Invention
In order to solve the existing technical problems, the embodiment of the invention provides a simulation method, a simulation device, simulation equipment and a computer readable storage medium based on man-machine interaction, which can realize simulation of hardware on electronic equipment, facilitate software testers to know the simulated hardware, and save a link of downloading software to the equipment, thereby improving the working efficiency.
In a first aspect, a simulation method based on man-machine interaction is provided, including:
acquiring simulation software configuration data;
generating man-machine interaction simulation software based on the simulation software configuration data;
acquiring an interactive interface;
acquiring selected hardware based on the interactive interface;
based on the interactive interface, acquiring communication data of the selected hardware;
based on the communication data of the selected hardware, establishing communication between the man-machine interaction simulation software and the selected hardware;
operational state data of the selected hardware is obtained.
In a second aspect, a simulation device based on man-machine interaction is provided, including:
the acquisition module is used for acquiring simulation software configuration data;
the generation module is used for generating man-machine interaction simulation software based on the simulation software configuration data;
the acquisition module is also used for acquiring an interactive interface;
the acquisition module is also used for acquiring the selected hardware based on the interactive interface;
the acquisition module is also used for acquiring communication data of the selected hardware based on the interactive interface;
the building module is used for building communication between the man-machine interaction simulation software and the selected hardware based on communication data of the selected hardware;
the acquisition module is also used for acquiring the running state data of the selected hardware.
In a third aspect, an electronic device is provided, including a memory and a processor, where the memory stores a computer program, where the computer program, when executed by the processor, causes the processor to execute the steps of the human-computer interaction based simulation method provided in the embodiments of the present application.
In a fourth aspect, a simulation system based on man-machine interaction is provided, including the electronic device and the upper computer according to the embodiments of the present application, where the upper computer configures the simulation software configuration data.
In a fifth aspect, a storage medium is provided, where a computer program is stored, where the computer program when executed by a processor causes the processor to perform the steps of the human-computer interaction based simulation method provided in the embodiments of the present application.
The simulation method, the device, the equipment, the system and the computer readable storage medium based on human-computer interaction provided by the embodiment can acquire simulation software configuration data of human-computer interaction simulation software, can configure the human-computer interaction simulation software on the electronic equipment based on the simulation software configuration data, can acquire data of an interaction interface, can display the interaction interface, can select hardware to be simulated through the interaction interface, and can configure communication data of the hardware to be simulated on the interaction interface. After the man-machine interaction simulation software and the simulated hardware establish communication, the man-machine interaction simulation software can acquire the running state of the simulated hardware, so that software testers can conveniently know the simulated hardware, and can quickly locate and solve the problems on the software based on the acquired running state data. The hardware simulation can be realized on the electronic equipment, and the link of downloading the software to the equipment is omitted, so that the working efficiency can be improved, and meanwhile, the communication cost between the lower computer and the upper computer is reduced.
Drawings
FIG. 1 is an application environment diagram of a simulation method based on human-computer interaction in an embodiment;
FIG. 2 is an application environment diagram of a simulation method based on human-computer interaction in another embodiment;
FIG. 3 is a flow chart of a simulation method based on human-computer interaction in an embodiment;
FIG. 4 is a schematic diagram of an interactive interface in an embodiment;
FIG. 5 is a schematic diagram of an interactive interface in yet another embodiment;
FIG. 6 is a flow chart of a simulation method based on human-computer interaction in yet another embodiment;
FIG. 7 is a schematic diagram of simulated interaction in an embodiment;
FIG. 8 is a flow chart of a simulation method based on human-computer interaction in another embodiment;
FIG. 9 is a schematic diagram of simulated interaction in another embodiment;
FIG. 10 is a schematic diagram of a simulation apparatus based on human-computer interaction in an embodiment;
FIG. 11 is a schematic diagram of a simulation device based on human-computer interaction in an embodiment.
Detailed Description
The technical scheme of the invention is further elaborated below by referring to the drawings in the specification and the specific embodiments.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the scope of the invention. The term "and/or" as used herein includes any and all combinations of one or more of the associated listed items.
In the following description, reference is made to the expression "some embodiments" which describe a subset of all possible embodiments, but it should be understood that "some embodiments" may be the same subset or a different subset of all possible embodiments and may be combined with each other without conflict.
Referring to fig. 1, an application environment diagram of a simulation method based on man-machine interaction in an embodiment is shown. The application environment diagram includes a host computer 100, an electronic device 200, and physical hardware 300. The upper computer 100 is a computer capable of directly sending a control command, and the upper computer 100 configures simulation software configuration data of the man-machine interaction simulation software operation. The electronic device 200 communicates with the host computer 100, and the electronic device 200 can obtain simulation software configuration data and generate man-machine interaction simulation software according to the simulation software configuration data. The physical hardware 300 is connected to the electronic device 200, and the physical hardware 300 is hardware that can provide at least one function, and includes, but is not limited to, a programmable logic controller (Programmable Logic Controller, PLC), various sensors, and the like. The electronic device 300 can simulate the functions of the entity hardware 300 by using man-machine interaction simulation software.
Referring to fig. 2, an application environment diagram of a simulation method based on man-machine interaction in another embodiment is shown. Comprises an upper computer 100 and an electronic device 200. The upper computer 100 is a computer capable of directly sending a control command, and the upper computer 100 configures simulation software configuration data of the operation of the man-machine interaction simulation software and configures hardware simulation configuration data of the operation of the hardware simulation software. The electronic device 200 communicates with the host computer 100, and the electronic device 200 can obtain configuration data of simulation software and generate man-machine interaction simulation software according to the configuration data. The electronic device 200 is capable of acquiring hardware emulation configuration data and generating hardware emulation software from the hardware emulation configuration data. The electronic device 200 is capable of virtualizing a plurality of virtual hardware from the hardware emulation configuration data. Virtual hardware is hardware that can provide at least one function, including but not limited to virtual PLCs, virtual sensors, and the like. Thus, the hardware simulation software can simulate the running environment of a plurality of virtual hardware. The hardware simulation software can establish communication with the man-machine interaction simulation software, so that simulation of the selected virtual hardware is realized.
Referring to fig. 3, a flowchart of a simulation method based on man-machine interaction according to an embodiment of the present application is provided. The simulation method based on the human-computer interaction is applied to the electronic equipment and comprises the following steps of:
S11, acquiring simulation software configuration data.
The simulation software configuration data is used for configuring man-machine interaction simulation software, and the simulation software configuration data is configured on the upper computer 100. Wherein the simulation software configuration data includes, but is not limited to: hardware identification, communication data of at least one hardware, operation environment data of man-machine interaction simulation software, a software interaction interface for man-machine interaction simulation software, and the like. Wherein the hardware identification is used to identify the hardware, the hardware identification including, but not limited to: hardware name, hardware code, etc. The communication data includes, but is not limited to, a communication port, a communication station number, and the like. The operation environment data of the man-machine interaction simulation software includes, but is not limited to: software configuration includes all documents, source code, executable files, library files, configuration files, test data, test tools, compilers, and the like in software development.
In some embodiments, the host computer 100 transmits the simulation software configuration data to the electronic device 200, and the electronic device 200 receives the simulation software configuration data. In other embodiments, the electronic device 200 may actively request the simulation software configuration data from the host computer 100, and the host computer 100 may send the simulation software configuration data to the electronic device 200 based on the received instruction for requesting the simulation software configuration data.
S12, based on simulation software configuration data, generating man-machine interaction simulation software.
The electronic device 300 generates human-machine interaction simulation software based on the operating environment data of the human-machine interaction simulation software. In one example, the runtime environment data may be in the form of an executable file, a computer program file, typically used for applications or installers in Wi-windows operating systems. The executable file contains all the codes and data required by the man-machine interaction simulation software. Therefore, the executable file can be called, and the executable file is installed in the electronic equipment to form the man-machine interaction simulation software.
S13, acquiring an interactive interface.
The interactive interface is used for providing an interface for selecting hardware to be simulated for a user. The interactive interface is provided with a hardware terminal option. Through the hardware-side option, the user can select the hardware that needs to be emulated. The interactive interface is also provided with communication parameter options. Through the communication parameter option, the user can set the communication parameters of the hardware to be simulated.
The upper computer 100 configures the interactive interface, and the electronic device 200 may actively acquire the interactive interface, or may actively send the interactive interface by the upper computer 100.
In some embodiments, the interactive interface is a software interactive interface, which is obtained from simulation software configuration data.
In some embodiments, the selected hardware is virtual hardware, the hardware emulation software virtualizes at least one virtual hardware, and the hardware emulation configuration data includes a hardware interactive interface, which is a user interface for hardware emulation. The interactive interface may also be a software interactive interface or a hardware interactive interface. The hardware interactive interface may be obtained from hardware simulation configuration data.
S14, acquiring selected hardware based on the interactive interface.
The interactive interface is provided with a hardware terminal option which comprises at least one of the following: communication port options and communication station number options. The user can select the hardware to be simulated through the hardware terminal options. As shown in fig. 1 and 2, the selected hardware may be virtual hardware or physical hardware.
Acquiring the selected hardware based on the interactive interface comprises:
based on the interactive interface, acquiring a hardware selection instruction for the hardware terminal option, and determining the hardware matched with the hardware selection instruction as the selected hardware. In some illustrative examples, the hardware terminal options may be a drop-down box, a checkbox, or the like, and by providing the hardware options on the interactive interface, the user may select hardware that needs to be debugged in a simulation manner according to his own needs, thereby improving the flexibility of debugging.
In some embodiments, one communication port corresponds to a plurality of hardware, each hardware corresponding to a different communication station number. Therefore, on the interactive interface, the user needs to select the communication port and the communication station number, and the electronic device 300 obtains the hardware selection instruction of the user, where the hardware selection instruction includes the selected communication port and the communication station number, so that a selected hardware can be determined according to the selected communication port and the communication station number. For example, one communication port a may be connected to three temperature control devices B, C, D, where the temperature control device B corresponds to the communication station number 1, the temperature control device C corresponds to the communication station number 2, and the temperature control device D corresponds to the communication station number 3, so that if the communication port a and the communication station number 1 are selected, the temperature control device B is selected. As shown in fig. 4, the box of "equipment port" indicates a communication port option, and the box of "station number" indicates a communication station number option.
In some embodiments, one communication port corresponds to one hardware, each hardware corresponding to a different communication port. On the interactive interface, the user needs to select a communication port, and the electronic device 300 obtains a hardware selection instruction selected by the user, where the hardware selection instruction includes the selected communication port. This allows a selected hardware to be determined based on the selected communication port.
In some embodiments, the hardware-side options include hardware identification. The hardware identification is used to indicate that the hardware is identified in order to facilitate the specific hardware. The hardware identification is associated with communication data of the hardware. The interactive interface is provided with a hardware identification option, the hardware selection instruction comprises a selected hardware identification, and the hardware selection instruction for the hardware identification option is obtained based on the interactive interface; and according to the selected hardware identifier, acquiring communication data associated with the selected hardware identifier, and displaying the communication data associated with the selected hardware identifier on the interactive interface. The user can modify the displayed communication data on the interactive interface.
S15, based on the interactive interface, the communication data of the selected hardware are obtained.
The host computer 100 configures each hardware and the communication data of each hardware in advance, the electronic device 300 can obtain the communication data of each hardware from the host computer 100, and the electronic device 200 can actively obtain the communication data of each hardware, or the host computer 100 can actively send the communication data of each hardware. On the interactive interface, the communication data of each hardware can be modified.
The interactive interface is provided with communication parameter options, and the communication parameter options comprise at least one of the following: communication port option, communication station number option, communication protocol option, communication rate option, check bit option, data bit option, stop bit option. The communication rate, check bit, data bit and stop bit are important parameters for serial communication, so that setting these parameters is the premise of correct communication.
Acquiring communication data of the selected hardware comprises:
based on an interactive interface, a communication parameter selection instruction of the communication parameter options of the selected hardware is obtained, and data corresponding to the communication parameter selection instruction is used as communication data of the selected hardware.
As shown in fig. 4, the boxes of "communication type" indicate communication protocol options, the boxes of "baud rate" indicate communication rate options, the boxes of "data bit" indicate data bit options, the boxes of "stop bit" indicate stop bit options, and the boxes of "check bit" indicate check bit options. The communication parameters of the selected hardware can be set through a plurality of options of communication settings arranged on the interactive interface, so that the man-machine interaction simulation software is communicated with the selected hardware.
S16, based on the communication data of the selected hardware, establishing communication between the man-machine interaction simulation software and the selected hardware.
In some embodiments, after the communication data of the selected hardware is obtained, if the selected hardware is virtual hardware, the hardware simulation software may request communication from the man-machine interaction simulation software based on the communication data of the selected hardware; the man-machine interaction simulation software can also request communication from the hardware simulation software based on the communication data of the selected hardware.
In some embodiments, after the communication data of the selected hardware is obtained, if the selected hardware is physical hardware, the human-computer interaction simulation software requests communication from the hardware simulation software based on the communication data of the selected hardware.
S17, acquiring running state data of the selected hardware.
After the man-machine interaction simulation software establishes communication with the selected hardware, the selected hardware operates under different configuration parameters to simulate the operation states under different working environments, so that a user can accurately test the working conditions of the selected hardware. The man-machine interaction simulation software is used for displaying simulation data of the selected hardware to a user so that the user can know the running state of the selected hardware, and the running state of the selected hardware can be analyzed and debugged conveniently. Therefore, the man-machine interaction simulation software can actively request the running state data from the selected hardware, or the entity hardware 300 or the hardware simulation software can acquire the running state data according to the preset time length and actively send the running state data to the man-machine interaction simulation software.
The operating conditions include, but are not limited to: normal operating state data, fault state data. Wherein the normal operating state data includes, but is not limited to: the operation time length, the start operation time and the end operation time. Wherein the fault status data includes, but is not limited to: fault codes, fault causes, etc.
The interactive interface is provided with data options, the data options include, but are not limited to, data names, data storage addresses and the like, the data options set on the interactive interface by a user are acquired, and specific data to be acquired can be determined. The electronic device 300 obtains status data corresponding to the selected data option.
FIG. 5 is a schematic diagram of an interactive interface in yet another embodiment. The box of "address" indicates the memory address of the data, i.e. the memory address of the fetch register is a value of 500.
In the above embodiment, the electronic device may obtain simulation software configuration data of the man-machine interaction simulation software, and may configure the man-machine interaction simulation software on the electronic device based on the simulation software configuration data, and the electronic device may obtain data of the interaction interface, display the interaction interface, and select hardware to be simulated through the interaction interface, and may configure communication data of the hardware to be simulated on the interaction interface. After the man-machine interaction simulation software and the simulated hardware establish communication, the man-machine interaction simulation software can acquire the running state of the simulated hardware, so that software testers can conveniently know the simulated hardware, and can quickly locate and solve the problems on the software based on the acquired running state data. The hardware simulation can be realized on the electronic equipment, and the link of downloading the software to the equipment is omitted, so that the working efficiency can be improved, and meanwhile, the communication cost between the lower computer and the upper computer is reduced.
In order to test the hardware in multiple aspects, different operation parameters need to be set so as to test the operation condition of the hardware under different operation parameters, thereby simulating various actual working conditions.
In some embodiments, the interactive interface is provided with operating parameter options, which may be different for each piece of hardware. Based on the interactive interface, the electronic device 200 obtains a parameter selection instruction for the operation parameter option of the selected hardware to enable the selected hardware to simulate operation.
For example, the basic principle of PLC simulation is to implement debugging and verification of a PLC program by simulating a hardware environment of the PLC, including an input module, an output module, a central processing unit, etc., and an execution process of the program. Operational parameter options for the PLC include, but are not limited to: hardware environment parameter options for the PLC, input signal parameter setting options, output signal parameter setting options, central processor parameter setting options, and the like. The operation state of the PLC under different parameters can be simulated by setting the operation parameter options of the PLC, so that various actual working conditions of the PLC are simulated, the execution process and the result of the PLC program are convenient to observe, and the problems are rapidly positioned and solved.
The main principle of the simulation of the temperature control equipment is that the temperature sensor detects the ambient temperature, and the temperature controller monitors and adjusts according to the ambient temperature. Operating parameter options for the temperature control device include, but are not limited to: a collected temperature setting item, a maximum temperature setting item, a minimum temperature setting item, and so forth. By setting operation parameter options of the temperature control equipment, the adjustment conditions of the temperature control equipment at different temperatures can be tested to debug the temperature control equipment. The operation state of the temperature control equipment under different temperature parameters can be simulated by setting the operation parameter options of the temperature control equipment, so that the adjustment condition of the temperature control equipment under different temperatures is simulated to debug the temperature control equipment.
In the above embodiment, by setting the operation parameter options, the operation state of the hardware under various parameters can be simulated so that the tester modifies the operation parameters according to the simulation result, thereby facilitating the observation of the execution process and result of the program, and thus the problems can be rapidly positioned and solved, the development and debugging of the display software of the hardware can be reduced, the working efficiency can be improved, and the communication cost between the lower computer and the upper computer can be reduced.
In some embodiments, obtaining operational state data for the selected hardware includes: and when the running state of the selected hardware is an abnormal state, acquiring feedback information indicating the abnormal state based on the man-machine interaction simulation software.
Abnormal conditions include, but are not limited to: abnormal operating parameters, fault conditions, etc. The abnormal state can be obtained by the selected hardware, and the abnormal state can be actively sent to the man-machine interaction simulation software, or the abnormal state can be obtained by the man-machine interaction simulation software.
In an optional example, the electronic device 200 may determine whether the operation state is abnormal according to the operation state data, for example, compare the acquired operation state data with preset data, and if the acquired operation state data matches with the preset data, confirm that the acquired operation state is a normal state; if the running state data is not matched with the preset data, confirming that the acquired running state data is in an abnormal state. The steps can be executed in man-machine interaction simulation software or hardware simulation software.
Optionally, the method further comprises:
and within a preset time period, feedback data indicating an abnormal state is not acquired, and the abnormality is prompted.
In the embodiment, during simulation, the abnormal state of the selected hardware is acquired, so that the execution process and the result of the program are conveniently observed, the problem is rapidly positioned and solved, the development and the debugging of the display software of the hardware are reduced, and the working efficiency is improved. And when the man-machine interaction simulation software does not receive the abnormal feedback information, the user needs to be prompted to be abnormal so as to facilitate the testers to check the reasons in time.
Referring to fig. 6, in another embodiment of the present application, the interactive interface may be a software interactive interface, and the selected hardware may be virtual hardware or physical hardware, which provides a flowchart of a simulation method based on man-machine interaction. The simulation method based on the human-computer interaction is applied to the electronic equipment and comprises the following steps of:
s21, acquiring simulation software configuration data.
S22, based on simulation software configuration data, generating man-machine interaction simulation software.
S23, acquiring a software interaction interface from simulation software configuration data.
S24, acquiring selected hardware based on the software interaction interface.
S25, based on the software interaction interface, the communication data of the selected hardware are obtained.
S26, based on the communication data of the selected hardware, establishing communication between the man-machine interaction simulation software and the selected hardware.
S27, acquiring running state data of the selected hardware.
In the above embodiments, the functions provided by the software interactive interface include the functions provided by the above interactive interface, which are not described in detail herein. The steps S21, S22, and S27 are the same as S11, S12, and S17. The steps performed at S23, S24, S25 are implemented based on a software interactive interface. The functions provided by the software interactive interface include those provided by the interactive interface described above and will not be described in detail.
In step S26, as shown in fig. 7, a simulation interaction diagram provided in an embodiment is that a first request communication instruction is sent to the selected hardware through the man-machine interaction simulation software. The first request communication instruction includes communication data of the selected hardware. After the selected hardware receives the first request communication instruction, communication is established with the man-machine interaction simulation software based on the communication data. In some alternative examples, after the selected hardware receives the first communication request instruction of the human-machine interaction simulation software, communication feedback information may be sent to the human-machine interaction simulation software to inform the human-machine interaction simulation software that the communication request instruction is received.
In some embodiments, the selected hardware may be virtual hardware, with the hardware emulation software providing the operating environment of the virtual hardware. The electronic device 200 acquires hardware simulation configuration data from the host computer 100, the hardware simulation configuration data being used to configure hardware simulation software. The hardware simulation configuration data is configured on the host computer 100. Wherein the hardware emulation configuration data includes, but is not limited to: the system comprises at least one virtual hardware, second communication data for establishing communication between each virtual hardware and the simulation software, an operation environment of each virtual hardware, a virtual hardware identifier, communication data of at least one virtual hardware, operation environment data of the hardware simulation software, a hardware interaction interface for the hardware simulation software and the like. The man-machine interaction simulation software sends a first request communication instruction to the hardware simulation software. After the hardware simulation software receives the first communication request instruction, communication is established with the man-machine interaction simulation software based on the communication data.
In some embodiments, the software interactive interface is provided with operating parameter options, which may be different for each piece of hardware. Based on the software interactive interface, the electronic device 200 obtains a parameter selection instruction for the operation parameter options of the selected hardware, and the man-machine interaction simulation software sends the parameter selection instruction to the selected hardware so as to enable the selected hardware to simulate operation.
In the above embodiment, the electronic device may obtain simulation software configuration data of the man-machine interaction simulation software, and may configure the man-machine interaction simulation software on the electronic device based on the simulation software configuration data, and may select hardware to be simulated through the software interaction interface, and may configure communication data of the hardware to be simulated at the software interaction interface. After the man-machine interaction simulation software and the simulated hardware establish communication, the man-machine interaction simulation software can acquire the running state of the simulated hardware, so that a tester can conveniently know the simulated hardware, and the problem can be quickly positioned and solved based on the acquired running state data. The simulation of hardware can be realized on the electronic equipment, so that the working efficiency can be improved, and meanwhile, the communication cost between the lower computer and the upper computer is reduced.
Referring to fig. 8, in another embodiment of the present application, the interactive interface is a hardware interactive interface, the selected hardware is virtual hardware, and a flowchart of a simulation method based on man-machine interaction is provided. The simulation method based on the human-computer interaction is applied to the electronic equipment and comprises the following steps of:
s31, acquiring simulation software configuration data.
S32, based on simulation software configuration data, generating man-machine interaction simulation software.
S33, acquiring hardware simulation configuration data.
The hardware emulation configuration data is used to configure hardware emulation software. The hardware simulation configuration data is configured on the host computer 100. Wherein the hardware emulation configuration data includes, but is not limited to: the system comprises at least one virtual hardware, second communication data for establishing communication between each virtual hardware and the simulation software, an operation environment of each virtual hardware, a virtual hardware identifier, communication data of at least one virtual hardware, operation environment data of the hardware simulation software, a hardware interaction interface for the hardware simulation software and the like. Wherein the virtual hardware identification is used to identify the virtual hardware, the virtual hardware identification including, but not limited to: virtual hardware name, virtual hardware code, etc. The communication data includes, but is not limited to, a communication port, a communication station number, and the like. The operating environment data of the hardware emulation software includes, but is not limited to: all documents of hardware emulation software, source code, executable files, library files, configuration files, test data, test tools, compilers, and the like.
The electronic device 300 generates hardware emulation software based on the operating environment data of the hardware emulation software.
In some embodiments, the host computer 100 transmits the hardware simulation configuration data to the electronic device 200, and the electronic device 200 receives the hardware simulation configuration data. In other embodiments, the electronic device 200 may actively request the hardware simulation configuration data from the host computer 100, and the host computer 100 may send the hardware simulation configuration data to the electronic device 200 based on the received instruction for requesting the hardware simulation configuration data.
S34, acquiring a hardware interaction interface based on the hardware simulation configuration data.
S35, acquiring selected hardware based on the hardware interaction interface.
S36, based on the hardware interaction interface, the communication data of the selected hardware is obtained.
S37, based on the communication data of the selected hardware, establishing communication between the man-machine interaction simulation software and the selected hardware.
S38, acquiring running state data of the selected hardware.
In the above embodiments, the functions provided by the hardware interactive interface include the functions provided by the above interactive interface, which are not described in detail herein. The steps performed in the steps S31, S32, and S38 are the same as those in the steps S11, S12, and S17, and will not be described in detail here. The steps performed in S35, S36, S37 are implemented based on a hardware interactive interface. The functions provided by the hardware interactive interface include those provided by the interactive interface described above, and thus will not be described in detail.
In step S37, as shown in fig. 9, a simulation interaction schematic diagram provided in an embodiment is provided, and a second request communication instruction is sent to the man-machine interaction simulation software through the hardware simulation software. The second request communication instruction includes communication data of the selected hardware. After the man-machine interaction simulation software receives the second communication request instruction, communication is established with the hardware simulation software based on the communication data. In some alternative examples, after the human-computer interaction simulation software receives the second request communication instruction of the hardware simulation software, communication feedback information may be sent to the hardware simulation software to inform the hardware simulation software that the request communication instruction is received. The hardware simulation software simulates the selected hardware according to the communication data of the hardware.
In some embodiments, the hardware emulation software emulates the operation of the selected hardware based on the operating environment of the selected hardware; and when the running state of the selected hardware is monitored to be an abnormal state, feedback information is sent to the man-machine interaction simulation software.
In some embodiments, the hardware interactive interface is provided with operating parameter options, which may be different for each hardware. Based on the hardware interactive interface, the electronic device 200 obtains a parameter selection instruction for the operation parameter options of the selected hardware, and the hardware simulation software configures the operation environment of the selected hardware according to the parameter selection instruction so as to enable the selected hardware to simulate operation according to the selected environment.
In the above embodiment, the electronic device may obtain simulation software configuration data of the man-machine interaction simulation software, and may configure the man-machine interaction simulation software on the electronic device based on the simulation software configuration data, the electronic device may obtain hardware simulation configuration data of the man-machine interaction simulation software, and may configure the hardware simulation software on the electronic device based on the hardware simulation configuration data, the hardware simulation software may virtualize a plurality of virtual hardware, and may select hardware to be simulated through the hardware interaction interface, and may configure communication data of the hardware to be simulated on the hardware interaction interface. After the man-machine interaction simulation software and the simulated hardware establish communication, the man-machine interaction simulation software can acquire the running state of the simulated hardware, so that a tester can conveniently know the simulated hardware, and the problem on the software can be rapidly positioned and solved based on the acquired running state data. The hardware simulation can be realized on the electronic equipment, and the link of downloading the software to the equipment is omitted, so that the working efficiency can be improved, and meanwhile, the communication cost between the lower computer and the upper computer is reduced.
Referring to fig. 10, an embodiment of the present application provides a simulation apparatus based on man-machine interaction, including: an acquisition module 21 for acquiring simulation software configuration data; a generating module 22, configured to generate human-computer interaction simulation software based on the simulation software configuration data; the acquisition module 21 is further configured to acquire an interaction interface; the acquisition module 21 is further configured to acquire the selected hardware based on the interactive interface; the obtaining module 21 is further configured to obtain communication data of the selected hardware based on the interactive interface; the establishing module 23 is configured to establish communication between the man-machine interaction simulation software and the selected hardware based on the communication data of the selected hardware; the acquisition module 21 is further configured to acquire operating state data of the selected hardware.
Optionally, the interactive interface is provided with a hardware end option, and the hardware end option includes at least one of the following: the obtaining module 21 is further configured to obtain a hardware selection instruction for the hardware terminal option based on the interactive interface, and determine the hardware matching with the hardware selection instruction as the selected hardware.
Optionally, the interactive interface is provided with communication parameter options, and the communication parameter options include at least one of the following: the obtaining module 21 is further configured to obtain a communication parameter selection instruction for the communication parameter option of the selected hardware based on the interactive interface, and use data corresponding to the communication parameter selection instruction as communication data of the selected hardware.
Optionally, the interactive interface is provided with operation parameter options, and the obtaining module 21 is further configured to obtain, based on the interactive interface, a parameter selection instruction for the operation parameter options of the selected hardware, so as to enable the selected hardware to simulate operation.
Optionally, the simulation software configuration data includes a software interaction interface, and the interaction interface is a software interaction interface.
Optionally, the establishing module 23 is further configured to send, based on the communication data of the selected hardware, a first communication request instruction to the selected hardware by using the man-machine interaction simulation software.
Optionally, the obtaining module 21 is further configured to obtain feedback information indicating an abnormal state based on the man-machine interaction simulation software when the running state of the selected hardware is the abnormal state.
Optionally, the prompting module 24 is configured to prompt the abnormality if feedback data indicating the abnormal state is not obtained within a preset period of time.
Optionally, the selected hardware is physical hardware.
Optionally, the selected hardware is virtual hardware, and the obtaining module 21 is further configured to obtain hardware emulation configuration data, where the hardware emulation configuration data includes at least one virtual hardware, second communication data for establishing communication between each virtual hardware and the emulation software, and an operating environment of each virtual hardware;
And generating hardware simulation software based on the hardware simulation configuration data.
Optionally, the hardware simulation configuration data includes a hardware interactive interface, and the interactive interface is a hardware interactive interface.
Optionally, the establishing module 23 is further configured to send, based on the communication data of the selected hardware, a second communication request instruction to the man-machine interaction simulation software by using the hardware simulation software;
receiving the second request communication instruction by using the man-machine interaction simulation software;
and establishing communication between the man-machine interaction simulation software and the selected hardware based on the second request communication instruction.
Optionally, the monitoring module 25 is configured to simulate the operation of the selected hardware based on the operation environment of the selected hardware;
and when the running state of the selected hardware is monitored to be an abnormal state, feedback information is sent to the man-machine interaction simulation software.
It will be appreciated by those skilled in the art that the structure of the human-computer interaction-based simulation apparatus in fig. 10 does not constitute a limitation of the human-computer interaction-based simulation apparatus, and the respective modules may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules may be embedded in hardware or independent of a controller in a computer device, or may be stored in software in a memory in the computer device, so that the controller may call and execute operations corresponding to the above modules. In other embodiments, more or fewer modules than illustrated may be included in a human-machine interaction-based simulation device.
Referring to fig. 11, in another aspect of the embodiments of the present application, there is further provided an electronic device 200, including a memory 3011 and a processor 3012, where the memory 3011 stores a computer program, and the computer program when executed by the processor causes the processor 212 to execute the steps of the human-computer interaction-based simulation method provided in any of the embodiments of the present application. Electronic device 200 may include a computing device (e.g., a desktop computer, a laptop computer, a tablet computer, a handheld computer, a smart speaker, a server, etc.), a mobile phone (e.g., a smart phone, a wireless phone, etc.), a wearable device (e.g., a pair of smart glasses or a smart watch), or the like.
Wherein the simulation device based on man-machine interaction includes but is not limited to: embedded equipment and electronic equipment.
Where the processor 3012 is a control center, various interfaces and lines are utilized to connect various portions of the overall computer device, perform various functions of the computer device and process data by running or executing software programs and/or modules stored in the memory 3011, and invoking data stored in the memory 3011. Optionally, the processor 3012 may include one or more processing cores; preferably, the processor 3012 may integrate an application processor and a modem processor, wherein the application processor primarily handles operating systems, user pages, applications, etc., and the modem processor primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 3012.
The memory 3011 may be used to store software programs and modules, and the processor 3012 executes various functional applications and data processing by executing the software programs and modules stored in the memory 3011. The memory 3011 may mainly include a storage program area that may store an operating system, application programs required for at least one function (such as a sound playing function, an image playing function, etc.), and a storage data area; the storage data area may store data created according to the use of the computer device, etc. In addition, memory 3011 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 3011 may also include a memory controller to provide access to the memory 3011 by the processor 3012.
In another aspect of the embodiments of the present application, there is further provided a storage medium storing a computer program, where the computer program when executed by a processor causes the processor to execute the steps of the human-computer interaction-based simulation method provided in any one of the embodiments of the present application.
Those skilled in the art will appreciate that implementing all or part of the processes of the methods provided in the above embodiments may be accomplished by computer programs stored on a non-transitory computer readable storage medium, which when executed, may comprise processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the various embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), memory bus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
The foregoing is merely illustrative of the present invention, and the present invention is not limited thereto, and any person skilled in the art will readily recognize that variations or substitutions are within the scope of the present invention. The scope of the invention is to be determined by the appended claims.

Claims (10)

1. The simulation method based on man-machine interaction is characterized by comprising the following steps of:
acquiring simulation software configuration data;
generating man-machine interaction simulation software based on the simulation software configuration data;
acquiring an interactive interface for simulation;
acquiring selected hardware based on the interactive interface;
based on the interactive interface, acquiring communication data of the selected hardware;
based on the communication data of the selected hardware, establishing communication between the man-machine interaction simulation software and the selected hardware;
operational state data of the selected hardware is obtained.
2. The human-computer interaction-based simulation method according to claim 1, wherein the interaction interface is provided with a hardware-side option, and the hardware-side option comprises at least one of the following: the method for acquiring the selected hardware based on the interactive interface comprises the following steps of:
And acquiring a hardware selection instruction for a hardware terminal option based on the interactive interface, and determining the hardware matched with the hardware selection instruction as the selected hardware.
3. The human-computer interaction-based simulation method according to claim 2, wherein the interaction interface is provided with communication parameter options, and the communication parameter options comprise at least one of the following: communication port option, communication station number option, communication protocol option, communication rate option, check bit option, data bit option, stop bit option, the obtaining the communication data of the selected hardware includes:
based on the interactive interface, a communication parameter selection instruction of the communication parameter options of the selected hardware is obtained, and data corresponding to the communication parameter selection instruction is used as communication data of the selected hardware.
4. The human-machine interaction-based simulation method according to claim 1, wherein the interaction interface is provided with operation parameter options, the method further comprising:
and based on the interactive interface, acquiring a parameter selection instruction of the operation parameter options of the selected hardware so as to enable the selected hardware to simulate operation.
5. The human-machine interaction-based simulation method of claim 1, wherein the simulation software configuration data comprises a software interaction interface, the interaction interface is a software interaction interface, the establishing communication between the human-machine interaction simulation software and the selected hardware based on the communication data of the selected hardware comprises: based on the communication data of the selected hardware, sending a first request communication instruction to the selected hardware by utilizing the man-machine interaction simulation software;
The acquiring the operation state data of the selected hardware comprises:
when the running state of the selected hardware is an abnormal state, acquiring feedback information indicating the abnormal state based on the man-machine interaction simulation software;
and within a preset time period, feedback data indicating the abnormal state is not acquired, and the abnormality is prompted on the software interactive interface.
6. A human-computer interaction based simulation method according to any of the claims 1 to 5, wherein the selected hardware is physical hardware.
7. The human-machine interaction-based simulation method of any one of claims 1 to 5, wherein the selected hardware is virtual hardware, the hardware simulation configuration data comprises a hardware interaction interface, the interaction interface is a hardware interaction interface, the method further comprising:
obtaining hardware simulation configuration data, wherein the hardware simulation configuration data comprises at least one virtual hardware, second communication data for establishing communication between each virtual hardware and the simulation software, and an operating environment of each virtual hardware;
generating hardware simulation software based on the hardware simulation configuration data;
simulating operation of the selected hardware by utilizing a hardware interactive interface based on the operation environment of the selected hardware;
And when the operation state of the selected hardware is monitored to be an abnormal state by utilizing a hardware interaction interface, feedback information is sent to the man-machine interaction simulation software.
8. A human-computer interaction-based simulation device, comprising:
the acquisition module is used for acquiring simulation software configuration data;
the generation module is used for generating man-machine interaction simulation software based on the simulation software configuration data;
the acquisition module is also used for acquiring an interactive interface;
the acquisition module is also used for acquiring the selected hardware based on the interactive interface;
the acquisition module is also used for acquiring communication data of the selected hardware based on the interactive interface;
the building module is used for building communication between the man-machine interaction simulation software and the selected hardware based on communication data of the selected hardware;
the acquisition module is also used for acquiring the running state data of the selected hardware.
9. An electronic device comprising a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of the method of any of claims 1 to 7.
10. A computer readable storage medium storing a computer program, which when executed by a processor causes the processor to perform the steps of the method according to any one of claims 1 to 7.
CN202311329412.5A 2023-10-13 2023-10-13 Simulation method, device, equipment and storage medium based on man-machine interaction Pending CN117390853A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311329412.5A CN117390853A (en) 2023-10-13 2023-10-13 Simulation method, device, equipment and storage medium based on man-machine interaction

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311329412.5A CN117390853A (en) 2023-10-13 2023-10-13 Simulation method, device, equipment and storage medium based on man-machine interaction

Publications (1)

Publication Number Publication Date
CN117390853A true CN117390853A (en) 2024-01-12

Family

ID=89438437

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311329412.5A Pending CN117390853A (en) 2023-10-13 2023-10-13 Simulation method, device, equipment and storage medium based on man-machine interaction

Country Status (1)

Country Link
CN (1) CN117390853A (en)

Similar Documents

Publication Publication Date Title
US10977014B2 (en) Web-based programming environment for embedded devices
US10663956B2 (en) Configuration in process plant using I/O-abstracted field device configurations
CN112270149B (en) Verification platform automatic integration method and system, electronic equipment and storage medium
CN104281520B (en) Tracking and method, the apparatus and system of debugging
EP3101547A1 (en) Control system, method, program and information processing device
CN106648556B (en) Method and device for front-end and back-end integrated development test
CN105164644A (en) Hook framework
CN107656872B (en) Software testing method, device, equipment and computer storage medium
CN104155972A (en) Mechanical engineering electronic controller parameter debugging method
US9645911B2 (en) System and method for debugging firmware/software by generating trace data
CN104915297B (en) A kind of automated testing method of the APP power consumption of android equipment
US20100312541A1 (en) Program test device and program
CN113672441A (en) Method and device for testing intelligent equipment
KR20180061589A (en) Software build system and software build method using the system
CN109194535A (en) A kind of terminal test system and method
CN111563032A (en) APP debugging method and device, computer equipment and storage medium
JP7157335B2 (en) API adapter test system, API adapter test support device, API adapter test support method, and API adapter test support program
CN112181822A (en) Test method and test method for starting time consumption of application program
CN105938337B (en) Secondary development cloud platform of microcomputer controller and use method
CN117390853A (en) Simulation method, device, equipment and storage medium based on man-machine interaction
JPWO2015079503A1 (en) System construction support device
CN108614704B (en) Code compiling method and device
CN115168232A (en) Testing method and device based on AUTOSAR platform, electronic equipment and storage medium
JP2019179284A (en) Simulation system and simulation program
CN112305936B (en) Satellite attitude and orbit control semi-physical simulation test method, system, device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination