Disclosure of Invention
The invention mainly aims to provide an intelligent monitoring method and device for maintenance behaviors and a computer readable storage medium, and aims to solve the technical problem of comprehensive control of permission, authority and behaviors of the maintenance behaviors in the IT equipment maintenance process.
In order to achieve the above object, the present invention provides an intelligent monitoring method for maintenance activities, comprising:
closing a communication channel between a maintenance tool and a terminal device to prohibit the maintenance tool from maintaining the terminal device;
acquiring the identity information of the maintenance tool, and judging whether the identity information meets the maintenance permission condition;
when the identity information meets the maintenance permission condition, the maintenance permission state of the maintenance tool is set to a permission state;
when the maintenance tool is in a permission state, adding the address data of the maintenance tool into an address white list, and opening the communication channel according to the address white list and preset authority data so as to allow the maintenance equipment to maintain each terminal device in an authority range;
when the maintenance tool is in a permission state, the permission state of the maintenance tool is maintained in real time, and the record state and the maintenance permission state of the maintenance behavior of the maintenance tool are monitored in real time;
judging whether the maintenance tool meets a management and control condition in real time according to the maintenance permission state, the recording state of the maintenance behavior and the maintenance authority state;
when the maintenance tool does not meet the control conditions, closing a communication channel between the maintenance tool and the terminal equipment;
the step when the maintenance tool does not satisfy the regulation and control condition specifically includes:
when maintaining the permission status of the maintenance tool fails; or;
when the maintenance authority state is an override state; or;
when the recording state is a non-acquirable state.
Preferably, the step of closing the communication channel between the maintenance tool and the terminal device specifically includes:
and respectively connecting the maintenance tool and the terminal equipment to different virtual local area networks which are isolated from each other.
Preferably, the step of closing the communication channel between the maintenance tool and the terminal device specifically includes:
and removing the addresses of the maintenance tools which do not meet the management and control requirements from the white list addresses.
Preferably, the step of maintaining the permission state of the maintenance tool in real time when the maintenance permission state of the maintenance tool is in the permission state specifically includes:
and when the maintenance permission state of the maintenance tool is in the permission state, acquiring the record data of the maintenance data packet which is mutually transmitted with the maintenance tool to maintain the permission state so as to maintain the maintenance tool to be in the permission state.
Preferably, the step of determining whether the maintenance tool meets the management and control requirement in real time according to the maintenance permission status, the record status of the maintenance behavior, and the maintenance permission status specifically includes:
respectively generating an authority access list and an actual access list according to the authority data and the maintenance behavior;
judging whether the number of times that the access list is an empty set is greater than M1 in a preset period; or;
judging whether the number of times that the actual access list is an empty set is greater than M2 in a preset period; or;
judging whether the difference set of the authority access list and the actual access list is an empty set or not;
the step when the maintenance authority state is the override state specifically includes:
when the number of times that the authority access list is an empty set is more than M1; or;
when the number of times that the actual access list is an empty set is more than M2; or;
when the difference between the authorized access list and the actual access list is an empty set.
Preferably, the step of determining whether the maintenance tool meets the management and control requirement in real time according to the maintenance permission status, the record status of the maintenance behavior, and the maintenance permission status specifically includes:
recording the maintenance behavior as stored data;
judging whether the stored data is an empty set or not; or;
judging whether the number of times of the stored data being empty sets is greater than M3 in a preset period;
the step of when the recording status is the status unable to be acquired specifically includes:
the storage data is an empty set; or;
the number of times that the stored data is an empty set is greater than M3 in a preset period.
Preferably, before the step of closing the communication channel between the maintenance tool and the terminal device, the method further includes:
initializing application data of a maintenance tool to provide a stable network address to the maintenance tool;
or, after the step of closing the communication channel between the maintenance tool and the terminal device, the method further includes:
and acquiring the application initialization data of the maintenance tool through a link layer.
Preferably, before the obtaining the identity information of the maintenance tool and determining whether the identity information meets the authentication condition, the method further includes:
the maintenance tool periodically receives application data from the link layer.
In order to solve the above technical problem, the present invention further provides an intelligent monitoring apparatus for a maintenance behavior, where the intelligent monitoring apparatus includes a tool interface connected to a maintenance tool, a network interface connected to a terminal device, a memory, a processor, and a computer program stored in the memory, and when the computer program is executed by the processor, the steps of the intelligent monitoring method for a maintenance behavior are implemented.
In order to solve the above technical problem, the present invention further provides a computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, and when being executed by a processor, the computer program implements the steps of the intelligent monitoring method for maintenance activities.
The invention provides an intelligent monitoring method of maintenance behaviors, which is characterized in that a communication channel between a maintenance tool and a terminal device is closed to prohibit the maintenance tool from maintaining the terminal device; acquiring the identity information of the maintenance tool, and judging whether the identity information meets the maintenance permission condition; when the identity information meets the maintenance permission condition, the maintenance permission state of the maintenance tool is set to a permission state; when the maintenance tool is in a permission state, adding the address data of the maintenance tool into an address white list, and opening the communication channel according to the address white list and preset authority data so as to allow the maintenance equipment to maintain each terminal device in an authority range; when the maintenance tool is in a permission state, the permission state of the maintenance tool is maintained in real time, and the record state and the maintenance permission state of the maintenance behavior of the maintenance tool are monitored in real time; judging whether the maintenance tool meets a management and control condition in real time according to the maintenance permission state, the recording state of the maintenance behavior and the maintenance authority state; when the maintenance tool does not meet the control conditions, closing a communication channel between the maintenance tool and the terminal equipment; the step when the maintenance tool does not satisfy the regulation and control condition specifically includes: when maintaining the permission status of the maintenance tool fails; or; when the maintenance authority state is an override state; or; when the recording state is a non-acquirable state. Therefore, potential safety hazards such as illegal intrusion, misoperation, unauthorized maintenance, malicious damage to equipment and systems and the like in the process of maintaining the IT equipment are eliminated, and the technical problem of safe and intelligent management and control of maintenance behaviors in the process of maintaining the IT equipment is solved.
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.
The invention provides an intelligent monitoring method for maintenance behaviors.
First embodiment
In this embodiment, the terminal devices are communicatively connected to each other to form a core network.
The application scenario of this embodiment is that the reserved interface of the core network is an unmanaged switch interface and all terminal devices in the core network are in the same subnet.
Or, the reserved interface of the core Network is a managed switch interface, and the reserved interface of the core Network and all terminal devices in the core Network are in the same Virtual Local Area Network (Virtual Local Area Network).
Referring to fig. 1, the intelligent monitoring method for maintenance activities includes:
s10, closing a communication channel between the maintenance tool and the terminal equipment to prohibit the maintenance tool from maintaining the terminal equipment;
specifically, the data exchange module is powered on; in a default state, a data exchange function between an interface connected to the core network reserved interface and an interface connected to the maintenance tool is in a closed state;
loading an outgoing direction mac white list of the management mac address, and starting an outgoing direction white list filtering function;
opening a data exchange function between an interface connected to the core network reservation interface and an interface connected to the maintenance tool.
The function of this step is: and preventing an out-of-control time window from occurring before the power-on is carried out and the service is started, so that the unauthorized maintenance tool can invade the core network by using the out-of-control time window.
S20, acquiring the identity information of the maintenance tool and judging whether the identity information meets the maintenance permission condition;
s30, when the identity information accords with the maintenance permission condition, the maintenance permission state of the maintenance tool is set to a permission state;
when the maintenance tool is in a permission state, adding the address data of the maintenance tool into an address white list, and opening the communication channel according to the address white list and preset authority data so as to allow the maintenance equipment to maintain each terminal device in an authority range;
specifically, if the TCP server is not created or the interception service is not opened, the TCP server is created with the network address of the management and control service, and the interception service is opened.
Establishing a TCP connection with the maintenance tool; receiving identity authentication data from the maintenance tool and preset authority data of the maintenance tool through the TCP connection;
acquiring a public key of the maintenance tool end; generating a random number; encrypting the random number by using the public key of the maintenance tool end to form a random number ciphertext; sending the random number cipher text to the maintenance tool; receiving a random number digital signature sent by the maintenance tool; verifying the random number digital signature by using the public key of the maintenance tool end;
if the result of the verification passes successfully, the result of the authentication of the identity authentication data is fed back as success, and the safe TCP connection between the management and control service and the maintenance tool is successfully established;
otherwise, the feedback result is failure; feeding back an authentication maintenance permission result;
if the result that the identity authentication data is authenticated is successful, the result that the maintenance permission is authenticated is permitted maintenance, otherwise, the result that the maintenance permission is authenticated is prohibited maintenance.
Obtaining a mac address of the maintenance tool at which maintenance is permitted;
temporarily adding the mac address to an outgoing mac whitelist of the data exchange service,
and opening a communication channel between all the maintenance tools which are currently allowed to obtain the maintenance permission and all the terminal equipment which can be accessed only by the maintenance tools.
S40, when the maintenance tool is in the permission state, the permission state of the maintenance tool is maintained in real time, and the recording state and the maintenance authority state of the maintenance behavior of the maintenance tool are monitored in real time;
specifically, the real-time maintaining of the permission status of the maintenance tool may be that a permission status maintaining data packet is mutually sent to and from the maintenance tool in real time. And sending permission state maintenance data packets with the maintenance tool to continuously maintain the safe TCP connection and continuously detect whether the safe TCP connection is disconnected.
Correspondingly, the step of maintaining the permission state of the maintenance tool in real time when the maintenance permission state of the maintenance tool is in the permission state specifically includes:
and when the maintenance permission state of the maintenance tool is in the permission state, acquiring the record data of the maintenance data packet which is mutually transmitted with the maintenance tool to maintain the permission state so as to maintain the maintenance tool to be in the permission state.
S50, judging whether the maintenance tool meets the management and control conditions in real time according to the maintenance permission state, the recording state of the maintenance behavior and the maintenance authority state;
when the maintenance tool does not meet the control conditions, closing a communication channel between the maintenance tool and the terminal equipment; namely, the process proceeds to step S10 again.
The step when the maintenance tool does not satisfy the regulation and control condition specifically includes:
when maintaining the permission status of the maintenance tool fails; or;
when the maintenance authority state is an override state; or;
when the recording state is a non-acquirable state.
Correspondingly, the step S50 specifically includes:
s501, judging whether the maintenance tool is successfully maintained in the permission state or not according to the maintenance permission state;
s502, judging whether the maintenance authority state of the maintenance tool is an override state according to the maintenance behavior and the authority data;
and S503, judging whether the recording state of the maintenance behavior of the maintenance tool is the state which can not be acquired according to the storage condition of the maintenance behavior.
In this embodiment, the step S501, the step S502, and the step S503 may occur simultaneously or sequentially.
When the condition of only one step is not satisfied, the process proceeds to step S10 again.
In other embodiments, there may be only one item in the steps S501, S502, and S503.
In this embodiment, the step S501 may specifically include:
s5011, in the period, acquiring the record data of the data packet which is mutually transmitted with the maintenance tool and maintains the permission state so as to determine the state of the mutually transmitted permission state maintaining data packet;
s5012, determining whether there is an interruption record of the data packet with the status of mutual permission of the maintenance tool in the recorded data.
In this implementation, the recorded data of the maintenance tool mutual-transmission permission state maintenance data packet is used for representing the result of the secure TCP connection; the existence of the interrupt record of the maintenance tool inter-transmission permission state maintaining data packet indicates that the result of detecting the safe TCP connection is disconnection, and at the moment, the result of feeding back the continuous maintenance permission state is failure. And when the interrupt record of the data packet maintained in the state of mutual permission with the maintenance tool does not exist, the feedback result is successful.
In this embodiment, the step S502 specifically includes:
s5021, respectively generating an authority access list and an actual access list according to the authority data and the maintenance behaviors;
in this embodiment, the actual access list may be an IP address list of a terminal device actually accessed by the maintenance tool end, and the permission access list may be an IP address list of a terminal device that the maintenance tool end has permission to access.
S5022, judging whether the number of times that the access list is an empty set is greater than M1 or not in the preset period; or;
the permission list is an empty set, that is, the permission access list is not acquired.
S5023, judging whether the number of times that the actual access list is an empty set is greater than M2 or not in the preset period; or;
the fact that the actual access list is an empty set means that the actual access list is not obtained.
S5024, judging whether the difference set of the permission access list and the actual access list is an empty set.
The difference between the authorized access list and the actual access list is not an empty set, which means that the actual access list contains the IP addresses of a group of access terminals, and the group of IP addresses does not exist in the authorized access list.
In particular, M1 and M2 may be equal to 2.
Correspondingly, the step when the maintenance authority state is the override state specifically includes:
when the number of times that the authority access list is an empty set is more than M1; or;
when the number of times that the actual access list is an empty set is more than M2; or;
when the difference between the authorized access list and the actual access list is an empty set.
In this embodiment, the step S5022, the step S5023 and the step S5024 may occur simultaneously or sequentially.
When the condition of only one step is not satisfied, the process proceeds to step S10 again.
In other embodiments, there may be only one item in the steps S5022, S5023 and S5024.
In this embodiment, the step S503 specifically includes: the method specifically comprises the following steps:
s5031, recording the maintenance action as storage data;
in this embodiment, the storage data may be a value of the maintenance behavior capture state;
in other implementations, the stored data may also be video data of the maintenance activity;
s5032, judging whether the stored data is an empty set; or;
whether the stored data is an empty set or not means that the value of the capturing state of the maintenance behavior indicates that the stored maintenance behavior data is not obtained and recorded currently.
Or, whether the stored data is an empty set means that the video data of the maintenance action does not exist.
S5033, in a preset period, determining whether the number of times that the stored data is an empty set is greater than M3.
In this embodiment, M3 may be equal to 2.
Correspondingly, the step when the recording status is the status unable to be acquired specifically includes:
the storage data is an empty set; or;
the number of times that the stored data is an empty set is greater than M3 in a preset period.
In this embodiment, the step S5032 and the step S5033 may occur simultaneously or sequentially.
When the condition of only one step is not satisfied, the process proceeds to step S10 again.
In other embodiments, there may be only one item in the steps S5032 and S5033.
In an embodiment, the step S10 may specifically include:
and respectively connecting the maintenance tool and the terminal equipment to different virtual local area networks which are isolated from each other.
In another embodiment, the step S10 may specifically include:
and removing the address data of the maintenance tool which does not meet the management and control requirements from the white list address.
In another embodiment, the step S10 may specifically include:
and respectively connecting the maintenance tool and the terminal equipment to different virtual local area networks which are isolated from each other.
And removing the address data of the maintenance tool which does not meet the management and control requirements from the white list address.
Second embodiment
Based on theintelligent monitoring method 100 for maintenance activities provided in the first embodiment of the present invention, the second embodiment of the present invention provides anotherintelligent monitoring method 200 for maintenance activities, wherein the steps S10 to S50 are the same as those in the first embodiment, and are not repeated here, except that:
before the step S10, themethod 200 further includes:
s11, initializing application data of the maintenance tool to provide a stable network address for the maintenance tool;
specifically, the data exchange function is turned off;
acquiring subnet mask data, an authentication service IP address and an authentication service port number from a local storage medium;
judging whether the IP address and the subnet mask of a network adapter executing the authentication service are respectively the same as the IP address and the subnet mask of the authentication service in a local storage medium;
if not, setting the network address of the network adapter executing the authentication service, including the IP address of the authentication service and the subnet mask.
In this embodiment, whether the IP address and the subnet mask of the network adapter executing the authentication service are the same as the IP address and the subnet mask of the authentication service in the local storage medium is determined;
if the authentication service is different, setting the network address of the network adapter executing the authentication service, including the IP address of the authentication service, the port number of the authentication service and the subnet mask, and ensuring to provide a stable network address of the authentication service for a maintenance tool.
Between the step S10 and the step S20, the method further comprises:
s21, the maintenance tool periodically receives application data from the link layer.
Specifically, the link layer application data message is continuously and periodically sent to the maintenance tool;
digitally signing the application data using a private key;
packaging the application data with the digital signature;
packaging the application data with the digital signature into a custom OptionalTLV according with the IEEE 802.3 organization, wherein the TLV type is 127;
writing the tlv to an LLDP link layer data broadcast frame of the interface connected to the maintenance tool;
starting the interface connected to the maintenance tool to periodically and continuously send the LLDP link layer data broadcast messages;
the application data at least comprises: an authentication service IP address, an authentication service port number, an IP address and a subnet mask which are configured by the maintenance tool network adapter;
in this embodiment, by encapsulating the application data into data with a digital signature, the maintenance tool can verify the digital signature after receiving the data, so as to ensure that an interface accessed by the maintenance tool is correct;
the LLDP message connected to the interface of the maintenance tool is continuously sent to the maintenance tool, so that the maintenance tool can be ensured to quickly obtain related application data, repeated authentication work caused by incorrect application data is avoided, and the maintenance efficiency and the user experience are effectively improved.
Third embodiment
Based on theintelligent monitoring method 100 for maintenance activities provided in the first embodiment of the present invention, a third embodiment of the present invention provides anotherintelligent monitoring method 300 for maintenance activities, wherein the steps S10 to S50 are the same as those in the first embodiment, and are not repeated here, except that:
between the step S10 and the step S20, themethod 300 further comprises:
and S22, acquiring the application initialization data of the maintenance tool through the connection layer.
Specifically, whether the maintenance tool exists is detected and judged, and if an interface connected to the maintenance tool is converted from a non-power-on unavailable state to a power-on available state, the maintenance tool exists;
acquiring a link layer LLDP message sent by the maintenance tool;
extracting an Optional TLV with a TLV type of 127;
extracting application initialization data, the application initialization data comprising at least: an authentication server IP address, a subnet mask;
judging whether the IP address and the subnet mask of a network adapter executing the authentication service are respectively the same as the acquired IP address and the subnet mask of the authentication service in the current LLDP message;
if the two are different, the network address of the network adapter executing the authentication service is set as the IP address of the authentication server and the subnet mask;
in the embodiment, the maintenance permission, the maintenance authority and the maintenance behavior of the maintenance tool are controlled, so that the intelligent control strength of the maintenance behavior is improved, the comprehensive control purpose that only the maintenance tool which successfully passes the identity authentication, successfully obtains the maintenance permission, successfully and continuously maintains the maintenance permission, only accesses the terminal equipment in the authority range and can normally obtain the maintenance behavior can maintain the terminal equipment in the core network in the authority range is achieved, the maintenance management cost is effectively reduced, and the safety of the core network is improved.
Referring to fig. 5, the present invention further provides an intelligent monitoring apparatus for maintenance activities, where the intelligent monitoring apparatus includes a tool interface connected to a maintenance tool, a network interface connected to a terminal device, a memory, a processor, and a computer program stored in the memory, and when the computer program is executed by the processor, the steps of the intelligent monitoring method for maintenance activities are implemented.
It can be understood that, in this embodiment, the tool interface is a reserved interface connected to the maintenance tool, and the network interface is a reserved interface connected to the core network.
The invention also provides a computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method for intelligent monitoring of maintenance activities.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.