CN111464379B - Data processing method and device - Google Patents

Data processing method and device Download PDF

Info

Publication number
CN111464379B
CN111464379B CN202010177456.0A CN202010177456A CN111464379B CN 111464379 B CN111464379 B CN 111464379B CN 202010177456 A CN202010177456 A CN 202010177456A CN 111464379 B CN111464379 B CN 111464379B
Authority
CN
China
Prior art keywords
network
mac address
data packet
network adapter
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.)
Active
Application number
CN202010177456.0A
Other languages
Chinese (zh)
Other versions
CN111464379A (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.)
Visionvera Information Technology Co Ltd
Original Assignee
Visionvera Information 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 Visionvera Information Technology Co Ltd filed Critical Visionvera Information Technology Co Ltd
Priority to CN202010177456.0A priority Critical patent/CN111464379B/en
Publication of CN111464379A publication Critical patent/CN111464379A/en
Application granted granted Critical
Publication of CN111464379B publication Critical patent/CN111464379B/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/04Processing captured monitoring data, e.g. for logfile generation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/06Generation of reports
    • 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
    • H04L2101/00Indexing scheme associated with group H04L61/00
    • H04L2101/60Types of network addresses
    • H04L2101/618Details of network addresses
    • H04L2101/622Layer-2 addresses, e.g. medium access control [MAC] addresses

Landscapes

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

Abstract

The embodiment of the invention provides a data processing method and device, wherein the method comprises the following steps: intercepting communication data sent by the first equipment by adopting the first network adapter; generating network diagnosis information aiming at the communication data and feeding back the information; the second network adapter is adopted to send the communication data to the second equipment, so that the non-login type network diagnosis is realized, the data packet capturing and sending are carried out when the terminal equipment system is not logged in, the network diagnosis flow is simplified, the network diagnosis can be completed without depending on equipment debugging network ports, and the convenience and the detection efficiency of the network diagnosis are improved.

Description

