CN115426301B - Device detection method, device, equipment and storage medium based on self-generated message - Google Patents

Device detection method, device, equipment and storage medium based on self-generated message Download PDF

Info

Publication number
CN115426301B
CN115426301B CN202211020672.XA CN202211020672A CN115426301B CN 115426301 B CN115426301 B CN 115426301B CN 202211020672 A CN202211020672 A CN 202211020672A CN 115426301 B CN115426301 B CN 115426301B
Authority
CN
China
Prior art keywords
self
message
information
detection
virtual client
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.)
Active
Application number
CN202211020672.XA
Other languages
Chinese (zh)
Other versions
CN115426301A (en
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.)
Beijing Huayao Technology Co ltd
Original Assignee
Beijing Huayao Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Huayao Technology Co ltd filed Critical Beijing Huayao Technology Co ltd
Priority to CN202211020672.XA priority Critical patent/CN115426301B/en
Publication of CN115426301A publication Critical patent/CN115426301A/en
Application granted granted Critical
Publication of CN115426301B publication Critical patent/CN115426301B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/02Capturing of monitoring data

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the invention provides a device detection method, a device and a storage medium based on a self-generated message, wherein the method comprises the following steps: terminal information corresponding to the virtual client is obtained, equipment information of the network equipment is determined, and a self-generated message corresponding to the virtual client is generated based on the terminal information and the equipment information. And finally, detecting the network equipment based on the self-generated message to obtain a detection result of the network equipment. In the scheme, the self-generated message corresponding to the virtual client is generated through the terminal information and the device information, namely, the network device can simulate and generate the message sent by the client, and the network device is detected by using the self-generated message, so that the device detection is not dependent on the real client, the self-detection operation of the device can be completed based on the network device, the reliability of the detection result is ensured, and the extra work brought by the use of the client can be avoided, so that the self-detection operation of the network device is more convenient and more efficient.

Description

