CN115865635A - Data processing method, device and storage medium - Google Patents

Data processing method, device and storage medium Download PDF

Info

Publication number
CN115865635A
CN115865635A CN202211468899.0A CN202211468899A CN115865635A CN 115865635 A CN115865635 A CN 115865635A CN 202211468899 A CN202211468899 A CN 202211468899A CN 115865635 A CN115865635 A CN 115865635A
Authority
CN
China
Prior art keywords
node
address information
detection
message
detected
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211468899.0A
Other languages
Chinese (zh)
Inventor
郑南成
马耀泉
陈铭祥
李隆
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sangfor Technologies Co Ltd
Original Assignee
Sangfor Technologies 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 Sangfor Technologies Co Ltd filed Critical Sangfor Technologies Co Ltd
Priority to CN202211468899.0A priority Critical patent/CN115865635A/en
Publication of CN115865635A publication Critical patent/CN115865635A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention provides a data processing method, a device and a storage medium, wherein the method comprises the following steps: the detection node sends a certain amount of current detection messages to each node to be detected based on the constructed virtual address information in the current detection period. Receiving a current response message fed back by each node to be detected in response to the current detection message; determining a communication link detection result between each node to be detected based on the current response message and the current detection message; when the communication link detection result represents that the link of the target node is abnormal, modifying the service message based on a preset address resolution protocol table by loading a preset program to obtain a target message to be sent to the target node; the address resolution protocol table contains the sending rule information between each node to be detected and the address resolution protocol table is determined by the detection message in the detection period before the current detection period. According to the scheme, the efficiency and the safety of data communication can be improved when a link fails.

Description

