Automatic verification method and device for illegal configuration of switch and storage medium

By constructing an illegal configuration prompt information table and parsing command line keyword information, combined with device model differences and variable variables, the coupling and error rate problems of illegal configuration prompt information verification in switch automated testing are solved, and the test efficiency and accuracy are improved. sex.

CN118540223APending Publication Date: 2024-08-23INSPUR NETWORK TECH (SHANDONG) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410814733.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-24
Publication Date
2024-08-23

AI Technical Summary

Technical Problem

In automated switch testing, existing technology is difficult to effectively reduce the coupling and error rate of illegal configuration prompt information verification, especially in the case of device model differences and variable variables, resulting in low test efficiency and high error rate.

Method used

By constructing an illegal configuration prompt information table, parsing the command line to be verified to extract keyword information, matching the corresponding expected configuration prompt information in the preset table, filling in data based on device model differences and variable variables, and generating the final pending configuration Verify prompt information to avoid artificially defining specific content.

Benefits of technology

It improves the script construction efficiency of the automation platform, reduces verification errors caused by changes in prompt information and differences in device models, and achieves imperceptible prompt information management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118540223A
    Figure CN118540223A
Patent Text Reader

Abstract

The invention discloses an automatic checking method and device for illegal configuration of a switch and a storage medium, and relates to the technical field of switch automatic testing. The method comprises the following steps: configuring a to-be-verified illegal command line to a to-be-verified switch to determine actual configuration prompt information of the to-be-verified switch; analyzing the to-be-verified illegal command line to determine keyword information of the to-be-verified illegal command line, and matching corresponding expected configuration prompt information in a preset illegal configuration prompt information table based on the keyword information; and comparing the actual configuration prompt information with the expected configuration prompt information to determine whether the to-be-verified switch passes verification. According to the method, the coupling between the verification logic and the prompt information is reduced, errors when the prompt information is clearly designated are avoided, and therefore the test efficiency is improved, and the error rate is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of switch automation testing, and in particular to an automated verification method, device and storage medium for illegal switch configuration. Background Art

[0002] During the switch automation test process, the switch command line configuration related tests will be involved. In order to test whether various command lines can be successfully issued, it is also necessary to test whether illegal configurations are allowed to be configured successfully and whether the prompt information meets expectations. Among them, illegal configuration means that the content of the configured command line is not allowed by the device and cannot be successfully configured on the switch; when the illegal command line is configured to the switch, the switch displays configuration failure and returns the corresponding prompt information. The prompt information corresponding to different command lines is different. The same command line has different prompt information due to variable variables. In addition, the prompt information returned by different models of switches with the same command line is different due to differences in device models. In the face of these three situations, the previous verification method for illegal configuration prompt information is: each time the illegal configuration prompt information is verified, it is necessary to explicitly specify the prompt information content to be verified this time. When a certain command line causes different prompt information due to the device model, it is also necessary to explicitly specify multiple prompt information for the model for verification operations.

[0003] The disadvantage of the above scheme is that when the prompt information changes or new prompt information of other models is added, each prompt information verification operation needs to be changed accordingly, which makes the test efficiency extremely low and the coupling is high; in the verification work for device differences, it is easy to miss the prompt information corresponding to a certain model, which increases the error rate. Summary of the invention

[0004] The embodiments of the present application provide an automated verification method, device and storage medium for illegal configuration of a switch, which are used to solve the following technical problems: how to reduce the coupling between verification logic and prompt information, and avoid errors when explicitly specifying prompt information, thereby improving test efficiency and reducing error rate.

[0005] In a first aspect, an embodiment of the present application provides an automated verification method for illegal configuration of a switch, characterized in that the method comprises: configuring the illegal command line to be verified on the switch to be verified to determine the actual configuration prompt information of the switch to be verified; parsing the illegal command line to be verified to determine the keyword information of the illegal command line to be verified, and based on the keyword information, matching the corresponding expected configuration prompt information in a preset illegal configuration prompt information table; comparing the actual configuration prompt information with the expected configuration prompt information to determine whether the switch to be verified has passed the verification.