Device detection method, device, equipment and storage medium based on self-generated message
Technical Field
The present invention relates to the field of network communication device testing technologies, and in particular, to a device detection method, apparatus, device and storage medium based on self-generated packets.
Background
In a network environment, functions of network equipment are complex and various, and configuration, processing flow, functions and the like of the network equipment need to be confirmed to be kept normal when clients are deployed on site. Therefore, in the development and test stage of the network device, a test environment is usually required to be built, and a real client is used for carrying out package sending to test whether the function of the network device is complete or not, and whether the processing flow is correct or not.
However, in the development testing stage of the network device, a larger number of clients may be required to perform the packet sending test, which makes the testing task heavy and the testing operation cumbersome, and there is a high probability that enough clients are not available for the detection of the network device when deployed on the site of the client. Therefore, how to realize the full coverage test of the network device without depending on the client is a problem to be solved.
Disclosure of Invention
The embodiment of the invention provides a device detection method, device, equipment and storage medium based on a self-generated message, which are used for realizing the detection of network equipment, and a client is not relied on in the detection process, so that the detection is more convenient.
In a first aspect, an embodiment of the present invention provides a device detection method based on a self-generated packet, which is applied to a network device, where the method includes:
acquiring terminal information corresponding to a virtual client;
determining device information of the network device;
generating a self-generated message corresponding to the virtual client based on the terminal information and the equipment information;
and detecting the network equipment based on the self-generated message to obtain a detection result of the network equipment.
Optionally, the generating, based on the virtual client information and the device information, a self-generated message corresponding to the virtual client includes:
acquiring application layer data corresponding to the virtual client;
and generating a self-generated message corresponding to the virtual client according to the application layer data, the terminal information and the equipment information.
Optionally, the terminal information includes an IP address of a virtual client, a virtual client port, a transport layer protocol, and a MAC address of a media access control address of the virtual client, the device information includes an IP address of a device, and the generating, according to the application layer data, the MAC address, and the device information, a self-generated packet corresponding to the virtual client includes:
and generating the self-generated message by taking the IP address of the virtual client as a source IP address, the virtual client port as a source port, the IP address of the equipment as a target IP, the equipment port as a target port and a transport layer protocol as a message transport protocol and combining the application layer data and the MAC address.
Optionally, the detecting the network device based on the self-generated packet, to obtain a detection result of the network device, includes:
determining a message processing strategy used for processing the self-generated message in the network equipment;
processing the self-generated message based on the message processing strategy to obtain message detection information;
and determining the detection result based on the message detection information.
Optionally, the determining the detection result based on the message detection information includes:
acquiring process parameters in the message detection information;
determining preset parameters for analyzing and processing the process parameters;
and determining a detection result of the network equipment according to the process parameter and the preset parameter.
Optionally, the method further comprises:
if the detection result of the network equipment is abnormal, acquiring abnormal process parameters in the process parameters;
and determining a fault point corresponding to the network equipment based on the abnormal process parameters.
In a second aspect, an embodiment of the present invention provides a device detection apparatus based on a self-generated packet, located in a network device, where the apparatus includes:
the acquisition module is used for acquiring terminal information corresponding to the virtual client;
a determining module, configured to determine device information of the network device;
the generation module is used for generating a self-generated message corresponding to the virtual client based on the terminal information and the equipment information;
and the detection module is used for detecting the network equipment based on the self-generated message and obtaining a detection result of the network equipment.
Optionally, the generating module may specifically be configured to: acquiring application layer data corresponding to the virtual client; and generating a self-generated message corresponding to the virtual client according to the application layer data, the terminal information and the equipment information.
Optionally, the terminal information includes an IP address of a virtual client, a virtual client port, a transport layer protocol, and a MAC address of a media access control address of the virtual client, the device information includes an IP address of a device, a device port, and the generating module may be further specifically configured to: and generating the self-generated message by taking the IP address of the virtual client as a source IP address, the virtual client port as a source port, the IP address of the equipment as a target IP, the equipment port as a target port and a transport layer protocol as a message transport protocol and combining the application layer data and the MAC address.
Optionally, the detection module may specifically be configured to: determining a message processing strategy used for processing the self-generated message in the network equipment; processing the self-generated message based on the message processing strategy to obtain message detection information; and determining the detection result based on the message detection information.
Optionally, the detection module may be further specifically configured to: acquiring process parameters in the message detection information; determining preset parameters for analyzing and processing the process parameters; and determining a detection result of the network equipment according to the process parameter and the preset parameter.
Optionally, the detection module may be further specifically configured to: acquiring function parameters in the equipment information, wherein the function parameters are used for identifying functions which can be realized by the network equipment; and determining the preset parameters according to the functional parameters.
Optionally, the device further comprises an anomaly module, specifically configured to: if the detection result of the network equipment is abnormal, acquiring abnormal process parameters in the process parameters; and determining a fault point corresponding to the network equipment based on the abnormal process parameters.
In a third aspect, an embodiment of the present invention provides an electronic device, including: a memory, a processor, a communication interface; wherein the memory has executable code stored thereon, which when executed by the processor, causes the processor to at least implement a self-generated message based device detection method as described in the first aspect.
In a fourth aspect, embodiments of the present invention provide a non-transitory machine-readable storage medium having stored thereon executable code, which when executed by a processor, causes the processor to at least implement a data storage method as described in the first aspect.
In the device detection scheme provided by the embodiment of the invention, terminal information corresponding to the virtual client is firstly obtained, then the device information of the network device is determined, and a self-generated message corresponding to the virtual client is generated based on the terminal information and the device information. And finally, detecting the network equipment based on the self-generated message to obtain a detection result of the network equipment. In the scheme, the self-generated message corresponding to the virtual client is generated through the terminal information and the device information, namely, the network device can construct the detection message sent by the client, and the self-generated message generated by the network device is used for detecting the network device, so that the device detection is not needed to be carried out by depending on the real client, the self-detection operation of the device can be completed based on the network device, the reliability of the detection result is ensured, and the extra work brought by the use of the client can be avoided, so that the self-detection operation of the network device is more convenient and more efficient.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flowchart of a device detection method based on a self-generated message according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart of generating a self-generated message corresponding to a virtual client based on virtual client information and device information according to an embodiment of the present invention;
fig. 3 is a schematic flow chart of detecting network devices based on self-generated messages to obtain detection results of the network devices according to the embodiment of the present invention;
fig. 4 is an application schematic diagram of a device detection method based on a self-generated packet according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a device detection apparatus based on a self-generated packet according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of an electronic device corresponding to the device detection apparatus based on self-generated packets provided in the embodiment shown in fig. 5.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The terminology used in the embodiments of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in this application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise, the "plurality" generally includes at least two.
The words "if", as used herein, may be interpreted as "at … …" or "at … …" or "in response to a determination" or "in response to a detection", depending on the context. Similarly, the phrase "if determined" or "if detected (stated condition or event)" may be interpreted as "when determined" or "in response to determination" or "when detected (stated condition or event)" or "in response to detection (stated condition or event), depending on the context.
In addition, the sequence of steps in the method embodiments described below is only an example and is not strictly limited.
At present, in the field of network communication, new products all need to be tested to judge whether the products meet the design requirements or not, and whether the products meet the market-oriented requirements or not can be judged. When testing network devices, no-message detection is usually performed mainly by using a command or a real client sends a message to the network device to be detected for detection. However, there is a certain difference between the detection flow and the message processing flow involved in the no-message detection manner, which results in that the no-message detection cannot cover all the message processing flows, so that the detection result may be inaccurate. In addition, a mode of using a real client to detect equipment may need a large number of clients to realize full coverage test, resulting in a large testing workload of the equipment, and meanwhile, the use of the client also brings additional work, so that the detection efficiency is low. In order to solve the technical problems, the embodiment of the invention provides a device detection method based on self-generated messages, which detects network devices by simulating messages of a constructed client, and realizes the detection of the network devices without depending on the client package, thereby not only ensuring the accuracy of detection results, but also avoiding extra work brought by the use of the client and improving the detection efficiency of the network devices.
The device detection method based on the self-generated message in the scheme is described in detail through the following embodiments.
Fig. 1 is a flowchart of a device detection method based on a self-generated message according to an embodiment of the present invention; referring to fig. 1, the embodiment provides a device detection method based on a self-generated message, where an execution body of the method may be a network device to be detected, and it may be understood that the network device may be implemented as software, or a combination of software and hardware, and specifically, as shown in fig. 1, the device detection method based on a self-generated message may include the following steps:
and 101, acquiring terminal information corresponding to the virtual client.
Step 102, determining device information of the network device.
And 103, generating a self-generated message corresponding to the virtual client based on the terminal information and the equipment information.
And 104, detecting the network equipment based on the self-generated message to obtain a detection result of the network equipment.
The device detection method based on the self-generated message provided by the embodiment of the invention can detect the devices of the network devices with various functions in the network environment, for example, the network devices can be the network devices with the routing function, the network devices with the switching function, the network devices with the address switching function, the network devices with the load balancing function, the network devices with the safety protection function and the like. The purpose of detecting the network device may be, for example, detecting whether the configuration of the network device is correct, detecting whether the function of the network device is complete, and detecting whether the processing flow of the network device is reliable.
In practical application, when a certain network device has a detection requirement, the network device to be detected can directly construct a message of the client, detect the network device based on the constructed self-generated message, realize the detection of the network device without depending on a data message sent by the client, and directly realize the detection of the device based on the network device to be detected. In the embodiment of the invention, the network equipment to be detected is not required to be in communication connection with a plurality of clients, the actual packet sending operation of the clients is not required, and the network equipment can directly detect the network equipment by using the self-generated message generated by the network equipment.
Specifically, when detecting the network device, terminal information corresponding to the virtual client is first acquired. The terminal information may be: the IP address of the client, the MAC address of the client, the transmission protocol, the application layer data and the like. In the embodiment of the invention, the client is not required to be in communication connection with the network equipment, and equipment detection is performed based on the data message sent by the client, so that the virtual client is not a client which is in real communication connection with the network equipment. The terminal information may be terminal information of a real client, or terminal information of a client that does not exist truly, that is, terminal information set manually. In the embodiment of the invention, the method is not limited, and the method can be set according to actual application requirements, and terminal information of any appointed client can be obtained.
Next, device information of the network device is determined. Wherein the device information may include: information such as the IP address of the network device, the MAC address of the network device, etc. After the device information of the network device is determined, in order to make the detection result of the network device more accurate, a self-generated message corresponding to the virtual client is generated according to the terminal information and the device information. Specifically, the terminal information may be input into the network device using a command line or file import manner, then a message generation parameter is determined based on the acquired terminal information and device information, and a self-generated message corresponding to the virtual client is generated based on the message generation parameter. The detection message corresponding to any client can be constructed according to the acquired terminal information and equipment information of any client. That is, based on the method, a detection message corresponding to any client can be constructed, so that the network device is replaced by any client to perform device detection.
And finally, detecting the network equipment based on the self-generated message to obtain a detection result of the network equipment. Specifically, the self-generated message may be sent to an entry of the message processing flow, so that the message processing flow may obtain the self-generated message, and further process the self-generated message like receiving the detection message from the real client, that is, the message processing flow in the network device may sequentially process the received self-generated message, and various message detection information may be generated in the process of message processing, and the detection result of the network device is determined based on the message detection information. The self-generated message is generated based on the combined action of the terminal information and the device information, so that the generated self-generated message is more in line with the detection message in the real test environment, the self-generated message generated by the network device can replace the detection message sent to the network device by the client, the detection of the device can be completed directly based on the network device without depending on the client, and meanwhile, the detection of the network device is carried out based on the self-generated message because the self-generated message is the detection message sent by the simulated client, so that the detection result of the device is more accurate.
In the scheme provided by the embodiment of the invention, the self-generated message corresponding to the virtual client is generated through the terminal information corresponding to the virtual client and the equipment information of the network equipment, namely the network equipment can construct the detection message sent by the client, the generated message is more in line with the real detection message, the equipment detection is carried out on the network equipment by using the self-generated message, the detection of the network equipment can be realized without depending on the client, and the self-detection operation of the equipment can be finished directly based on the network equipment, so that the follow-up detection result is more accurate, the extra work brought by the use of the client can be avoided, and the self-detection operation of the network equipment is more convenient and more efficient.
FIG. 2 is a schematic flow chart of generating a self-generated message corresponding to a virtual client based on virtual client information and device information according to an embodiment of the present invention; on the basis of the foregoing embodiment, with continued reference to fig. 2, this embodiment provides an implementation manner that may determine a self-generated packet corresponding to a virtual client, which may specifically include:
step 201, acquiring application layer data corresponding to a virtual client.
Step 202, generating a self-generated message corresponding to the virtual client according to the application layer data, the terminal information and the equipment information.
When constructing the self-generated message corresponding to the virtual client, in order to make the constructed self-generated message more approximate to the detection message sent by the real client, acquiring the application layer data corresponding to the virtual client, and then generating the self-generated message corresponding to the virtual client according to the application layer data, the terminal information and the equipment information. The application layer data may include application layer data required for a real test, or may be set according to specified information.
Specifically, in different network structures, a self-generated message corresponding to the virtual client may be configured according to the application layer data, the terminal information, and the device information according to the network requirements. In an alternative embodiment, the network structure is a TCP/IP network, in which network devices all use TCP/IP packets as processing objects, and they can construct self-generated packets according to TCP/IP network requirements.
In an alternative embodiment, the specific terminal information may include an IP address of the virtual client, a virtual client port, a transport layer protocol, and a MAC address of a media access control address of the virtual client, and the device information may include an IP address of the device, and the specific implementation manner of generating, according to the TCP/IP network requirement, the self-generated packet corresponding to the virtual client based on the application layer data, the MAC address, and the device information may be: the IP address of the virtual client is used as a source IP address, the port of the virtual client is used as a source port, the IP address of the equipment is used as a destination IP, the port of the equipment is used as a destination port, the transport layer protocol is used as a message transport protocol, and the self-generated message is generated by combining the application layer data and the MAC address. According to the appointed information of the virtual client and the network equipment, the generated self-generated message is compared with the detection message which is imitated and received from the client, so that the detection process of the network equipment is more in line with the real detection environment.
In summary, in the embodiment of the present invention, by acquiring the application layer data corresponding to the virtual client, and generating the self-generated message corresponding to the virtual client according to the application layer data, the terminal information and the device information, the generated self-generated message is closer to the detection message actually received from the client, so that the detection result is more accurate.
Fig. 3 is a schematic flow chart of detecting network devices based on self-generated messages to obtain detection results of the network devices according to the embodiment of the present invention; on the basis of the foregoing embodiment, with continued reference to fig. 3, this embodiment provides an implementation manner that a network device may be detected based on a self-generated packet to obtain a detection result of the network device, which may specifically include:
step 301, determining a message processing policy in the network device, where the message processing policy is used for processing the self-generated message.
Step 302, processing the self-generated message based on the message processing strategy to obtain the message detection information.
Step 303, determining a detection result based on the message detection information.
After generating the self-generated message, determining a message processing strategy for processing the self-generated message in the network equipment. Different network devices may have different message processing policies, and corresponding message processing policies in network devices of different vendors of the same type may also be different. And then, processing the self-generated message directly based on a message processing strategy in the network equipment to obtain message detection information. Specifically, after determining the message processing policy, a message processing flow corresponding to the message processing policy is called, the self-generated message is processed based on the message processing flow, and various message detection information is generated in the process of message processing. The message detection information may include: equipment statistics information, message processing logs, execution states, message processing results and other information.
In an alternative embodiment, when the self-generated message is processed based on the message processing flow, the self-generated message is first injected into the entry of the message processing flow, so that the message processing flow can acquire the self-generated message and then process the self-generated message as if the self-generated message is received from a real client. When the network device is developed, a message injection point, namely an entrance of a message processing flow, is reserved in the network device in advance. In practical applications, for example, the network device may first receive a packet from the network card, and then put the packet into the packet processing queue, where the packet processing flow will sequentially read the self-generated packet from the packet processing queue and sequentially process the self-generated packet.
When the message processing flow processes the self-generated message, various message processing information is output, and message detection information is determined based on the message processing information. And determining a detection result of the network equipment based on the message detection information. In an alternative embodiment, based on the message detection information, a specific implementation manner of determining the detection result of the network device may be: acquiring process parameters in the message detection information, determining preset parameters for analyzing and processing the process parameters, and determining a detection result of the network equipment according to the process parameters and the preset parameters. The specific implementation manner of determining the preset parameters for analyzing and processing the process parameters may be: and acquiring functional parameters in the equipment information, wherein the functional parameters are used for identifying functions which can be realized by the network equipment, and determining preset parameters according to the functional parameters.
Comparing the acquired process parameters with preset parameters, and judging that the network equipment is abnormal if error statistics, abnormal states, error logs or error outputs exist. If the message output is normal, whether the output result accords with the expectation is required to be judged based on the preset parameters, if not, the network equipment processes errors, and the network equipment can be judged to have the abnormality. If the detection result of the network equipment is abnormal, acquiring abnormal process parameters in the process parameters, and determining a fault point corresponding to the network equipment based on the abnormal process parameters.
In the embodiment of the invention, the message processing strategy for processing the self-generated message in the network equipment is determined, the self-generated message is processed based on the message processing strategy, the message detection information is obtained, the detection result is determined based on the message detection information, and the determined detection result is more reliable.
In a specific application, in order to facilitate understanding of a process flow of detecting a network address conversion function in a gateway device in combination with fig. 4, terminal information corresponding to a virtual client is first obtained, device information of the gateway device is determined, and a self-generated message corresponding to the virtual client is constructed based on the terminal information and the device information. And then injecting the self-generated message into a message processing queue, reading the self-generated message from the message processing queue by a message processing flow, checking the validity of the self-generated message, performing routing after the verification is successful, performing address conversion and creating a session according to a routing network address conversion rule, starting a session timer, and finally sending the converted message. Message detection information is generated in the whole processing process of the self-generated message, statistical analysis is carried out on the message detection information, whether error data exist in process parameters in the message detection information or not is determined, and if error statistics, abnormal state and error logs exist in the message processing process, the network address conversion function of the gateway is abnormal.
The relevant content of the embodiment, which is not described in the present embodiment, may refer to the relevant description in the foregoing embodiment, which is not repeated here.
Data storage devices of one or more embodiments of the present invention will be described in detail below. Those skilled in the art will appreciate that these means may be configured by the steps taught by the present solution using commercially available hardware components.
Fig. 5 is a schematic structural diagram of a device detection apparatus based on self-generated packets according to an embodiment of the present invention, where the device is located in a network device, as shown in fig. 5, and the device includes: the device comprises an acquisition module 11, a determination module 12, a generation module 13 and a detection module 14.
An acquisition module 11, configured to acquire terminal information corresponding to a virtual client;
a determining module 12, configured to determine device information of the network device;
a generating module 13, configured to generate a self-generated packet corresponding to the virtual client based on the terminal information and the device information;
and the detection module 14 is configured to detect the network device based on the self-generated packet, and obtain a detection result of the network device.
Alternatively, the generating module 13 may be specifically configured to: acquiring application layer data corresponding to the virtual client; and generating a self-generated message corresponding to the virtual client according to the application layer data, the terminal information and the equipment information.
Optionally, the terminal information includes an IP address of a virtual client, a virtual client port, a transport layer protocol, and a MAC address of a media access control address of the virtual client, the device information includes an IP address of a device, a device port, and the generating module 13 may be specifically further configured to: and generating the self-generated message by taking the IP address of the virtual client as a source IP address, the virtual client port as a source port, the IP address of the equipment as a target IP, the equipment port as a target port and a transport layer protocol as a message transport protocol and combining the application layer data and the MAC address.
Alternatively, the detection module 14 may be specifically configured to: determining a message processing strategy used for processing the self-generated message in the network equipment; processing the self-generated message based on the message processing strategy to obtain message detection information; and determining the detection result based on the message detection information.
Optionally, the detection module 14 may be further specifically configured to: acquiring process parameters in the message detection information; determining preset parameters for analyzing and processing the process parameters; and determining a detection result of the network equipment according to the process parameter and the preset parameter.
Optionally, the detection module 14 may be further specifically configured to: acquiring function parameters in the equipment information, wherein the function parameters are used for identifying functions which can be realized by the network equipment; and determining the preset parameters according to the functional parameters.
Optionally, the device further comprises an anomaly module, specifically configured to: if the detection result of the network equipment is abnormal, acquiring abnormal process parameters in the process parameters; and determining a fault point corresponding to the network equipment based on the abnormal process parameters.
The apparatus shown in fig. 5 may perform the steps performed by the device detection apparatus based on the self-generated message in the foregoing embodiment, and the detailed performing process and technical effects are referred to the description in the foregoing embodiment, which is not repeated herein.
In one possible design, the structure of the device detection apparatus based on self-generated messages shown in fig. 5 may be implemented as an electronic device, as shown in fig. 6, where the electronic device may include: a first processor 21, a first memory 22, a first communication interface 23. Wherein the first memory 22 has executable code stored thereon, which when executed by the first processor 21, causes the first processor 21 to at least implement the steps performed by the device detection apparatus based on self-generated messages as in the previous embodiments.
In addition, embodiments of the present invention provide a non-transitory machine-readable storage medium having executable code stored thereon, which when executed by a processor of an electronic device, causes the processor to at least implement a device detection method based on self-generated messages as provided in the foregoing embodiments.
The apparatus embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separate. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by adding necessary general purpose hardware platforms, or may be implemented by a combination of hardware and software. Based on such understanding, the foregoing aspects, in essence and portions contributing to the art, may be embodied in the form of a computer program product, which may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (8)

