CN114780315A - Hardware simulation test method and device - Google Patents

Hardware simulation test method and device Download PDF

Info

Publication number
CN114780315A
CN114780315A CN202210461342.8A CN202210461342A CN114780315A CN 114780315 A CN114780315 A CN 114780315A CN 202210461342 A CN202210461342 A CN 202210461342A CN 114780315 A CN114780315 A CN 114780315A
Authority
CN
China
Prior art keywords
simulation
data
hardware
transmission
hardware equipment
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
CN202210461342.8A
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.)
Bank of China Ltd
Original Assignee
Bank of China 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 Bank of China Ltd filed Critical Bank of China Ltd
Priority to CN202210461342.8A priority Critical patent/CN114780315A/en
Publication of CN114780315A publication Critical patent/CN114780315A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/26Functional testing
    • G06F11/261Functional testing by simulating additional hardware, e.g. fault simulation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2273Test methods

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The embodiment of the application discloses a hardware simulation test method and device, which can be applied to the field of Internet of things or the field of finance. The method comprises the following steps: acquiring simulation hardware equipment, simulation data corresponding to the simulation hardware equipment, a simulation data transmission mode corresponding to the simulation hardware equipment and transmission parameters corresponding to the simulation data transmission mode; packaging the analog data based on a packaging method corresponding to the analog equipment to obtain packaged analog data; transmitting the encapsulation analog data according to the analog data transmission mode and the transmission parameters to obtain a transmission test result; if the transmission test result represents that the encapsulation simulation data realizes transmission, determining that the simulation hardware equipment is matched with the corresponding transmission mode and transmission parameters, and performing performance test according to the encapsulation simulation data to obtain a performance test result; and analyzing the performance test result based on the analysis rule corresponding to the simulation equipment to obtain an analysis performance test result. The method can complete the simulation test of various hardware devices.

Description