[0006] In one implementation of the present application, before matching the corresponding expected configuration prompt information in a preset illegal configuration prompt information table based on keyword information, the method also includes: constructing an illegal configuration prompt information table, specifically including: obtaining an illegal configuration command line to be filled in; determining the expected configuration prompt information and keywords corresponding to the illegal configuration command line to be filled in; and storing the expected configuration prompt information and keywords corresponding to the illegal configuration command line to be filled in the form of key-value pairs in the illegal configuration prompt information table.

[0007] In one implementation of the present application, the expected configuration prompt information and keywords corresponding to the illegal configuration command line to be filled in are determined, specifically including: determining whether there is a device model difference in the expected configuration prompt information corresponding to the illegal configuration command line to be filled in; when it is determined that there is no device model difference, constructing unique expected configuration prompt information corresponding to the illegal configuration command line to be filled in, and determining the common keyword corresponding to the unique expected configuration prompt information; when it is determined that there is a device model difference, constructing an expected configuration prompt information group corresponding to the illegal configuration command line to be filled in based on each device model, and determining the unique keyword corresponding to each expected configuration prompt information in the expected configuration prompt information group.

[0008] In one implementation of the present application, the illegal command line to be checked is parsed to determine the keyword information of the illegal command line to be checked, specifically including: performing grammatical analysis on the illegal command line to be checked to extract key parameters and options in the illegal command line to be checked; and converting the key parameters and options into corresponding keyword information according to preset rules.

[0009] In one implementation of the present application, based on keyword information, the corresponding expected configuration prompt information is matched in a preset illegal configuration prompt information table, specifically including: determining the corresponding key-value pair in the illegal configuration prompt information table based on the keyword information of the extracted illegal command line to be verified; extracting the value corresponding to the key-value pair to return the corresponding expected configuration prompt information.

[0010] In one implementation of the present application, after matching the corresponding expected configuration prompt information in a preset illegal configuration prompt information table based on keyword information, the method also includes: parsing the format and content of the expected configuration prompt information to determine whether it contains variable variables; if it contains variable variables, based on a preset data filling method, filling the variable variables with data to update the expected configuration prompt information.

[0011] In one implementation of the present application, the actual configuration prompt information is compared with the expected configuration prompt information to determine whether the switch to be verified has passed the verification, specifically including: when the actual configuration prompt information is completely consistent with the expected configuration prompt information, it is determined that the switch to be verified has passed the verification; when the actual configuration prompt information is inconsistent with the expected configuration prompt information, it is determined that the switch to be verified has failed the verification, and a verification failure report is generated; wherein the verification failure report includes the comparison result of the actual configuration prompt information and the expected configuration prompt information.

[0012] In an implementation of the present application, after determining that the switch to be verified fails verification, the method further includes: writing expected configuration prompt information into the switch to be verified to update actual configuration prompt information output by the switch to be verified when configuring the illegal command line to be verified.

[0013] In a second aspect, an embodiment of the present application also provides an automated verification device for illegal configuration of a switch, characterized in that the device includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can: configure the illegal command line to be verified on the switch to be verified to determine the actual configuration prompt information of the switch to be verified; parse the illegal command line to be verified to determine the keyword information of the illegal command line to be verified, and based on the keyword information, match the corresponding expected configuration prompt information in a preset illegal configuration prompt information table; compare the actual configuration prompt information with the expected configuration prompt information to determine whether the switch to be verified has passed the verification.

[0014] In a third aspect, an embodiment of the present application further provides a non-volatile computer storage medium for automated verification of illegal configuration of a switch, storing computer executable instructions, characterized in that the computer executable instructions are configured to: configure the illegal command line to be verified on the switch to be verified to determine the actual configuration prompt information of the switch to be verified; parse the illegal command line to be verified to determine the keyword information of the illegal command line to be verified, and based on the keyword information, match the corresponding expected configuration prompt information in a preset illegal configuration prompt information table; compare the actual configuration prompt information with the expected configuration prompt information to determine whether the switch to be verified has passed the verification.