1. The device detection method based on the self-generated message is characterized by being applied to network devices and comprising the following steps:
acquiring terminal information corresponding to a virtual client;
determining device information of the network device;
generating a self-generated message corresponding to the virtual client based on the terminal information and the equipment information;
determining a message processing strategy used for processing the self-generated message in the network equipment;
injecting the self-generated message into an inlet of a message processing flow in the network equipment, and calling the message processing flow corresponding to the message processing strategy to process the self-generated message to obtain message detection information;
acquiring process parameters in the message detection information;
determining preset parameters for analyzing and processing the process parameters;
and determining a detection result of the network equipment according to the process parameter and the preset parameter.
2. The method of claim 1, wherein generating a self-generated message corresponding to the virtual client based on the virtual client information and the device information comprises:
acquiring application layer data corresponding to the virtual client;
and generating a self-generated message corresponding to the virtual client according to the application layer data, the terminal information and the equipment information.
3. The method of claim 2, wherein the terminal information includes an IP address of a virtual client, a virtual client port, a transport layer protocol, and a media access control address MAC address of the virtual client, the device information includes an IP address of a device, a device port, and the generating a self-generated message corresponding to the virtual client according to the application layer data, the MAC address, and the device information includes:
and generating the self-generated message by taking the IP address of the virtual client as a source IP address, the virtual client port as a source port, the IP address of the equipment as a target IP, the equipment port as a target port and a transport layer protocol as a message transport protocol and combining the application layer data and the MAC address.
4. The method of claim 1, wherein determining the predetermined parameters for performing the analysis process on the process parameters comprises:
acquiring function parameters in the equipment information, wherein the function parameters are used for identifying functions which can be realized by the network equipment;
and determining the preset parameters according to the functional parameters.
5. The method according to claim 4, wherein the method further comprises:
if the detection result of the network equipment is abnormal, acquiring abnormal process parameters in the process parameters;
and determining a fault point corresponding to the network equipment based on the abnormal process parameters.
6. The utility model provides a detection device of autogenous message which characterized in that is located network equipment, includes:
the acquisition module is used for acquiring terminal information corresponding to the virtual client;
a determining module, configured to determine device information of the network device;
the generation module is used for generating a self-generated message corresponding to the virtual client based on the terminal information and the equipment information;
the detection module is used for determining a message processing strategy for processing the self-generated message in the network equipment; injecting the self-generated message into an inlet of a message processing flow in the network equipment, and calling the message processing flow corresponding to the message processing strategy to process the self-generated message to obtain message detection information; acquiring process parameters in the message detection information; determining preset parameters for analyzing and processing the process parameters; and determining a detection result of the network equipment according to the process parameter and the preset parameter.
7. An electronic device, comprising: a memory, a processor, a communication interface; wherein the memory has stored thereon executable code which, when executed by the processor, causes the processor to perform the self-generated message based device detection method of any of claims 1 to 5.
8. A non-transitory machine-readable storage medium having executable code stored thereon, which when executed by a processor, causes the processor to perform the self-generated message-based device detection method of any of claims 1 to 5.
CN202211020672.XA 2022-08-24 2022-08-24 Device detection method, device, equipment and storage medium based on self-generated message Active CN115426301B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211020672.XA CN115426301B (en) 2022-08-24 2022-08-24 Device detection method, device, equipment and storage medium based on self-generated message

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211020672.XA CN115426301B (en) 2022-08-24 2022-08-24 Device detection method, device, equipment and storage medium based on self-generated message