Data processing method and device
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and an apparatus for data processing.
Background
With the increasing development of network technology, more and more terminal devices acquire richer data resources through an access network. In order to learn the current network state in time, network data of the terminal device can be acquired through a PC (personal computer) for network analysis and network diagnosis.
In the prior art, when network analysis and diagnosis are performed, as shown in fig. 1, two network ports are required to be provided by a terminal device, wherein the terminal device is in communication connection with a server through a W network port for communication, and the terminal device is connected with a PC device through an L network port for device debugging. After the PC equipment is connected with the terminal equipment, a Telnet protocol and other modes are needed to log in a system of the terminal equipment so as to acquire network data in the authority grabbing terminal equipment.
However, in this method, the terminal device needs to have both the W-port and the L-port to perform network diagnosis, and the terminal device needs to log in to the terminal system before diagnosis, which is a complicated process.
Disclosure of Invention
The present invention has been made in view of the above problems, and provides a method and apparatus for data processing which overcomes or at least partially solves the above problems, including:
a method of data processing for use with a network diagnostic device having a first network adapter communicatively coupled to a first device and a second network adapter communicatively coupled to a second device, the method comprising:
intercepting communication data sent by the first equipment by adopting the first network adapter;
Generating network diagnosis information aiming at the communication data and feeding back the information;
and transmitting the communication data to the second device by adopting the second network adapter.
Optionally, the step of transmitting the communication data to the second device using the second network adapter includes:
determining a first MAC address from the intercepted first data packet containing the communication data; wherein, the first MAC address is a source MAC address of the first data packet;
setting a source MAC address of the first data packet as the MAC address of the first network adapter, obtaining a second data packet, and sending the second data packet to the second network adapter;
and setting the source MAC address of the second data packet as the first MAC address, obtaining a third data packet, and sending the third data packet to the second equipment.
Optionally, the first network adapter and the second network adapter are configured in promiscuous mode.
Optionally, the first network adapter and the second network adapter are connected by a bridge.
Optionally, the first device is a video networking server or switch, and the second device is a video networking terminal;
or alternatively, the process may be performed,
The first device is a video networking terminal, and the second device is a video networking server or switch.
An apparatus for data processing applied to a network diagnostic device having a first network adapter communicatively coupled to a first device and a second network adapter communicatively coupled to a second device, the apparatus comprising:
the communication data interception module is used for intercepting communication data sent by the first equipment by adopting the first network adapter;
the network diagnosis information generation module is used for generating network diagnosis information aiming at the communication data and feeding back the network diagnosis information;
and the communication data transmitting module is used for transmitting the communication data to the second equipment by adopting the second network adapter.
Optionally, the communication data sending module includes:
a first MAC address determining sub-module, configured to determine a first MAC address from an intercepted first data packet including the communication data; wherein, the first MAC address is a source MAC address of the first data packet;
the first MAC address modification sub-module is used for setting the source MAC address of the first data packet as the MAC address of the first network adapter, obtaining a second data packet and sending the second data packet to the second network adapter;
And the third data packet sending sub-module is used for setting the source MAC address of the second data packet as the first MAC address, obtaining a third data packet and sending the third data packet to the second equipment.
Optionally, the first network adapter and the second network adapter are configured in promiscuous mode.
Optionally, the first network adapter and the second network adapter are connected by a bridge.
Optionally, the first device is a video networking server or switch, and the second device is a video networking terminal;
or alternatively, the process may be performed,
the first device is a video networking terminal, and the second device is a video networking server or switch.
The embodiment of the invention has the following advantages:
in the embodiment of the invention, the communication data sent by the first equipment is intercepted by adopting the first network adapter, the network diagnosis information aiming at the communication data is generated and fed back, the communication data is sent to the second equipment by adopting the second network adapter, so that the non-login type network diagnosis is realized, the packet capturing and the packet sending of the data are carried out when a terminal equipment system is not logged in, the network diagnosis flow is simplified, the network diagnosis can be completed without depending on equipment debugging network ports, and the convenience and the detection efficiency of the network diagnosis are improved.
Drawings
In order to more clearly illustrate the technical solutions of the present invention, the drawings that are needed in the description of the present invention will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings may be obtained according to these drawings without inventive effort to a person skilled in the art.
FIG. 1 is a schematic diagram of a device connection according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a networking of a video network according to an embodiment of the present invention;
fig. 3 is a schematic hardware structure of a node server according to an embodiment of the present invention;
fig. 4 is a schematic hardware structure of an access switch according to an embodiment of the present invention;
fig. 5 is a schematic hardware structure of an ethernet corotation gateway according to an embodiment of the present invention;
FIG. 6 is a flow chart of steps of a method for data processing according to an embodiment of the present invention;
FIG. 7 is a schematic diagram of another device connection provided by an embodiment of the present invention;
fig. 8 is a block diagram of an apparatus for data processing according to an embodiment of the present invention.
Detailed Description
In order that the above-recited objects, features and advantages of the present invention will become more readily apparent, a more particular description of the invention will be rendered by reference to the appended drawings and appended detailed description. It will be apparent that the described embodiments are some, but not all, embodiments of the 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 video networking is an important milestone for network development, is a real-time network, can realize real-time transmission of high-definition videos, and pushes numerous internet applications to high-definition videos, and the high definition faces.
The video networking adopts a real-time high-definition video exchange technology, and can integrate all required services such as high-definition video conference, video monitoring, intelligent monitoring analysis, emergency command, digital broadcast television, delay television, network teaching, live broadcast, VOD on demand, television mail, personal record (PVR), intranet (self-processing) channel, intelligent video playing control, information release and other tens of services into one system platform, and realize high-definition quality video playing through television or computer.
For a better understanding of embodiments of the present invention, the following description of the video networking is presented to one skilled in the art:
the partial techniques applied by the video networking are as follows:
network technology (Network Technology)
The network technology innovation of the internet of vision improves on the traditional Ethernet (Ethernet) to face the potentially huge video traffic on the network. Unlike pure network Packet Switching (Packet Switching) or network circuit Switching (Circuit Switching), the technology of video networking employs Packet Switching to meet Streaming requirements. The video networking technology has the flexibility, simplicity and low price of packet switching, and simultaneously has the quality and the safety guarantee of circuit switching, thereby realizing the seamless connection of the whole network switching type virtual circuit and the data format.
Exchange technology (Switching Technology)
The video network adopts the two advantages of the asynchronization and the packet switching of the Ethernet, eliminates the Ethernet defect on the premise of full compatibility, has full-network end-to-end seamless connection, and is directly connected with the user terminal to directly bear the IP data packet. The user data does not need any format conversion in the whole network. The video networking is a higher-level form of Ethernet, is a real-time exchange platform, can realize real-time transmission of full-network large-scale high-definition video which cannot be realized by the current Internet, and pushes numerous network video applications to high definition and unification.
Server technology (Server Technology)
The server technology on the video networking and unified video platform is different from the server in the traditional sense, the streaming media transmission is based on connection-oriented basis, the data processing capability is irrelevant to the flow and the communication time, and a single network layer can contain signaling and data transmission. For voice and video services, the complexity of video networking and unified video platform streaming media processing is much simpler than that of data processing, and the efficiency is greatly improved by more than hundred times than that of a traditional server.
Accumulator technology (Storage Technology)
The ultra-high-speed storage technology of the unified video platform adopts the most advanced real-time operating system for adapting to the ultra-large capacity and ultra-large flow media content, the program information in the server instruction is mapped to a specific hard disk space, the media content does not pass through the server any more, the media content is instantly and directly delivered to a user terminal, and the waiting time of the user is generally less than 0.2 seconds. The optimized sector distribution greatly reduces the mechanical motion of magnetic head seek of the hard disk, the resource consumption only accounts for 20% of the IP Internet of the same grade, but the concurrent flow which is 3 times greater than that of the traditional hard disk array is generated, and the comprehensive efficiency is improved by more than 10 times.
Network security technology (Network Security Technology)
The structural design of the video networking thoroughly structurally solves the network security problem puzzling the Internet by means of independent permission of each service, complete isolation of equipment and user data and the like, generally does not need antivirus programs or firewalls, eliminates attacks of hackers and viruses, and provides a structural carefree security network for users.
Service innovation technology (Service Innovation Technology)
The unified video platform fuses services with transmissions, whether a single user, private network users or a network aggregate, but automatically connects at a time. The user terminal, the set top box or the PC is directly connected to the unified video platform, so that various multimedia video services are obtained. The unified video platform adopts a menu type table allocation mode to replace the traditional complex application programming, and can realize complex application by using very few codes, thereby realizing 'infinite' new business innovation.
Networking of the video networking is as follows:
the video networking is a centrally controlled network structure, which may be of the tree network, star network, ring network, etc., but on the basis of this there is a need for a centralized control node in the network to control the whole network.
As shown in fig. 2, the view network is divided into an access network and a metropolitan area network.
The devices of the access network part can be mainly divided into 3 classes: node server, access switch, terminal (including various set-top boxes, code boards, memories, etc.). The node server is connected with an access switch, which can be connected with a plurality of terminals and can be connected with an Ethernet.
The node server is a node with a centralized control function in the access network, and can control the access switch and the terminal. The node server may be directly connected to the access switch or may be directly connected to the terminal.
Similarly, devices of the metropolitan area network portion can also be classified into 3 categories: metropolitan area server, node switch, node server. The metro server is connected to a node switch, which may be connected to a plurality of node servers.
The node server is the node server of the access network part, namely the node server belongs to the access network part and also belongs to the metropolitan area network part.
The metropolitan area server is a node with centralized control function in the metropolitan area network, and can control a node switch and a node server. The metropolitan area server may be directly connected to the node switch or directly connected to the node server.
Thus, the whole video network is a hierarchical centralized control network structure, and the network controlled by the node server and the metropolitan area server can be in various structures such as tree, star, ring and the like.
The access network part can be vividly called as a unified video platform (part in a dotted circle), and a plurality of unified video platforms can form a video network; each unified video platform can be interconnected and intercommunicated through metropolitan area and wide area video networking.
1. View networking device classification
1.1 devices in the visual network according to the embodiment of the present invention may be mainly classified into 3 types: a server, a switch (including an ethernet corotation gateway), and a terminal (including various set-top boxes, a code board, a memory, etc.). The view networking can be divided into metropolitan area networks (or national networks, global networks, etc.) and access networks as a whole.
1.2 devices in the access network part can be mainly classified into 3 classes: node server, access switch (including Ethernet corotation gateway), terminal (including various set-top boxes, coding board, memory, etc.).
The specific hardware structure of each access network device is as follows:
the node server:
as shown in fig. 3, the device mainly comprises a network interface module 301, a switching engine module 302, a CPU module 303 and a disk array module 304;
Wherein, the packets coming in from the network interface module 301, the cpu module 303 and the disk array module 304 all enter the switching engine module 302; the switching engine module 302 performs an operation of looking up an address table 305 on an incoming packet, thereby obtaining packet guiding information; and stores the packet into a corresponding queue of the packet buffer 306 according to the packet guiding information; discarding if the queue of packet buffer 306 is nearly full; the switch engine module 302 polls all packet buffer queues for forwarding if the following conditions are met: 1) The port sending buffer is not full; 2) The queue packet counter is greater than zero. The disk array module 304 mainly controls the hard disk, including initializing, reading and writing operations on the hard disk; the CPU module 303 is mainly responsible for protocol processing with an access switch and a terminal (not shown in the figure), configuration of an address table 305 (including a downstream protocol packet address table, an upstream protocol packet address table, and a data packet address table), and configuration of the disk array module 304.
Access switch:
as shown in fig. 4, mainly includes a network interface module (a downstream network interface module 401, an upstream network interface module 402), a switching engine module 403, and a CPU module 404;
wherein, the packet (uplink data) coming in from the downlink network interface module 401 enters the packet detection module 405; the packet detection module 405 detects whether the Destination Address (DA), source Address (SA), packet type, and packet length of the packet meet the requirements, if so, allocates a corresponding stream identifier (stream-id), and enters the switching engine module 403, otherwise, discards the packet; the packets (downstream data) coming in from the upstream network interface module 402 enter the switching engine module 403; the data packet coming in from the CPU module 404 enters the switching engine module 403; the switching engine module 403 performs an operation of looking up the address table 406 on the incoming packet, thereby obtaining packet guiding information; if a packet entering the switch engine module 403 is sent from the downstream network interface to the upstream network interface, the packet is stored in the queue of the corresponding packet buffer 407 in combination with a stream identifier (stream-id); discarding if the queue of the packet buffer 407 is nearly full; if the packet entering the switching engine module 403 is not sent from the downlink network interface to the uplink network interface, storing the data packet into the queue of the corresponding packet buffer 407 according to the packet guiding information; if the queue of the packet buffer 407 is nearly full, it is discarded.
The switch engine module 403 polls all packet buffer queues, in two cases in the embodiment of the present invention:
if the queue is sent from the downlink network interface to the uplink network interface, the following conditions are satisfied for forwarding: 1) The port sending buffer is not full; 2) The queue packet counter is greater than zero; 3) Obtaining a token generated by a code rate control module;
if the queue is not addressed by the downstream network interface to the upstream network interface, the following condition is satisfied for forwarding: 1) The port sending buffer is not full; 2) The queue packet counter is greater than zero.
The rate control module 408 is configured by the CPU module 404 to generate tokens for all packet buffer queues from the downstream network interface to the upstream network interface at programmable intervals to control the rate of upstream forwarding.
The CPU module 404 is mainly responsible for protocol processing with the node servers, configuration of the address table 406, and configuration of the rate control module 408.
Ethernet corotation gateway
As shown in fig. 5, the device mainly includes a network interface module (a downstream network interface module 501 and an upstream network interface module 502), a switching engine module 503, a CPU module 504, a packet detection module 505, a rate control module 508, an address table 506, a packet buffer 507, a MAC adding module 509, and a MAC deleting module 510.
Wherein, the data packet coming in from the downlink network interface module 501 enters the packet detection module 505; the packet detection module 505 detects whether the ethernet MAC DA, ethernet MAC SA, ethernet length or frame type, video network destination address DA, video network source address SA, video network packet type and packet length of the data packet meet the requirements, and if so, allocates a corresponding stream identifier (stream-id); then, the MAC DA, MAC SA, length or frame type (2 byte) are subtracted by the MAC delete module 510 and enter the corresponding receive buffer, otherwise discarded;
the downlink network interface module 501 detects the sending buffer of the port, if there is a packet, acquires the ethernet MAC DA of the corresponding terminal according to the destination address DA of the packet's internet of view, adds the ethernet MAC DA of the terminal, the MAC SA of the ethernet protocol gateway, and the ethernet length or frame type, and sends.
The function of the other modules in the ethernet corotation gateway is similar to that of the access switch.
And (3) a terminal:
the system mainly comprises a network interface module, a service processing module and a CPU module; for example, the set top box mainly comprises a network interface module, a video/audio encoding/decoding engine module and a CPU module; the coding board mainly comprises a network interface module, a video and audio coding engine module and a CPU module; the memory mainly comprises a network interface module, a CPU module and a disk array module.
1.3 devices of the metropolitan area network part can be mainly classified into 2 classes: node server, node switch, metropolitan area server. The node switch mainly comprises a network interface module, a switching engine module and a CPU module; the metropolitan area server mainly comprises a network interface module, a switching engine module and a CPU module.
2. View networking data packet definition
2.1 Access network packet definition
The data packet of the access network mainly comprises the following parts: destination Address (DA), source Address (SA), reserved bytes, payload (PDU), CRC.
As shown in the following table, the data packet of the access network mainly includes the following parts:
DA SA Reserved Payload CRC
wherein:
the Destination Address (DA) is composed of 8 bytes (byte), the first byte represents the type of data packet (such as various protocol packets, multicast data packets, unicast data packets, etc.), 256 possibilities are at most provided, the second byte to the sixth byte are metropolitan area network addresses, and the seventh and eighth bytes are access network addresses;
the Source Address (SA) is also composed of 8 bytes (bytes), defined identically to the Destination Address (DA);
the reserved bytes consist of 2 bytes;
the payload portion has different lengths according to the types of the different datagrams, and is 64 bytes if it is various protocol packets, and 32+1024=1056 bytes if it is a unicast packet, and is of course not limited to the above 2 types;
The CRC consists of 4 bytes and its calculation method follows the standard ethernet CRC algorithm.
2.2 metropolitan area network packet definition
The topology of the metropolitan area network is a pattern, there may be 2 or even more than 2 connections between two devices, i.e. there may be more than 2 connections between node switches and node servers, node switches and node switches, node switches and node servers. However, the metropolitan area network address of the metropolitan area network device is unique, and in order to accurately describe the connection relationship between metropolitan area network devices, parameters are introduced in the embodiment of the present invention: a tag to uniquely describe a metropolitan area network device.
The definition of label in this specification is similar to that of MPLS (Multi-Protocol Label Switch, multiprotocol label switching), and assuming that there are two connections between device a and device B, there are 2 labels for packets from device a to device B and 2 labels for packets from device B to device a. The label is split into label and label out, and assuming that the label (in label) of the packet entering the device a is 0x0000, the label (out label) of the packet when leaving the device a may become 0x0001. The network access process of the metropolitan area network is a network access process under centralized control, that is, the address allocation and label allocation of the metropolitan area network are all led by the metropolitan area server, the node switch and the node server are all passively executed, which is different from the label allocation of the MPLS, which is the result of mutual negotiation between the switch and the server.
As shown in the following table, the data packet of the metropolitan area network mainly includes the following parts:
DA SA Reserved label (Label) Payload CRC
I.e. Destination Address (DA), source Address (SA), reserved bytes (Reserved), labels, payload (PDU), CRC. Wherein the format of the tag may be defined with reference to the following: the tag is 32 bits, with the high 16bit reservation, with only the low 16bit, and its position is between the reserved bytes and payload of the packet.
Referring to fig. 6, a flowchart illustrating steps of a method for data processing according to an embodiment of the present invention may be applied to a network diagnostic device that may have a first network adapter communicatively coupled to a first device and a second network adapter communicatively coupled to a second device.
As an example, the first device may be a view networking server or switch and the second device may be a view networking terminal; alternatively, the first device may be a video networking terminal and the second device may be a video networking server or switch.
In practical applications, as shown in fig. 7, the video networking server or switch 701 may be connected to an a-port (i.e., a first network adapter in the present invention) of the portable network diagnostic tool 702 (i.e., the network diagnostic device in the present invention), and the portable network diagnostic tool 702 is connected to a W-port for communication with the video networking terminal 703 through the a' -port.
Specifically, the method comprises the following steps:
step 601, intercepting communication data sent by the first device by adopting the first network adapter;
as an example, the network diagnostic device may also be referred to as a grasper, which may be a handheld device that uses battery power; the first network adapter may be configured in a promiscuous mode in which all communication data flowing through the first network adapter may be received.
Specifically, the first device may send communication data for the second device, and in the data transmission process, the network diagnostic device may intercept the communication data sent by the first device using the first network adapter.
In practical applications, since the first network adapter of the network diagnostic device may be configured in promiscuous mode, after accessing the communication network between the first device and the second device, the network diagnostic device may wait for communication data sent by the first device to the second device and capture all the communication data.
Step 602, generating network diagnosis information for the communication data and feeding back the information;
after the communication data is acquired, the network diagnosis device may perform network diagnosis on the communication data, generate network diagnosis information for the data, and perform feedback.
Specifically, the network diagnosis device may perform operations such as data monitoring, data screening, and data query on the communication data to perform network diagnosis and acquire network diagnosis information.
For example, during data monitoring, the network diagnostic device may copy the communication data, obtain a copy of the communication data, and store the copy in the database; alternatively, a preset data screening condition may be obtained, and the data screening condition may be used to perform data screening on the copy of the communication data.
And step 603, transmitting the communication data to the second device by adopting the second network adapter.
As an example, the second network adapter may be configured in promiscuous mode and the first network adapter may employ a bridge connection with the second network adapter.
In practical application, the first network adapter may be connected to the second network adapter through the network bridge, and after performing network diagnosis on the communication data, the first network adapter may forward the communication data to the second network adapter through the network bridge. When the data is transmitted, the data can be transmitted between the first network adapter and the second network adapter in a transparent transmission mode. After transmission to the second network adapter, the second network adapter may be employed to send the communication data to the second device.
In the invention, because the communication data sent by the first equipment aiming at the second equipment can be sent to the second equipment through the network diagnosis equipment, when a system of the second equipment is not logged in, the network connection between the second equipment and the network diagnosis equipment can be established by adding a network cable, the network diagnosis equipment is connected in series to a network path between the first equipment and the second equipment, the network data is subjected to packet capturing, packet sending, analysis, debugging and network diagnosis, the network port is not required to be debugged by the equipment, and the manufacturing cost of the equipment is saved.
In an embodiment of the present invention, step 603 may include the following sub-steps:
a substep 11 of determining a first MAC address from the intercepted first packet containing the communication data; wherein, the first MAC address is a source MAC address of the first data packet;
in practical applications, the communication data may be transmitted in the form of data packets. After intercepting a first data packet containing communication data using the first network adapter, the network diagnostic device may determine a first MAC (Media Access Control ) address from the first data packet, which may be a source MAC address of the first data packet.
For example, when the first device transmits a first packet for the second device, the source MAC address of the first packet may be the MAC address corresponding to the first device.
In an example, the network diagnostic device may further determine a destination MAC address corresponding to the second device from the first data packet, and when performing the data query, the network diagnostic device may generate data query information using the destination MAC address and transmit the data query information to the first device to disguise the data query information as information transmitted by the second device.
A sub-step 12 of setting a source MAC address of the first data packet as a MAC address of the first network adapter, obtaining a second data packet, and sending the second data packet to the second network adapter;
in particular implementations, different network adapters may have different MAC addresses. After determining the source MAC address of the first data packet, the MAC address of the first network adapter may be determined, and the source MAC address of the first data packet is set to the MAC address of the first network adapter, so as to obtain a second data packet, and sent to the second network adapter.
And step 13, setting the source MAC address of the second data packet as the first MAC address, obtaining a third data packet, and sending the third data packet to the second device.
After the second data packet is sent to the second network adapter, the source MAC address of the second data packet may be the MAC address of the first network adapter, and then the source MAC address of the second data packet may be set to the first MAC address to obtain a third data packet, and the second network adapter is adopted to send the third data packet to the second device.
In the invention, even when the first device sends the communication data to the second device, the communication data needs to be forwarded through the network diagnosis device, and the second device can be disguised by modifying the source MAC address of the second data packet, so that the second device cannot perceive the existence of the network diagnosis device. And when the second device needs to perform source MAC address verification on the communication data to judge whether the data is legal, the third data packet received by the second device can pass the verification.
In an example, the second device may send communication data to the first device, the network diagnostic device may employ the second network adapter to intercept the communication data sent by the second device, generate network diagnostic information for the communication data, and feed back, and may employ the first network adapter to send the communication data to the first device during the process of the second device sending the communication data to the first device.
In an embodiment of the present invention, the step of transmitting the communication data to the first device using the first network adapter may include the following sub-steps:
a substep 21 of determining a second MAC address from the intercepted fourth packet containing the communication data; wherein, the second MAC address is the source MAC address of the fourth data packet;
after intercepting a fourth data packet containing communication data using the second network adapter, the network diagnostic device may determine a second MAC address from the fourth data packet, the second MAC address may be a source MAC address of the fourth data packet.
For example, when the second device transmits a fourth packet for the first device, the source MAC address of the second packet may be the MAC address corresponding to the second device.
In an example, the network diagnostic device may further determine a destination MAC address corresponding to the first device from the fourth data packet, and when performing the data query, the network diagnostic device may generate the data query information using the destination MAC address corresponding to the first device and transmit the data query information to the second device to disguise the data query information as the information transmitted by the first device.
A sub-step 22 of setting the source MAC address of the fourth data packet as the MAC address of the second network adapter, obtaining a fifth data packet, and sending the fifth data packet to the first network adapter;
After determining the source MAC address of the fourth data packet, the MAC address of the second network adapter may be determined, and the source MAC address of the fourth data packet is set to the MAC address of the second network adapter, so as to obtain a fifth data packet, and sent to the first network adapter.
And step 23, setting the source MAC address of the fifth data packet as the second MAC address, obtaining a sixth data packet, and sending the sixth data packet to the first device.
After the fifth data packet is sent to the first network adapter, the source MAC address of the fifth data packet may be the MAC address of the second network adapter, and then the source MAC address of the fifth data packet may be set to the second MAC address to obtain a sixth data packet, and the first network adapter is adopted to send the sixth data packet to the first device.
In the embodiment of the invention, the communication data sent by the first equipment is intercepted by adopting the first network adapter, the network diagnosis information aiming at the communication data is generated and fed back, the communication data is sent to the second equipment by adopting the second network adapter, so that the non-login type network diagnosis is realized, the packet capturing and the packet sending of the data are carried out when a terminal equipment system is not logged in, the network diagnosis flow is simplified, the network diagnosis can be completed without depending on equipment debugging network ports, and the convenience and the detection efficiency of the network diagnosis are improved.
In order that those skilled in the art may better understand the above steps, an embodiment of the present invention will be described below by way of an example, but it should be understood that the embodiment of the present invention is not limited thereto.
As shown in fig. 7, when the first device is the internet of view server 701, the internet of view server 701 may send communication data to the internet of view terminal 703, and in the data transmission process, the portable network diagnostic tool 702 (i.e., the network diagnostic device in the present invention) may acquire a first data packet containing the communication data by using the a-port, and parse the first data packet to acquire a source MAC address and a destination MAC address of the first data packet, where the source MAC address may be a MAC address corresponding to the internet of view server 701, and the destination MAC address may be a MAC address corresponding to the internet of view terminal 703.
After the data analysis, the source MAC address of the first data packet can be modified into the MAC address of the A network port, so as to obtain the second data packet. After modification, the second data packet is forwarded from the port a to the port a' through the bridge, the source MAC address of the second data packet is modified to the MAC address corresponding to the internet of view server 701, a third data packet is obtained, and the third data packet is sent to the internet of view terminal 703. By modifying the source MAC address of the second packet to the MAC address corresponding to the view networking server 701, masquerading of the view networking terminal 703 can be formed such that the view networking terminal 703 is not aware of the presence of the portable network diagnostic tool 702.
When the first device is the internet of view terminal 703, the internet of view terminal 703 may send communication data to the internet of view server 701, and in the data transmission process, the portable network diagnostic tool 702 (i.e. the network diagnostic device in the present invention) may acquire a first data packet containing the communication data by using the a' port, and parse the first data packet to acquire a source MAC address and a destination MAC address of the first data packet, where the source MAC address may be a MAC address corresponding to the internet of view terminal 703, and the destination MAC address may be a MAC address corresponding to the internet of view server 701.
After the data analysis, the source MAC address of the first data packet can be modified into the MAC address of the A' network port, so as to obtain the second data packet. After modification, forwarding the second data packet from the a' port to the a port through the bridge, modifying the source MAC address of the second data packet to the MAC address corresponding to the video networking terminal 701, obtaining a third data packet, and sending the third data packet to the video networking server 701. By modifying the source MAC address of the second data packet to the MAC address corresponding to the video networking terminal 701, masquerading of the video networking server 701 can be formed, so that the video networking server 701 cannot perceive the existence of the portable network diagnostic tool 702.
It should be noted that, for simplicity of description, the method embodiments are shown as a series of acts, but it should be understood by those skilled in the art that the embodiments are not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the embodiments. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred embodiments, and that the acts are not necessarily required by the embodiments of the invention.
Referring to FIG. 8, a block diagram illustrating a data processing apparatus according to one embodiment of the present invention may be applied to a network diagnostic device that may have a first network adapter communicatively coupled to a first device and a second network adapter communicatively coupled to a second device;
the method specifically comprises the following modules:
a communication data intercepting module 801, configured to intercept communication data sent by the first device using the first network adapter;
a network diagnostic information generating module 802, configured to generate network diagnostic information for the communication data, and perform feedback;
and a communication data sending module 803, configured to send the communication data to the second device using the second network adapter.
In an embodiment of the present invention, the communication data sending module 803 includes:
a first MAC address determining sub-module, configured to determine a first MAC address from an intercepted first data packet including the communication data; wherein, the first MAC address is a source MAC address of the first data packet;
the first MAC address modification sub-module is used for setting the source MAC address of the first data packet as the MAC address of the first network adapter, obtaining a second data packet and sending the second data packet to the second network adapter;
and the third data packet sending sub-module is used for setting the source MAC address of the second data packet as the first MAC address, obtaining a third data packet and sending the third data packet to the second equipment.
In an embodiment of the invention, the first network adapter and the second network adapter are configured in promiscuous mode.
In one embodiment of the invention, the first network adapter and the second network adapter are connected by a bridge.
In an embodiment of the present invention, the first device is a server or a switch for video networking, and the second device is a terminal for video networking;
or alternatively, the process may be performed,
the first device is a video networking terminal, and the second device is a video networking server or switch.
In the embodiment of the invention, the communication data sent by the first equipment is intercepted by adopting the first network adapter, the network diagnosis information aiming at the communication data is generated and fed back, the communication data is sent to the second equipment by adopting the second network adapter, so that the non-login type network diagnosis is realized, the packet capturing and the packet sending of the data are carried out when a terminal equipment system is not logged in, the network diagnosis flow is simplified, the network diagnosis can be completed without depending on equipment debugging network ports, and the convenience and the detection efficiency of the network diagnosis are improved.
An embodiment of the present invention also provides an electronic device that may include a processor, a memory, and a computer program stored on the memory and capable of running on the processor, the computer program implementing the steps of the method of data processing as above when executed by the processor.
An embodiment of the present invention also provides a computer-readable storage medium on which a computer program is stored, which when executed by a processor, implements the steps of the method of data processing as above.
For the device embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and reference is made to the description of the method embodiments for relevant points.
In this specification, each embodiment is described in a progressive manner, and each embodiment is mainly described by differences from other embodiments, and identical and similar parts between the embodiments are all enough to be referred to each other.
It will be apparent to those skilled in the art that embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the invention may take the form of a computer program product 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.
Embodiments of the present invention are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiment and all such alterations and modifications as fall within the scope of the embodiments of the invention.
Finally, it is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or terminal device comprising the element.
The foregoing has outlined rather broadly the more detailed description of the method and apparatus for data processing in accordance with the present invention, wherein specific examples are provided herein to illustrate the principles and embodiments of the present invention and to help understand the method and core concepts thereof; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in accordance with the ideas of the present invention, the present description should not be construed as limiting the present invention in view of the above.