[0015] The embodiments of the present application provide an automated verification method, device and storage medium for illegal configuration of a switch. Prompt information is managed through an illegal configuration prompt information table. When illegal configuration verification is required, the final prompt information to be verified is constructed for verification in combination with issues such as device model differences and variable variables. This can effectively avoid manually defining the specific content of the final prompt information to be verified for each verification operation. Only keywords and variable variables (if any) in the illegal configuration prompt information table need to be specified, thereby improving the script construction efficiency of the automation platform. In addition, when the prompt information changes or new prompt information is added due to differences in device models, the prompt information content can also be quickly changed without changing the script verification content, thereby achieving an imperceptible effect for upper-level users. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0017] Figure 1 A flow chart of an automated verification method for illegal switch configuration provided in an embodiment of the present application;

[0018] Figure 2 A schematic diagram of the internal structure of an automated verification device for illegal switch configuration provided in an embodiment of the present application. DETAILED DESCRIPTION

[0019] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.

[0020] The embodiments of the present application provide an automated verification method, device and storage medium for illegal configuration of a switch, which are used to solve the following technical problems: how to reduce the coupling between verification logic and prompt information, and avoid errors when explicitly specifying prompt information, thereby improving test efficiency and reducing error rate.

[0021] The technical solution proposed in the embodiments of the present application is described in detail below with reference to the accompanying drawings.

[0022] Figure 1 A flow chart of an automated verification method for illegal switch configuration provided by an embodiment of the present application. Figure 1As shown, an automatic verification method for illegal switch configuration provided by an embodiment of the present application specifically includes the following steps:

[0023] Step 101: configure the illegal command line to be verified on the switch to be verified to determine the actual configuration prompt information of the switch to be verified.

[0024] In one embodiment of the present application, in order to realize automatic verification of illegal switch configuration, firstly, the illegal command line to be verified is configured on the switch to be verified to determine the actual configuration prompt information of the switch to be verified.

[0025] In one embodiment, according to the verification requirements, a series of illegal command lines to be verified are prepared. These command lines may include incorrect parameters, unsupported function configurations, or commands with grammatical errors. Through network management tools, command line interfaces (CLIs), or other remote management methods, the prepared illegal command lines to be verified are configured one by one on the switch to be verified. After configuring the illegal command lines, the switch usually returns some prompt information, such as error codes, warning messages, or notifications of configuration failures. This information reflects the switch's reaction to the current configuration and the processing results. Use automated scripts or tools to capture and record these actual configuration prompt information.

[0026] Step 102: parse the illegal command line to be checked to determine keyword information of the illegal command line to be checked, and match the corresponding expected configuration prompt information in a preset illegal configuration prompt information table based on the keyword information.

[0027] In one embodiment of the present application, in order to realize automatic verification of illegal switch configuration, it is also necessary to obtain expected configuration prompt information to be compared.

[0028] First, the illegal command line to be checked needs to be parsed to determine the keyword information of the illegal command line to be checked.

[0029] Specifically, a syntax analysis is performed on the illegal command line to be checked to extract key parameters and options in the illegal command line to be checked; and the key parameters and options are converted into corresponding keyword information according to preset rules.

[0030] In one embodiment, before starting parsing, it is necessary to ensure that a complete syntax analysis tool and rule base are available, which can accurately identify and extract the various components in the command line. The illegal command line to be checked is input into the syntax analysis tool. The tool will perform lexical analysis and syntax analysis on the command line, and identify the structure of the command line, including key components such as the command body, parameters, and options. Through syntax analysis, the tool can extract the key parameters and options in the command line. These key parameters and options are the core of understanding the intent of the command line and executing operations. According to preset rules, the extracted key parameters and options are converted into corresponding keyword information. These rules may include mapping of parameter names, normalization of option values, etc. For example, a parameter "speed" may be converted to "transmission rate", and "100Mbps" may be converted to "100M".