Publications (2)

Publication Number Publication Date
CN115426301A CN115426301A (en) 2022-12-02
CN115426301B true CN115426301B (en) 2023-11-10

Family

ID=84197402

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211020672.XA Active CN115426301B (en) 2022-08-24 2022-08-24 Device detection method, device, equipment and storage medium based on self-generated message

Country Status (1)

Country Link
CN (1) CN115426301B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006012787A1 (en) * 2004-07-31 2006-02-09 Huawei Technologies Co., Ltd. A terminal data simulation method and mobile terminal data source simulation method
CN101425938A (en) * 2008-12-17 2009-05-06 福建星网锐捷网络有限公司 Method and apparatus for network apparatus test
CN103731352A (en) * 2013-12-26 2014-04-16 华为技术有限公司 Message processing method and device
US9449320B1 (en) * 2015-06-08 2016-09-20 Vantiv, Llc Closed-loop testing of integrated circuit card payment terminals
CN108011824A (en) * 2016-11-02 2018-05-08 华为技术有限公司 A kind of message processing method and the network equipment
CN108259264A (en) * 2017-12-01 2018-07-06 国网北京市电力公司 Test method, the device and system of the network equipment
CN114039760A (en) * 2021-11-03 2022-02-11 中国工商银行股份有限公司 Security testing method and device, computer equipment and storage medium
CN114205274A (en) * 2021-11-02 2022-03-18 北京百度网讯科技有限公司 Network equipment testing method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20010011215A1 (en) * 1998-08-31 2001-08-02 Scott A. Beeker Network device simulation system and method

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006012787A1 (en) * 2004-07-31 2006-02-09 Huawei Technologies Co., Ltd. A terminal data simulation method and mobile terminal data source simulation method
CN101425938A (en) * 2008-12-17 2009-05-06 福建星网锐捷网络有限公司 Method and apparatus for network apparatus test
CN103731352A (en) * 2013-12-26 2014-04-16 华为技术有限公司 Message processing method and device
US9449320B1 (en) * 2015-06-08 2016-09-20 Vantiv, Llc Closed-loop testing of integrated circuit card payment terminals
CN108011824A (en) * 2016-11-02 2018-05-08 华为技术有限公司 A kind of message processing method and the network equipment
CN108259264A (en) * 2017-12-01 2018-07-06 国网北京市电力公司 Test method, the device and system of the network equipment
CN114205274A (en) * 2021-11-02 2022-03-18 北京百度网讯科技有限公司 Network equipment testing method and device
CN114039760A (en) * 2021-11-03 2022-02-11 中国工商银行股份有限公司 Security testing method and device, computer equipment and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Leonard Bradatsch ; Thomas Lukaseder ; Frank Kargl.A Testing Framework for High-Speed Network and Security Devices.2017 IEEE 42nd Conference on Local Computer Networks (LCN).2017,全文. *
基于机器学习的Modbus_TCP通信异常检测方法研究;陈鑫龙;陈志翔;周小方;;信息技术与网络安全(10);全文 *