Claims (8)

1. A method of data processing, characterized by being applied to a network diagnostic device having a first network adapter communicatively connected to a first device and a second network adapter communicatively connected to a second device, an a-port of the network diagnostic device being connected to the first device, an a' -port of the network diagnostic device being connected to a W-port of the second device, the method comprising:
intercepting communication data sent by the first device and aiming at the second device by adopting the first network adapter;
generating network diagnosis information aiming at the communication data and feeding back the information;
transmitting the communication data to the second device using the second network adapter;
wherein the step of transmitting the communication data to the second device using the second network adapter comprises:
determining a first MAC address from the intercepted first data packet containing the communication data; wherein, the first MAC address is a source MAC address of the first data packet;
setting a source MAC address of the first data packet as the MAC address of the first network adapter, obtaining a second data packet, and sending the second data packet to the second network adapter;
And setting the source MAC address of the second data packet as the first MAC address, obtaining a third data packet, and sending the third data packet to the second equipment.
2. The method of claim 1, wherein the first network adapter and the second network adapter are configured in promiscuous mode.
3. The method of claim 1, wherein the first network adapter and the second network adapter are connected using a bridge.
4. The method of claim 1, wherein the first device is a video networking server or switch and the second device is a video networking terminal;
or alternatively, the process may be performed,
the first device is a video networking terminal, and the second device is a video networking server or switch.
5. An apparatus for data processing, characterized by being applied to a network diagnostic device having a first network adapter communicatively connected to a first device and a second network adapter communicatively connected to a second device, an a-port of the network diagnostic device being connected to the first device, an a' -port of the network diagnostic device being connected to a W-port of the second device, the apparatus comprising:
A communication data intercepting module, configured to intercept communication data sent by the first device and directed to the second device, using the first network adapter;
the network diagnosis information generation module is used for generating network diagnosis information aiming at the communication data and feeding back the network diagnosis information;
a communication data transmitting module, configured to transmit the communication data to the second device using the second network adapter;
wherein, the communication data sending module includes:
a first MAC address determining sub-module, configured to determine a first MAC address from an intercepted first data packet including the communication data; wherein, the first MAC address is a source MAC address of the first data packet;
the first MAC address modification sub-module is used for setting the source MAC address of the first data packet as the MAC address of the first network adapter, obtaining a second data packet and sending the second data packet to the second network adapter;
and the third data packet sending sub-module is used for setting the source MAC address of the second data packet as the first MAC address, obtaining a third data packet and sending the third data packet to the second equipment.
6. The apparatus of claim 5, wherein the first network adapter and the second network adapter are configured in promiscuous mode.
7. The apparatus of claim 5, wherein the first network adapter and the second network adapter are connected using a bridge.
8. The apparatus of claim 5, wherein the first device is a video networking server or switch and the second device is a video networking terminal;
or alternatively, the process may be performed,
the first device is a video networking terminal, and the second device is a video networking server or switch.
CN202010177456.0A 2020-03-13 2020-03-13 Data processing method and device Active CN111464379B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010177456.0A CN111464379B (en) 2020-03-13 2020-03-13 Data processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010177456.0A CN111464379B (en) 2020-03-13 2020-03-13 Data processing method and device