[0031] Furthermore, based on the keyword information, the corresponding expected configuration prompt information is matched in a preset illegal configuration prompt information table.

[0032] Specifically, based on the extracted keyword information of the illegal command line to be checked, a corresponding key-value pair is determined in the illegal configuration prompt information table; and a value corresponding to the key-value pair is extracted to return corresponding expected configuration prompt information.

[0033] In one embodiment of the present application, in order to match the corresponding expected configuration prompt information in the preset illegal configuration prompt information table, it is necessary to construct an illegal configuration prompt information table before matching the corresponding expected configuration prompt information in the preset illegal configuration prompt information table based on keyword information.

[0034] Specifically, an illegal configuration command line to be filled is obtained; it is determined whether there is a device model difference in the expected configuration prompt information corresponding to the illegal configuration command line to be filled; when it is determined that there is no device model difference, unique expected configuration prompt information corresponding to the illegal configuration command line to be filled is constructed, and the universal keyword corresponding to the unique expected configuration prompt information is determined; when it is determined that there is a device model difference, an expected configuration prompt information group corresponding to the illegal configuration command line to be filled is constructed based on each device model, and the unique keyword corresponding to each expected configuration prompt information in the expected configuration prompt information group is determined; the expected configuration prompt information corresponding to the illegal configuration command line to be filled and the keyword are stored in the illegal configuration prompt information table in the form of key-value pairs.

[0035] In one embodiment, a series of possible illegal configuration command lines are collected and sorted, and these command lines may come from historical records, device testing, user feedback or expert advice. For each illegal configuration command line to be filled, it is necessary to check whether the corresponding expected configuration prompt information varies due to different device models. This can be done by consulting the device manual, consulting the device manufacturer or conducting actual tests. If it is determined that the expected configuration prompt information of a certain illegal configuration command line is consistent on all device models, then a unique expected configuration prompt information is constructed for the command line. The common keywords in this expected configuration prompt information are extracted, and these keywords will be used in the subsequent matching process. If the expected configuration prompt information of a certain illegal configuration command line is different on different device models, then the corresponding expected configuration prompt information needs to be constructed based on each device model. For the expected configuration prompt information of each device model, its unique keywords are extracted to ensure accurate matching in the future. The illegal configuration command line to be filled and its corresponding expected configuration prompt information and keywords are stored in the illegal configuration prompt information table in the form of key-value pairs. This table can be a database table, a CSV file or any other format suitable for storing structured data.

[0036] In one embodiment of the present application, after matching the corresponding expected configuration prompt information in a preset illegal configuration prompt information table based on keyword information, the method also includes: parsing the format and content of the expected configuration prompt information to determine whether it contains variable variables; if it contains variable variables, based on a preset data filling method, filling the variable variables with data to update the expected configuration prompt information.

[0037] In one embodiment, first, the expected configuration prompt information that is matched is analyzed in detail to identify its format and content characteristics. Regular expressions, string parsing or other text processing techniques are used to check whether the information contains variable variables. These variable variables are usually placeholders, which are used to be replaced by specific values ​​or texts in actual situations. If common placeholder symbols such as "%s", "%d", "{}" or "<>", or specific tags (such as "<device name>", "<port number>", etc.) are found during the parsing process, it is determined that the expected configuration prompt information contains variable variables. If the above placeholders or tags are not found, the expected configuration prompt information does not need to be further processed. Once it is determined that the expected configuration prompt information contains variable variables, it is necessary to fill these variables with data according to a preset data filling method. There are many filling methods, such as using jinja2 combined with pydantic to fill the values ​​into appropriate positions to generate the final expected prompt information.