Data processing method, device and storage medium
Technical Field
The present invention relates to the field of computer and internet technologies, and in particular, to a data processing method, apparatus, and storage medium.
Background
In the related art, a plurality of servers perform data communication through a switch, and when any server puts a failed/sub-healthy portal off line, the server cannot sense whether the state of the off-line portal is recovered, and cannot take recovery measures, so that the number of the portals is reduced, and the data communication efficiency is low. In addition, when the server detects the aggregation port physical link failure/sub-health, but does not detect a specific destination port link failure, even if the sending end switches the service to the network port in a normal state, due to the load algorithm of the switch chip, data still passes through the destination port failed link, which results in lower security and efficiency of data communication.
Disclosure of Invention
The data processing method, the data processing device and the storage medium provided by the embodiment of the invention can improve the data communication efficiency and the data communication safety between the servers.
The technical scheme of the invention is realized as follows:
the embodiment of the invention provides a data processing method, which is applied to a detection node in a aggregation network port and comprises the following steps:
in the current detection period, a certain number of current detection messages are sent to each node to be detected based on the constructed virtual address information; the number of the certain number representations is larger than the number of the network ports corresponding to the nodes to be detected;
receiving the current response message fed back by each node to be detected in response to the current detection message;
determining a communication link detection result between each node to be detected and the current response message and the current detection message;
when the communication link detection result represents that a target node link is abnormal, modifying a service message based on a preset address resolution protocol table by loading a preset program to obtain a target message to send to the target node; the address resolution protocol table includes sending rule information between each node to be detected and the node to be detected, and is determined by a detection message in a detection period before the current detection period.
In the above solution, the sending a certain number of current detection messages to each node to be detected based on the constructed virtual address information in the current detection period includes:
determining the number N of the network ports of each node to be tested in a local information table; the information table stores the network port information and the aggregation network port information of each node to be tested; n is an integer greater than or equal to 1;
constructing M times of virtual address information of N according to a predetermined program instruction; m is an integer greater than 1;
and forming M times of current detection messages corresponding to N times of each node to be detected based on the M times of virtual address information of the N, and sending the M times of current detection messages to each node to be detected.
In the foregoing solution, the forming of the M-th-party current detection packets corresponding to N of each node to be detected based on the M-th-party virtual address information of N includes one of:
respectively taking the M times of virtual address information of the N as source physical address information, taking the address information of the aggregation network port of each node to be detected as target physical address information, and combining a local identifier, a local aggregation network port identifier and the local aggregation network port physical address information to form M times of current detection messages of the N;
and respectively taking the M times of virtual address information of the N as the destination physical address information, taking the local aggregation network port physical address information as the source physical address information, and combining the local identification and the local aggregation network port identification to form M times of current detection messages of the N.
In the foregoing solution, before sending a certain number of current detection packets to each node to be detected based on the constructed virtual address information in the current detection period, the method further includes:
in a first detection period, sending a certain number of first detection messages to each node to be detected based on the constructed first virtual address information; wherein the first probing period is prior to the current probing period;
receiving a first response message fed back by each node to be detected in response to the first detection message;
and constructing the address resolution protocol table based on the first detection message and the first response message.
In the foregoing solution, the constructing the arp table based on the first probe packet and the first response packet includes:
and constructing each row of an address resolution protocol table based on the source physical address information and the local aggregation network port identification contained in each first detection message of each node to be detected, the second source physical address information, the corresponding node identification to be detected, the network port identification of the corresponding node to be detected and the aggregation network port information of the corresponding node to be detected contained in the corresponding first response message, so as to obtain the address resolution protocol table.
In the foregoing solution, the determining, based on the current response packet and the current probing packet, a detection result of a communication link with each node to be detected includes one of:
calculating packet loss rates through K current response messages fed back by the target node and M times of current detection messages of the N, comparing the packet loss rates with packet loss rate thresholds, and determining the communication link detection result of each node to be detected;
and acquiring the time delay information of the K response messages, comparing the time delay information with a time delay threshold value, and determining the communication link detection result of each node to be detected.
In the above solution, when the communication link detection result indicates that the link of the target node is abnormal, modifying the service packet based on the preset address resolution protocol table by loading a preset program to obtain the target packet, so as to send the target packet to the target node, includes:
when the communication link detection result represents that the target node link is abnormal, loading the preset program;
determining a switch forwarding rule based on the address resolution protocol table to determine replacement address information in the address resolution protocol table;
and responding to the preset program, and replacing the source address information or the destination address information in the service message by using the replacement address information according to the switch forwarding rule to obtain the target message so as to send the target message to the target node.
In the foregoing solution, the determining a switch forwarding rule based on the arp table to determine the replacement address information in the arp table includes:
determining the switch forwarding rule based on the source physical address information and the second source physical address information of each node to be tested in the address resolution protocol table;
and determining the replacement address information corresponding to the switch forwarding rule in the address resolution protocol table.
In the foregoing solution, the determining the switch forwarding rule based on the source physical address information and the second source physical address information of each node to be tested in the address resolution protocol table includes one of:
if the source physical address information of each node to be tested in the address resolution protocol table is inconsistent, obtaining the switch forwarding rule as a source address forwarding algorithm;
if the second source physical address information of each node to be tested in the address resolution protocol table is inconsistent, obtaining the switch forwarding rule as a destination address forwarding algorithm;
and if the source physical address information and the second source physical address information of each node to be tested in the address resolution protocol table are inconsistent, obtaining the switch forwarding rule as a source-destination address forwarding algorithm.
In the foregoing solution, the determining, in the address resolution protocol table, the replacement address information corresponding to the switch forwarding rule includes:
determining corresponding target source physical address information and target second source physical address information in the address resolution protocol table according to the identifier of the target node contained in the service message;
determining the replacement address information in the target source physical address information and the target second source physical address information based on the switch forwarding rule; and the replacement address information is address information corresponding to the network port with the minimum load of the target node.
In the foregoing solution, after determining a detection result of a communication link with each node to be detected based on the current response packet and the current probe packet, the method further includes:
when the communication link detection result represents that the target node link is abnormal, sending loading notification information to the target node, so that the target node loads a second preset program based on the loading notification information; and the target node constructs a target response message based on the second preset program and feeds back the target response message.
The embodiment of the invention also provides a data processing method, which is applied to the target node and comprises the following steps:
receiving a certain number of current detection messages sent by a detection node, responding to the current detection messages to form current response messages, and feeding the current response messages back to the detection node; the current detection message is sent by the detection node based on the constructed virtual address information in the current detection period; the number of the certain number representations is larger than the number of local network ports;
receiving a target message sent by the detection node; the target message is obtained by modifying a service message based on an address resolution protocol table by loading a preset program when a detection result of a communication link represents that a local link is abnormal; the communication link detection result is determined by the detection node based on the current response message and the current detection message; the address resolution protocol table is determined by the detection node through a detection message in a detection period before the current detection period.
In the above solution, the receiving a certain number of current probe packets sent by a probe node, responding to the current probe packets to form current response packets, and feeding back the current response packets to the probe node includes:
and receiving K current detection messages sent by the detection node, responding to the K detection messages to form K response messages, and sending the K response messages to the detection node.
In the above solution, before the receiving a certain number of current probe packets sent by a probe node, and forming a current response packet in response to the current probe packet and feeding back the current response packet to the probe node, the method further includes:
and receiving a first detection message sent by the detection node, responding to the first detection message, and forming a first response message based on the constructed second virtual address information and feeding back the first response message to the detection node.
In the above solution, before receiving the target packet sent by the probe node, the method further includes:
receiving loading notification information sent by the target node, and loading a second preset program;
after receiving the target packet sent by the probe node, the method further includes:
responding to the second preset program, and modifying the target message based on a preset second address resolution protocol table to obtain a corresponding message of the target so as to send the corresponding message to the detection node; the second address resolution protocol table comprises sending rule information between the target node and other nodes.
The embodiment of the present invention further provides a data processing apparatus, which is applied to a probe node in a aggregation network port, and includes:
a first sending unit, configured to send a certain number of current detection messages to each node to be detected based on the constructed virtual address information in a current detection period; the number of the certain quantity representations is larger than the number of the network ports corresponding to the nodes to be detected;
a first receiving unit, configured to receive a current response packet fed back by each node to be detected in response to the current detection packet;
a determining unit, configured to determine, based on the current response packet and the current detection packet, a detection result of a communication link with each node to be detected;
the modification processing unit is used for modifying the service message based on a preset address resolution protocol table by loading a preset program when the communication link detection result represents that the link of the target node is abnormal, so as to obtain a target message and send the target message to the target node; the address resolution protocol table includes sending rule information between each node to be detected and the node to be detected, and is determined by a detection message in a detection period before the current detection period.
An embodiment of the present invention further provides a data processing apparatus, applied to a target node, including:
a second receiving unit, configured to receive a certain number of current detection packets sent by a detection node, and respond to the current detection packets to form current response packets, which are fed back to the detection node; the current detection message is sent by the detection node based on the constructed virtual address information in the current detection period; the number of the certain number representations is larger than the number of local network ports;
the second receiving unit is further configured to receive a target packet sent by the probe node; the target message is obtained by modifying a service message based on an address resolution protocol table by loading a preset program when a detection result of a communication link represents that a local link is abnormal; the communication link detection result is determined by the detection node based on the current response message and the current detection message; the address resolution protocol table is determined by the detection node through a detection message in a detection period before the current detection period.
The embodiment of the invention also provides a data processing device, which comprises a first memory and a first processor, wherein the first memory stores a computer program capable of running on the first processor, and the first processor executes the program to realize the steps in the method at the side of the detection node.
An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by the first processor, implements the steps in the method on the side of the probing node.
The embodiment of the present invention further provides a data processing apparatus, which includes a second memory and a second processor, where the second memory stores a computer program that can be executed on the second processor, and the second processor implements the steps in the method on the target node side when executing the program.
Embodiments of the present invention further provide a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a second processor, implements the steps in the method on the target node side.
In the embodiment of the invention, a detection node sends a certain amount of current detection messages to each node to be detected based on constructed virtual address information in a current detection period; the number of the certain quantity representations is larger than the number of the network ports corresponding to the nodes to be detected; receiving a current response message fed back by each node to be detected in response to the current detection message; determining a communication link detection result between each node to be detected based on the current response message and the current detection message; when the communication link detection result represents that the link of the target node is abnormal, modifying the service message based on a preset address resolution protocol table by loading a preset program to obtain a target message to be sent to the target node; the address resolution protocol table contains the sending rule information between each node to be detected and the address resolution protocol table is determined by the detection message in the detection period before the current detection period. According to the scheme, the detection result of the communication link between the node to be detected and each node to be detected can be detected in real time in each detection period, when the communication link of a certain node to be detected is abnormal, a preset program can be loaded, the service message of the node to be detected is modified based on the address resolution protocol table, the service message can be sent to the corresponding node, and the efficiency and the safety of data communication can be improved when the link fails.
Drawings
Fig. 1 is a schematic diagram illustrating an optional effect of the related art according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart of an alternative data processing method according to an embodiment of the present invention;
fig. 3 is a schematic diagram illustrating an optional effect of the data processing method according to the embodiment of the present invention;
fig. 4 is a schematic diagram illustrating an optional effect of the data processing method according to the embodiment of the present invention;
FIG. 5 is a schematic flow chart of an alternative data processing method according to an embodiment of the present invention;
fig. 6 is an interaction diagram of a data processing method according to an embodiment of the present invention;
FIG. 7 is a first schematic structural diagram of a data processing apparatus according to an embodiment of the present invention;
FIG. 8 is a first diagram illustrating a first hardware entity of the data processing apparatus according to the embodiment of the present invention;
FIG. 9 is a second schematic structural diagram of a data processing apparatus according to an embodiment of the present invention;
fig. 10 is a hardware entity diagram of a data processing apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the technical solutions of the present invention are further described in detail with reference to the drawings and the embodiments, the described embodiments should not be construed as limiting the present invention, and all other embodiments obtained by a person of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
In the following description, reference is made to "some embodiments" which describe a subset of all possible embodiments, but it is understood that "some embodiments" may be the same subset or different subsets of all possible embodiments, and may be combined with each other without conflict.
To the extent that similar descriptions of "first/second" appear in this patent document, the description below will be added, where reference is made to the term "first \ second \ third" merely to distinguish between similar objects and not to imply a particular ordering with respect to the objects, it being understood that "first \ second \ third" may be interchanged either in a particular order or in a sequential order as permitted, to enable embodiments of the invention described herein to be practiced in other than the order illustrated or described herein.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used herein is for the purpose of describing embodiments of the invention only and is not intended to be limiting of the invention.
Illustratively, in connection with fig. 1, in the related art, a server a and a server B perform data communication through a switch. The server a includes: port A1 and port A2. The server B includes: port B1 and port B2. The link 1 is formed by the internet access A1 and the internet access B1 from the server a to the server B. After the link between the switch and the network port B1 is failed, when the server a sends a service message to the server B, the server a switches the link to the link 2 corresponding to the network port A2, and due to the switch algorithm, the switch still sends the service message to the server B through the network port B1, so that the service message cannot be sent to the server B, and the data communication efficiency and the security are low.
Referring to fig. 2, a schematic flow chart of an alternative data processing method according to an embodiment of the present invention will be described with reference to the steps shown in fig. 2.
S101, in a current detection period, sending a certain number of current detection messages to each node to be detected based on the constructed virtual address information; the number of the certain quantity representations is larger than the number of the network ports corresponding to the nodes to be tested.
In the embodiment of the invention, the detection node sends a certain amount of current detection messages to each node to be detected based on the constructed virtual address information in the current detection period. The number of the certain quantity representations is larger than the number of the network ports corresponding to the nodes to be tested.
In the embodiment of the invention, the network system comprises a plurality of servers, equipment to be accessed and the like. Wherein, data communication is carried out among a plurality of servers through the switch. The probe node may be each server, device to be accessed, etc. The node to be tested may be a server other than the server corresponding to the probing node. That is, each server in the network system sends a certain number of current probe messages to each other server in each probe cycle. The plurality of portals of each server form a converged portal.
In the embodiment of the invention, the detection node determines the number of the network ports of each node to be detected in the local information table. And the server forms the current detection message of each node to be detected based on the constructed virtual address information. The number of the detection messages of each node to be detected is larger than the number of the corresponding network ports, so that the network ports of the nodes to be detected can be covered comprehensively by the detection messages.
In the embodiment of the invention, the detection node can send the corresponding current detection message to each node to be detected every 10 seconds. In other embodiments, the probe node may also send the current probe packet to each node to be tested every 1 minute. In the embodiment of the invention, the duration of the detection period is not limited.
In the embodiment of the present invention, when there are 10 servers in the network system, each server sends a certain number of detection messages to the other 9 servers in each detection period.
And S102, receiving the current response message fed back by each node to be detected in response to the current detection message.
In the embodiment of the invention, the detection node receives the current response message fed back by each node to be detected responding to the current detection message.
In the embodiment of the invention, after the node to be detected receives the corresponding current detection message, the node to be detected forms the same number of current response messages and feeds back the current response messages to the detection node. Because the node to be detected has a link fault with the detection node, the number of the current detection messages received by the node to be detected and the number of the current detection messages sent by the detection node may be inconsistent.
S103, determining a communication link detection result between each node to be detected based on the current response message and the current detection message.
In the embodiment of the invention, the detection node determines the detection result of the communication link between the detection node and each node to be detected based on the current response message and the current detection message.
In the embodiment of the invention, the detection node can calculate the packet loss rate through the current response message and the current detection message, and if the packet loss rate is greater than the packet loss rate threshold, the communication link detection result of the link abnormity between the corresponding node to be detected and the detection node is determined. And if the packet loss rate is not greater than the packet loss rate threshold, determining a communication link detection result that the link between the corresponding node to be detected and the detection node is normal.
In the embodiment of the invention, the detection node can also obtain the time delay information corresponding to the current response message, and if the time delay information is greater than the time delay threshold, the communication link detection result of the link abnormity between the corresponding node to be detected and the detection node is determined. And if the time delay information is not greater than the time delay threshold, determining a communication link detection result that the link between the corresponding node to be detected and the detection node is normal.
The communication link includes a physical link and a data link, the physical link refers to a section of physical line from one node to an adjacent node, and there is no other switching node in the middle. When data communication is carried out, a path between two servers is often formed by connecting a plurality of links in series. Data links refer to physical lines as well as communication protocols necessary to control the transmission of such data. The hardware and software that implements these protocols is added to the link to be the data link. The data links are also referred to as logical links.
S104, when the communication link detection result represents that the link of the target node is abnormal, modifying the service message based on a preset address resolution protocol table by loading a preset program to obtain a target message and sending the target message to the target node; the address resolution protocol table contains the sending rule information between each node to be detected and the address resolution protocol table is determined by the detection message in the detection period before the current detection period.
In the embodiment of the invention, when the communication link detection result represents that the link of the target node is abnormal, the detection node modifies the service message based on the preset address resolution protocol table by loading the preset program to obtain the target message to send to the target node. The address resolution protocol table contains the sending rule information between each node to be detected and the address resolution protocol table is determined by the detection message in the detection period before the current detection period.
In the embodiment of the invention, when the communication link detection result represents that the target node link is abnormal, the detection node loads a preset program. The detection node determines a switch forwarding rule based on the address resolution protocol table, and determines the replacement address information corresponding to the target node in the address resolution protocol table. And the detection node responds to a preset program and modifies the address information in the service message sent to the target node into the replacement address information according to the forwarding rule of the switch so as to obtain the target message.
Figure BDA0003957657860000071
Table one: address resolution protocol table
For example, in combination with table one, since the second source physical address information corresponding to host-B is inconsistent and the source physical address information of host-C is inconsistent, the probe node may determine that the switch forwarding rule is a source-destination address forwarding algorithm. At this time, when the target node is host-B, the probe node may determine a replacement address information from the corresponding source physical address information or the second source physical address information. The detection node replaces the source address information or the destination address information in the service message by using the replacement address information to form a target message and sends the target message to the host-B.
In the embodiment of the invention, the detection node sends a certain number of first detection messages to each node to be detected based on the constructed first virtual address information in the first detection period. Wherein the first detection period is before the current detection period. The detection nodes receive the first response message fed back by each node to be detected in response to the first detection message. The detection node constructs an address resolution protocol table based on the first detection message and the first response message.
In the embodiment of the invention, the first detection period is positioned before the current detection period, and the communication link of each node to be detected is normal. The detection node sends a first detection message to each node to be detected in a first detection period, and each node to be detected can also feed back the same number of first response messages to the detection node due to the normal communication link. And the first detection message and the first response message are in one-to-one correspondence.
In the embodiment of the invention, the detection node constructs each row of the address resolution protocol table based on the source physical address information and the local aggregation network port identification contained in each first detection message of each node to be detected, the second source physical address information contained in the corresponding first response message, the corresponding node identification to be detected, the corresponding network port identification of the node to be detected and the aggregation network port information of the corresponding node to be detected, so as to obtain the address resolution protocol table.
Illustratively, in connection with FIG. 3, the HOST A host includes ports NIC0 and NIC1.NIC0 and NIC1 form an aggregation network port band0.HOST B HOST includes ports NIC2 and NIC3.NIC2 and NIC3 form an aggregation network port band1. The construction process of the address resolution protocol table may include:
HOST a HOST agent randomly addresses a mac Address, and takes 8 consecutive Media Access Control Address addresses (mac) from the last byte +1, which may include: addresses (macA 0 to macA 7). The HOST A HOST acquires the mac of the HOST aggregation network port bond1 of the HOST B through the information table, and 8 current detection messages are constructed in the form of the mac of the macA 0-macA 7 → the mac of the HOST bond1 of the HOST B respectively and are sent to the bond1 of the HOST HOST B. Wherein, the current detection message includes: HOST a HOST identity and aggregation portal band0 identity and mac.
HOST B HOST agent also obtains 8 consecutive mac addresses (macB 0-macB 7) by the same random algorithm. When the HOST HOST B receives the current detection message of the HOST HOST A, the HOST A is respectively subjected to back packet in the format of macB 0-macB 7 → the aggregation network port bond0mac of the HOST HOSTA. And any network port of the HOSTB receives the current detection message to form a corresponding current response message for repackaging. Wherein, the current response message includes: HOST B HOST identity and corresponding portal identity. The 8 current probe messages of HOST a cover all member ports of HOST B's bond1. The HOST HOST A analyzes all the member ports of 8 bond1 covering the HOST HOST B, and can obtain the message source mac and the message destination mac of the NIC2 and the NIC3 which are sent to the HOST HOST B, and then the detection of the sending link of the HOST HOSTA → the HOST HOSTB is finished, and an address resolution protocol table is obtained. Otherwise, continuing the next step, and detecting by modifying the target mac.
The HOST HOST A reconstructs the current detection messages, and 8 current detection messages are constructed and sent to the bond1 of the HOST HOST B by respectively taking the mac of the HOST A bond0 as a source mac and taking macA 0-macA 7 as destination macs. When the HOST HOST B receives the current detection message of the HOST HOST A, the HOST HOSTA is respectively subjected to back packet in the format of macB 0-macB 7 → the bond0mac of the HOST HOSTA. The HOSTA host analyzes all the member ports of 8 bond1 covering the HOSTB host, and can obtain which two message source mac and destination mac of NIC2 and NIC3 sent to the HOSTB host should use, so that the detection of the sending link of the HOSTA host → HOSTB host is finished, and an address resolution protocol table is obtained.
In the embodiment of the invention, when the communication link detection result represents that the link is normal, the detection node unloads the preset program and sends the service message serving as the target message to the target node.
In the embodiment of the invention, when the communication link detection result represents that the link of the target node is abnormal, the detection node sends loading notification information to the target node, so that the target node loads a second preset program based on the loading notification information; and the target node constructs a target response message based on a second preset program and feeds back the target response message.
In the embodiment of the invention, after the detection node sends the target message to the target node, the detection node receives a target response message fed back by the target node in response to the target message.
In the embodiment of the invention, a detection node sends a certain amount of current detection messages to each node to be detected based on constructed virtual address information in a current detection period; receiving a current response message fed back by each node to be detected in response to the current detection message; determining a communication link detection result between each node to be detected based on the current response message and the current detection message; when the communication link detection result represents that the link of the target node is abnormal, modifying the service message based on a preset address resolution protocol table by loading a preset program to obtain a target message to be sent to the target node; the address resolution protocol table contains the sending rule information between each node to be detected and the address resolution protocol table is determined by the detection message in the detection period before the current detection period. According to the scheme, the detection result of the communication link between the node to be detected and each node to be detected can be detected in real time in each detection period, when the communication link of a certain node to be detected is abnormal, a preset program can be loaded, the service message of the node to be detected is modified based on the address resolution protocol table, the service message can be sent to the corresponding node, and the efficiency and the safety of data communication can be improved when the link fails.
In some embodiments, S101 to S102 shown in fig. 2 may also be implemented through S105 to S108, which will be described in conjunction with each step.
And S105, determining the number N of the network ports of each node to be tested in a local information table.
In the embodiment of the invention, the detection node determines the number N of the network ports of each node to be detected in a local information table. The information table stores the network port information and the aggregation network port information of each node to be tested. N is an integer of 1 or more.
S106, constructing M times of virtual address information of N according to a preset program instruction; m is an integer greater than 1.
In the embodiment of the invention, the detection node constructs M times of virtual address information of N according to a preset program instruction. M is an integer greater than 1.
In the embodiment of the invention, the detection node constructs a plurality of pieces of virtual address information according to the randomness of the preset program instruction.
For example, if the number of network ports of a certain node to be tested is 2, the probing node may construct 2 × 2=8 pieces of virtual address information corresponding to the node to be tested. In other embodiments, the probing node may also construct 10 pieces of virtual address information. The number of the virtual address information is larger than the number of the network ports of the corresponding nodes to be tested.
S107, forming M times of current detection messages corresponding to N times of each node to be detected based on the M times of virtual address information of the N, and sending the M times of current detection messages to each node to be detected.
In the embodiment of the invention, the detection node forms N M times of current detection messages corresponding to each node to be detected based on N M times of virtual address information, and sends the current detection messages to each node to be detected.
In the embodiment of the invention, the detection node takes M times of virtual address information of N as source physical address information respectively, takes the address information of the aggregation network port of each node to be detected as target physical address information, and combines a local identifier, a local aggregation network port identifier and the physical address information of the local aggregation network port to form N times of current detection messages.
In the embodiment of the invention, the detection node takes M times of virtual address information of N as destination physical address information respectively, takes local aggregation network port physical address information as source physical address information, and combines a local identification and a local aggregation network port identification to form M times of current detection messages of N.
S108, receiving M current detection messages of each node to be detected responding to the N power, and feeding back K current response messages.
In the embodiment of the invention, the detection node receives M times of current detection messages of each node to be detected responding to N and K current response messages fed back. Wherein K is an integer.
In the embodiment of the invention, because the communication conditions between each node to be detected and the detection node are different, when a communication link between a certain node to be detected and the detection node is abnormal, the number of the current detection messages received by the node to be detected is not equal to the M power of N. The number of the K current response messages is determined by the number of the normal network ports of the node to be tested.
In the embodiment of the invention, the detection node sends the current detection message which can cover all network ports to each node to be detected, and when any network port fault exists, the detection node can detect the link fault condition of the node to be detected, thereby modifying the service message, realizing the service message sending in the case of the link fault and improving the data communication efficiency.
In some embodiments, S103 to S104 shown in fig. 2 can also be implemented through S109 to S112, which will be described in conjunction with each step.
S109, calculating packet loss rates through K current response messages fed back by the target node and M times of current detection messages of the N, comparing the packet loss rates with packet loss rate thresholds, and determining a communication link detection result of each node to be detected.
In the embodiment of the invention, the detection node calculates the packet loss rate through K current response messages fed back by the target node and M times of current detection messages of N, compares the packet loss rate with the packet loss rate threshold value, and determines the communication link detection result of each node to be detected.
In the embodiment of the invention, the detection node calculates the ratio of the power M of K to the power N to obtain the packet loss rate. And if the packet loss rate is greater than the first packet loss rate threshold, determining a communication link detection result corresponding to the sub-health of the link of the node to be detected. And if the packet loss rate is greater than the second packet loss rate threshold, determining a communication link detection result corresponding to the link fault of the node to be detected. And if the packet loss rate is smaller than the first packet loss rate threshold, determining a normal communication link detection result corresponding to the link of the node to be detected. And the first packet loss rate threshold is smaller than the second packet loss rate threshold.
In the embodiment of the invention, the detection node acquires the time delay information of the K response messages, compares the time delay information with a time delay threshold value, and determines the communication link detection result of each node to be detected.
In the embodiment of the invention, if the time delay information is greater than the first time delay threshold value, the detection result of the communication link corresponding to the sub-health of the link of the node to be detected is determined. And if the time delay information is larger than the second time delay threshold value, determining a communication link detection result corresponding to the link fault of the node to be detected. And determining the normal communication link detection result corresponding to the link of the node to be detected when the time delay information is smaller than the first time delay threshold value. Wherein the first delay threshold is less than the second delay threshold.
Therein, link sub-health (Fail slow) refers to a state where hardware can operate normally but the performance is severely degraded. Hardware components such as a hard disk module, a network card, a Central Processing Unit (CPU), and a memory may enter a sub-health state, and when the hardware enters the sub-health state, a system does not take effective monitoring and fault-tolerant measures, which may result in an increase in time delay and packet loss of system response, and even cause interruption of host service due to failure to respond to a host.
And S110, loading a preset program when the communication link detection result represents that the link of the target node is abnormal.
In the embodiment of the invention, when the communication link detection result represents that the link of the target node is abnormal, the detection node loads the preset program.
Wherein, the preset program may include: the Berkeley Pack Filter (BPF), the BPF invention was originally a network filtering tool, developed to the present name of eBPF: the extended Berkeley Packet Filter evolves into a set of general execution engines, which are not only network analysis, but also can develop various types of tools and platforms such as performance analysis, system tracking, network optimization and the like based on eBPF.
The eBPF can be implemented by a Traffic Classifier (TC) and a fast Data Path (XDP) in cooperation. The TC is an eBPF hook in the Linux network processing flow, can mount an eBPF program and provides a plurality of functions such as modifying packets, rerouting and discarding packets. The XDP is an eBPF hook in a Linux network processing flow, can be used for mounting an eBPF program, and can process a network data packet when the network data packet reaches a network card driving layer.
And S111, determining a switch forwarding rule based on the address resolution protocol table so as to determine the replacement address information in the address resolution protocol table.
In the embodiment of the invention, the detection node determines the forwarding rule of the switch based on the address resolution protocol table so as to determine the replacement address information in the address resolution protocol table.
In the embodiment of the invention, the detection node determines the forwarding rule of the switch based on the source physical address information and the second source physical address information of each node to be detected in the address resolution protocol table. The detection node determines the replacement address information of the corresponding switch forwarding rule in the address resolution protocol table.
In the embodiment of the invention, if the source physical address information of each node to be detected in the address resolution protocol table is inconsistent, the detection node obtains the switch forwarding rule as a source address forwarding algorithm. And if the second source physical address information of each node to be detected in the address resolution protocol table is inconsistent, the detection node obtains the switch forwarding rule as a destination address forwarding algorithm. And if the source physical address information and the second source physical address information of each node to be detected in the address resolution protocol table are inconsistent, the detection node obtains a switch forwarding rule as a source-destination address forwarding algorithm.
In the embodiment of the invention, the detection node determines the corresponding target source physical address information and the target second source physical address information in the address resolution protocol table through the identification of the target node contained in the service message. The detection node determines replacement address information in the target source physical address information and the target second source physical address information based on a switch forwarding rule; and the replacement address information is address information corresponding to the network port with the minimum load of the target node.
If the switch forwarding rule is a source address forwarding algorithm, the detection node determines the replacement address information in the target source physical address information. And if the switch forwarding rule is a destination address forwarding algorithm, the detection node determines the replacement address information in the target second source physical address information. If the switch forwarding rule is a source destination address forwarding algorithm, the detection node may determine the replacement address information from the target source physical address information and the target second source physical address information.
And S112, responding to the preset program, replacing the source address information or the destination address information in the service message by using the replacement address information according to the forwarding rule of the switch, and obtaining a target message to send to the target node.
In the embodiment of the invention, the detection node responds to the preset program, and replaces the source address information or the destination address information in the service message by using the replacement address information according to the forwarding rule of the switch to obtain the target message so as to send the target message to the target node.
If the switch forwarding rule is a source address forwarding algorithm, the detection node replaces the source address information in the service message with the replacement address information. If the switch forwarding rule is a destination address forwarding algorithm, the detection node replaces the destination address information in the service message by using the replacement address information. If the switch forwarding rule is a source-destination address forwarding algorithm, the detection node replaces the source address information or the destination address information in the service message with the replacement address information.
In the embodiment of the invention, when the detection node detects the link failure of the target node, the forwarding rule of the switch is determined through the address resolution protocol table, the available replacement address information corresponding to the target node is determined in the address resolution protocol table, and the source address or the destination address in the service message is modified by utilizing the replacement address information, so that the effect of sending the target message to the target node is obtained.
Please refer to fig. 4, which is a schematic diagram illustrating an optional effect of the data processing method according to the embodiment of the present invention.
In the embodiment of the invention, all servers in the network system ping each other, and each server sends the detection message to other servers. Each server periodically (such as every second or every minute) sends a first detection message through the constructed virtual address information, and determines an address resolution protocol table based on a first response message fed back. When the server a detects the packet loss rate or the time delay between the server a and the network port of the server B through the current detection message and the current response message, if the packet loss rate or the time delay is continuously greater than the threshold th1 within a given time period T, the link is considered to be sub-healthy, and if the packet loss rate or the time delay is continuously greater than the threshold th2, the link is considered to be failed. When the server a detects a link failure/sub-health between the network port A1 and the network port B1, the control center of the probe node determines a learned virtual mac address in the address resolution protocol table for topology routing (a message using the mac address as a source mac or a destination mac is forwarded to a network port healthy by the server B, such as the network port B2, by the switch). Wherein, the address resolution protocol table comprises: the corresponding relation 1: a source port A1, a source mac1 and a destination port B1; the corresponding relation 2: source port A2, source mac2, destination port B2. Server a now notifies server B to load the eBPF programs (TC and XDP). Server a selects a virtual mac address that can be hashed to a healthy destination port, such as port B2. The server A modifies the source mac or the destination mac in the service message through the eBPF program and redirects the service message to a normal port, such as the port A2. After receiving the target message, the server B (e.g., port B2) detects a source mac address or a destination mac address in the target message by using the eBPF, and if the source mac address or the destination mac address is a special mac address for link switching, modifies the source mac address of the target message and restores the source mac address or the destination mac address to a real source mac address or a real destination mac address. When server a detects that the link failure/sub-health has been restored, the eBPF process is unloaded, i.e., the communication link can be restored.
Referring to fig. 5, a schematic flow chart of an alternative data processing method according to an embodiment of the present invention will be described with reference to the steps shown in fig. 5.
S201, receiving a certain number of current detection messages sent by a detection node, responding to the current detection messages to form current response messages, and feeding the current response messages back to the detection node; the current detection message is sent by the detection node based on the constructed virtual address information in the current detection period. The number of the certain quantity representations is larger than the number of local network ports.
In the embodiment of the invention, a target node receives a certain number of current detection messages sent by a detection node, responds to the current detection messages, and forms current response messages to be fed back to the detection node; the current detection message is sent by the detection node based on the constructed virtual address information in the current detection period. The number of the certain quantity representations is larger than the number of local network ports.
S202, receiving a target message sent by a detection node; the target message is obtained by modifying a service message based on an address resolution protocol table by loading a preset program when a detection result of a communication link represents that a local link is abnormal; the communication link detection result is determined by the detection node based on the current response message and the current detection message; the address resolution protocol table is determined by the probe node through the probe message in the probe period before the current probe period.
In the embodiment of the invention, a target node receives a target message sent by a detection node; the target message is obtained by modifying a service message based on an address resolution protocol table by loading a preset program when a detection result of a communication link represents that a local link is abnormal; the communication link detection result is determined by the detection node based on the current response message and the current detection message; the address resolution protocol table is determined by the probe node through the probe message in the probe period before the current probe period.
In the embodiment of the invention, when the detection node determines that the communication link detection result represents the link abnormality of the target node, the load notification information is sent to the target node. And the target node receives the loading notification information sent by the target node and loads the second preset program. After receiving the target packet sent by the probe node, the method further includes: the target node responds to the second preset program, modifies the target message based on a preset second address resolution protocol table, and obtains a corresponding target message to send to the detection node; the second address resolution protocol table comprises sending rule information between the target node and other nodes.
The second preset program may also be a BPF program.
And the second address resolution protocol table is determined by the target node through the detection message in the previous detection period.
According to the scheme, the detection result of the communication link between the node to be detected and each node to be detected can be detected in real time in each detection period, when the communication link of a certain node to be detected is abnormal, a preset program can be loaded, the service message of the node to be detected is modified based on the address resolution protocol table, the service message can be sent to the corresponding node, and the efficiency and the safety of data communication can be improved when the link fails.
In some embodiments, S201 shown in fig. 5 can also be implemented by S203, which will be described in conjunction with various steps.
S203, K current detection messages sent by the detection node are received, K response messages are formed by responding to the K detection messages, and the K response messages are sent to the detection node.
In the embodiment of the invention, the target node receives K current detection messages sent by the detection node, responds to the K detection messages to form K response messages, and sends the K response messages to the detection node.
In some embodiments, S204 may be further included before S201 shown in fig. 5, which will be described in conjunction with the steps.
S204, receiving a first detection message sent by the detection node, responding to the first detection message, and forming a first response message based on the constructed second virtual address information and feeding back the first response message to the detection node.
In the embodiment of the invention, the target node receives the first detection message sent by the detection node, responds to the first detection message, and forms the first response message based on the constructed second virtual address information to be fed back to the detection node.
In the embodiment of the invention, the target node determines the network port number T of the detection node in the second information table; the second information table stores the network port information and the aggregation network port information of the detection nodes; t is an integer of 1 or more. And the target node constructs M-power second virtual address information of T according to a second preset program instruction. And the target node forms M times of first response messages of the T corresponding to the detection node based on the M times of second virtual address information of the T.
In the embodiment of the invention, the target node takes the M-th power of second virtual address information of T as second source physical address information respectively, takes the address information of the aggregation network port of the detection node as second target physical address information, and combines the target node identification and the target node network port identification to form M-th power of first response messages of the detection node.
Referring to fig. 6, an interaction diagram of a data processing method according to an embodiment of the present invention will be described with reference to the steps shown in fig. 6.
S301, the detection node sends a certain amount of current detection messages to the target node based on the constructed virtual address information in the current detection period; the number of the certain quantity representations is larger than the number of the network ports corresponding to the nodes to be tested.
In the embodiment of the present invention, the implementation process of S301 may refer to S101, which is not described herein.
S302, the detection node receives the current response message fed back by the target node responding to the current detection message.
In the embodiment of the present invention, the implementation process of S302 may refer to S102, which is not described herein.
S303, the detection node determines a detection result of the communication link with the target node based on the current response message and the current detection message.
In the embodiment of the present invention, reference may be made to S103 in the implementation process of S303, which is not described herein.
S304, when the detection result of the communication link represents that the link of the target node is abnormal, modifying the service message based on a preset address resolution protocol table by loading a preset program to obtain a target message and sending the target message to the target node; the address resolution protocol table contains the sending rule information between each node to be detected and the address resolution protocol table is determined by the detection message in the detection period before the current detection period.
In the embodiment of the present invention, the implementation process of S304 may refer to S104, which is not described herein.
Fig. 7 is a schematic structural diagram of a data processing apparatus according to an embodiment of the present invention.
An embodiment of the present invention further provides a data processing apparatus 800, which is applied to a probe node in a aggregation network port, and includes: a first sending unit 803, a first receiving unit 804, a determining unit 805 and a modification processing unit 806.
A first sending unit 803, configured to send a certain number of current detection packets to each node to be detected based on the constructed virtual address information in a current detection period; the number of the certain quantity representations is larger than the number of the network ports in the corresponding nodes to be tested.
A first receiving unit 804, configured to receive the current response packet fed back by each node to be detected in response to the current detection packet;
a determining unit 805, configured to determine, based on the current response packet and the current probe packet, a detection result of a communication link with each node to be detected;
a modification processing unit 806, configured to modify, when the communication link detection result indicates that a target node link is abnormal, a service packet based on a preset address resolution protocol table by loading a preset program, so as to obtain a target packet, and send the target packet to the target node; the address resolution protocol table includes sending rule information between each node to be detected and the node to be detected, and is determined by a detection message in a detection period before the current detection period.
In this embodiment of the present invention, the first sending unit 803 in the data processing apparatus 800 is configured to determine, in a local information table, the number N of network ports of each node to be tested; the information table stores the network port information and the aggregation network port information of each node to be tested; n is an integer greater than or equal to 1; constructing M times of virtual address information of N according to a preset program instruction; m is an integer greater than 1; and forming M times of current detection messages corresponding to N times of each node to be detected based on the M times of virtual address information of the N, and sending the M times of current detection messages to each node to be detected.
In this embodiment of the present invention, the first sending unit 803 in the data processing apparatus 800 is configured to use the M times of virtual address information of the N as source physical address information, use the address information of the aggregation network port of each node to be detected as destination physical address information, and combine the local identifier, the local aggregation network port identifier, and the local aggregation network port physical address information to form M times of current detection packets of the N;
and respectively taking the M times of virtual address information of the N as the destination physical address information, taking the local aggregation network port physical address information as the source physical address information, and combining the local identification and the local aggregation network port identification to form M times of current detection messages of the N.
In this embodiment of the present invention, the first sending unit 803 in the data processing apparatus 800 is configured to send a certain number of first detection messages to each node to be detected based on the constructed first virtual address information in a first detection period; wherein the first probing period is prior to the current probing period; the first receiving unit 804 is configured to receive a first response message fed back by each node to be detected in response to the first detection message; and constructing the address resolution protocol table based on the first detection message and the first response message.
In this embodiment of the present invention, the data processing apparatus 800 is configured to construct each row of the address resolution protocol table based on the source physical address information and the local aggregation network port identifier included in each first probe message of each node to be detected, the second source physical address information, the corresponding node identifier to be detected, the corresponding network port identifier of the node to be detected, and the aggregation network port information of the corresponding node to be detected, which are included in the corresponding first response message, so as to obtain the address resolution protocol table.
In this embodiment of the present invention, the determining unit 805 in the data processing apparatus 800 is configured to calculate a packet loss rate through the K current response packets fed back by the target node and the M current detection packets of the N times, compare the packet loss rate with a packet loss rate threshold, and determine the communication link detection result of each node to be detected; and acquiring the time delay information of the K response messages, and comparing the time delay information with a time delay threshold value to determine the communication link detection result of each node to be detected.
In this embodiment of the present invention, the modification processing unit 806 in the data processing apparatus 800 is configured to load the preset program when the communication link detection result indicates that the target node link is abnormal; determining a switch forwarding rule based on the address resolution protocol table to determine replacement address information in the address resolution protocol table; and responding to the preset program, and replacing the source address information or the destination address information in the service message by using the replacement address information according to the switch forwarding rule to obtain the target message so as to send the target message to the target node.
In this embodiment of the present invention, the modification processing unit 806 in the data processing apparatus 800 is configured to determine the switch forwarding rule based on the source physical address information and the second source physical address information of each node to be tested in the address resolution protocol table; and determining the replacement address information corresponding to the switch forwarding rule in the address resolution protocol table.
In this embodiment of the present invention, the modification processing unit 806 in the data processing apparatus 800 is configured to obtain the switch forwarding rule as a source address forwarding algorithm if the source physical address information of each node to be tested in the address resolution protocol table is inconsistent;
if the second source physical address information of each node to be tested in the address resolution protocol table is inconsistent, obtaining the switch forwarding rule as a destination address forwarding algorithm;
and if the source physical address information and the second source physical address information of each node to be detected in the address resolution protocol table are inconsistent, obtaining the switch forwarding rule as a source-destination address forwarding algorithm.
In this embodiment of the present invention, the modification processing unit 806 in the data processing apparatus 800 is configured to determine, according to the identifier of the target node included in the service packet, corresponding target source physical address information and target second source physical address information in the address resolution protocol table;
determining the replacement address information in the target source physical address information and the target second source physical address information based on the switch forwarding rule; and the replacement address information is address information corresponding to the network port with the minimum load of the target node.
In this embodiment of the present invention, the first sending unit 803 in the data processing apparatus 800 is configured to send, when the communication link detection result indicates that the target node link is abnormal, loading notification information to the target node, so that the target node loads a second preset program based on the loading notification information; and the target node constructs a target response message based on the second preset program and feeds back the target response message.
In the embodiment of the present invention, the first sending unit 803 is configured to send a certain number of current detection messages to each node to be detected based on the constructed virtual address information in the current detection period; the number of the certain quantity representations is larger than the number of the network ports corresponding to the nodes to be tested. A first receiving unit 804, configured to receive a current response message fed back by each node to be detected in response to the current detection message; a determining unit 805, configured to determine, based on the current response packet and the current probe packet, a detection result of a communication link with each node to be detected; a modification processing unit 806, configured to modify, when the communication link detection result indicates that the link of the target node is abnormal, the service packet based on the preset address resolution protocol table by loading a preset program, so as to obtain a target packet, and send the target packet to the target node; the address resolution protocol table contains the sending rule information between each node to be detected and the address resolution protocol table is determined by the detection message in the detection period before the current detection period. According to the scheme, the detection result of the communication link between the node to be detected and each node to be detected can be detected in real time in each detection period, when the communication link of a certain node to be detected is abnormal, a preset program can be loaded, the service message of the node to be detected is modified based on the address resolution protocol table, the service message can be sent to the corresponding node, and the efficiency and the safety of data communication can be improved when the link fails.
It should be noted that, in the embodiment of the present invention, if the data processing method is implemented in the form of a software functional module and sold or used as a standalone product, the data processing method may also be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a data processing apparatus (which may be a personal computer or the like) to execute all or part of the methods according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read Only Memory (ROM), a magnetic disk, or an optical disk. Thus, embodiments of the invention are not limited to any specific combination of hardware and software.
Correspondingly, the embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the steps in the above method.
Correspondingly, the embodiment of the present invention provides a data processing apparatus 800, which includes a first memory 802 and a first processor 801, where the first memory 802 stores a computer program that can be executed on the first processor 801, and the first processor 801 implements the steps in the method when executing the computer program.
Here, it should be noted that: the above description of the storage medium and apparatus embodiments is similar to the description of the method embodiments above, with similar beneficial effects as the method embodiments. For technical details not disclosed in the embodiments of the storage medium and the apparatus according to the invention, reference is made to the description of the embodiments of the method according to the invention.
It should be noted that fig. 8 is a first schematic diagram of a hardware entity of a data processing apparatus according to an embodiment of the present invention, as shown in fig. 8, the hardware entity of the data processing apparatus 800 includes: a first processor 801 and a first memory 802, wherein;
the first processor 801 generally controls the overall operation of the data processing apparatus 800.
The first Memory 802 is configured to store instructions and applications executable by the processor 801, and may also buffer data (e.g., image data, audio data, voice communication data, and video communication data) to be processed or already processed by each module in the first processor 801 and the data processing apparatus 800, and may be implemented by a FLASH Memory (FLASH) or a Random Access Memory (RAM).
Fig. 9 is a schematic structural diagram of a data processing apparatus according to a second embodiment of the present invention.
An embodiment of the present invention further provides a data processing apparatus 900, which is applied to a target node, and includes: a second receiving unit 903.
A second receiving unit 903, configured to receive a certain number of current probe packets sent by a probe node, and form a current response packet in response to the current probe packet and feed the current response packet back to the probe node; the current detection message is sent by the detection node based on the constructed virtual address information in the current detection period; the number of the certain quantity representations is larger than the number of local network ports.
The second receiving unit 903 is further configured to receive a target packet sent by the probe node; the target message is obtained by modifying a service message based on an address resolution protocol table by loading a preset program when a detection result of a communication link represents that a local link is abnormal; the communication link detection result is determined by the detection node based on the current response message and the current detection message; the address resolution protocol table is determined by the detection node through a detection message in a detection period before the current detection period.
In this embodiment of the present invention, the second receiving unit 903 in the data processing apparatus 900 is configured to receive K current probe packets sent by the probe node, respond to the K current probe packets to form K response packets, and send the K response packets to the probe node.
In this embodiment of the present invention, the second receiving unit 903 in the data processing apparatus 900 is configured to receive a first probe packet sent by the probe node, and form a first response packet based on the constructed second virtual address information in response to the first probe packet, and feed back the first response packet to the probe node.
In this embodiment of the present invention, the second receiving unit 903 in the data processing apparatus 900 is configured to receive the loading notification information sent by the target node, and load a second preset program; responding to the second preset program, and modifying the target message based on a preset second address resolution protocol table to obtain a corresponding message of the target so as to send the corresponding message to the detection node; the second address resolution protocol table comprises sending rule information between the target node and other nodes.
In the embodiment of the present invention, the second receiving unit 903 is configured to receive a certain number of current probe packets sent by a probe node, and respond to the current probe packets to form current response packets, which are fed back to the probe node; the current detection message is sent by the detection node based on the constructed virtual address information in the current detection period; the number of the certain quantity representations is larger than the number of local network ports. The second receiving unit 903 is further configured to receive a target packet sent by the probe node; the target message is obtained by modifying a service message based on an address resolution protocol table by loading a preset program when a detection result of a communication link represents that a local link is abnormal; the communication link detection result is determined by the detection node based on the current response message and the current detection message; the address resolution protocol table is determined by the detection node through a detection message in a detection period before the current detection period. According to the scheme, the detection result of the communication link between the node to be detected and each node to be detected can be detected in real time in each detection period, when the communication link of a certain node to be detected is abnormal, a preset program can be loaded, the service message of the node to be detected is modified based on the address resolution protocol table, the service message can be sent to the corresponding node, and the efficiency and the safety of data communication can be improved when the link fails.
Correspondingly, the embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements the steps of the above-mentioned method.
Correspondingly, the embodiment of the present invention provides a data processing apparatus 900, which includes a second memory 902 and a second processor 901, where the second memory 902 stores a computer program that can be executed on the second processor 901, and the second processor 901 implements the steps in the above method when executing the program.
Here, it should be noted that: the above description of the storage medium and apparatus embodiments is similar to the description of the method embodiments above, with similar beneficial effects as the method embodiments. For technical details not disclosed in the embodiments of the storage medium and the apparatus according to the invention, reference is made to the description of the embodiments of the method according to the invention.
It should be noted that fig. 10 is a schematic diagram of a hardware entity of a data processing apparatus according to an embodiment of the present invention, as shown in fig. 10, the hardware entity of the data processing apparatus 900 includes: a second processor 901 and a second memory 902, wherein;
the second processor 901 generally controls the overall operation of the data processing apparatus 900.
The second Memory 902 is configured to store instructions and applications executable by the processor 901, and may also buffer data (e.g., image data, audio data, voice communication data, and video communication data) to be processed or already processed by each module in the second processor 901 and the data processing apparatus 900, and may be implemented by a FLASH Memory (FLASH) or a Random Access Memory (RAM).
It should be appreciated that reference throughout this specification to "one embodiment" or "an embodiment" means that a particular feature, structure or characteristic described in connection with the embodiment is included in at least one embodiment of the present invention. Thus, the appearances of the phrases "in one embodiment" or "in an embodiment" in various places throughout this specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. It should be understood that, in various embodiments of the present invention, the sequence numbers of the above-mentioned processes do not mean the execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention. The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus 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 apparatus. Without further limitation, an element defined by the phrases "comprising a component of' 8230; \8230;" does not exclude the presence of another like element in a process, method, article, or apparatus that comprises the element.
In the several embodiments provided in the present invention, it should be understood that the disclosed apparatus and method may be implemented in other manners. The above-described device embodiments are merely illustrative, for example, the division of the unit is only one logical functional division, and other division ways may be implemented in practice, such as: multiple units or components may be combined, or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the coupling, direct coupling or communication connection between the components shown or discussed may be through some interfaces, and the indirect coupling or communication connection between the devices or units may be electrical, mechanical or other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units; can be located in one place or distributed on a plurality of network units; some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, all the functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may be separately regarded as one unit, or two or more units may be integrated into one unit; the integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
Those of ordinary skill in the art will understand that: all or part of the steps for realizing the method embodiments can be completed by hardware related to program instructions, the program can be stored in a computer readable storage medium, and the program executes the steps comprising the method embodiments when executed; and the aforementioned storage medium includes: various media capable of storing program codes, such as a removable storage device, a Read Only Memory (ROM), a magnetic disk, and an optical disk.
Alternatively, the integrated unit of the present invention may be stored in a computer-readable storage medium if it is implemented in the form of a software functional module and sold or used as a separate product. Based on such understanding, the technical solutions of the embodiments of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the methods according to the embodiments of the present invention. And the aforementioned storage medium includes: various media that can store program codes, such as a removable storage device, a ROM, a magnetic disk, or an optical disk.
The above description is only an embodiment of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of changes or substitutions within the technical scope of the present invention, and all such changes or substitutions are included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.

