CN110830274A - Communication equipment simulation method and device - Google Patents
Communication equipment simulation method and device Download PDFInfo
- Publication number
- CN110830274A CN110830274A CN201810898317.XA CN201810898317A CN110830274A CN 110830274 A CN110830274 A CN 110830274A CN 201810898317 A CN201810898317 A CN 201810898317A CN 110830274 A CN110830274 A CN 110830274A
- Authority
- CN
- China
- Prior art keywords
- data
- response
- preset
- request data
- response data
- 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.)
- Withdrawn
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/02—Standardisation; Integration
- H04L41/0213—Standardised network management protocols, e.g. simple network management protocol [SNMP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/04—Network management architectures or arrangements
- H04L41/046—Network management architectures or arrangements comprising network management agents or mobile agents therefor
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/14—Network analysis or design
- H04L41/145—Network analysis or design involving simulating, designing, planning or modelling of a network
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/50—Testing arrangements
- H04L43/55—Testing of service level quality, e.g. simulating service usage
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/02—Standardisation; Integration
- H04L41/0246—Exchanging or transporting network management information using the Internet; Embedding network management web servers in network elements; Web-services-based protocols
- H04L41/0266—Exchanging or transporting network management information using the Internet; Embedding network management web servers in network elements; Web-services-based protocols using meta-data, objects or commands for formatting management information, e.g. using eXtensible markup language [XML]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/08—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
- H04L43/0852—Delays
- H04L43/0864—Round trip delays
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/50—Testing arrangements
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Quality & Reliability (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention discloses a communication equipment simulation method, which comprises the steps of obtaining request data sent by a network management end; when the request data has corresponding preset response data, sending the preset response data to the network pipe end; and when the corresponding preset response data does not exist in the request data, sending the request data to preset communication equipment, and sending equipment response data returned by the preset communication equipment to the network pipe end. The invention also discloses a device and a storage medium for simulating the communication equipment.
Description
Technical Field
The present invention relates to a communication device network management technology, and in particular, to a method and an apparatus for simulating a communication device.
Background
As shown in fig. 1, the communication device network management system includes three components: communication equipment, communication equipment network management software (network management software for short) and a management protocol (protocol for short). Network management software manages a large number of various types of communication devices through management protocols.
In the process of developing the network management software, the network management software needs to be debugged by means of real equipment, but the following problems are often encountered: firstly, the corresponding functions of equipment in a debugging and testing environment are not complete; secondly, the types of equipment are numerous, and some types of equipment are lacked in the debugging and testing environment; thirdly, the number of devices in the debugging and testing environment is small, and a large-scale network cannot be constructed; and fourthly, the debugging and testing environment may not reproduce abnormal scenes with small probability.
Therefore, in a commissioning environment, simulation software is used to simulate large-scale, multiple types of real communication devices. The information interaction process of the simulation environment can be as shown in fig. 2, and includes: firstly, network management software sends a request to simulation software; secondly, a request message processing module of the simulation software analyzes request data from the request message; thirdly, the data simulation module simulates response data according to the request data; and the four response message processing modules assemble the response data into response messages and send the response messages to the network management software.
Generally, the data simulation module is implemented in a static configuration manner, that is, corresponding simulation response data is provided for each request data. When the request data is not of a large variety, it is feasible to implement data emulation through static configuration. However, the data of real communication devices is constantly expanding and changing, and when it is necessary to provide corresponding simulated answer data for a large number of different kinds of request data, the manual static configuration is very labor intensive. And for different types of requests or different response data amounts corresponding to the same type of request, the response time of the real communication equipment is different. The static configuration is difficult to simulate the difference of response time, and thus the simulation degree is not high.
Therefore, how to adapt the simulation environment to different request data and truly simulate the communication equipment is a problem to be solved urgently.
Disclosure of Invention
In view of this, embodiments of the present invention are intended to provide a method and an apparatus for simulating a communication device, which can adapt a simulation environment to different request data and can truly simulate the communication device.
In order to achieve the purpose, the technical scheme of the invention is realized as follows:
the embodiment of the invention provides a communication equipment simulation method, which comprises the following steps:
acquiring request data sent by a network management end;
when the request data has corresponding preset response data, sending the preset response data to the network pipe end; and when the corresponding preset response data does not exist in the request data, sending the request data to preset communication equipment, and sending equipment response data returned by the preset communication equipment to the network pipe end.
In the above scheme, the method further comprises:
and determining the equipment response data as preset response data corresponding to the request data.
In the above scheme, the method further comprises:
recording the response time of the preset communication equipment after receiving the request data, and determining the response time as the delay time for responding the request data.
In the foregoing scheme, determining that the request data has corresponding preset response data includes:
and when the first identification information in the request data is consistent with the second identification information of the preset response data, determining that the request data corresponds to the preset response data.
The embodiment of the invention also provides a communication equipment simulation device, which comprises: an acquisition module and a response module; wherein the content of the first and second substances,
the acquisition module is used for acquiring request data sent by a network management end;
the response module is used for sending the preset response data to the network pipe end when the corresponding preset response data exists in the request data; and when the corresponding preset response data does not exist in the request data, sending the request data to preset communication equipment, and sending equipment response data returned by the preset communication equipment to the network pipe end.
In the foregoing solution, the response module is further configured to:
and determining the equipment response data as preset response data corresponding to the request data.
In the foregoing solution, the response module is further configured to:
recording the response time of the preset communication equipment after receiving the request data, and determining the response time as the delay time for responding the request data.
In the foregoing solution, the response module is specifically configured to:
and when the first identification information in the request data is consistent with the second identification information of the preset response data, determining that the request data corresponds to the preset response data.
An embodiment of the present invention further provides a storage medium, on which an executable program is stored, where the executable program, when executed by a processor, implements the steps of any one of the above-mentioned methods of simulating a communication device.
The embodiment of the invention also provides a communication equipment simulation device, which comprises a processor, a memory and an executable program which is stored on the memory and can be run by the processor, wherein when the processor runs the executable program, the step of executing any one of the communication equipment simulation methods is executed.
The communication equipment simulation method and device provided by the embodiment of the invention; acquiring request data sent by a network management end; when the request data has corresponding preset response data, sending the preset response data to the network pipe end; and when the corresponding preset response data does not exist in the request data, sending the request data to preset communication equipment, and sending equipment response data returned by the preset communication equipment to the network pipe end. Therefore, the method can adapt to different types of request data by adopting the preset response data or acquiring the response data from the preset communication equipment and returning the response data to the network management terminal, and can truly simulate the communication equipment by acquiring the response data from the preset communication equipment.
Drawings
Fig. 1 is a schematic structural diagram of a conventional network management system of a communication device;
FIG. 2 is a schematic diagram of an interaction of a conventional simulation environment;
fig. 3 is a schematic flow chart of a simulation method of a communication device according to an embodiment of the present invention;
fig. 4 is a schematic view of a detailed implementation flow of a simulation method of a communication device according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of the SNMP communication network management system according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of a simulation flow of the SNMP communication network management system according to the embodiment of the present invention;
fig. 7 is a schematic structural diagram of a communication device simulation apparatus according to an embodiment of the present invention.
Detailed Description
In the embodiment of the invention, request data sent by a network management end is obtained; when the request data has corresponding preset response data, sending the preset response data to the network pipe end; and when the corresponding preset response data does not exist in the request data, sending the request data to preset communication equipment, and sending equipment response data returned by the preset communication equipment to the network pipe end.
The present invention will be described in further detail with reference to examples.
As shown in fig. 3, the method for simulating communication equipment according to the embodiment of the present invention includes:
step 301: acquiring request data sent by a network management end;
here, the simulation of the communication device may be performed by a simulation device, which may be a computer or the like; the simulation device is provided with simulation software for simulating the communication device; the emulation software can also be in the network management equipment where the network management software is located, such as in a server where the network management software is located. The network management end can be network management equipment where network management software is located and the like; the request data can be obtained through the connection between the simulation equipment where the simulation software is located and the network management equipment or through the interface between the network management software and the simulation software. The request data can be analyzed from the request message by simulation software.
Step 302: when the request data has corresponding preset response data, sending the preset response data to the network pipe end; when the request data does not have corresponding preset response data, the request data is sent to preset communication equipment, and equipment response data returned by the preset communication equipment is sent to the network pipe end;
here, the preset response data, the device response data, and other response data may be packaged by the emulation software and sent to the network pipe end in the form of a response message. The preset response data can be preset at the appointed position of the simulation equipment or the network management equipment and other equipment; corresponding preset response data can be set by adopting a static configuration mode aiming at different request data; the preset response data is used for simulating the response condition of the communication equipment after receiving the request data; the network management terminal can be network management software or network management equipment where the network management software is located;
after receiving the request data, the simulation device can search preset response data corresponding to the request data at a specified position;
if the preset response data corresponding to the request data is found, directly returning the preset response data to the network management software as final simulation response data;
if the preset response data corresponding to the request data are not found, forwarding the request data to preset communication equipment; the preset communication equipment is real communication equipment, a communication link can be established with network management equipment or simulation equipment in a connection mode such as a network, and the request data can be sent to the preset communication equipment through the communication link; different types of preset communication equipment can be set according to the types of the request data which possibly occur so as to meet the requirements of different types of the request data;
the preset communication equipment receives the request data and returns real equipment response data to the simulation software, and the simulation software returns the equipment response data serving as final simulation response data to the network management software; thereby completing the simulation; in this way, by returning the response data of the real communication device, the actual situation is truly simulated.
Further, when first identification information in the request data is consistent with second identification information of the preset response data, determining that the request data corresponds to the preset response data;
here, the first identification information and the second identification information may be identification information such as an Object Identifier (OID) in a Simple Network Management Protocol (SNMP), or an element tag of an eXtensible Markup Language (XML) in a Network Configuration Protocol (NetConf); the different identification information corresponds to different response data;
when static configuration is performed, the preset response data and the second identification information thereof can be stored in a file or other storage media of static configuration simulation data; when the request data is received, the first identification information in the request data can be extracted, the first identification information and the second identification information are compared, and if the first identification information and the second identification information are consistent, the request data and the preset response data are determined to be consistent.
Further, the equipment response data is determined as preset response data corresponding to the request data;
here, after receiving the device response data, the device response data may be stored as preset response data corresponding to the subsequent same request data; and when the request data is received again subsequently, the equipment response data can be directly returned to the network management software. The device response data can be saved to a file or other storage medium of static configuration simulation data; the process of storing the equipment response data can be carried out before or after the equipment response data is sent to the network management software.
Further, recording the response time of the preset communication equipment after receiving the request data, and determining the response time as the delay time for responding to the request data;
specifically, a time point of sending the request data to the preset communication device and a time point of receiving device response data returned by the preset communication device may be recorded, so as to determine a response time of the preset communication device;
the device response data and corresponding response time may be saved to a file or other storage medium of static configuration simulation data; when request data corresponding to the equipment response data appear subsequently, the simulation software reads the equipment response data and the corresponding response time at the same time, delays the time according to the response time and then returns the equipment response data; therefore, response data and response delay of the real communication equipment can be simulated, and the time situation is simulated more truly.
In practical application, the specific implementation steps of the communication device simulation method may be as shown in fig. 4, and include:
step 401: receiving request data; receiving request data sent by network management software by simulation software;
step 402: searching response data corresponding to the request data in the statically configured simulation data according to the identification information of the request data;
step 403: if the response data corresponding to the request data is found, executing step 407, otherwise executing step 404;
step 404: forwarding the request data to the real communication equipment, and timing the response time of the real communication equipment;
step 405: receiving response data sent by real communication equipment and finishing timing response time of the real communication equipment;
step 406: adding the mapping of the request data identification information and the received response data of the real communication equipment into the static configuration, and simultaneously adding the response time of the real communication equipment into the static configuration;
the response time is used for delaying and then sending corresponding response data when the same request data is received subsequently; thus, real communication equipment can be simulated really;
step 407: and returning the response data to the network management software.
The positive effects produced by the present invention will be described in further detail with reference to specific examples below;
the invention takes Get operation of SNMP and analog data stored in XML file as an example, and further explains the simulation method of communication equipment;
SNMP is a network management standard based on Transmission Control Protocol/Internet Protocol (TCP/IP) defined by the Internet Engineering Task Force (IETF), and is a standard Protocol for managing network nodes (such as servers, workstations, routers, switches, etc.) in an IP network; as shown in fig. 5, the SNMP communication network management system is composed of three elements, namely, a Manager (Manager), an Agent (Agent), and an SNMP protocol; an Agent describes its state using one or more variables, called Managed objects; all management objects form a Management Information Base (MIB), and each management object uses an OID as a unique identifier; and the Manager accesses the object in the MIB of the Agent through operation instructions such as Get, Get Next, Set and the like defined by the SNMP protocol.
XML describes data using a series of simple, custom tags. The example uses XML file to save the simulation data; the main contents of the simulation data XML file are as follows:
as shown in fig. 6, the specific steps of the communication device simulation method implemented by the example of the present invention include:
step 601: simulation software in the simulation equipment loads simulation data of all static configurations from the simulation data XML file;
step 602: starting an SNMP protocol message monitoring module;
step 603: receiving an SNMP Get request sent by a Manager, and analyzing a request OID list from an SNMP Get request message;
step 604: searching corresponding simulation response data in the statically configured simulation data according to the request OID list;
step 605: judging whether the corresponding simulation response data is found, if so, executing step 610, otherwise, executing step 606;
step 606: assembling the request OID list into an SNMP Get request message, sending the SNMP Get request message to the Agent, Starting timing, and recording as Starting Time;
step 607: the method comprises the steps of receiving an SNMP Get response message of Agent, stopping timing, recording as end time (EndingTime), and analyzing a response OID + Value list from the SNMP Get response message;
step 608: calculating response Time, wherein the calculation formula is encoding Time-Starting Time;
step 609: the request OID list, the answer OID + Value list, and the answer time are added to the simulation DATA XML file, corresponding to a < DATA > element. The REQUEST OID list corresponds to the < REQUEST > element, the RESPONSE TIME corresponds to the < RESPONSE _ TIME > sub-element of the < RESPONSE > element, and the RESPONSE OID + Value list corresponds to the < OID _ Value > sub-element of the < RESPONSE > element;
step 610: assembling the simulation response data into an SNMP Get response message and sending the SNMP Get response message to a Manager;
as shown in fig. 7, the communication device simulation apparatus provided in the embodiment of the present invention includes: an acquisition module 71 and a response module 72; wherein the content of the first and second substances,
the acquiring module 71 is configured to acquire request data sent by a network management end;
here, the simulation of the communication device may be performed by a simulation device, which may be a computer or the like; the simulation device is provided with simulation software for simulating the communication device; the emulation software can also be in the network management equipment where the network management software is located, such as in a server where the network management software is located. The network management end can be network management equipment where network management software is located and the like; the request data can be obtained through the connection between the simulation equipment where the simulation software is located and the network management equipment or through the interface between the network management software and the simulation software. The request data can be analyzed from the request message by simulation software.
The response module 72 is configured to send the preset response data to the network pipe end when the corresponding preset response data exists in the request data; when the request data does not have corresponding preset response data, the request data is sent to preset communication equipment, and equipment response data returned by the preset communication equipment is sent to the network pipe end;
here, the preset response data, the device response data, and other response data may be packaged by the emulation software and sent to the network pipe end in the form of a response message. The preset response data can be preset at the appointed position of the simulation equipment or the network management equipment and other equipment; corresponding preset response data can be set by adopting a static configuration mode aiming at different request data; the preset response data is used for simulating the response condition of the communication equipment after receiving the request data; the network management terminal can be network management software or network management equipment where the network management software is located;
after receiving the request data, the simulation device can search preset response data corresponding to the request data at a specified position;
if the preset response data corresponding to the request data is found, directly returning the preset response data to the network management software as final simulation response data;
if the preset response data corresponding to the request data are not found, forwarding the request data to preset communication equipment; the preset communication equipment is real communication equipment, a communication link can be established with network management equipment or simulation equipment in a connection mode such as a network, and the request data can be sent to the preset communication equipment through the communication link; different types of preset communication equipment can be set according to the types of the request data which possibly occur so as to meet the requirements of different types of the request data;
the preset communication equipment receives the request data and returns real equipment response data to the simulation software, and the simulation software returns the equipment response data serving as final simulation response data to the network management software; thereby completing the simulation; in this way, by returning the response data of the real communication device, the actual situation is truly simulated.
Further, when first identification information in the request data is consistent with second identification information of the preset response data, determining that the request data corresponds to the preset response data;
here, the first identification information and the second identification information may be identification information such as OID in SNMP or an element tag of XML in NetConf; the different identification information corresponds to different response data;
when static configuration is performed, the preset response data and the second identification information thereof can be stored in a file or other storage media of static configuration simulation data; when the request data is received, the first identification information in the request data can be extracted, the first identification information and the second identification information are compared, and if the first identification information and the second identification information are consistent, the request data and the preset response data are determined to be consistent.
Further, the equipment response data is determined as preset response data corresponding to the request data;
here, after receiving the device response data, the device response data may be stored as preset response data corresponding to the subsequent same request data; and when the request data is received again subsequently, the equipment response data can be directly returned to the network management software. The device response data can be saved to a file or other storage medium of static configuration simulation data; the process of storing the equipment response data can be carried out before or after the equipment response data is sent to the network management software.
Further, recording the response time of the preset communication equipment after receiving the request data, and determining the response time as the delay time for responding to the request data;
specifically, a time point of sending the request data to the preset communication device and a time point of receiving device response data returned by the preset communication device may be recorded, so as to determine a response time of the preset communication device;
the device response data and corresponding response time may be saved to a file or other storage medium of static configuration simulation data; when request data corresponding to the equipment response data appear subsequently, the simulation software reads the equipment response data and the corresponding response time at the same time, delays the time according to the response time and then returns the equipment response data; therefore, response data and response delay of the real communication equipment can be simulated, and the time situation is simulated more truly.
In practical application, the specific implementation steps of the communication device simulation method may be as shown in fig. 4, and include:
step 401: receiving request data; receiving request data sent by network management software by simulation software;
step 402: searching response data corresponding to the request data in the statically configured simulation data according to the identification information of the request data;
step 403: if the response data corresponding to the request data is found, executing step 407, otherwise executing step 404;
step 404: forwarding the request data to the real communication equipment, and timing the response time of the real communication equipment;
step 405: receiving response data sent by real communication equipment and finishing timing response time of the real communication equipment;
step 406: adding the mapping of the request data identification information and the received response data of the real communication equipment into the static configuration, and simultaneously adding the response time of the real communication equipment into the static configuration;
the response time is used for delaying and then sending corresponding response data when the same request data is received subsequently; thus, real communication equipment can be simulated really;
step 407: and returning the response data to the network management software.
In practical applications, the obtaining module 71 and the responding module 72 may be implemented by a CPU, a Microprocessor (MCU), a Digital Signal Processor (DSP), or a Field Programmable Gate Array (FPGA) in a simulation device or a network management device.
The storage medium provided in the embodiment of the present invention stores thereon an executable program, and the executable program, when executed by a processor, implements a communication device simulation method, as shown in fig. 3, the method including:
step 301: acquiring request data sent by a network management end;
here, the simulation of the communication device may be performed by a simulation device, which may be a computer or the like; the simulation device is provided with simulation software for simulating the communication device; the emulation software can also be in the network management equipment where the network management software is located, such as in a server where the network management software is located. The network management end can be network management equipment where network management software is located and the like; the request data can be obtained through the connection between the simulation equipment where the simulation software is located and the network management equipment or through the interface between the network management software and the simulation software. The request data can be analyzed from the request message by simulation software.
Step 302: when the request data has corresponding preset response data, sending the preset response data to the network pipe end; when the request data does not have corresponding preset response data, the request data is sent to preset communication equipment, and equipment response data returned by the preset communication equipment is sent to the network pipe end;
here, the preset response data, the device response data, and other response data may be packaged by the emulation software and sent to the network pipe end in the form of a response message. The preset response data can be preset at the appointed position of the simulation equipment or the network management equipment and other equipment; corresponding preset response data can be set by adopting a static configuration mode aiming at different request data; the preset response data is used for simulating the response condition of the communication equipment after receiving the request data; the network management terminal can be network management software or network management equipment where the network management software is located;
after receiving the request data, the simulation device can search preset response data corresponding to the request data at a specified position;
if the preset response data corresponding to the request data is found, directly returning the preset response data to the network management software as final simulation response data;
if the preset response data corresponding to the request data are not found, forwarding the request data to preset communication equipment; the preset communication equipment is real communication equipment, a communication link can be established with network management equipment or simulation equipment in a connection mode such as a network, and the request data can be sent to the preset communication equipment through the communication link; different types of preset communication equipment can be set according to the types of the request data which possibly occur so as to meet the requirements of different types of the request data;
the preset communication equipment receives the request data and returns real equipment response data to the simulation software, and the simulation software returns the equipment response data serving as final simulation response data to the network management software; thereby completing the simulation; in this way, by returning the response data of the real communication device, the actual situation is truly simulated.
Further, when first identification information in the request data is consistent with second identification information of the preset response data, determining that the request data corresponds to the preset response data;
here, the first identification information and the second identification information may be identification information such as OID in SNMP or an element tag of XML in NetConf; the different identification information corresponds to different response data;
when static configuration is performed, the preset response data and the second identification information thereof can be stored in a file or other storage media of static configuration simulation data; when the request data is received, the first identification information in the request data can be extracted, the first identification information and the second identification information are compared, and if the first identification information and the second identification information are consistent, the request data and the preset response data are determined to be consistent.
Further, the equipment response data is determined as preset response data corresponding to the request data;
here, after receiving the device response data, the device response data may be stored as preset response data corresponding to the subsequent same request data; and when the request data is received again subsequently, the equipment response data can be directly returned to the network management software. The device response data can be saved to a file or other storage medium of static configuration simulation data; the process of storing the equipment response data can be carried out before or after the equipment response data is sent to the network management software.
Further, recording the response time of the preset communication equipment after receiving the request data, and determining the response time as the delay time for responding to the request data;
specifically, a time point of sending the request data to the preset communication device and a time point of receiving device response data returned by the preset communication device may be recorded, so as to determine a response time of the preset communication device;
the device response data and corresponding response time may be saved to a file or other storage medium of static configuration simulation data; when request data corresponding to the equipment response data appear subsequently, the simulation software reads the equipment response data and the corresponding response time at the same time, delays the time according to the response time and then returns the equipment response data; therefore, response data and response delay of the real communication equipment can be simulated, and the time situation is simulated more truly.
In practical application, the specific implementation steps of the communication device simulation method may be as shown in fig. 4, and include:
step 401: receiving request data; receiving request data sent by network management software by simulation software;
step 402: searching response data corresponding to the request data in the statically configured simulation data according to the identification information of the request data;
step 403: if the response data corresponding to the request data is found, executing step 407, otherwise executing step 404;
step 404: forwarding the request data to the real communication equipment, and timing the response time of the real communication equipment;
step 405: receiving response data sent by real communication equipment and finishing timing response time of the real communication equipment;
step 406: adding the mapping of the request data identification information and the received response data of the real communication equipment into the static configuration, and simultaneously adding the response time of the real communication equipment into the static configuration;
the response time is used for delaying and then sending corresponding response data when the same request data is received subsequently; thus, real communication equipment can be simulated really;
step 407: and returning the response data to the network management software.
The information processing apparatus provided in the embodiment of the present invention includes a processor, a memory, and an executable program stored on the memory and capable of being run by the processor, and executes a method for implementing communication device simulation when the processor runs the executable program, as shown in fig. 3, the method includes:
step 301: acquiring request data sent by a network management end;
here, the simulation of the communication device may be performed by a simulation device, which may be a computer or the like; the simulation device is provided with simulation software for simulating the communication device; the emulation software can also be in the network management equipment where the network management software is located, such as in a server where the network management software is located. The network management end can be network management equipment where network management software is located and the like; the request data can be obtained through the connection between the simulation equipment where the simulation software is located and the network management equipment or through the interface between the network management software and the simulation software. The request data can be analyzed from the request message by simulation software.
Step 302: when the request data has corresponding preset response data, sending the preset response data to the network pipe end; when the request data does not have corresponding preset response data, the request data is sent to preset communication equipment, and equipment response data returned by the preset communication equipment is sent to the network pipe end;
here, the preset response data, the device response data, and other response data may be packaged by the emulation software and sent to the network pipe end in the form of a response message. The preset response data can be preset at the appointed position of the simulation equipment or the network management equipment and other equipment; corresponding preset response data can be set by adopting a static configuration mode aiming at different request data; the preset response data is used for simulating the response condition of the communication equipment after receiving the request data; the network management terminal can be network management software or network management equipment where the network management software is located;
after receiving the request data, the simulation device can search preset response data corresponding to the request data at a specified position;
if the preset response data corresponding to the request data is found, directly returning the preset response data to the network management software as final simulation response data;
if the preset response data corresponding to the request data are not found, forwarding the request data to preset communication equipment; the preset communication equipment is real communication equipment, a communication link can be established with network management equipment or simulation equipment in a connection mode such as a network, and the request data can be sent to the preset communication equipment through the communication link; different types of preset communication equipment can be set according to the types of the request data which possibly occur so as to meet the requirements of different types of the request data;
the preset communication equipment receives the request data and returns real equipment response data to the simulation software, and the simulation software returns the equipment response data serving as final simulation response data to the network management software; thereby completing the simulation; in this way, by returning the response data of the real communication device, the actual situation is truly simulated.
Further, when first identification information in the request data is consistent with second identification information of the preset response data, determining that the request data corresponds to the preset response data;
here, the first identification information and the second identification information may be identification information such as OID in SNMP or an element tag of XML in NetConf; the different identification information corresponds to different response data;
when static configuration is performed, the preset response data and the second identification information thereof can be stored in a file or other storage media of static configuration simulation data; when the request data is received, the first identification information in the request data can be extracted, the first identification information and the second identification information are compared, and if the first identification information and the second identification information are consistent, the request data and the preset response data are determined to be consistent.
Further, the equipment response data is determined as preset response data corresponding to the request data;
here, after receiving the device response data, the device response data may be stored as preset response data corresponding to the subsequent same request data; and when the request data is received again subsequently, the equipment response data can be directly returned to the network management software. The device response data can be saved to a file or other storage medium of static configuration simulation data; the process of storing the equipment response data can be carried out before or after the equipment response data is sent to the network management software.
Further, recording the response time of the preset communication equipment after receiving the request data, and determining the response time as the delay time for responding to the request data;
specifically, a time point of sending the request data to the preset communication device and a time point of receiving device response data returned by the preset communication device may be recorded, so as to determine a response time of the preset communication device;
the device response data and corresponding response time may be saved to a file or other storage medium of static configuration simulation data; when request data corresponding to the equipment response data appear subsequently, the simulation software reads the equipment response data and the corresponding response time at the same time, delays the time according to the response time and then returns the equipment response data; therefore, response data and response delay of the real communication equipment can be simulated, and the time situation is simulated more truly.
In practical application, the specific implementation steps of the communication device simulation method may be as shown in fig. 4, and include:
step 401: receiving request data; receiving request data sent by network management software by simulation software;
step 402: searching response data corresponding to the request data in the statically configured simulation data according to the identification information of the request data;
step 403: if the response data corresponding to the request data is found, executing step 407, otherwise executing step 404;
step 404: forwarding the request data to the real communication equipment, and timing the response time of the real communication equipment;
step 405: receiving response data sent by real communication equipment and finishing timing response time of the real communication equipment;
step 406: adding the mapping of the request data identification information and the received response data of the real communication equipment into the static configuration, and simultaneously adding the response time of the real communication equipment into the static configuration;
the response time is used for delaying and then sending corresponding response data when the same request data is received subsequently; thus, real communication equipment can be simulated really;
step 407: and returning the response data to the network management software.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the scope of the present invention, and any modifications, equivalents and improvements made within the spirit and principle of the present invention should be included in the scope of the present invention.
Claims (10)
1. A method for communication device emulation, the method comprising:
acquiring request data sent by a network management end;
when the request data has corresponding preset response data, sending the preset response data to the network pipe end; and when the corresponding preset response data does not exist in the request data, sending the request data to preset communication equipment, and sending equipment response data returned by the preset communication equipment to the network pipe end.
2. The method of claim 1, further comprising:
and determining the equipment response data as preset response data corresponding to the request data.
3. The method of claim 2, further comprising:
recording the response time of the preset communication equipment after receiving the request data, and determining the response time as the delay time for responding the request data.
4. The method according to any one of claims 1 to 3, wherein determining that the request data has corresponding preset response data comprises:
and when the first identification information in the request data is consistent with the second identification information of the preset response data, determining that the request data corresponds to the preset response data.
5. An apparatus for emulating a communication device, the apparatus comprising: an acquisition module and a response module; wherein the content of the first and second substances,
the acquisition module is used for acquiring request data sent by a network management end;
the response module is used for sending the preset response data to the network pipe end when the corresponding preset response data exists in the request data; and when the corresponding preset response data does not exist in the request data, sending the request data to preset communication equipment, and sending equipment response data returned by the preset communication equipment to the network pipe end.
6. The apparatus of claim 5, wherein the response module is further configured to:
and determining the equipment response data as preset response data corresponding to the request data.
7. The apparatus of claim 6, wherein the response module is further configured to:
recording the response time of the preset communication equipment after receiving the request data, and determining the response time as the delay time for responding the request data.
8. The apparatus according to any one of claims 5 to 7, wherein the response module is specifically configured to:
and when the first identification information in the request data is consistent with the second identification information of the preset response data, determining that the request data corresponds to the preset response data.
9. A storage medium on which an executable program is stored, the executable program, when executed by a processor, implementing the steps of the communication device emulation method of any one of claims 1 to 4.
10. A communication device emulation apparatus comprising a processor, a memory and an executable program stored on the memory and capable of being executed by the processor, wherein the steps of the communication device emulation method according to any of claims 1 to 4 are performed when the executable program is executed by the processor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810898317.XA CN110830274A (en) | 2018-08-08 | 2018-08-08 | Communication equipment simulation method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810898317.XA CN110830274A (en) | 2018-08-08 | 2018-08-08 | Communication equipment simulation method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110830274A true CN110830274A (en) | 2020-02-21 |
Family
ID=69540746
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810898317.XA Withdrawn CN110830274A (en) | 2018-08-08 | 2018-08-08 | Communication equipment simulation method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110830274A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111209405A (en) * | 2020-04-22 | 2020-05-29 | 成都四方伟业软件股份有限公司 | Dynamic OID (object identification) push data acquisition method and device |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20060106925A1 (en) * | 2004-11-18 | 2006-05-18 | Samsung Electronics Co., Ltd. | Network management apparatus and method based on simple network management protocol |
CN103150238A (en) * | 2011-12-07 | 2013-06-12 | 阿里巴巴集团控股有限公司 | Service request processing method, simulation performance test method and simulation performance test device |
CN107579879A (en) * | 2017-09-26 | 2018-01-12 | 深圳震有科技股份有限公司 | A kind of network simulation method of testing, emulation server and storage medium |
-
2018
- 2018-08-08 CN CN201810898317.XA patent/CN110830274A/en not_active Withdrawn
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20060106925A1 (en) * | 2004-11-18 | 2006-05-18 | Samsung Electronics Co., Ltd. | Network management apparatus and method based on simple network management protocol |
CN103150238A (en) * | 2011-12-07 | 2013-06-12 | 阿里巴巴集团控股有限公司 | Service request processing method, simulation performance test method and simulation performance test device |
CN107579879A (en) * | 2017-09-26 | 2018-01-12 | 深圳震有科技股份有限公司 | A kind of network simulation method of testing, emulation server and storage medium |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111209405A (en) * | 2020-04-22 | 2020-05-29 | 成都四方伟业软件股份有限公司 | Dynamic OID (object identification) push data acquisition method and device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109582588B (en) | Test case generation method and device and electronic equipment | |
US9348771B1 (en) | Cloud-based instrument driver system | |
CN107819611B (en) | Client test method based on IEC61850 multi-server simulation | |
CN107168844B (en) | Performance monitoring method and device | |
CN106776318A (en) | A kind of test script method for recording and system | |
CN114124694A (en) | Configuration method and configuration device of Internet of things equipment, electronic equipment and medium | |
US20160218952A1 (en) | Testing by simulation using variations of real-time traffic | |
US20140250332A1 (en) | Log file reduction according to problem-space network topology | |
CN112235262A (en) | Message analysis method and device, electronic equipment and computer readable storage medium | |
Song et al. | Rule-based verification of network protocol implementations using symbolic execution | |
CN110830274A (en) | Communication equipment simulation method and device | |
US9329960B2 (en) | Methods, systems, and computer readable media for utilizing abstracted user-defined data to conduct network protocol testing | |
CN116097226A (en) | Apparatus and method for injecting faults into a distributed system | |
CN113468045A (en) | Test system, method and assembly for server batch configuration software | |
US9819741B1 (en) | Device for sensor simulation using constrained application protocol | |
CN112363939A (en) | Method, system and equipment for quickly generating fuzzy test network protocol template | |
CN105207803A (en) | Method for simulating trap messages of multiple network elements and system | |
US10176075B1 (en) | Methods, systems, and computer readable mediums for generating key performance indicator metric test data | |
CN112527453A (en) | Virtualization information simulation system, method and computer-readable storage medium | |
CN114567458A (en) | System and method for quickly identifying monitoring equipment | |
CN111221687B (en) | Cloud storage testing system and method | |
CN115203008A (en) | Test method, test device, storage medium and equipment | |
Vogt et al. | A REST based co-simulation interface for distributed simulations | |
CN114765633A (en) | Network message analysis method and device based on train real-time Ethernet protocol | |
US20120260235A1 (en) | Response simulator computing apparatuses and methods thereof |
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 | ||
WW01 | Invention patent application withdrawn after publication | ||
WW01 | Invention patent application withdrawn after publication |
Application publication date: 20200221 |