Configuration detection method and device, computer equipment, storage medium and program product
By obtaining the alarm log from the controller and performing configuration detection and verification, the problem of NETCONF accidentally deleted public configurations in the cloud network converged network scenario is solved, and automatic detection of whether public configuration information has been accidentally deleted, improving testing efficiency and quality.
Patent Information
- Application Number
- CN202510350335.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-24
- Publication Date
- 2025-06-10
AI Technical Summary
NETCONF has the problem of accidentally deleting public configurations in the cloud network convergence scenario, which affects normal business and testing efficiency and quality.
A configuration detection method is provided, by obtaining an alarm log from the controller, performing configuration detection based on the alarm information, obtaining initial detection results, and verifying based on the initial detection results, obtaining target detection results, and characterizing whether the public configuration information has been accidentally deleted.
It realizes automatic detection of whether public configuration information has been deleted by mistake, avoids frequent manual logging in to network devices and setting up complex scripts in test cases, and improves testing efficiency and quality.
Smart Images

Figure CN120128475A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of network protocols, and in particular, to a configuration detection method, apparatus, computer device, storage medium, and program product. Background Art
[0002] As a powerful and flexible network configuration protocol, NETCONF (Network Configuration Protocol) is widely used in the current cloud-network integration networking scenario due to its advantages such as high security and high scalability. In actual applications, NETCONF has the problem that incorrect deletion of common configurations may occur due to service rollback on the upper control plane, affecting normal services.
[0003] During network testing, it is necessary to timely detect whether there is a problem of incorrect deletion of common configurations, otherwise it will affect the test efficiency and test quality. Summary of the Invention
[0004] Based on this, in view of the above technical problems, it is necessary to provide a configuration detection method, apparatus, computer device, storage medium, and program product that can improve test efficiency and test instructions.
[0005] In a first aspect, this application provides a configuration detection method, which includes:
[0006] Obtain an alarm log from a controller; where the alarm log includes at least one piece of alarm information such as device information of the network device that triggered the alarm and the alarm time;
[0007] Perform configuration detection based on the alarm information to obtain an initial detection result; where the initial detection result is used to indicate whether the common configuration information has been deleted;
[0008] Perform verification processing based on the initial detection result to obtain a target detection result; the target detection result is used to indicate whether the common configuration information has been incorrectly deleted.
[0009] In one embodiment, performing configuration detection based on the alarm information to obtain an initial detection result includes:
[0010] Obtain the control plane log of the controller within a preset time period according to the alarm information;
[0011] In the case where it is determined from the control plane log that there is a configuration modification operation, parse the alarm log to obtain an initial detection result and the deleted common configuration information.
[0012] In one embodiment, performing verification processing based on the initial detection result to obtain a target detection result includes:
[0013] Find the original public configuration information that matches the deleted public configuration information from the system database;
[0014] In the case where the original public configuration information is found, call the control plane interface of the controller for reconfiguration;
[0015] Detect whether the alarm is eliminated after reconfiguration to obtain the target detection result.
[0016] In one embodiment, detecting whether the alarm is eliminated after reconfiguration to obtain the target detection result includes:
[0017] Obtain the alarm log after reconfiguration;
[0018] Detect whether the alarm is eliminated according to the alarm log after reconfiguration to obtain the target detection result.
[0019] In one embodiment, the method further includes:
[0020] Obtain the control plane log of the controller, and determine the original public configuration information according to the control plane log;
[0021] Store the original public configuration information into the system database.
[0022] In one embodiment, the method further includes:
[0023] Generate a configuration detection record, and store the configuration detection record into the system database; wherein, the configuration detection record includes multiple items such as alarm time, alarm content, controller configuration modification content, whether it involves public configuration information, public configuration information, associated network devices, whether it is reconfigured, whether the alarm is eliminated, whether it is deleted after reconfiguration, and whether there is a mis-deletion.
[0024] In a second aspect, the present application further provides a configuration detection device, and the device includes:
[0025] An alarm log acquisition module, configured to acquire an alarm log from the controller; wherein, the alarm log includes at least one piece of alarm information such as device information of the network device that triggers the alarm and the alarm time;
[0026] A configuration detection module, configured to perform configuration detection according to the alarm information to obtain an initial detection result; wherein, the initial detection result is used to characterize whether the public configuration information is deleted;
[0027] A verification module, configured to perform verification processing based on the initial detection result to obtain a target detection result; the target detection result is used to characterize whether the public configuration information is mis-deleted.
[0028] In a third aspect, the present application further provides a computer device, including a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0029] Obtain an alarm log from a controller; wherein, the alarm log includes at least one piece of alarm information such as device information of a network device that triggers the alarm and the alarm time;
[0030] Perform configuration detection according to the alarm information to obtain an initial detection result; wherein, the initial detection result is used to indicate whether the public configuration information has been deleted;
[0031] Perform verification processing based on the initial detection result to obtain a target detection result; the target detection result is used to indicate whether the public configuration information has been accidentally deleted.
[0032] In a fourth aspect, the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:
[0033] Obtain an alarm log from a controller; wherein, the alarm log includes at least one piece of alarm information such as device information of a network device that triggers the alarm and the alarm time;
[0034] Perform configuration detection according to the alarm information to obtain an initial detection result; wherein, the initial detection result is used to indicate whether the public configuration information has been deleted;
[0035] Perform verification processing based on the initial detection result to obtain a target detection result; the target detection result is used to indicate whether the public configuration information has been accidentally deleted.
[0036] In a fifth aspect, the present application further provides a computer program product, including a computer program. When the computer program is executed by a processor, the following steps are implemented:
[0037] Obtain an alarm log from a controller; wherein, the alarm log includes at least one piece of alarm information such as device information of a network device that triggers the alarm and the alarm time;
[0038] Perform configuration detection according to the alarm information to obtain an initial detection result; wherein, the initial detection result is used to indicate whether the public configuration information has been deleted;
[0039] Perform verification processing based on the initial detection result to obtain a target detection result; the target detection result is used to indicate whether the public configuration information has been accidentally deleted.
[0040] The above configuration detection method, device, computer device, storage medium and program product obtain an alarm log from a controller, where the alarm log includes at least one piece of alarm information such as device information of a network device that triggers an alarm and an alarm time; perform configuration detection based on the alarm information to obtain an initial detection result; perform verification processing based on the initial detection result to obtain a target detection result; where the target detection result is used to indicate whether public configuration information has been accidentally deleted. The embodiments of the present application can automatically detect whether public configuration information has been accidentally deleted, without the need for manual frequent logging in to the network device to check whether the public configuration information has been accidentally deleted, nor the need to set a script for checking the public configuration information in the test case. Therefore, the test efficiency and test quality can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following will briefly introduce the drawings required for use in the description of the embodiments or related technologies. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0042] Figure 1 It is an application environment diagram of the configuration detection method in an embodiment;
[0043] Figure 2 It is a flowchart of the configuration detection method in an embodiment;
[0044] Figure 3 It is a flowchart of the configuration detection steps in an embodiment;
[0045] Figure 4 It is a flowchart of the verification processing steps in an embodiment;
[0046] Figure 5 It is a flowchart of the steps for detecting whether the alarm is eliminated after reconfiguration in an embodiment;
[0047] Figure 6 It is a flowchart of the steps for storing the original public configuration information in an embodiment;
[0048] Figure 7 It is a structural block diagram of the configuration detection device in an embodiment;
[0049] Figure 8 It is an internal structure diagram of a computer device in an embodiment. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0050] In order to make the objectives, technical solutions, and advantages of the present application clearer and more understandable, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0051] Before specifically introducing the technical solutions of the embodiments of the present disclosure, the technical background or the technical evolution context based on which the embodiments of the present disclosure are described will be introduced first. As a powerful and flexible network configuration protocol, NETCONF (Network Configuration Protocol) is widely used in the current cloud-network integration networking scenario due to its advantages such as high security and high scalability. In the SDN (Software Defined Network) architecture, the controller needs to communicate with the underlying network devices to achieve flexible control and management of network traffic. NETCONF can be used as one of the communication protocols between the controller and the network devices to transmit configuration information and instructions, enabling the controller to dynamically configure the forwarding rules of the network devices, etc.
[0052] In practical applications, NETCONF has problems such as occupying the CPU (Central Processing Unit) and memory of network devices, deadlocks, and network instability. These problems are likely to lead to configuration failures and business rollbacks on the upper control plane, and the business rollback may cause the accidental deletion of public configuration information, affecting normal business.
[0053] During network testing, it is necessary to promptly detect whether there is a problem of accidental deletion of public configuration information. Currently, for different testing methods, the configuration detection methods are also different. For example, in manual testing, it is necessary to frequently log in to the network devices to check whether the public configuration information has been accidentally deleted. In automated testing, all test cases need to include scripts for checking public configuration information, resulting in complex and redundant scripts and high maintenance costs. The above configuration detection methods all have problems of low testing efficiency and low testing quality.
[0054] In response to the above problems, the embodiments of the present application provide a configuration detection method. The method obtains an alarm log from the controller, and the alarm log includes at least one piece of alarm information such as the device information of the network device that triggers the alarm and the alarm time; performs configuration detection based on the alarm information to obtain an initial detection result; performs verification processing based on the initial detection result to obtain a target detection result; where the target detection result is used to indicate whether the public configuration information has been accidentally deleted. The embodiments of the present application can automatically detect whether the public configuration information has been accidentally deleted, without the need for manual frequent login to the network devices to check whether the public configuration information has been accidentally deleted, nor the need to set scripts for checking public configuration information in test cases. Therefore, the testing efficiency and testing quality can be improved.
[0055] The configuration detection method provided by the embodiments of this application can be applied to an application environment as shown in Figure 1 the following figure. This application environment includes a server 101, an SDN controller 102, and multiple network devices 103. Among them, the server 101, the SDN controller 102, and the multiple network devices 103 can communicate through a network. The data storage system can store the data that the server 101 needs to process, such as the original public configuration information, the device information of the network devices, the configuration detection records, etc. The data storage system can be integrated on the server 101, or placed on the cloud or other network servers. The server 101 can obtain the control plane logs and alarm logs from the SDN controller 102, and determine whether the public configuration information has been accidentally deleted according to the alarm logs. The server 101 and the SDN controller 102 can be implemented by independent servers or a server cluster composed of multiple servers. The above network devices 103 can include, but are not limited to, various gateways, routers, and computer devices, etc.
[0056] In an exemplary embodiment, as shown in Figure 2 the following figure, a configuration detection method is provided. Taking the server in Figure 1 as an example, the method includes the following steps:
[0057] Step 201, obtain the alarm log from the controller.
[0058] Among them, the alarm log includes at least one alarm information of the device information of the network device that triggers the alarm and the alarm time; the device information can include device identification, device type, device port, etc.
[0059] The SDN controller communicates with multiple network devices through a network. After the network device triggers an alarm, it can send alarm information such as device information and alarm time to the SDN control. The SDN controller receives the alarm information and generates an alarm log according to the alarm information.
[0060] The server communicates with the SDN controller through a network and obtains the alarm log from the SDN controller. After that, the server can parse and process the alarm log to obtain the device information and alarm time of the network device that triggers the alarm.
[0061] Step 202, perform configuration detection according to the alarm information to obtain an initial detection result.
[0062] Among them, the initial detection result is used to characterize whether the common configuration information has been deleted. The common configuration information is the configuration information shared by multiple network devices, and the common configuration information includes, but is not limited to, default route, ARP (Address Resolution Protocol), interface configuration, BGP (Border Gateway Protocol), and security policy, etc.
[0063] After the server obtains the alarm information, it can obtain the configuration modification information corresponding to the alarm information, determine whether the common configuration information has been deleted according to the configuration modification information, and obtain the initial detection result.
[0064] For example, obtain the first configuration modification information according to the device information of the network device that triggers the alarm, and then screen the first configuration modification information according to the alarm time to obtain the second configuration modification information corresponding to the alarm time. Check whether there is relevant information indicating that the common configuration information has been deleted in the second configuration modification information to obtain the initial detection result.
[0065] Step 203, perform verification processing based on the initial detection result to obtain the target detection result.
[0066] Among them, the target detection result is used to characterize whether the common configuration information has been accidentally deleted.
[0067] If the initial detection result indicates that the common configuration information has been deleted, verify whether the alarm information is caused by the deletion of the common configuration information. If the alarm information is caused by the deletion of the common configuration information, obtain the target detection result that the common configuration information has been accidentally deleted. If the alarm information is not caused by the deletion of the common configuration information, obtain the target detection result that the common configuration information has not been accidentally deleted.
[0068] In the above embodiment, obtain the alarm log from the controller, and the alarm log includes at least one piece of alarm information such as the device information of the network device that triggers the alarm and the alarm time; perform configuration detection according to the alarm information to obtain the initial detection result; perform verification processing based on the initial detection result to obtain the target detection result; among them, the target detection result is used to characterize whether the common configuration information has been accidentally deleted. The embodiment of the present application can automatically detect whether the common configuration information has been accidentally deleted, without the need for manual frequent login to the network device to check whether the common configuration information has been accidentally deleted, nor the need to set a script for checking the common configuration information in the test case. Therefore, the test efficiency and test quality can be improved.
[0069] In an exemplary embodiment, as Figure 3 shown, in the above embodiment, "perform configuration detection according to the alarm information to obtain the initial detection result" may include the following steps:
[0070] Step 301: Obtain the control plane logs of the controller within a preset time period according to the alarm information.
[0071] Among them, the control plane logs include the relevant records of the SDN controller's operations and configurations on each network device.
[0072] The alarm information includes the device information of the network device that triggers the alarm, the alarm time, etc. The server obtains the control plane logs including the network device that triggers the alarm from the SDN controller according to the device information; and filters out the control plane logs within the preset time period from the control plane logs according to the alarm time.
[0073] For example, if the network device that triggers the alarm is A and the alarm time is xx:xx:xx, the server can obtain the control plane logs from the SDN controller that contain relevant operations on the network device A and are within 1 minute based on the alarm time xx:xx:xx.
[0074] It should be noted that the preset time period can also be 2 minutes, 5 minutes, etc. The embodiments of the present application do not limit this and can be designed according to the actual situation.
[0075] Step 302: When it is determined that there is a configuration modification operation according to the control plane logs, perform parsing processing on the alarm logs to obtain the initial detection result and the deleted common configuration information.
[0076] Parse the obtained control plane logs to determine whether there is a configuration modification operation from the records of the control plane logs; if there is a configuration modification operation, perform parsing processing on the alarm logs to determine the deleted common configuration information from the records of the alarm logs, and obtain the initial detection result that the common configuration information is deleted.
[0077] If there is no configuration modification operation in the records of the control plane logs, determine the initial detection result that the common configuration information is not deleted, and ignore this alarm information in the alarm logs.
[0078] In the above embodiments, the control plane logs of the controller within a preset time period are obtained according to the alarm information; when it is determined that there is a configuration modification operation according to the control plane logs, perform parsing processing on the alarm logs to obtain the initial detection result and the deleted common configuration information. The embodiments of the present application can initially detect whether there is a configuration modification operation based on the control plane logs, providing support for detecting whether the common configuration information is accidentally deleted.
[0079] In an exemplary embodiment, as Figure 4 shown, the above embodiment of "performing verification processing based on the initial detection result to obtain the target detection result" may include the following steps:
[0080] Step 401: Search for the original public configuration information that matches the deleted public configuration information from the system database.
[0081] Multiple original public configuration information are pre-stored in the system database. After the server determines the deleted public configuration information, it searches in the system database to check if there is any original public configuration information that matches the deleted public configuration information.
[0082] If no original public configuration information that matches the deleted public configuration information is found, the alarm information in the alarm log is ignored.
[0083] Step 402: In the case where the original public configuration information is found, call the control plane interface of the controller for reconfiguration.
[0084] If original public configuration information that matches the deleted public configuration information is found, the SDN controller is made to reconfigure the public configuration information for the network device through the corresponding control plane interface.
[0085] Step 403: Detect whether the alarm is eliminated after reconfiguration to obtain the target detection result.
[0086] After reconfiguring the public configuration information, the server detects whether the alarm triggered after the public configuration information is deleted is eliminated. If the alarm is eliminated, indicating that the alarm is caused by the deletion of the public configuration information, the target detection result that the public configuration information is accidentally deleted is obtained. If the alarm is not eliminated, indicating that the alarm is not caused by the deletion of the public configuration information, the target detection result that the public configuration information is not accidentally deleted is obtained.
[0087] In some embodiments, in the case where the target detection result indicates that the public configuration information is accidentally deleted, it is detected whether there are defects in the version of the public configuration information. If there are defects, the public configuration information is updated.
[0088] In some embodiments, in the case where the target detection result indicates that the public configuration information is not accidentally deleted, the reconfigured public configuration information is deleted.
[0089] In the above embodiments, the original public configuration information that matches the deleted public configuration information is searched for from the system database; in the case where the original public configuration information is found, the control plane interface of the controller is called for reconfiguration; it is detected whether the alarm is eliminated after reconfiguration to obtain the target detection result. In the embodiments of the present application, by reconfiguring the public configuration information, it can be verified whether the alarm is caused by the deletion of the public configuration information, thereby obtaining a relatively accurate target detection result.
[0090] In an exemplary embodiment, such as Figure 5As shown, in the above embodiments, "detecting whether the alarm is eliminated after reconfiguration to obtain the target detection result" may include the following steps:
[0091] Step 501: Obtain the alarm log after reconfiguration.
[0092] After reconfiguring the common configuration information, the server obtains the alarm log after reconfiguration from the SDN controller.
[0093] Step 502: Detect whether the alarm is eliminated according to the alarm log after reconfiguration to obtain the target detection result.
[0094] Parse and process the alarm log after reconfiguration to determine whether the alarm in the alarm log after reconfiguration is eliminated. If the alarm is eliminated, obtain the target detection result that the common configuration information has been accidentally deleted. If the alarm is not eliminated, obtain the target detection result that the common configuration information has not been accidentally deleted.
[0095] In the above embodiments, obtain the alarm log after reconfiguration; detect whether the alarm is eliminated according to the alarm log after reconfiguration to obtain the target detection result. In the embodiments of the present application, it is possible to detect whether the alarm is eliminated through the alarm log after reconfiguration, providing support for detecting whether the common configuration information has been accidentally deleted.
[0096] In an exemplary embodiment, as Figure 6 shown, the embodiments of the present application may further include the following steps:
[0097] Step 601: Obtain the control plane log of the controller and determine the original common configuration information according to the control plane log.
[0098] A log collection system may be pre-deployed in the SDN controller, and log collection items are configured through this log collection system. Among them, the log collection items are various configuration items and operation items that need to be collected for the log, including but not limited to routing, ARP, interface configuration, BGP configuration, security policies, etc.
[0099] The diary collection system collects information according to the log collection items and generates the control plane log. The server communicates with the SDN controller to obtain the control plane log from the SDN controller. Then, parse and process the control plane log to obtain the original common configuration information recorded in the control plane log.
[0100] Step 602: Store the original common configuration information in the system database.
[0101] In the above embodiments, the control plane logs of the controller are obtained, and the original common configuration information is determined according to the control plane logs; the original common configuration information is stored in the system database. In the embodiments of the present application, relying on the log collection and cleaning system to collect and store the common configuration information on the network device in the database provides a basis for verifying whether the common configuration information is accidentally deleted.
[0102] In an exemplary embodiment, the embodiments of the present application may further include: generating a configuration detection record and storing the configuration detection record in the system database.
[0103] Among them, the configuration detection record includes multiple types such as alarm time, alarm content, controller configuration modification content, whether it involves common configuration information, common configuration information, associated network devices, whether to reconfigure, whether the alarm is eliminated, whether to delete after reconfiguration, and whether there is accidental deletion.
[0104] After obtaining the target detection result, a configuration detection record is generated according to the target detection result. Then, the configuration detection record is stored in the system database. Subsequently, the configuration detection record can be queried from the system database, or the configuration detection record can be exported, and a detection report can be generated according to the configuration detection record, etc.
[0105] In the embodiments of the present application, generating a configuration detection record and storing the configuration detection record in the system database provides support for subsequent querying of detection results.
[0106] In an exemplary embodiment, a configuration detection method is provided. Taking the server in which this method is applied as an example for illustration, it includes the following steps: Figure 1 as follows:
[0107] Step 1, obtain the control plane logs of the controller, and determine the original common configuration information according to the control plane logs.
[0108] Step 2, store the original common configuration information in the system database.
[0109] Step 3, obtain the alarm logs from the controller.
[0110] Among them, the alarm logs include at least one alarm information such as the device information of the network device that triggers the alarm and the alarm time.
[0111] Step 4, obtain the control plane logs of the controller within a preset period according to the alarm information.
[0112] Step 5, in the case of determining that there is a configuration modification operation according to the control plane logs, perform parsing processing on the alarm logs to obtain an initial detection result and the deleted common configuration information.
[0113] Step 6: Search for the original common configuration information that matches the deleted common configuration information in the system database.
[0114] Step 7: In the case where the original common configuration information is found, call the control plane interface of the controller for reconfiguration.
[0115] Step 8: Obtain the alarm log after reconfiguration; detect whether the alarm is eliminated based on the alarm log after reconfiguration to obtain the target detection result.
[0116] Step 9: Generate a configuration detection record and store the configuration detection record in the system database.
[0117] The embodiments of the present application can automatically detect whether the common configuration information is accidentally deleted, without the need for manual frequent logging in to the network device to check whether the common configuration information is accidentally deleted, nor the need to set a script for checking the common configuration information in the test case. Therefore, the test efficiency and test quality can be improved.
[0118] It should be understood that although the steps in the flowcharts involved in the above-described embodiments are sequentially shown according to the indication of the arrows, these steps do not necessarily need to be executed sequentially in the order indicated by the arrows. Unless there is a clear description in this article, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-described embodiments may include multiple steps or multiple stages, and these steps or stages do not necessarily need to be executed at the same moment, but can be executed at different moments, and the execution order of these steps or stages does not necessarily need to be sequential, but can be executed alternately or alternately with at least a part of other steps or steps or stages in other steps.
[0119] Based on the same inventive concept, the embodiments of the present application also provide a configuration detection device for implementing the above-mentioned configuration detection method. The implementation solution provided by this device for solving problems is similar to the implementation solution described in the above method. Therefore, the specific limitations in one or more of the following configuration detection device embodiments can refer to the limitations on the configuration detection method in the above text, and will not be repeated here.
[0120] In an exemplary embodiment, as Figure 7 shown, a configuration detection device is provided, including:
[0121] An alarm log acquisition module 701, configured to acquire an alarm log from a controller; wherein, the alarm log includes at least one piece of alarm information such as device information of a network device that triggers the alarm and the alarm time;
[0122] Configure a detection module 702 to perform configuration detection based on the alarm information to obtain an initial detection result; wherein, the initial detection result is used to indicate whether the public configuration information has been deleted;
[0123] A verification module 703 is used to perform verification processing based on the initial detection result to obtain a target detection result; the target detection result is used to indicate whether the public configuration information has been misdeleted.
[0124] In one embodiment, the configuration detection module 702 is specifically configured to obtain the control plane log of the controller within a preset time period according to the alarm information; in the case where it is determined from the control plane log that there is a configuration modification operation, parse the alarm log to obtain the initial detection result and the deleted public configuration information.
[0125] In one embodiment, the verification module 703 is specifically configured to find the original public configuration information that matches the deleted public configuration information from the system database; in the case where the original public configuration information is found, call the control plane interface of the controller to perform reconfiguration; detect whether the alarm is eliminated after reconfiguration to obtain the target detection result.
[0126] In one embodiment, the verification module 703 is specifically configured to obtain the alarm log after reconfiguration; detect whether the alarm is eliminated according to the alarm log after reconfiguration to obtain the target detection result.
[0127] In one embodiment, the device further includes:
[0128] A control plane log acquisition module is used to obtain the control plane log of the controller and determine the original public configuration information according to the control plane log;
[0129] A configuration information storage module is used to store the original public configuration information in the system database.
[0130] In one embodiment, the device further includes:
[0131] A detection record storage module is used to generate a configuration detection record and store the configuration detection record in the system database; wherein, the configuration detection record includes multiple items such as alarm time, alarm content, controller configuration modification content, whether it involves public configuration information, public configuration information, associated network devices, whether reconfiguration is performed, whether the alarm is eliminated, whether it is deleted after reconfiguration, and whether there is misdeletion.
[0132] Each module in the above configuration detection device can be implemented in whole or in part by software, hardware, or a combination thereof. Each of the above modules can be embedded in the processor of the computer device in hardware form or be independent of it, or can be stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each of the above modules.
[0133] In an exemplary embodiment, a computer device is provided. The computer device can be a server, and its internal structure diagram can be as Figure 8 shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, abbreviated as I / O), and a communication interface. Among them, the processor, the memory, and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store configuration detection data. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with external terminals through a network connection. When the computer program is executed by the processor, it implements a configuration detection method.
[0134] Those skilled in the art can understand that Figure 8 the structure shown in
[0135] is only a block diagram of some structures related to the solution of this application, and does not constitute a limitation on the computer device to which the solution of this application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have a different component layout.
[0136] Obtain an alarm log from the controller; where the alarm log includes at least one piece of alarm information such as the device information of the network device that triggers the alarm and the alarm time;
[0137] Perform configuration detection according to the alarm information to obtain an initial detection result; where the initial detection result is used to characterize whether the common configuration information has been deleted;
[0138] Perform verification processing based on the initial detection result to obtain a target detection result; the target detection result is used to characterize whether the common configuration information has been accidentally deleted.
[0139] In one embodiment, when the processor executes the computer program, the following steps are further implemented:
[0140] Obtain the control plane log of the controller within a preset time period according to the alarm information;
[0141] In the case where it is determined from the control plane log that there is a configuration modification operation, parse and process the alarm log to obtain an initial detection result and the deleted common configuration information.
[0142] In one embodiment, when the processor executes the computer program, the following steps are further implemented:
[0143] Search the system database for the original common configuration information that matches the deleted common configuration information;
[0144] In the case where the original common configuration information is found, call the control plane interface of the controller for reconfiguration;
[0145] Detect whether the alarm is eliminated after reconfiguration to obtain a target detection result.
[0146] In one embodiment, when the processor executes the computer program, the following steps are further implemented:
[0147] Obtain the alarm log after reconfiguration;
[0148] Detect whether the alarm is eliminated according to the alarm log after reconfiguration to obtain a target detection result.
[0149] In one embodiment, when the processor executes the computer program, the following steps are further implemented:
[0150] Obtain the control plane log of the controller, and determine the original common configuration information according to the control plane log;
[0151] Store the original common configuration information in the system database.
[0152] In one embodiment, when the processor executes the computer program, the following steps are further implemented:
[0153] Generate a configuration detection record, and store the configuration detection record in the system database; wherein, the configuration detection record includes multiple items such as alarm time, alarm content, controller configuration modification content, whether it involves common configuration information, common configuration information, associated network devices, whether it is reconfigured, whether the alarm is eliminated, whether it is deleted after reconfiguration, and whether there is a misdeletion.
[0154] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:
[0155] Obtain the alarm log from the controller; wherein, the alarm log includes at least one piece of alarm information such as the device information of the network device that triggers the alarm and the alarm time;
[0156] Perform configuration detection based on the alarm information to obtain an initial detection result; wherein, the initial detection result is used to indicate whether the common configuration information has been deleted;
[0157] Perform verification processing based on the initial detection result to obtain a target detection result; the target detection result is used to indicate whether the common configuration information has been accidentally deleted.
[0158] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented:
[0159] Obtain the control plane log of the controller within a preset time period according to the alarm information;
[0160] In the case where it is determined from the control plane log that there is a configuration modification operation, perform parsing processing on the alarm log to obtain an initial detection result and the deleted common configuration information.
[0161] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented:
[0162] Search in the system database for the original common configuration information that matches the deleted common configuration information;
[0163] In the case where the original common configuration information is found, call the control plane interface of the controller for reconfiguration;
[0164] Detect whether the alarm is eliminated after reconfiguration to obtain a target detection result.
[0165] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented:
[0166] Obtain the alarm log after reconfiguration;
[0167] Detect whether the alarm is eliminated according to the alarm log after reconfiguration to obtain a target detection result.
[0168] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented:
[0169] Obtain the control plane log of the controller, and determine the original common configuration information according to the control plane log;
[0170] Store the original common configuration information into the system database.
[0171] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented:
[0172] Generate a configuration detection record and store the configuration detection record in the system database; wherein, the configuration detection record includes multiple items such as the alarm time, alarm content, controller configuration modification content, whether it involves public configuration information, public configuration information, associated network devices, whether to reconfigure, whether the alarm is eliminated, whether to delete after reconfiguration, and whether there is accidental deletion.
[0173] In one embodiment, a computer program product is provided, including a computer program which, when executed by a processor, implements the following steps:
[0174] Obtain an alarm log from the controller; wherein, the alarm log includes at least one piece of alarm information such as the device information of the network device that triggered the alarm and the alarm time;
[0175] Perform configuration detection based on the alarm information to obtain an initial detection result; wherein, the initial detection result is used to characterize whether the public configuration information has been deleted;
[0176] Perform verification processing based on the initial detection result to obtain a target detection result; the target detection result is used to characterize whether the public configuration information has been accidentally deleted.
[0177] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented:
[0178] Obtain the control plane log of the controller within a preset time period according to the alarm information;
[0179] In the case of determining that there is a configuration modification operation according to the control plane log, parse the alarm log to obtain an initial detection result and the deleted public configuration information.
[0180] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented:
[0181] Search for the original public configuration information that matches the deleted public configuration information in the system database;
[0182] In the case of finding the original public configuration information, call the control plane interface of the controller to perform reconfiguration;
[0183] Detect whether the alarm is eliminated after reconfiguration to obtain a target detection result.
[0184] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented:
[0185] Obtain the alarm log after reconfiguration;
[0186] Detect whether the alarm is eliminated according to the alarm log after reconfiguration to obtain a target detection result.
[0187] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:
[0188] Obtain the control plane log of the controller, and determine the original common configuration information according to the control plane log;
[0189] Store the original common configuration information in the system database.
[0190] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:
[0191] Generate a configuration detection record, and store the configuration detection record in the system database; wherein, the configuration detection record includes multiple items such as alarm time, alarm content, controller configuration modification content, whether it involves common configuration information, common configuration information, associated network devices, whether reconfiguration is performed, whether the alarm is eliminated, whether it is deleted after reconfiguration, and whether there is accidental deletion.
[0192] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use, and processing of relevant data need to comply with relevant regulations.
[0193] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, database, or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memories. Non-volatile memories can include read-only memory (ROM), magnetic tapes, floppy disks, flash memories, optical memories, high-density embedded non-volatile memories, resistive random access memories (ReRAMs), magnetoresistive random access memories (MRAMs), ferroelectric random access memories (FRAMs), phase change memories (PCMs), graphene memories, etc. Volatile memories can include random access memory (RAM) or external cache memories, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The databases involved in the embodiments provided in the present application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. The processors involved in the embodiments provided in the present application can be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logics, data processing logics based on quantum computing, etc., without limitation.
[0194] The technical features of the above embodiments can be combined arbitrarily. For the sake of concise description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope described in this specification.
[0195] The above-described embodiments merely represent several implementation manners of the present application. Their descriptions are relatively specific and detailed, but they should not be construed as limiting the patent scope of the present application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.
Claims
1. A configuration detection method, characterized in that: The method comprises: Acquire an alarm log from the controller; wherein the alarm log includes device information of the network device that triggers the alarm and at least one alarm information of the alarm time; Performing configuration detection according to the alarm information to obtain an initial detection result; wherein the initial detection result is used to indicate whether the public configuration information is deleted; A verification process is performed based on the initial detection result to obtain a target detection result; the target detection result is used to indicate whether the public configuration information is deleted by mistake.
2. The method according to claim 1, characterized in that The performing configuration detection according to the alarm information to obtain an initial detection result includes: Acquire a control plane log of the controller within a preset period of time according to the alarm information; When it is determined according to the control plane log that there is a configuration modification operation, the alarm log is parsed to obtain the initial detection result and the deleted public configuration information.
3. The method according to claim 2, characterized in that The verification process is performed based on the initial detection result to obtain the target detection result, including: Searching the system database for original public configuration information that matches the deleted public configuration information; In case the original public configuration information is found, calling the control plane interface of the controller for reconfiguration; After the reconfiguration, whether the alarm is eliminated is detected, and the target detection result is obtained.
4. The method according to claim 3, characterized in that The detection of whether the alarm is eliminated after the reconfiguration, and obtaining the target detection result, include: Get the alarm log after reconfiguration; The target detection result is obtained by detecting whether the alarm is eliminated according to the reconfigured alarm log.
5. The method according to claim 3, characterized in that: The method further comprises: Obtaining a control plane log of the controller, and determining the original public configuration information according to the control plane log; The original public configuration information is stored in the system database.
6. The method according to claim 3, characterized in that: The method further comprises: Generate a configuration detection record and store the configuration detection record in the system database; wherein the configuration detection record includes the alarm time, alarm content, controller configuration modification content, whether public configuration information is involved, public configuration information, associated network equipment, whether to reconfigure, whether the alarm is eliminated, whether it is deleted after reconfiguration, and whether there is a mistaken deletion.
7. A configuration detection device, characterized in that: The device comprises: An alarm log acquisition module is used to obtain an alarm log from a controller; wherein the alarm log includes at least one alarm information of the device information of the network device that triggers the alarm and the alarm time; A configuration detection module, used to perform configuration detection according to the alarm information to obtain an initial detection result; wherein the initial detection result is used to indicate whether the public configuration information is deleted; A verification module is used to perform verification processing based on the initial detection result to obtain a target detection result; the target detection result is used to indicate whether the public configuration information is deleted by mistake.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.