Claims (14)

1. A data processing method is applied to a detection node in a converged network port, and comprises the following steps:
in the current detection period, a certain number of current detection messages are sent to each node to be detected based on the constructed virtual address information; the number of the certain number representations is larger than the number of the network ports corresponding to the nodes to be detected;
receiving the current response message fed back by each node to be detected in response to the current detection message;
determining a communication link detection result between each node to be detected and the current response message and the current detection message;
when the communication link detection result represents that a target node link is abnormal, modifying a service message based on a preset address resolution protocol table by loading a preset program to obtain a target message to be sent to the target node; the address resolution protocol table includes sending rule information between each node to be detected and the node to be detected, and is determined by a detection message in a detection period before the current detection period.
2. The data processing method according to claim 1, wherein the sending a certain number of current probing messages to each node to be tested based on the constructed virtual address information in the current probing cycle comprises:
determining the number N of the network ports of each node to be tested in a local information table; the information table stores the network port information and the aggregation network port information of each node to be tested; n is an integer greater than or equal to 1;
constructing M times of virtual address information of N according to a predetermined program instruction; m is an integer greater than 1;
and forming M times of current detection messages corresponding to N times of each node to be detected based on the M times of virtual address information of the N, and sending the M times of current detection messages to each node to be detected.
3. The data processing method according to claim 2, wherein the forming of N M times current probe packets corresponding to each node to be tested based on the N M times virtual address information includes one of:
respectively taking the M times of virtual address information of the N as source physical address information, taking the address information of the aggregation network port of each node to be detected as target physical address information, and combining a local identifier, a local aggregation network port identifier and the local aggregation network port physical address information to form M times of current detection messages of the N;
and respectively taking the M times of virtual address information of the N as the destination physical address information, taking the local aggregation network port physical address information as the source physical address information, and combining the local identification and the local aggregation network port identification to form M times of current detection messages of the N.
4. The data processing method according to claim 1, wherein before sending a certain number of current probing messages to each node to be tested based on the constructed virtual address information in the current probing cycle, the method further comprises:
in a first detection period, sending a certain number of first detection messages to each node to be detected based on the constructed first virtual address information; wherein the first probing period is prior to the current probing period;
receiving a first response message fed back by each node to be detected responding to the first detection message;
and constructing the address resolution protocol table based on the first detection message and the first response message.
5. The data processing method according to claim 4, wherein the constructing the ARP table based on the first probe packet and the first response packet comprises:
and constructing each row of an address resolution protocol table based on the source physical address information and the local aggregation network port identification contained in each first detection message of each node to be detected, the second source physical address information, the corresponding node identification to be detected, the network port identification of the corresponding node to be detected and the aggregation network port information of the corresponding node to be detected contained in the corresponding first response message, so as to obtain the address resolution protocol table.
6. The data processing method according to claim 1, wherein the determining, based on the current response packet and the current probe packet, a detection result of a communication link with each node under test includes one of:
calculating packet loss rates through K current response messages fed back by the target node and M times of current detection messages of the N, comparing the packet loss rates with packet loss rate thresholds, and determining the communication link detection result of each node to be detected;
and acquiring the time delay information of the K response messages, comparing the time delay information with a time delay threshold value, and determining the communication link detection result of each node to be detected.
7. The data processing method according to claim 5, wherein when the communication link detection result indicates that the link of the target node is abnormal, modifying the service packet based on a preset address resolution protocol table by loading a preset program to obtain a target packet for sending to the target node, the method includes:
when the communication link detection result represents that the target node link is abnormal, loading the preset program;
determining a switch forwarding rule based on the address resolution protocol table to determine replacement address information in the address resolution protocol table;
and responding to the preset program, and replacing the source address information or the destination address information in the service message by using the replacement address information according to the switch forwarding rule to obtain the target message so as to send the target message to the target node.
8. The data processing method of claim 7, wherein determining a switch forwarding rule based on the ARP table to determine alternative address information in the ARP table comprises:
determining the switch forwarding rule based on the source physical address information and the second source physical address information of each node to be tested in the address resolution protocol table;
and determining the replacement address information corresponding to the switch forwarding rule in the address resolution protocol table.
9. The data processing method according to claim 8, wherein the determining the switch forwarding rule based on the source physical address information and second source physical address information of each node under test in the arp table comprises one of:
if the source physical address information of each node to be tested in the address resolution protocol table is inconsistent, obtaining the switch forwarding rule as a source address forwarding algorithm;
if the second source physical address information of each node to be tested in the address resolution protocol table is inconsistent, obtaining the switch forwarding rule as a destination address forwarding algorithm;
and if the source physical address information and the second source physical address information of each node to be tested in the address resolution protocol table are inconsistent, obtaining the switch forwarding rule as a source-destination address forwarding algorithm.
10. The data processing method of claim 9, wherein the determining the replacement address information corresponding to the switch forwarding rule in the arp table comprises:
determining corresponding target source physical address information and target second source physical address information in the address resolution protocol table according to the identifier of the target node contained in the service message;
determining the replacement address information in the target source physical address information and the target second source physical address information based on the switch forwarding rule; and the replacement address information is address information corresponding to the network port with the minimum load of the target node.
11. The data processing method according to claim 1, wherein after determining the detection result of the communication link with each node under test based on the current response packet and the current probe packet, the method further comprises:
when the communication link detection result represents that the target node link is abnormal, sending loading notification information to the target node, so that the target node loads a second preset program based on the loading notification information; and the target node constructs a target response message based on the second preset program and feeds back the target response message.
12. A data processing device, applied to a probe node in an aggregation network port, includes:
a first sending unit, configured to send a certain number of current detection messages to each node to be detected based on the constructed virtual address information in a current detection period; the number of the certain quantity representations is larger than the number of the network ports corresponding to the nodes to be detected;
a first receiving unit, configured to receive a current response packet fed back by each node to be detected in response to the current detection packet;
a determining unit, configured to determine, based on the current response packet and the current detection packet, a detection result of a communication link with each node to be detected;
the modification processing unit is used for modifying the service message based on a preset address resolution protocol table by loading a preset program when the communication link detection result represents that the link of the target node is abnormal, so as to obtain a target message and send the target message to the target node; the address resolution protocol table includes information of a sending rule between each node to be detected and the node to be detected, and is determined by a detection message in a detection period before the current detection period.
13. A data processing apparatus comprising a first memory and a first processor, the first memory storing a computer program operable on the first processor, the first processor implementing the steps of the method of any one of claims 1 to 11 when executing the program.
14. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a first processor, carries out the steps of the method of any one of claims 1 to 11.
CN202211468899.0A 2022-11-22 2022-11-22 Data processing method, device and storage medium Pending CN115865635A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211468899.0A CN115865635A (en) 2022-11-22 2022-11-22 Data processing method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211468899.0A CN115865635A (en) 2022-11-22 2022-11-22 Data processing method, device and storage medium