Also Published As

Publication number Publication date
CN115426301A (en) 2022-12-02

Similar Documents

Publication Publication Date Title
CN110351156B (en) Test method and device
US8006136B2 (en) Automatic grammar based fault detection and isolation
CN108255725B (en) Test method and device
US20080301647A1 (en) Delivering Malformed Data for Fuzz Testing to Software Applications
CN108092854B (en) Test method and device for train-level Ethernet equipment based on IEC61375 protocol
US20080168425A1 (en) Software testing techniques for stack-based environments
CN113572726B (en) Multimode network control-data plane consistency verification method and device
CN102123058A (en) Test equipment and method for testing network protocol decoder
CN113938395B (en) Data analysis method, system, equipment and storage medium
CN107168844B (en) Performance monitoring method and device
Berger et al. Does my bft protocol implementation scale?
CN112561690B (en) Method, system, equipment and storage medium for testing credit card staged service interface
CN115426301B (en) Device detection method, device, equipment and storage medium based on self-generated message
CN107222332A (en) Method of testing, device, system and machinable medium
CN110609786A (en) Software testing method and device, computer equipment and storage medium
CN116166536A (en) Test method, test device, electronic equipment and storage medium
CN115174245A (en) Test method and system based on DoIP protocol detection
CN115185829A (en) Business process testing method and device, terminal equipment and storage medium
CN111597101B (en) SDK access state detection method, computer equipment and computer readable storage medium
CN108363922A (en) A kind of automation malicious code emulation detection method and system
CN112799956B (en) Asset identification capability test method, device and system device
CN110958259A (en) Detection method, device, equipment and storage medium of snort rule
CN111506507A (en) Business service state detection method and device, electronic equipment and storage medium
CN108366040B (en) Programmable firewall logic code detection method and device and electronic equipment
RU2381550C2 (en) Method of monitoring web server security

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
GR01 Patent grant
GR01 Patent grant