Hardware simulation test method and device
Technical Field
The present application relates to the field of simulation testing, and in particular, to a hardware simulation testing method and apparatus.
Background
In recent years, with the development of internet, the internet of things is extended and expanded on the basis of internet. The internet of things, namely the internet with all things connected, realizes that a user side extends and expands to the space between articles, and performs information exchange and communication between the articles. Therefore, the internet of things not only needs various types of hardware devices to acquire various information of the articles, but also needs to transmit the information of the articles so as to facilitate information exchange and sharing. However, hardware devices of the internet of things are various, and a unified internet of things system architecture is not established at present to realize transmission of information of various hardware devices with unified technical standards, so that in the implementation process of a project, various hardware devices related to the internet of things need to be tested in the development process, wherein the transmission test of information is particularly important.
During the implementation of a project, various tests during development are currently done primarily by purchasing the physical hardware devices. However, due to various problems such as slow purchasing process of hardware equipment, difficult actual laying of equipment, high equipment cost, and the like, the time required for testing in the development process by purchasing the physical hardware equipment is often long, the cost is often high, and the overall implementation of the project is not facilitated.
Disclosure of Invention
The embodiment of the application provides a hardware simulation test method and device, which can realize simulation test of hardware equipment and is beneficial to the overall implementation of projects.
In view of this, a first aspect of the embodiments of the present application provides a hardware simulation testing method, where the method includes:
acquiring simulated hardware equipment, simulated data corresponding to the simulated hardware equipment, a simulated data transmission mode corresponding to the simulated hardware equipment and transmission parameters corresponding to the simulated data transmission mode;
packaging the simulation data based on a packaging method corresponding to the data protocol of the simulation hardware equipment to obtain packaged simulation data corresponding to the simulation hardware equipment;
transmitting the encapsulation simulation data according to the simulation data transmission mode and the transmission parameters so as to obtain a transmission test result;
if the transmission test result represents that the encapsulation simulation data realizes transmission, determining that the simulation data transmission mode and the transmission parameters are matched with the simulation hardware equipment, and performing performance test on the simulation hardware equipment according to the encapsulation simulation data to obtain a performance test result;
and analyzing the performance test result based on an analysis rule corresponding to the data protocol of the simulation hardware equipment to obtain an analysis performance test result.
A second aspect of the embodiments of the present application provides a hardware simulation test apparatus, including:
the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring analog hardware equipment, analog data corresponding to the analog hardware equipment, an analog data transmission mode corresponding to the analog hardware equipment and transmission parameters corresponding to the analog data transmission mode;
the data encapsulation unit is used for encapsulating the simulation data based on an encapsulation method corresponding to the data protocol of the simulation hardware equipment to obtain encapsulation simulation data corresponding to the simulation hardware equipment;
the transmission unit is used for transmitting the encapsulation simulation data according to the simulation data transmission mode and the transmission parameters so as to obtain a transmission test result;
the test unit is used for determining that the transmission mode of the analog data and the transmission parameters are matched with the analog hardware equipment if the transmission test result represents that the encapsulation analog data realizes transmission, and performing performance test on the analog hardware equipment according to the encapsulation analog data to obtain a performance test result;
and the data analysis unit is used for analyzing the performance test result based on the analysis rule corresponding to the data protocol of the simulation hardware equipment to obtain an analysis performance test result.
Optionally, the obtaining unit is configured to obtain at least one set of parameters corresponding to at least one function of the real hardware device to be tested;
generating the simulated hardware device based on the at least one set of parameters.
Optionally, the obtaining unit is configured to construct the simulation data according to a test requirement of the simulation hardware device;
the device further comprises:
the simulation data storage unit is used for establishing a corresponding relation between the simulation data and the simulation hardware equipment and the test requirement;
and storing the simulation data to a simulation data storage database based on the corresponding relation, wherein the simulation data storage database is used for providing the stored simulation data for hardware simulation test.
Optionally, the obtaining unit is configured to obtain the analog data transmission manner by: serial port transmission or gateway transmission.
Optionally, the apparatus further comprises:
the front-end operation unit is used for setting a first front-end interface for acquiring the simulation hardware equipment, the simulation data transmission mode and the transmission parameters and presenting an editing area in the first front-end interface;
the acquisition unit is used for receiving the simulation hardware equipment edited based on the editing area, the edited simulation data corresponding to the simulation hardware equipment, the edited simulation data transmission mode corresponding to the simulation hardware equipment and the edited transmission parameters corresponding to the simulation data transmission mode.
Optionally, the apparatus further comprises:
and the front-end operation unit is also used for setting a second front-end interface for displaying the analysis performance test result, and the second front-end interface receives and displays the analysis performance test result.
A third aspect of embodiments of the present application provides an electronic device, including:
a memory for storing executable instructions;
and the processor is used for realizing the hardware simulation test method provided by the embodiment of the application when the executable instructions stored in the memory are executed.
A fourth aspect of the embodiments of the present application provides a computer-readable medium, which stores executable instructions and is configured to, when executed by a processor, implement the hardware simulation test method provided in the embodiments of the present application.
According to the technical scheme, the embodiment of the application has the following advantages:
the embodiment of the application discloses a hardware simulation test method and a device, wherein the method comprises the following steps: firstly, analog configuration of hardware equipment is realized by acquiring analog hardware equipment, analog data corresponding to the analog hardware equipment, an analog data transmission mode corresponding to the analog hardware equipment and transmission parameters corresponding to the analog data transmission mode; then, packaging the analog data based on a packaging method corresponding to a data protocol of the analog equipment, and packaging the analog data through a corresponding packaging method to obtain packaged analog data so as to facilitate the transmission of subsequent analog data; then, according to the transmission mode of the analog data and the transmission parameters, transmitting the encapsulated analog data to obtain a corresponding transmission result; then, if the transmission result represents that the encapsulation simulation data is transmitted, the simulation hardware equipment can be determined to be matched with the corresponding transmission mode and transmission parameters, and performance test is carried out according to the encapsulation simulation data on the basis of transmission realization of the encapsulation simulation data, so as to obtain a performance test result of the simulation hardware equipment; and finally, analyzing the performance test result based on an analysis rule corresponding to the data protocol of the simulation equipment to obtain an analysis performance test result. By the method, the data transmission test and the data performance test of various types of hardware equipment can be completed quickly and reliably without purchasing real hardware equipment, the off-line test cost is saved, and the whole implementation of a project is facilitated.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the embodiments or the prior art descriptions will be briefly described below, it is obvious that the drawings in the following description are only the embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart of a hardware simulation testing method according to an embodiment of the present disclosure;
fig. 2 is an application scenario diagram of a hardware simulation testing method according to an embodiment of the present application;
fig. 3 is an application scenario diagram of another hardware simulation testing method according to an embodiment of the present application;
fig. 4 is a schematic diagram of a hardware simulation test apparatus according to another embodiment of the present disclosure.
Detailed Description
In order to make the technical solutions of the present application better understood, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application without making any creative effort belong to the protection scope of the present application.
The terms "first," "second," "third," "fourth," and the like in the description and claims of this application and in the above-described drawings, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It should be understood that the data so used may be interchanged under appropriate circumstances such that embodiments of the application described herein may be implemented in sequences other than those illustrated or described herein. Moreover, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
In the implementation process of a project, various tests in the project development process are mainly performed by purchasing real hardware equipment with test requirements at present, but the purchase of the real hardware equipment has various problems of slow purchasing process, high equipment cost and the like.
In view of this, the embodiments of the present application provide a hardware simulation testing method, which can quickly and reliably complete data transmission tests and data performance tests of various types of hardware devices without purchasing real hardware devices.
Specifically, in the hardware simulation test method provided in the embodiment of the present application, a simulation configuration of a hardware device is first implemented by obtaining a simulation hardware device, simulation data corresponding to the simulation hardware device, a simulation data transmission mode corresponding to the simulation hardware device, and a transmission parameter corresponding to the simulation data transmission mode; then, packaging the analog data based on a packaging method corresponding to a data protocol of the analog equipment, and packaging the analog data through a corresponding packaging method to obtain packaged analog data so as to facilitate the transmission of subsequent analog data; then, according to the transmission mode of the analog data and the transmission parameters, transmitting the encapsulated analog data to obtain a corresponding transmission result; then, if the transmission result represents that the encapsulation simulation data is transmitted, the simulation hardware equipment can be determined to be matched with the corresponding transmission mode and transmission parameters, and performance test is carried out according to the encapsulation simulation data on the basis of transmission realization of the encapsulation simulation data, so as to obtain a performance test result of the simulation hardware equipment; and finally, analyzing the performance test result based on an analysis rule corresponding to the data protocol of the simulation equipment to obtain an analysis performance test result. By the method, the data transmission test and the data performance test of various types of hardware equipment can be completed quickly and reliably without purchasing real hardware equipment, the off-line test cost is saved, and the whole implementation of a project is facilitated.
The hardware simulation test method provided by the present application is described in detail by the method embodiment below.
The embodiment of the application provides a hardware simulation test method for testing data transmission and data performance of various types of hardware equipment. As shown in fig. 1, the hardware simulation test method provided in the embodiment of the present application includes the following steps:
s101, acquiring simulated hardware equipment, simulated data corresponding to the simulated hardware equipment, a simulated data transmission mode corresponding to the simulated hardware equipment and transmission parameters corresponding to the simulated data transmission mode.
Specifically, the hardware simulation test configuration may be completed by acquiring the simulation hardware device, the simulation data corresponding to the simulation hardware device, the simulation data transmission mode corresponding to the simulation hardware device, and the transmission parameter corresponding to the simulation data transmission mode.
It should be noted that, first, the purpose of obtaining the simulated hardware device is to meet the test requirement of the real hardware device to be tested, and the simulated hardware device may be obtained in various ways, which is not limited herein.
Optionally, the simulated hardware device corresponding to the real hardware device may be obtained through the type of the real hardware device to be tested, for example, the real hardware device to be tested may be a temperature and humidity device, and the corresponding temperature and humidity simulated hardware device may be directly obtained. The simulation hardware device is to meet the test requirement of the real hardware device to be tested, so the simulation hardware devices corresponding to the real hardware device may be functionally identical or similar hardware devices.
Optionally, the analog hardware device may be obtained by: acquiring at least one group of parameters corresponding to at least one function of the real hardware equipment to be tested;
and generating corresponding simulated hardware equipment based on the at least one group of parameters.
Specifically, the actual hardware device to be tested may be an actual hardware device having only one function, may also be an actual hardware device having multiple functions, and may also be multiple actual hardware devices having different functions. Corresponding parameters corresponding to the functions can be obtained through the functions of the real hardware equipment to be tested, and then corresponding simulation hardware equipment is generated through the corresponding parameters. In the actual process of a project, multiple real hardware devices with different functions are required to be tested, and the test of the multiple hardware devices can be realized on the basis of the simulation test of a single hardware device by generating corresponding simulation hardware devices, for example, in a certain internet of things project, a pressure sensor and a temperature and humidity sensor are required to be tested, corresponding three groups of parameters can be obtained according to three functions to be tested of the two sensors, and then the corresponding simulation hardware devices with the pressure sensing function of the pressure sensor, the temperature sensing function of the temperature and humidity sensor and the humidity sensing function are generated on the basis of the three groups of parameters.
Next, the purpose of acquiring simulation data corresponding to the simulation hardware device is: on one hand, whether the simulation data are matched with the transmission mode can be judged, and on the other hand, the performance test of the corresponding simulation equipment can be carried out according to the simulation data. The simulation data corresponding to the simulation hardware device may be various data that needs to be transmitted by the real device corresponding to the simulation hardware device, for example, the simulation hardware device simulates a temperature and humidity device, and correspondingly, the simulation data may be data that needs to be transmitted, such as temperature and humidity.
Optionally, the analog data may be acquired as follows: and aiming at the test requirements of the simulation hardware equipment, constructing simulation data.
Specifically, the corresponding simulation data may be constructed for the test requirements of the simulated hardware device, that is, for various data that the simulated hardware device needs to transmit.
Optionally, the analog data may be acquired as follows: aiming at the test requirements of the simulation hardware equipment, constructing simulation data;
after the simulation data are constructed, corresponding relations between the simulation data and corresponding simulation hardware equipment and corresponding test requirements can be established;
and storing the simulation data into a simulation data storage database based on the corresponding relation, wherein the simulation data storage database is used for providing the stored simulation data for the hardware simulation test.
Specifically, after the simulation data is constructed according to the test requirements of the simulation hardware equipment, the corresponding relation between the constructed simulation data and the simulation hardware equipment and the test requirements is established, and then the simulation data is stored in the simulation data storage database based on the corresponding relation, so that when the simulation data corresponding to the simulation hardware equipment is obtained, the corresponding simulation data does not need to be constructed again, the simulation data can be directly called through the simulation data storage database, the test flow is simplified, and the test efficiency is improved.
Then, the acquisition of the analog data transmission mode corresponding to the analog hardware device is to prepare for subsequent judgment of whether the corresponding analog data transmission mode is matched with the analog hardware device. Data to be transmitted by various hardware devices in the internet of things are various, for example, the data to be transmitted may be analog signals or digital signals, so that in the actual use process of the hardware device, it is necessary to determine whether the selected data transmission mode matches with the hardware device through a transmission performance test, and abnormal situations such as data loss do not occur, thereby realizing reliable transmission of the data.
Optionally, the analog data transmission mode includes serial port transmission or gateway transmission.
Specifically, protocol networks used for data transmission of different hardware devices are different when the hardware devices are used, so that the analog data transmission mode can be serial port transmission or gateway transmission, and preparation is made for subsequently testing whether the analog hardware devices are matched with the acquired analog data transmission mode by acquiring the data transmission mode of the hardware devices which is common in practical situations.
It should be noted that serial transmission may refer to the serial sending and receiving bytes in bits. The communication protocol used by the serial port transmission stipulates the content of a data packet, the content comprises a start bit, main data, a check bit and a stop bit, and a sender and a receiver can normally receive and transmit data only by appointing a consistent data packet format.
The gateway transmission may refer to data transmission by using a gateway, and the gateway realizes network interconnection above a network layer, and may be used for interconnection of a wide area network and a local area network. The gateway can be used between two systems with different communication protocols, data formats or languages, even completely different architectures, and repackages the received information to meet the requirements of the destination system.
Finally, acquiring the transmission parameter corresponding to the analog data transmission mode refers to acquiring a parameter required by the analog data transmission mode, and after the transmission mode is determined, how to specifically determine the transmission parameter is needed.
Optionally, a first front-end interface for acquiring the simulated hardware device, the simulated data transmission mode, and the transmission parameter may be further configured in the embodiment of the present application, and an editing area is presented in the first front-end interface;
one specific implementation of obtaining the simulated hardware device, the simulated data corresponding to the simulated hardware device, the simulated data transmission mode corresponding to the simulated hardware device, and the transmission parameters corresponding to the simulated data transmission mode may be:
receiving the simulation hardware equipment edited based on the editing area, the edited simulation data corresponding to the simulation hardware equipment, the edited simulation data transmission mode corresponding to the simulation hardware equipment and the edited transmission parameters corresponding to the simulation data transmission mode.
Specifically, by setting a first front-end interface, the first front-end interface includes an editing area, and a user can edit corresponding information through the editing area to obtain the simulated hardware device, the simulated data corresponding to the simulated hardware device, the simulated data transmission mode corresponding to the simulated hardware device, and the transmission parameters corresponding to the simulated data transmission mode, that is, by setting a first front-end interface, an operation interface is provided for the user, and the user completes configuration of a hardware simulation test through the first front-end interface.
S102, packaging the simulation data based on a packaging method corresponding to the data protocol of the simulation hardware equipment to obtain the packaging simulation data corresponding to the simulation hardware equipment.
Specifically, because the data protocols related to different hardware devices may be different, the data encapsulation method of the data protocol corresponding to the analog hardware device may be determined based on the data protocol related to the analog hardware device, and the analog data is encapsulated according to the corresponding encapsulation method to obtain corresponding encapsulated analog data.
The reliable transmission of the analog data can be realized by encapsulating the analog data, and abnormal conditions such as data loss and the like are not easy to occur.
S103, transmitting the encapsulation simulation data according to the simulation data transmission mode and the transmission parameters so as to obtain a transmission test result.
Specifically, according to the obtained simulation data transmission mode and transmission parameters, the encapsulation simulation data is correspondingly transmitted, and a corresponding transmission test result is obtained. The purpose of obtaining the transmission test result is to test whether the transmission of the packaging simulation data can be realized by adopting the obtained simulation data transmission mode and the transmission parameters. The transmission test result can be obtained by single transmission or multiple transmission cycles, so as to increase the reliability of the transmission test result.
And S104, if the transmission test result represents that the encapsulation simulation data is transmitted, determining that the simulation data transmission mode and the transmission parameters are matched with the simulation hardware equipment, and performing performance test on the simulation hardware equipment according to the encapsulation simulation data to obtain a performance test result.
Specifically, if the transmission test result represents that the transmission of the encapsulation simulation data is realized, the obtained simulation data transmission mode and the transmission parameter can be determined to be matched with the simulation hardware equipment, and on the basis of encapsulating the simulation data and realizing the transmission, the performance test of the simulation hardware equipment can be performed according to the encapsulation simulation data to obtain the corresponding performance test result. The obtained encapsulation simulation data can be tested by adopting related codes, for example, the obtained simulation hardware equipment is temperature and humidity sensing simulation hardware equipment, the corresponding simulation data is temperature data and humidity data, and whether the temperature and humidity sensing function and the humidity sensing performance of the temperature and humidity simulation hardware equipment can be judged by correspondingly testing the temperature data and the humidity data obtained by transmission through the related codes.
And S105, analyzing the performance test result based on the analysis rule corresponding to the data protocol of the simulation hardware equipment to obtain an analysis performance test result.
Specifically, since data protocols related to different hardware devices may be different, a data analysis method corresponding to the data protocol of the simulated hardware device may be determined based on the data protocol related to the simulated hardware device, and the performance test result may be analyzed according to the corresponding analysis method.
Because the performance test result can be obtained by testing the relevant codes, and is generally binary data, the performance test result can be analyzed correspondingly by the performance test result, so that the analysis performance test result which is favorable for visual analysis of a user can be obtained.
Optionally, after the analysis performance test result is obtained in the embodiment of the application, a second front-end interface for displaying the analysis performance test result may be further configured, and the second front-end interface receives and displays the analysis performance test result.
Specifically, by setting a second front-end interface, the second front-end interface can display the analysis test result for the user, that is, a display interface is provided for the user, and the user can intuitively obtain the corresponding analysis test result through the second front-end interface.
An application scenario of the hardware simulation test method is further provided in the embodiments of the present application, and as shown in fig. 2, the application scenario includes:
the front-end operation module 201 may be a front-end module that can be operated by a user, and may be a browser having functions of input, presentation, and the like, for example. For implementing the foregoing step S101, the specific implementation of this module may refer to step S101 in the foregoing method embodiment accordingly, and details are not described here again. The method may further include a step of performing a function related to the second front-end interface, and the function related to the second front-end interface may be referred to in the above embodiment, which is not described herein again.
The data service module 202 may be configured to implement the foregoing steps S102 and S105, and the specific implementation of the module may refer to the steps S102 and S105 in the foregoing method embodiment, which is not described herein again.
The transmission module 203 may be configured to implement the step S103, and the specific implementation of the module may refer to the step S103 in the foregoing method embodiment, which is not described herein again.
The test program 204 may be used to implement the step S104, and the specific implementation of this module may refer to the step S104 in the foregoing method embodiment accordingly, which is not described herein again.
The database 205 may be configured to store the package simulation data obtained in step S102, and may also be configured to store the analysis performance test result obtained in step S105, and the storage of the relevant data is beneficial to a user to call directly.
The embodiment of the present application further provides an application scenario of another hardware simulation testing method, as shown in fig. 3, the application scenario includes:
the front-end operation module 301 may be a front-end module that can be operated by a user, and may be a browser having functions of input, presentation, and the like, for example. For implementing the foregoing step S101, the specific implementation of this module may refer to step S101 in the foregoing method embodiment accordingly, and details are not described here again. The method may further be used to implement the related display function of the second front-end interface, and the related display function of the second front-end interface may refer to the foregoing method embodiment, which is not described herein again.
First, the data service module 302 may be configured to implement the step S102 by using an encapsulation module, and in a specific implementation of the module, reference may be made to the step S102 in the foregoing method embodiment, which is not described herein again, and send encapsulated data to the transmission module for a subsequent test.
Secondly, the analysis module may be configured to implement the step S105, and the specific implementation of the module may refer to the step S105 in the foregoing method embodiment, which is not described herein again, and send the analysis result to the front-end operation module for display.
The transmission module 303 may be configured to implement the step S103, and a specific implementation of the module may refer to the step S103 in the foregoing method embodiment, which is not described herein again, where the analog data transmission mode includes a serial port mode and a gateway mode.
The test program 304 may be configured to implement the step S104, and the specific implementation of the module may refer to the step S104 in the foregoing method embodiment, which is not described herein again, and send the obtained related test result to the transmission module, so that the transmission module sends the data service module, so as to enable the analysis module in the data service module to implement analysis.
The database 305 may be configured to store the package simulation data obtained in step S102, and may also be configured to store the analysis performance test result obtained in step S105, and the storage of the relevant data is beneficial to a user to call directly.
The embodiment of the application discloses a hardware simulation test method, which comprises the following steps: firstly, analog configuration of hardware equipment is realized by acquiring analog hardware equipment, analog data corresponding to the analog hardware equipment, an analog data transmission mode corresponding to the analog hardware equipment and transmission parameters corresponding to the analog data transmission mode; then, packaging the analog data based on a packaging method corresponding to a data protocol of the analog equipment, and packaging the analog data through a corresponding packaging method to obtain packaged analog data so as to facilitate the transmission of subsequent analog data; then, according to the transmission mode of the analog data and the transmission parameters, transmitting the encapsulated analog data to obtain a corresponding transmission result; then, if the transmission result represents that the encapsulation simulation data is transmitted, the simulation hardware equipment can be determined to be matched with the corresponding transmission mode and transmission parameters, and performance test is carried out according to the encapsulation simulation data on the basis of transmission realization of the encapsulation simulation data, so as to obtain a performance test result of the simulation hardware equipment; and finally, analyzing the performance test result based on an analysis rule corresponding to the data protocol of the simulation equipment to obtain an analysis performance test result. By the method, the data transmission test and the data performance test of various types of hardware equipment can be completed quickly and reliably without purchasing real hardware equipment, the off-line test cost is saved, and the whole implementation of a project is facilitated.
Another embodiment of the present application provides a hardware simulation test apparatus, as shown in fig. 4, the apparatus includes:
an obtaining unit 401, configured to obtain a simulated hardware device, simulated data corresponding to the simulated hardware device, a simulated data transmission mode corresponding to the simulated hardware device, and a transmission parameter corresponding to the simulated data transmission mode;
a data encapsulation unit 402, configured to encapsulate the analog data based on an encapsulation method corresponding to a data protocol of the analog hardware device, so as to obtain encapsulated analog data corresponding to the analog hardware device;
a transmission unit 403, configured to transmit the encapsulation analog data according to the analog data transmission manner and the transmission parameters so as to obtain a transmission test result;
the test unit 404 is configured to determine that a transmission mode and transmission parameters of the analog data match the analog hardware device if the transmission test result represents that the encapsulation analog data is transmitted, and perform a performance test on the analog hardware device according to the encapsulation analog data to obtain a performance test result;
the data analysis unit 405 is configured to analyze the performance test result based on an analysis rule corresponding to the data protocol of the analog hardware device, so as to obtain an analysis performance test result.
Optionally, in a hardware simulation testing apparatus provided in another embodiment of the present application, the obtaining unit is configured to obtain at least one set of parameters corresponding to at least one function of a real hardware device to be tested;
based on at least one set of parameters, a simulated hardware device is generated.
Optionally, in a hardware simulation testing apparatus provided in another embodiment of the present application, the obtaining unit is configured to construct simulation data according to a test requirement of a simulation hardware device;
the device also includes:
the simulation data storage unit is used for establishing a corresponding relation between simulation data and simulation hardware equipment and test requirements;
and storing the simulation data into a simulation data storage database based on the corresponding relation, wherein the simulation data storage database is used for providing the stored simulation data for the hardware simulation test.
Optionally, in a hardware simulation testing apparatus provided in another embodiment of the present application, the obtaining unit is configured to obtain an analog data transmission manner, where the analog data transmission manner includes: serial port transmission or gateway transmission.
Optionally, an embodiment of the present application provides a hardware simulation test apparatus, further including:
the front-end operation unit is used for setting a first front-end interface for acquiring the simulation hardware equipment, the simulation data transmission mode and the transmission parameters and presenting an editing area in the first front-end interface;
the acquisition unit is used for receiving the edited simulation hardware equipment based on the editing area, the edited simulation data corresponding to the simulation hardware equipment, the edited simulation data transmission mode corresponding to the simulation hardware equipment and the edited transmission parameters corresponding to the simulation data transmission mode.
Optionally, an embodiment of the present application provides a hardware simulation test apparatus, further including:
and the front-end operation unit is also used for setting a second front-end interface for displaying the analytic performance test result, and the second front-end interface receives and displays the analytic performance test result.
It should be noted that, for the specific working processes of each module provided in the foregoing embodiments of the present application, reference may be made to corresponding implementation manners in the foregoing method embodiments, and details are not described herein again.
It should be noted that the hardware simulation test method and apparatus provided in the embodiments of the present application may be used in the fields of internet of things, artificial intelligence, block chaining, distributed, cloud computing, big data, mobile internet, network security, chip, virtual reality, augmented reality, holography, quantum computing, quantum communication, quantum measurement, digital twinning, or finance. The foregoing is merely an example, and does not limit the application field of the hardware simulation testing method and apparatus provided in the embodiments of the present application.
Another embodiment of the present application provides an electronic device, including:
a memory for storing executable instructions;
the processor is configured to implement the hardware simulation test method according to the embodiment of the present application when executing the executable instructions stored in the memory.
Another embodiment of the present application provides a computer-readable storage medium, which stores executable instructions for implementing the hardware simulation testing method described in the embodiment of the present application when the computer-readable storage medium is executed by a processor.
Those of skill would further appreciate that the various illustrative components and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the components and steps of the various examples have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A hardware simulation test method, the method comprising:
acquiring simulated hardware equipment, simulated data corresponding to the simulated hardware equipment, a simulated data transmission mode corresponding to the simulated hardware equipment and transmission parameters corresponding to the simulated data transmission mode;
packaging the simulation data based on a packaging method corresponding to the data protocol of the simulation hardware equipment to obtain packaging simulation data corresponding to the simulation hardware equipment;
transmitting the encapsulation simulation data according to the simulation data transmission mode and the transmission parameters so as to obtain a transmission test result;
if the transmission test result represents that the encapsulation simulation data realizes transmission, determining that the simulation data transmission mode and the transmission parameters are matched with the simulation hardware equipment, and performing performance test on the simulation hardware equipment according to the encapsulation simulation data to obtain a performance test result;
and analyzing the performance test result based on an analysis rule corresponding to the data protocol of the simulation hardware equipment to obtain an analysis performance test result.
2. The method of claim 1, wherein the simulated hardware device is obtained by:
acquiring at least one group of parameters corresponding to at least one function of real hardware equipment to be tested;
generating the simulated hardware device based on the at least one set of parameters.
3. The method of claim 1, wherein the analog data is obtained by:
aiming at the test requirement of the simulation hardware equipment, constructing the simulation data;
the method further comprises the following steps:
establishing a corresponding relation between the simulation data and the simulation hardware equipment and the test requirement;
and storing the simulation data to a simulation data storage database based on the corresponding relation, wherein the simulation data storage database is used for providing the stored simulation data for hardware simulation test.
4. The method of claim 1, wherein the analog data transmission comprises: serial port transmission or gateway transmission.
5. The method of claim 1, further comprising:
setting a first front-end interface for acquiring the simulation hardware equipment, the simulation data transmission mode and the transmission parameters, and presenting an editing area in the first front-end interface;
the acquiring of the simulated hardware device, the simulated data corresponding to the simulated hardware device, the simulated data transmission mode corresponding to the simulated hardware device, and the transmission parameters corresponding to the simulated data transmission mode includes:
receiving an edited simulated hardware device based on the editing area, edited simulated data corresponding to the simulated hardware device, an edited simulated data transmission mode corresponding to the simulated hardware device, and edited transmission parameters corresponding to the simulated data transmission mode.
6. The method of claim 1, wherein after obtaining the analytical performance test results, the method further comprises:
and setting a second front-end interface for displaying the analysis performance test result, wherein the second front-end interface receives and displays the analysis performance test result.
7. A hardware simulation test apparatus, the apparatus comprising:
the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring analog hardware equipment, analog data corresponding to the analog hardware equipment, an analog data transmission mode corresponding to the analog hardware equipment and transmission parameters corresponding to the analog data transmission mode;
the data encapsulation unit is used for encapsulating the simulation data based on an encapsulation method corresponding to a data protocol of the simulation hardware equipment to obtain encapsulation simulation data corresponding to the simulation hardware equipment;
the transmission unit is used for transmitting the encapsulation simulation data according to the simulation data transmission mode and the transmission parameters so as to obtain a transmission test result;
the test unit is used for determining that the transmission mode of the analog data and the transmission parameters are matched with the analog hardware equipment if the transmission test result represents that the encapsulation analog data realizes transmission, and performing performance test on the analog hardware equipment according to the encapsulation analog data to obtain a performance test result;
and the data analysis unit is used for analyzing the performance test result based on an analysis rule corresponding to the data protocol of the simulation hardware equipment to obtain an analysis performance test result.
8. The apparatus of claim 7, further comprising:
the front-end operation unit is used for setting a first front-end interface for acquiring the simulation hardware equipment, the simulation data transmission mode and the transmission parameters and presenting an editing area in the first front-end interface;
the acquisition unit is used for receiving the simulation hardware equipment edited based on the editing area, the edited simulation data corresponding to the simulation hardware equipment, the edited simulation data transmission mode corresponding to the simulation hardware equipment and the edited transmission parameters corresponding to the simulation data transmission mode.
9. An electronic device, comprising:
a memory for storing executable instructions;
a processor for implementing the hardware simulation test method of any of claims 1 to 6 when executing executable instructions stored in the memory.
10. A computer readable storage medium storing executable instructions for implementing the hardware simulation test method of any one of claims 1 to 6 when executed by a processor.
CN202210461342.8A 2022-04-28 2022-04-28 Hardware simulation test method and device Pending CN114780315A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210461342.8A CN114780315A (en) 2022-04-28 2022-04-28 Hardware simulation test method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210461342.8A CN114780315A (en) 2022-04-28 2022-04-28 Hardware simulation test method and device