Publications (1)

Publication Number Publication Date
CN115865635A true CN115865635A (en) 2023-03-28

Family

ID=85665055

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211468899.0A Pending CN115865635A (en) 2022-11-22 2022-11-22 Data processing method, device and storage medium

Country Status (1)

Country Link
CN (1) CN115865635A (en)

Similar Documents

Publication Publication Date Title
EP2564561B1 (en) Method for routing data packets in a fat tree network
US10095576B2 (en) Anomaly recovery method for virtual machine in distributed environment
US7653769B2 (en) Management of devices connected to infiniband ports
US10680893B2 (en) Communication device, system, and method
US20090249115A1 (en) Method and system for dynamic link failover management
CN112217658B (en) Stacking and splitting processing method and device
CN106878164B (en) Message transmission method and device
CN105721318A (en) Method and device for discovering network topology in software defined network SDN (Software Defined Network)
CN108123901B (en) Message transmission method and device
CN107547240B (en) Link detection method and device
CN109787869B (en) Path fault detection method and device
CN109495320B (en) Data message transmission method and device
CN113328916B (en) BFD detection mode switching method, device and equipment
CN110011941B (en) Message forwarding method and device
CN107241208B (en) Message forwarding method, first switch and related system
CN111030877A (en) Main/standby equipment switching method and device
US7676623B2 (en) Management of proprietary devices connected to infiniband ports
CN113507431B (en) Message management method, device, equipment and machine-readable storage medium
US8619627B2 (en) Automatic determination of groupings of communications interfaces
US10951548B2 (en) Method for resetting a packet processing component to an operational state
CN115865635A (en) Data processing method, device and storage medium
CN108156052B (en) Method and system for testing equipment stability
US20140086067A1 (en) Transmitting device, method for monitoring memory, and transmission system
CN111934909B (en) Main-standby machine IP resource switching method, device, computer equipment and storage medium
JP6278868B2 (en) Communication control device and computing device

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