[0038] Step 103: Compare the actual configuration prompt information with the expected configuration prompt information to determine whether the switch to be verified has passed the verification.

[0039] In one embodiment of the present application, after obtaining the actual configuration prompt information and the expected configuration prompt information, the actual configuration prompt information and the expected configuration prompt information are compared to determine whether the switch to be verified has passed the verification.

[0040] Specifically, when the actual configuration prompt information is completely consistent with the expected configuration prompt information, it is determined that the switch to be verified has passed the verification; when the actual configuration prompt information is inconsistent with the expected configuration prompt information, it is determined that the switch to be verified has failed the verification, and a verification failure report is generated; wherein the verification failure report includes the comparison result of the actual configuration prompt information and the expected configuration prompt information.

[0041] In one embodiment of the present application, after determining that the switch to be verified fails verification, the method further includes: writing expected configuration prompt information into the switch to be verified to update actual configuration prompt information output by the switch to be verified when configuring the illegal command line to be verified.

[0042] The above is an embodiment of the method proposed in this application. Based on the same inventive concept, the embodiment of this application also provides an automatic verification device for illegal configuration of a switch, and its structure is as follows: Figure 2 shown.

[0043] Figure 2 A schematic diagram of the internal structure of an automated verification device for illegal switch configuration provided in an embodiment of the present application. Figure 2 As shown, the device includes:

[0044] at least one processor 201;

[0045] and, a memory 202 communicatively connected to the at least one processor;

[0046] The memory 202 stores instructions that can be executed by at least one processor, and the instructions are executed by at least one processor 201 to enable at least one processor 201 to:

[0047] Configure the illegal command line to be verified on the switch to be verified to determine the actual configuration prompt information of the switch to be verified;

[0048] Parse the illegal command line to be checked to determine keyword information of the illegal command line to be checked, and match the corresponding expected configuration prompt information in a preset illegal configuration prompt information table based on the keyword information;

[0049] Compare the actual configuration prompt information with the expected configuration prompt information to determine whether the switch to be verified has passed the verification.

[0050] Some embodiments of the present application provide corresponding Figure 1 A non-volatile computer storage medium for automatic verification of illegal switch configuration, storing computer executable instructions, wherein the computer executable instructions are set to:

[0051] Configure the illegal command line to be verified on the switch to be verified to determine the actual configuration prompt information of the switch to be verified;

[0052] Parse the illegal command line to be checked to determine keyword information of the illegal command line to be checked, and match the corresponding expected configuration prompt information in a preset illegal configuration prompt information table based on the keyword information;

[0053] Compare the actual configuration prompt information with the expected configuration prompt information to determine whether the switch to be verified has passed the verification.

[0054] Each embodiment in this application is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the IoT device and medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.

[0055] The system and medium provided in the embodiments of the present application correspond one-to-one to the method. Therefore, the system and medium also have similar beneficial technical effects to the corresponding methods. Since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the system and medium will not be repeated here.

[0056] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0057] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0058] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0059] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0060] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0061] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0062] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0063] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0064] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims

1. An automated verification method for illegal switch configuration, characterized in that: The method comprises: Configuring the illegal command line to be verified on the switch to be verified to determine the actual configuration prompt information of the switch to be verified; Parsing the illegal command line to be checked to determine keyword information of the illegal command line to be checked, and matching corresponding expected configuration prompt information in a preset illegal configuration prompt information table based on the keyword information; The actual configuration prompt information is compared with the expected configuration prompt information to determine whether the switch to be verified has passed the verification.

2. The method for automatically checking illegal switch configuration according to claim 1, characterized in that: Before matching the corresponding expected configuration prompt information in a preset illegal configuration prompt information table based on the keyword information, the method further includes: Construct an illegal configuration prompt information table, including: Get the illegal configuration command line to be filled; Determine expected configuration prompt information and keywords corresponding to the illegal configuration command line to be filled; The expected configuration prompt information and keywords corresponding to the illegal configuration command line to be filled are stored in the illegal configuration prompt information table in the form of key-value pairs.