Publications (1)

Publication Number Publication Date
CN114780315A true CN114780315A (en) 2022-07-22

Family

ID=82435555

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210461342.8A Pending CN114780315A (en) 2022-04-28 2022-04-28 Hardware simulation test method and device

Country Status (1)

Country Link
CN (1) CN114780315A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115426297A (en) * 2022-08-09 2022-12-02 杭州涂鸦信息技术有限公司 Function test method and device of sub-equipment, computer equipment and storage medium
CN116248567A (en) * 2023-02-21 2023-06-09 深圳绿米联创科技有限公司 Intelligent device testing method and device, electronic device and testing system

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115426297A (en) * 2022-08-09 2022-12-02 杭州涂鸦信息技术有限公司 Function test method and device of sub-equipment, computer equipment and storage medium
CN115426297B (en) * 2022-08-09 2023-12-12 杭州涂鸦信息技术有限公司 Function test method and device of sub-equipment, computer equipment and storage medium
CN116248567A (en) * 2023-02-21 2023-06-09 深圳绿米联创科技有限公司 Intelligent device testing method and device, electronic device and testing system

Similar Documents

Publication Publication Date Title
CN114780315A (en) Hardware simulation test method and device
CN102946616B (en) Internet of things middleware performance testing system and testing method
CN107636602A (en) A kind of data processing method and data processing equipment
CN108363662A (en) A kind of applied program testing method, storage medium and terminal device
CN111506047B (en) Vehicle diagnosis method, device and storage medium
CN104253842B (en) Method, apparatus, terminal and the server of synchronous terminal mirror image
CN110647490B (en) Data transmission method, device, equipment and computer storage medium
CN107171897A (en) A kind of interface test method and data-interface test system
CN107547574A (en) A kind of communication system and method based on puppy parc
US11740997B2 (en) Method and apparatus for debugging a device
CN106851513A (en) The method of testing and system of a kind of electronic product
CN111552266B (en) Vehicle remote diagnosis method, system, equipment connector and vehicle connector
CN110187986A (en) A kind of command management method, system, device and computer readable storage medium
CN117176802B (en) Full-link monitoring method and device for service request, electronic equipment and medium
CN112583663B (en) Automatic network performance testing method based on domestic operating system
CN111935767A (en) Network simulation system
CN110719216B (en) Data transmission data processing method, system, device and storage medium
CN112399446A (en) Edge gateway communication method, device, computer equipment and storage medium
CN113438226B (en) Message generating and analyzing method, device and system based on hybrid transmission protocol
CN112838938B (en) Test system of Internet of things platform
CN114326669A (en) Vehicle IO test method and device, electronic equipment and storage medium
CN105634862B (en) Application and identification method and device
CN110120895B (en) Method, device, medium and electronic equipment for testing communication of mobile terminal
CN103678054B (en) Test method and device used for BACnet equipment
CN105183482A (en) Network simulation development testing method and system

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