Publications (2)

Publication Number Publication Date
CN111464379A CN111464379A (en) 2020-07-28
CN111464379B true CN111464379B (en) 2023-09-12

Family

ID=71680795

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010177456.0A Active CN111464379B (en) 2020-03-13 2020-03-13 Data processing method and device

Country Status (1)

Country Link
CN (1) CN111464379B (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101459618A (en) * 2009-01-06 2009-06-17 北京航空航天大学 Data packet forwarding method and device for virtual machine network
CN101562534A (en) * 2009-05-26 2009-10-21 中山大学 Network behavior analytic system
CN101958815A (en) * 2010-10-18 2011-01-26 北京全路通信信号研究设计院 Security Ethernet interface on-line monitor system and method
WO2012016528A1 (en) * 2010-08-06 2012-02-09 北京乾唐视联网络科技有限公司 Ethernet-compatible method and system
CN103944771A (en) * 2013-01-19 2014-07-23 鸿富锦精密工业(深圳)有限公司 Method and system for testing network data traffic
WO2015043204A1 (en) * 2013-09-26 2015-04-02 华为技术有限公司 Data packet processing method and method, device and system for network traffic management
CN206498417U (en) * 2017-03-08 2017-09-15 广东电网有限责任公司佛山供电局 Power information Transmission system and its communications router
CN107509214A (en) * 2017-08-30 2017-12-22 深圳鲲鹏无限科技有限公司 A kind of more radio frequency link wireless routers and method for diagnosing faults
CN108881137A (en) * 2017-10-10 2018-11-23 北京视联动力国际信息技术有限公司 A kind of processing method of multi-medium data and view networked terminals
CN108989273A (en) * 2017-07-03 2018-12-11 北京视联动力国际信息技术有限公司 A kind of method and apparatus obtaining video flowing
CN110650147A (en) * 2019-09-27 2020-01-03 视联动力信息技术股份有限公司 Data acquisition method and system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070208864A1 (en) * 2002-10-21 2007-09-06 Flynn Lori A Mobility access gateway

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101459618A (en) * 2009-01-06 2009-06-17 北京航空航天大学 Data packet forwarding method and device for virtual machine network
CN101562534A (en) * 2009-05-26 2009-10-21 中山大学 Network behavior analytic system
WO2012016528A1 (en) * 2010-08-06 2012-02-09 北京乾唐视联网络科技有限公司 Ethernet-compatible method and system
CN101958815A (en) * 2010-10-18 2011-01-26 北京全路通信信号研究设计院 Security Ethernet interface on-line monitor system and method
CN103944771A (en) * 2013-01-19 2014-07-23 鸿富锦精密工业(深圳)有限公司 Method and system for testing network data traffic
WO2015043204A1 (en) * 2013-09-26 2015-04-02 华为技术有限公司 Data packet processing method and method, device and system for network traffic management
CN206498417U (en) * 2017-03-08 2017-09-15 广东电网有限责任公司佛山供电局 Power information Transmission system and its communications router
CN108989273A (en) * 2017-07-03 2018-12-11 北京视联动力国际信息技术有限公司 A kind of method and apparatus obtaining video flowing
CN107509214A (en) * 2017-08-30 2017-12-22 深圳鲲鹏无限科技有限公司 A kind of more radio frequency link wireless routers and method for diagnosing faults
CN108881137A (en) * 2017-10-10 2018-11-23 北京视联动力国际信息技术有限公司 A kind of processing method of multi-medium data and view networked terminals
CN110650147A (en) * 2019-09-27 2020-01-03 视联动力信息技术股份有限公司 Data acquisition method and system

Also Published As

Publication number Publication date
CN111464379A (en) 2020-07-28

Similar Documents

Publication Publication Date Title
CN109996086B (en) Method and device for inquiring service state of video networking
CN109561072B (en) Link detection method and system
CN109246486B (en) Method and device for framing
CN110022295B (en) Data transmission method and video networking system
CN109819062B (en) Method and device for accessing network by using virtual MAC address
CN110049273B (en) Video networking-based conference recording method and transfer server
CN111131911B (en) Multicast method and device
CN110138513B (en) Data transmission method and video networking system
CN109347844B (en) Method and device for accessing equipment to Internet
CN111478880B (en) Data processing method and device
CN111614480B (en) Service detection method, device and storage medium
CN110493149B (en) Message processing method and device
CN110336710B (en) Terminal testing method, system and device and storage medium
CN110266577B (en) Tunnel establishment method and video networking system
CN109889516B (en) Method and device for establishing session channel
CN109121017B (en) Method and device for evaluating quality of video networking network
CN111510341A (en) Network testing method and device for video network
CN110677315A (en) Method and system for monitoring state
CN113162910B (en) Resource transmission method and device, electronic equipment and storage medium
CN111526323B (en) Panoramic video processing method and device
CN111225241B (en) Communication method and device
CN111464379B (en) Data processing method and device
CN110417792B (en) Communication method, system, gateway device and storage medium
CN109587436B (en) Video networking conference management platform login method and device
CN110474956B (en) Method and device for sealing number of video networking equipment, electronic equipment and readable storage medium

Legal Events

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