3. The method for automatically checking illegal switch configuration according to claim 2, characterized in that: Determining expected configuration prompt information and keywords corresponding to the illegal configuration command line to be filled in specifically includes: Determine whether there is a device model difference in the expected configuration prompt information corresponding to the illegal configuration command line to be filled; In the case where it is determined that there is no device model difference, constructing unique expected configuration prompt information corresponding to the illegal configuration command line to be filled, and determining that the unique expected configuration prompt information corresponds to a common keyword; When it is determined that there is a difference in device models, an expected configuration prompt information group corresponding to the illegal configuration command line to be filled is constructed based on each device model, and a unique keyword corresponding to each expected configuration prompt information in the expected configuration prompt information group is determined.

4. The method for automatically checking illegal switch configuration according to claim 1, characterized in that: Parsing the illegal command line to be checked to determine keyword information of the illegal command line to be checked specifically includes: Performing grammatical analysis on the illegal command line to be checked to extract key parameters and options in the illegal command line to be checked; The key parameters and options are converted into corresponding keyword information according to preset rules.

5. The method for automatically checking illegal switch configuration according to claim 1, characterized in that: Based on the keyword information, the corresponding expected configuration prompt information is matched in a preset illegal configuration prompt information table, specifically including: Determine a corresponding key-value pair in the illegal configuration prompt information table based on the keyword information of the extracted illegal command line to be checked; The value corresponding to the key-value pair is extracted to return the corresponding expected configuration prompt information.

6. The method for automatically checking illegal switch configuration according to claim 1, characterized in that: After matching the corresponding expected configuration prompt information in a preset illegal configuration prompt information table based on the keyword information, the method further includes: Parsing the format and content of the expected configuration prompt information to determine whether it contains variable variables; In the case of including variable variables, data is filled in the variable variables based on a preset data filling method to update the expected configuration prompt information.

7. The method for automatically checking illegal switch configuration according to claim 1, characterized in that: Comparing the actual configuration prompt information with the expected configuration prompt information to determine whether the switch to be verified has passed the verification, specifically includes: When the actual configuration prompt information is completely consistent with the expected configuration prompt information, determining that the switch to be verified has passed verification; When the actual configuration prompt information is inconsistent with the expected configuration prompt information, it is determined that the switch to be verified fails verification, and a verification failure report is generated; wherein the verification failure report includes a comparison result of the actual configuration prompt information and the expected configuration prompt information.

8. The method for automatically checking illegal switch configuration according to claim 1, characterized in that: After determining that the switch to be verified fails verification, the method further includes: The expected configuration prompt information is written into the switch to be verified, so as to update the actual configuration prompt information output by the switch to be verified when configuring the illegal command line to be verified.

9. An automated verification device for illegal switch configuration, characterized in that: The device comprises: at least one processor; and, a memory communicatively coupled to the at least one processor; The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to: Configuring the illegal command line to be verified on the switch to be verified to determine the actual configuration prompt information of the switch to be verified; Parsing the illegal command line to be checked to determine keyword information of the illegal command line to be checked, and matching corresponding expected configuration prompt information in a preset illegal configuration prompt information table based on the keyword information; The actual configuration prompt information is compared with the expected configuration prompt information to determine whether the switch to be verified has passed the verification.

10. A non-volatile computer storage medium for automatic verification of illegal switch configuration, storing computer executable instructions, characterized in that: The computer executable instructions are configured to: Configuring the illegal command line to be verified on the switch to be verified to determine the actual configuration prompt information of the switch to be verified; Parsing the illegal command line to be checked to determine keyword information of the illegal command line to be checked, and matching corresponding expected configuration prompt information in a preset illegal configuration prompt information table based on the keyword information; The actual configuration prompt information is compared with the expected configuration prompt information to determine whether the switch to be verified has passed the verification.