Disclosure of Invention
Aiming at the defects in the prior art, the invention aims to provide an island self-healing method based on an SNMP protocol network system, so as to reduce operation and maintenance cost, efficiently locate faults and recover equipment operation through the self-healing method under certain conditions.
The technical scheme adopted by the invention for realizing the purpose is as follows: an island self-healing method based on an SNMP protocol network system comprises the following steps:
(1) heartbeat mutual-sending detection determination server and client device communication normal
Establishing an inquiry link between each client device and a server, wherein the client device sends a heartbeat packet to the server, the server also sends a heartbeat packet to the client, and the heartbeat packet sent by the client device and the heartbeat packet sent by the server are independent; the client device and the server respectively detect heartbeat packets sent by the opposite side, and if the client device and the server can continuously and stably receive the heartbeat packets sent by the opposite side, the server and the client device are judged to be in normal communication;
(2) sending the modified configuration parameters or the new version to the client
When the server and the client equipment are judged to be in normal communication through the step (1), the server sends a modification configuration parameter or a new version to the client equipment, a heartbeat package is sent to the client equipment after the modification configuration parameter or the new version is sent to indicate that the modification configuration parameter or the new version is sent, the client backs up the original parameter or the original version after receiving the modification configuration parameter or the new version, the client equipment sends the heartbeat package to the server after the backup is finished to indicate that the modification configuration parameter or the new version is received and the original parameter or the original version is backed up, and the client equipment modifies the received configuration parameter or installs the new version after the heartbeat is sent;
(3) client device islanding detection
After the client equipment modifies the received configuration parameters or installs a new version in the step (2), the server continues to send heartbeat to the client equipment, if the client equipment does not receive heartbeat packets sent by the server continuously for multiple times, the disconnection of a direction link from the server to the client equipment can be judged, the client equipment starts a reset timer, and the link is still not recovered within the set time of the reset timer, so that the client equipment is determined to be in an island state;
(4) client device reset and black box information recording
After the client device is subjected to island detection through the step (3), if the client is determined to be in an island state, the client device backs back the backup parameter data and resets the client device to record black box information, the black box information comprises the starting time and the ending absolute time when the heartbeat is lost and the modified configuration parameter and the version information before the reset, a request link between the server and the client device is reestablished, the heartbeat package sent by the client device and the server is ensured to be stably received and sent, the server makes corresponding modification after analyzing the fault reason, and the configuration parameter modification or version upgrading operation is carried out again.
In the step (3), the server sends the heartbeat packet to the client device, and the client device also sends the heartbeat packet to the server, if the server does not detect the heartbeat packet sent by the client device for a plurality of times continuously, the server stops sending the heartbeat packet to the client device, recovers resources, and records the absolute time of the last heartbeat packet.
And (4) in the step (3), the client device and the server do not receive the heartbeat packet sent by the opposite side continuously for 10 times, and the heartbeat packet is used as a standard for judging whether the server and the client device are disconnected.
And (4) the time set by the reset timer in the step (3) is 2 hours.
And (4) the island state in the steps (3) and (4) is that the client equipment and the server equipment lose contact, and the server end cannot perform subsequent maintenance operation on the equipment.
The client device is a device which carries out SNMP protocol communication with the server through an SNMP agent program, and the set distance between the client device and the server is not limited by geography.
The server can be deployed with one or more groups in a network system, manage a large number of client devices, and perform maintenance operations such as parameter configuration, modification, version upgrade, state alarm query, new energy statistics and the like on the client devices.
The heartbeat interval of the heartbeat packet is set to be 1 second, and the network connection between the client device and the server includes but is not limited to a fiber network.
The invention has the beneficial effects that:
1. determining that the server and the client equipment are normally communicated through heartbeat mutual sending detection in the step (1), after the server and the client equipment are normally communicated, sending configuration parameter modification or a new version to the client through the step (2), modifying received configuration parameters or installing the new version by the client equipment, performing island detection on the client equipment with the received configuration parameters or the new version through the step (3), judging whether the client equipment is in an island state, if the client is in the island state, resetting the client equipment and recording black box information through the step (4), and performing corresponding modification after analyzing a fault reason according to the black box information, wherein the whole processing process is simple and efficient, and the operation and maintenance cost is well reduced;
2. by adopting a mutual heartbeat sending mode, the problem of the disconnection of an uplink link and a downlink link can be more accurately analyzed and positioned, wherein the uplink link refers to a client, and the downlink link refers to a link from a server to client equipment, so that the high-efficiency positioning of the fault can be ensured;
3. although the client device enters an island, the service provided for the user is normal, and the link with the server is tried to be restored, so that the influence on the user can be reduced to the minimum, and under the condition that hardware has no problem, the device can be reset, the configuration parameters or versions can be modified in a backspacing mode, the link with the server device is built again to restore the operation, and the operation of the device can be restored by a self-healing method.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example 1:
referring to fig. 1, an island self-healing method based on an SNMP protocol network system includes the following steps:
(1) heartbeat mutual-sending detection determination server and client device communication normal
Establishing an inquiry link between each client device and a server, wherein the client device sends a heartbeat packet to the server, the server also sends a heartbeat packet to the client, and the heartbeat packet sent by the client device and the heartbeat packet sent by the server are independent; the client device and the server respectively detect heartbeat packets sent by the opposite side, and if the client device and the server can continuously and stably receive the heartbeat packets sent by the opposite side, the server and the client device are judged to be in normal communication;
(2) sending the modified configuration parameters or the new version to the client
When the server and the client equipment are judged to be in normal communication through the step (1), the server sends a modification configuration parameter or a new version to the client equipment, a heartbeat package is sent to the client equipment after the modification configuration parameter or the new version is sent to indicate that the modification configuration parameter or the new version is sent, the client backs up the original parameter or the original version after receiving the modification configuration parameter or the new version, the client equipment sends the heartbeat package to the server after the backup is finished to indicate that the modification configuration parameter or the new version is received and the original parameter or the original version is backed up, and the client equipment modifies the received configuration parameter or installs the new version after the heartbeat is sent;
(3) client device islanding detection
After the client equipment modifies the received configuration parameters or installs a new version in the step (2), if the client equipment does not receive heartbeat packets sent by the server continuously for multiple times, the disconnection of a direction link from the server to the client equipment can be judged, the client equipment starts a reset timer, and the link is still not recovered within the set time of the reset timer, so that the client equipment is determined to be in an island state;
(4) client device reset and black box information recording
After the client equipment is subjected to island detection through the step (3), if the client is determined to be in an island state, the client equipment backs back the backup parameter data and resets the client equipment to record black box information, the black box information comprises the starting time and the ending absolute time when the heartbeat is lost and the modified configuration parameter and the version information before the reset, a request link between the server and the client equipment is reestablished, the heartbeat package sent by the client equipment and the server is ensured to be stably received and sent, the server makes corresponding modification after analyzing the fault reason, and the configuration parameter modification or version upgrading operation is carried out again.
In the invention, in the step (3), the server sends the heartbeat packet to the client equipment, and simultaneously the client equipment also sends the heartbeat packet to the server, if the server does not detect the heartbeat packet sent by the client equipment continuously for a plurality of times, the server stops sending the heartbeat packet to the client equipment, recovers resources and records the absolute time of the last heartbeat packet; in the step (3), the client device and the server do not receive the heartbeat packet sent by the opposite side continuously for 10 times, and the heartbeat packet is used as a standard for judging whether the server and the client device are disconnected; the time set by the reset timer in the step (3) is 2 hours; in the island state in the steps (3) and (4), the client equipment and the server equipment lose contact, and the server cannot perform subsequent maintenance operation on the equipment; the client device is a device which carries out SNMP protocol communication with the server through an SNMP agent program, and the set distance between the client device and the server is not limited by geography; the server can be deployed with one or more groups in a network system, manage a large amount of client equipment, and carry out maintenance operations such as parameter configuration, modification, version upgrade, state alarm inquiry, new energy statistics and the like on the client equipment; the heartbeat interval of the heartbeat packet is set to 1 second, and the network connection between the client device and the server includes, but is not limited to, a fiber optic network.
Example 2:
referring to fig. 1, an island self-healing method based on an SNMP protocol network system includes the following steps:
(1) heartbeat mutual-sending detection determination server and client device communication normal
Establishing an inquiry link between each client device and a server, sending a heartbeat packet to the server by the client device, sending the heartbeat packet to the client by the server, setting the heartbeat interval of the heartbeat packet to be 1 second, and enabling the heartbeat packet sent by the client device and the heartbeat packet sent by the server to be independent; the client device and the server respectively detect heartbeat packets sent by the opposite side, and if the client device and the server can continuously and stably receive the heartbeat packets sent by the opposite side, the server and the client device are judged to be in normal communication;
(2) sending the modified configuration parameters or the new version to the client
When the server and the client equipment are judged to be in normal communication through the step (1), the server sends a modification configuration parameter or a new version to the client equipment, a heartbeat package is sent to the client equipment after the modification configuration parameter or the new version is sent to indicate that the modification configuration parameter or the new version is sent, the client backs up the original parameter or the original version after receiving the modification configuration parameter or the new version, the client equipment sends the heartbeat package to the server after the backup is finished to indicate that the modification configuration parameter or the new version is received and the original parameter or the original version is backed up, and the client equipment modifies the received configuration parameter or installs the new version after the heartbeat is sent;
(3) client device islanding detection
After the client equipment modifies the received configuration parameters or installs a new version in the step (2), if the client equipment does not receive heartbeat packets sent by the server continuously for multiple times, the disconnection of a direction link from the server to the client equipment can be judged, the client equipment starts a reset timer, the time set by the reset timer is 2 hours, and the link is still not recovered within the set time of the reset timer, so that the client equipment is determined to be in an island state;
(4) client device reset and black box information recording
After the client equipment is subjected to island detection through the step (3), if the client is determined to be in an island state, the client equipment backs back the backup parameter data and resets the client equipment to record black box information, the black box information comprises the starting time and the ending absolute time when the heartbeat is lost and the modified configuration parameter and the version information before the reset, a request link between the server and the client equipment is reestablished, the heartbeat package sent by the client equipment and the server is ensured to be stably received and sent, the server makes corresponding modification after analyzing the fault reason, and the configuration parameter modification or version upgrading operation is carried out again.
Referring to fig. 1, the beneficial effects of the present invention are: determining that the server and the client equipment are normally communicated through heartbeat mutual sending detection in the step (1), after the server and the client equipment are normally communicated, sending configuration parameter modification or a new version to the client through the step (2), modifying received configuration parameters or installing the new version by the client equipment, performing island detection on the client equipment with the received configuration parameters or the new version through the step (3), judging whether the client equipment is in an island state, if the client is in the island state, resetting the client equipment and recording black box information through the step (4), and performing corresponding modification after analyzing a fault reason according to the black box information, wherein the whole processing process is simple and efficient, and the operation and maintenance cost is well reduced;
by adopting a mutual heartbeat sending mode, the problem of the disconnection of an uplink link and a downlink link can be more accurately analyzed and positioned, wherein the uplink link refers to a client, and the downlink link refers to a link from a server to client equipment, so that the high-efficiency positioning of the fault can be ensured;
although the client device enters an island, the service provided for the user is normal, and the link with the server is tried to be restored, so that the influence on the user can be reduced to the minimum, and under the condition that hardware has no problem, the device can be reset, the configuration parameters or versions can be modified in a backspacing mode, the link with the server device is built again to restore the operation, and the operation of the device can be restored by a self-healing method.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof. The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned.
Furthermore, it should be understood that although the present description refers to embodiments, not every embodiment may contain only a single embodiment, and such description is for clarity only, and those skilled in the art should integrate the description, and the embodiments may be combined as appropriate to form other embodiments understood by those skilled in the art.