Port authentication and three-rights function testing method, device, equipment and storage medium
Through the automated test terminal with dual network cards, network device port authentication and three-rights functions are realized, solving the problem of inefficient testing in the existing technology, and providing multi-dimensional performance evaluation and accuracy improvement.
Patent Information
- Application Number
- CN202510451521.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-11
- Publication Date
- 2025-08-29
- Estimated Expiration
- 2045-04-11
AI Technical Summary
In the prior art, the port authentication and three-rights function testing of network equipment rely on manual or semi-automated tools, the test cases are insufficient, the efficiency is low, and it is difficult to judge whether the switch processing logic is abnormal in real time, and manual analysis is prone to miss hidden problems.
An automated test terminal adopts dual network cards that divides labor and cooperate with each other, the first network card simulates the client, and the second network card monitors the switch status, analyzes interactive messages through machine learning models, generates multi-dimensional performance evaluation reports, and realizes automated testing of port authentication and three-rights functions.
Improves testing efficiency and accuracy, can automatically identify abnormal behavior of switches, provide multi-dimensional performance evaluation, and meets the testing needs of large-scale equipment and complex scenarios.
Smart Images

Figure CN119996241B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a method, apparatus, device, and storage medium for testing port authentication and three-rights functions. Background Art
[0002] Currently, testing of port authentication (such as 802.1X) and AAA (authentication, authorization, and accounting) functions on network devices (such as switches and routers) relies heavily on manual or semi-automated tools. These tools offer insufficient test case coverage and are inefficient. Test results require manual comparison with logs and packet capture data, making it difficult to determine in real time whether the switch processing logic is abnormal.
[0003] Manual testing is difficult to meet the needs of large-scale equipment or complex scenarios. It is time-consuming and highly repetitive. At the same time, manual analysis is prone to missing hidden problems. Therefore, how to achieve automated testing of port authentication and three-power functions is an urgent problem that needs to be solved.
[0004] The above content is only used to assist in understanding the technical solution of this application and does not constitute an admission that the above content is prior art. Summary of the Invention
[0005] The main purpose of this application is to provide a method, device, equipment and storage medium for testing port authentication and three-rights functions, aiming to solve the technical problem of how to achieve automated testing of port authentication and three-rights functions.
[0006] To achieve the above objectives, the present application proposes a method for testing port authentication and three-rights functions, the method comprising:
[0007] A method for testing port authentication and three-rights functions, wherein the method is applied to an automated test terminal in a port authentication and three-rights function testing system, wherein the port authentication and three-rights function testing system comprises a switch and the automated test terminal, wherein the automated test terminal comprises a first network card and a second network card;
[0008] The method includes:
[0009] Generate a test message based on a preset authentication protocol and preset authentication information;
[0010] Sending the test message to the switch so that the switch completes port authentication and three-rights function test;
[0011] When the port status of the switch changes, capturing the interactive message between the switch and the remote user dial-up authentication server;
[0012] A test report is obtained based on the machine learning model, the test message and the interaction message.
[0013] In one embodiment, generating a test message based on a preset authentication protocol and preset authentication information includes:
[0014] Get the configuration file;
[0015] Update the configuration file based on the extended protocol information to obtain an extended configuration file;
[0016] Acquire a preset authentication protocol based on the extended configuration file;
[0017] The test message is generated based on the preset authentication protocol and preset authentication information.
[0018] In one embodiment, before sending the test message to the switch so that the switch completes the port authentication and three-rights function test, the method further includes:
[0019] Get the preset port status and preset three-power parameters;
[0020] Generate a remote call request based on the preset port status and the preset three-power parameters;
[0021] Setting the port status and three-right parameters of the switch based on the remote call request;
[0022] The switch is monitored to ensure that the port status and three-weight parameters of the switch are consistent with the preset port status and the preset three-weight parameters.
[0023] In one embodiment, setting the port status and three-right parameters of the switch based on the remote call request includes:
[0024] Obtaining role permissions based on the remote call request;
[0025] Obtaining the current port status and current three-power parameters of the switch;
[0026] When the configuration of the preset three-power parameters and the preset port status does not exceed the role authority, verifying the feasibility of the configuration;
[0027] When the configuration is not feasible, the configuration of the switch is set to the current port state and the current three-power parameters.
[0028] In one embodiment, after capturing the interaction message between the switch and the remote user dial-up authentication server when the port status of the switch changes, the method further includes:
[0029] Acquire an interaction message timestamp and an authentication message based on the interaction message;
[0030] Determining whether the switch is synchronized with the remote user dial-up authentication server based on the interaction message timestamp and a preset critical threshold;
[0031] When the switch is synchronized with the remote user dial-up authentication server, troubleshooting is performed based on the authentication message to obtain an authentication result.
[0032] In one embodiment, obtaining a test report based on the machine learning model, the test message, and the interaction message includes:
[0033] Obtaining multiple timestamps based on the test message and the interaction message;
[0034] Based on each of the timestamps, obtaining an associated test message and an associated interaction message;
[0035] Extracting key fields based on the association test message and the association interaction message;
[0036] Based on the key fields and the machine learning model, a test report is generated.
[0037] In one embodiment, before generating a test report based on the key fields and the machine learning model, the method further includes:
[0038] Obtain historical correlation test messages and historical correlation interaction messages;
[0039] Marking historical key fields based on the historical correlation test message and the historical correlation interaction message;
[0040] The historical key fields are classified, and a machine learning model is trained based on preset scenarios and the classified historical key fields.
[0041] In addition, to achieve the above-mentioned purpose, the present application also proposes a test device for port authentication and three-authority functions, the test device for port authentication and three-authority functions comprising:
[0042] The first network card module is used to generate a test message based on a preset authentication protocol and preset authentication information;
[0043] A switch module, configured to send the test message to a switch, so that the switch completes port authentication and three-rights function testing;
[0044] A second network card module is used to capture the interactive message between the switch and the remote user dial-up authentication server when the port status of the switch changes;
[0045] The test module is used to obtain a test report based on the machine learning model, the test message and the interaction message.
[0046] In addition, to achieve the above-mentioned purpose, the present application also proposes a testing device for port authentication and three-authority functions, which includes: a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the computer program is configured to implement the steps of the testing method for port authentication and three-authority functions as described above.
[0047] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by the processor, the steps of the port authentication and three-power function testing method as described above are implemented.
[0048] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program. When the computer program is executed by a processor, it implements the steps of the port authentication and three-rights function testing method as described above.
[0049] The present application proposes a method for testing port authentication and three-power functions, which is applied to an automated test terminal in a test system for port authentication and three-power functions. The test system for port authentication and three-power functions includes a switch and the automated test terminal, wherein the automated test terminal includes a first network card and a second network card; a test message is generated based on a preset authentication protocol and preset authentication information; the test message is sent to the switch so that the switch completes the port authentication and three-power function test; when the port status of the switch changes, the interactive message between the switch and the remote user dial-up authentication server is captured; a test report is obtained based on a machine learning model, the test message, and the interactive message. The present application realizes a closed-loop process of sending authentication requests, capturing responses, and analyzing results through the division of labor and cooperation of dual network cards, with the first network card simulating the client and the second network card monitoring the switch status and controlling the monitoring server. In the result analysis stage, the machine learning algorithm is used to statistically analyze indicators such as authentication success rate, response delay, and concurrent session capacity to provide a multi-dimensional performance evaluation report. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0051] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0052] Figure 1 A flowchart illustrating the first embodiment of the test method for port authentication and three-rights functions of this application;
[0053] Figure 2 A brief flowchart of the test method for port authentication and three-rights functions provided in Example 1 of the present application;
[0054] Figure 3 This is a schematic diagram of the module structure of the test device for port authentication and three-authority functions according to an embodiment of the present application;
[0055] Figure 4 This is a schematic diagram of the device structure of the hardware operating environment involved in the test method for port authentication and three-rights functions in the embodiment of the present application.
[0056] The purpose, features and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0057] It should be understood that the specific embodiments described herein are merely used to explain the technical solutions of the present application and are not intended to limit the present application.
[0058] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0059] The main solution of the embodiment of the present application is: a test method for port authentication and three-power functions, the test method for port authentication and three-power functions is applied to an automated test terminal in a test system for port authentication and three-power functions, the test system for port authentication and three-power functions includes a switch and the automated test terminal, wherein the automated test terminal includes a first network card and a second network card; a test message is generated based on a preset authentication protocol and preset authentication information; the test message is sent to the switch so that the switch completes the port authentication and three-power function test; when the port status of the switch changes, the interaction message between the switch and the remote user dial-up authentication server is captured; and a test report is obtained based on a machine learning model, the test message and the interaction message.
[0060] Existing technologies for testing port authentication (e.g., 802.1X) and AAA (Authentication, Authorization, and Accounting) functions on network devices (e.g., switches and routers) rely heavily on manual or semi-automated tools. These tools offer insufficient test case coverage and are inefficient. Test results require manual comparison with logs and packet capture data, making it difficult to determine in real time whether switch processing logic is abnormal. Manual testing is difficult to meet the needs of large-scale devices or complex scenarios, is time-consuming, and is highly repetitive. Furthermore, manual analysis can easily miss hidden issues.
[0061] This application provides a solution that uses dual network cards to work together. The first network card simulates the client, and the second network card monitors the switch status and controls the monitoring server, thereby realizing a closed-loop process of sending authentication requests, capturing responses, and analyzing results. During the result analysis stage, machine learning algorithms are used to calculate indicators such as authentication success rate, response delay, and concurrent session capacity, providing a multi-dimensional performance evaluation report.
[0062] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, mobile phone, etc., or an electronic device capable of performing the above functions. The following uses a computer as an example to illustrate this embodiment and the following embodiments.
[0063] Based on this, an embodiment of the present application provides a testing method for port authentication and three-power functions. The testing method for port authentication and three-power functions is applied to an automated testing terminal in a testing system for port authentication and three-power functions. The testing system for port authentication and three-power functions includes a switch and the automated testing terminal, wherein the automated testing terminal includes a first network card and a second network card.
[0064] It should be noted that the automated test terminal can be a computer with two network cards. The first network card can be used to simulate an authentication client or a security protocol channel, and the second network card can be used to monitor switch port status changes.
[0065] Reference Figure 1 , Figure 1 This is a flow chart of the first embodiment of the test method for port authentication and three-rights functions of this application.
[0066] In this embodiment, the port authentication and three-rights function testing method includes steps S10 to S40:
[0067] Step S10, generating a test message based on a preset authentication protocol and preset authentication information;
[0068] It should be noted that a preset authentication protocol refers to a network communication specification or standard that implements the "three rights" (AAA) function. The three rights include identity verification, permission control, and behavior auditing. Identity verification verifies the authenticity of the user or device identity. Permission control defines the scope of resources accessible to authenticated users or devices. Behavior auditing records the network behavior of users or devices (such as online time and data usage) for billing or security analysis. Preset authentication information refers to the credentials or rule sets pre-configured by the network system for verifying the identity of users or devices. Test messages are network data packets constructed according to the specifications of a specific authentication protocol (such as RADIUS and 802.1X), combined with pre-configured user or device identity credentials, authorization policies, and other parameters, to simulate a real-world authentication process.
[0069] It is understandable that based on the preset authentication protocol and preset authentication information, the real interaction process can be accurately simulated, the reliability, security and performance of the AAA function can be systematically verified, and a solid guarantee can be provided for network access control.
[0070] In a feasible implementation, step S10 may include: obtaining a configuration file; updating the configuration file based on extended protocol information to obtain an extended configuration file; obtaining a preset authentication protocol based on the extended configuration file; and generating the test message based on the preset authentication protocol and preset authentication information.
[0071] It should be noted that a configuration file may refer to a text or binary file used to store system, software or device operating parameters, and define program behavior, such as network protocol type and authentication method. Extended protocol information includes information about the authentication protocol to be extended. An extended configuration file is a configuration file after the extended protocol information is stored. A preset authentication protocol may be a newly extended protocol within a configuration file. The preset authentication information is a set of credentials or rules related to the newly extended protocol, pre-configured by the network system, and used to verify the identity of a user or device.
[0072] In this embodiment, the authentication protocol can be extended through configuration files, breaking through the limitation of the existing technology on supporting complex security protocols, thereby improving the flexibility of the automated testing of port testing and three-rights functions.
[0073] The above is only a feasible implementation of step S10 provided in this embodiment, and this embodiment does not specifically limit the specific implementation of step S10.
[0074] Step S20: Send the test message to the switch, so that the switch completes port authentication and three-rights function test;
[0075] It should be noted that a switch is a hardware device used to forward data frames in a computer network. Port authentication verifies the port access control function of network devices (such as switches) to ensure that only legitimate users or devices can access the network through authentication.
[0076] It is understandable that completing port authentication and three-authority function testing based on test messages can ensure data consistency. Systematized port authentication and three-authority function testing can ensure that network access is secure and controllable and meet corporate compliance requirements.
[0077] In a feasible implementation, the steps before step S20 may include obtaining a preset port status and preset three-weight parameters; generating a remote call request based on the preset port status and the preset three-weight parameters; setting the port status and three-weight parameters of the switch based on the remote call request; and monitoring the switch to ensure that the port status and three-weight parameters of the switch are consistent with the preset port status and the preset three-weight parameters.
[0078] It should be noted that the preset port status can be authorized or unauthorized, and the preset three-authority parameters can refer to a pre-configured set of rules and policies for controlling the three core functions of authentication, authorization, and accounting, such as user name, RADIUS shared key, role permissions, and other information.
[0079] Specifically, setting the port status and three-power parameters of the switch based on the remote call request includes: obtaining role authority based on the remote call request; obtaining the current port status and current three-power parameters of the switch; when the configuration of the preset three-power parameters and the preset port status does not exceed the role authority, verifying the feasibility of the configuration; when the configuration is not feasible, setting the configuration of the switch to the current port status and the current three-power parameters.
[0080] It should be noted that remote call requests can be API requests, allowing switch parameters (such as ACL rules and RADIUS server addresses) to be dynamically adjusted through the API to adapt to multiple scenario testing. Role permissions can include administrators and ordinary guests.
[0081] It is understandable that by using preset configurations and API requests, we can ensure configuration standardization, realize automatic configuration distribution, avoid manual input errors, and accurately configure the switch to ensure that the configuration results meet expectations.
[0082] The above is only a feasible implementation of step S20 provided in this embodiment, and this embodiment does not specifically limit the specific implementation of step S20.
[0083] Step S30, when the port status of the switch changes, capturing the interactive message between the switch and the remote user dial-up authentication server;
[0084] It should be noted that the remote user dial-up authentication server is a RADIUS server. The interactive messages refer to the messages exchanged between the switch and the RADIUS server during the three-rights function verification process, which usually carry key information about the authentication results. The port status can include blocked and open. After the port authentication is successful, the port changes from blocked to open. At this time, the interactive messages between the switch and the remote user dial-up authentication server can be captured.
[0085] It is understandable that, since the three rights functions are verified, step S30 is performed to capture the monitoring messages between the switch and the RADIUS server, so that the test results can be analyzed in time, thereby improving the accuracy of the test.
[0086] In a feasible implementation, step S30 may include: obtaining an interaction message timestamp and an authentication message based on the interaction message; determining whether the switch is synchronized with the remote user dial-up authentication server based on the interaction message timestamp and a preset critical threshold; and when the switch is synchronized with the remote user dial-up authentication server, performing troubleshooting based on the authentication message to obtain an authentication result.
[0087] It should be noted that the interaction message timestamp refers to the time when each interaction message is sent, and the authentication message refers to the message carrying the authentication result, which can be a result such as port authorization or port authorization failure. The preset critical threshold can be a fixed value. When the preset critical threshold is not exceeded, it is considered that the switch is synchronized with the remote user dial-up authentication server.
[0088] In this embodiment, dual verification of the preset time threshold and the switch status is used to determine whether the switch behavior meets expectations, thereby ensuring the accuracy of the test results.
[0089] The above is only a feasible implementation of step S30 provided in this embodiment, and this embodiment does not specifically limit the specific implementation of step S30.
[0090] Step S40: Obtain a test report based on the machine learning model, the test message, and the interaction message.
[0091] It should be noted that the machine learning model is the product of the machine learning algorithm trained on data, and is used to perform operations such as prediction, classification, and clustering on new data. The test report is a report obtained by analyzing the test results of port authentication and three-rights function testing, which may include the authentication success rate and abnormal event log.
[0092] It is understandable that by introducing machine learning models, abnormal behavior patterns of switches can be automatically identified, and multi-dimensional performance evaluation reports can be provided by statistically analyzing indicators such as authentication success rate and response delay.
[0093] In a feasible implementation, step S40 may include: obtaining multiple timestamps based on the test message and the interaction message; obtaining associated test messages and associated interaction messages based on each of the timestamps; extracting key fields based on the associated test message and the associated interaction message; and generating a test report based on the key fields and the machine learning model.
[0094] It should be noted that the timestamp is the time when the test message and the interaction message are sent. The associated test message and the associated interaction message refer to the messages belonging to the same port authentication and AAA function test process. The key field can be a field in the message containing key information, such as the version number and RADIUS return code.
[0095] Specifically, before generating a test report based on the key fields and the machine learning model, the method also includes: obtaining historical correlation test messages and texts; marking historical key fields based on the historical correlation test messages and the historical correlation interaction messages; classifying the historical key fields, and training the machine learning model based on preset scenarios and the classified historical key fields.
[0096] It should be noted that historical correlation test messages and historical correlation interaction messages refer to historical sample data related to port authentication and three-rights function tests. Historical key fields are fields in the message that contain key information, such as version number and RADIUS return code. Preset scenarios may include scenarios such as port unauthorized, authentication successful but VLAN not issued, etc.
[0097] In this embodiment, by collecting sample data from historical port authentication and three-rights function verification processes to train a machine learning model, the efficiency of data analysis and the accuracy of automated testing are improved.
[0098] The above is only a feasible implementation of step S40 provided in this embodiment, and this embodiment does not specifically limit the specific implementation of step S40.
[0099] This embodiment provides a method for testing port authentication and three-power functions, which is applied to an automated test terminal in a test system for port authentication and three-power functions. The test system for port authentication and three-power functions includes a switch and the automated test terminal, wherein the automated test terminal includes a first network card and a second network card; a test message is generated based on a preset authentication protocol and preset authentication information; the test message is sent to the switch so that the switch completes the port authentication and three-power function test; when the port status of the switch changes, the interactive message between the switch and the remote user dial-up authentication server is captured; a test report is obtained based on a machine learning model, the test message, and the interactive message. This application realizes a closed-loop process of sending authentication requests, capturing responses, and analyzing results through the division of labor and cooperation of dual network cards, with the first network card simulating the client and the second network card monitoring the switch status and controlling the monitoring server. In the result analysis stage, the machine learning algorithm is used to statistically analyze indicators such as authentication success rate, response delay, and concurrent session capacity to provide a multi-dimensional performance evaluation report.
[0100] For example, in order to help understand the implementation process of the port authentication and three-rights function testing method obtained by combining the present embodiment with the above embodiment 1, please refer to Figure 2 , Figure 2 This article provides a brief flowchart of the test method for port authentication and three-rights functions. Specifically:
[0101] The first network card module simulates an authentication client or a security protocol channel, and generates test messages based on a preset authentication protocol and preset authentication information, including different authentication messages and SSH (Secure Shell) messages. At the same time, a configuration file is obtained through a protocol configurator, and the configuration file is updated based on extended protocol information to obtain an extended configuration file. The preset authentication protocol is obtained based on the extended configuration file, and a test message is generated based on the preset authentication protocol and the preset authentication information.
[0102] The switch is automatically configured through a dynamic configuration engine, that is, the preset port status and preset three-power parameters are obtained, a remote call request is generated based on the preset port status and the preset three-power parameters, and the port status and three-power parameters of the switch are set based on the remote call request to monitor the switch to ensure that the port status and three-power parameters of the switch are consistent with the preset port status and the preset three-power parameters.
[0103] The switch port status changes are monitored through the second network card module (status monitoring / setting server), the interaction messages between the switch and the RADIUS server are captured, and then the interaction message timestamp and authentication message are obtained based on the interaction message; based on the interaction message timestamp and a preset key threshold, it is determined whether the switch is synchronized with the remote user dial-up authentication server; when the switch is synchronized with the remote user dial-up authentication server, troubleshooting is performed based on the authentication message to obtain an authentication result; at the same time, multiple timestamps are obtained based on the test message and the exchange message; based on each of the timestamps, an associated test message and an associated interaction message are obtained; based on the associated test message and the associated interaction message, key fields are extracted; based on the key fields and the machine learning model, a test report (multi-dimensional test report) is generated.
[0104] It should be noted that the above examples are only used to understand this application and do not constitute a limitation on the testing method of port authentication and three-rights functions of this application. More simple transformations based on this technical concept are all within the scope of protection of this application.
[0105] This application also provides a test device for port authentication and three-rights function, please refer to Figure 3 The test device for the port authentication and three-rights functions includes:
[0106] The first network card module 10 is used to generate a test message based on a preset authentication protocol and preset authentication information;
[0107] The switch module 20 is used to send the test message to the switch so that the switch completes the port authentication and three-right function test;
[0108] The second network card module 30 is used to capture the interactive message between the switch and the remote user dial-up authentication server when the port status of the switch changes;
[0109] The testing module 40 is configured to obtain a test report based on the machine learning model, the test message, and the interaction message.
[0110] The port authentication and three-authority function testing device provided by the present application adopts the port authentication and three-authority function testing method in the above-mentioned embodiment, which can solve the technical problems of port authentication and three-authority function testing. Compared with the existing technology, the beneficial effects of the port authentication and three-authority function testing device provided by the present application are the same as the beneficial effects of the port authentication and three-authority function testing method provided by the above-mentioned embodiment, and the other technical features of the port authentication and three-authority function testing device are the same as the features disclosed in the above-mentioned embodiment method, which will not be repeated here.
[0111] The first network card module 10 is further configured to obtain a configuration file; update the configuration file based on the extended protocol information to obtain an extended configuration file; obtain a preset authentication protocol based on the extended configuration file; and generate the test message based on the preset authentication protocol and preset authentication information.
[0112] The switch module 20 is further configured to obtain a preset port status and preset three-weight parameters; generate a remote call request based on the preset port status and the preset three-weight parameters; set the port status and three-weight parameters of the switch based on the remote call request; and monitor the switch to ensure that the port status and three-weight parameters of the switch are consistent with the preset port status and the preset three-weight parameters.
[0113] The switch module 20 is further used to obtain role permissions based on the remote call request; obtain the current port status and current three-power parameters of the switch; verify the feasibility of the configuration when the configuration of the preset three-power parameters and the preset port status does not exceed the role permissions; and set the configuration of the switch to the current port status and the current three-power parameters when the configuration is not feasible.
[0114] The second network card module 30 is further used to obtain an interaction message timestamp and an authentication message based on the interaction message; determine whether the switch is synchronized with the remote user dial-up authentication server based on the interaction message timestamp and a preset key threshold; and when the switch is synchronized with the remote user dial-up authentication server, perform troubleshooting based on the authentication message to obtain an authentication result.
[0115] The test module 40 is further used to obtain multiple timestamps based on the test message and the interaction message; obtain associated test messages and associated interaction messages based on each of the timestamps; extract key fields based on the associated test message and the associated interaction message; and generate a test report based on the key fields and the machine learning model.
[0116] The test module 40 is also used to obtain historical correlation test messages and historical correlation interaction messages; mark historical key fields based on the historical correlation test messages and the historical correlation interaction messages; classify the historical key fields, and train a machine learning model based on preset scenarios and the classified historical key fields.
[0117] The present application provides a testing device for port authentication and three-authority functions, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable 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 perform the port authentication and three-authority function testing method in the above-mentioned embodiment 1.
[0118] Reference below Figure 4 , which shows a schematic diagram of the structure of a test device suitable for implementing the port authentication and three-authority functions in the embodiments of the present application. The test device for the port authentication and three-authority functions in the embodiments of the present application can include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), in-vehicle terminals (such as in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 4 The port authentication and three-rights function test equipment shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0119] like Figure 4 As shown, the port authentication and three-authority function test equipment may include a processing device 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes based on programs stored in a ROM (Read Only Memory) 1002 or programs loaded from a storage device 1003 into a random access memory (RAM) 1004. RAM 1004 also stores various programs and data required for the operation of the port authentication and three-authority function test equipment. Processing device 1001, ROM 1002, and RAM 1004 are interconnected via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to I / O interface 1006: input device 1007 including, for example, a touch screen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; output device 1008 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage device 1003 including, for example, a magnetic tape, hard disk, etc.; and communication device 1009. Communication device 1009 can allow the port authentication and three-authority function test equipment to communicate wirelessly or wired with other devices to exchange data. Although the figure shows a port authentication and three-authority function test equipment with various systems, it should be understood that not all of the illustrated systems are required to be implemented or present. More or fewer systems may be implemented or present instead.
[0120] In particular, according to the embodiments disclosed in the present application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, the embodiments disclosed in the present application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program comprising program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0121] The port authentication and three-authority function testing device provided by this application adopts the port authentication and three-authority function testing method of the above-mentioned embodiment, which can solve the technical problems of port authentication and three-authority function testing. Compared with the existing technology, the beneficial effects of the port authentication and three-authority function testing device provided by this application are the same as the beneficial effects of the port authentication and three-authority function testing method provided by the above-mentioned embodiment, and the other technical features of the port authentication and three-authority function testing device are the same as the features disclosed in the method of the above-mentioned embodiment, which will not be repeated here.
[0122] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0123] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
[0124] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, a computer program) stored thereon, the computer-readable program instructions being used to execute the port authentication and three-rights function testing method in the above-mentioned embodiment.
[0125] The computer-readable storage medium provided herein may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems, or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including, but not limited to, wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.
[0126] The computer-readable storage medium may be included in the port authentication and three-authority function test device; or may exist independently without being assembled into the port authentication and three-authority function test device.
[0127] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by a port authentication and three-rights function testing device, the port authentication and three-rights function testing device: generates a test message based on a preset authentication protocol and preset authentication information; sends the test message to a switch so that the switch completes the port authentication and three-rights function test; captures the interaction message between the switch and a remote user dial-up authentication server when the port status of the switch changes; and obtains a test report based on a machine learning model, the test message, and the interaction message.
[0128] Computer program code for performing the operations of the present application may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0129] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, program segment or a part of code, and the module, program segment or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented by a dedicated hardware-based system that performs the specified function or operation, or can be implemented by a combination of dedicated hardware and computer instructions.
[0130] The modules described in the embodiments of the present application may be implemented in software or hardware, wherein the name of a module does not necessarily limit the unit itself.
[0131] The computer-readable storage medium provided in this application stores computer-readable program instructions (i.e., a computer program) for executing the aforementioned method for testing port authentication and the three-authority functions. This computer-readable storage medium can address the technical issues of testing port authentication and the three-authority functions. Compared to the prior art, the beneficial effects of the computer-readable storage medium provided in this application are similar to those of the method for testing port authentication and the three-authority functions provided in the aforementioned embodiments, and are not further elaborated here.
[0132] The present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned port authentication and three-rights function testing method when executed by a processor.
[0133] The computer program product provided in this application can solve the technical problems of port authentication and the testing of the three-authority functions. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as those of the port authentication and the testing method of the three-authority functions provided in the above-mentioned embodiments, and will not be elaborated here.
[0134] The above description is only part of the embodiments of the present application and does not limit the patent scope of the present application. All equivalent structural transformations made by using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect application in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A method for testing port authentication and three-rights functions, characterized in that: The port authentication and three-rights function testing method is applied to an automated test terminal in a port authentication and three-rights function testing system, wherein the port authentication and three-rights function testing system includes a switch and the automated test terminal, wherein the automated test terminal includes a first network card and a second network card; The method includes: Generate a test message based on a preset authentication protocol and preset authentication information; Sending the test message to the switch so that the switch completes port authentication and three-rights function test; When the port status of the switch changes, capturing the interactive message between the switch and the remote user dial-up authentication server; Obtaining a test report based on the machine learning model, the test message, and the interaction message; Before sending the test message to the switch so that the switch completes the port authentication and three-rights function test, the method further includes: Get the preset port status and preset three-power parameters; Generate a remote call request based on the preset port status and the preset three-power parameters; Setting the port status and three-right parameters of the switch based on the remote call request; The switch is monitored to ensure that the port status and the three-weight parameters of the switch are consistent with the preset port status and the preset three-weight parameters.
2. The method according to claim 1, wherein The generating of the test message based on the preset authentication protocol and the preset authentication information includes: Get the configuration file; Update the configuration file based on the extended protocol information to obtain an extended configuration file; Acquire a preset authentication protocol based on the extended configuration file; The test message is generated based on the preset authentication protocol and preset authentication information.
3. The method according to claim 1, wherein The step of setting the port status and three-right parameters of the switch based on the remote call request includes: Obtaining role permissions based on the remote call request; Obtaining the current port status and current three-power parameters of the switch; When the configuration of the preset three-power parameters and the preset port status does not exceed the role authority, verifying the feasibility of the configuration; When the configuration is not feasible, the configuration of the switch is set to the current port state and the current three-power parameters.
4. The method according to claim 1, wherein After capturing the interactive message between the switch and the remote user dial-up authentication server when the port status of the switch changes, the method further includes: Acquire an interaction message timestamp and an authentication message based on the interaction message; Determining whether the switch is synchronized with the remote user dial-up authentication server based on the interaction message timestamp and a preset critical threshold; When the switch is synchronized with the remote user dial-up authentication server, troubleshooting is performed based on the authentication message to obtain an authentication result.
5. The method according to claim 1, wherein The obtaining of a test report based on the machine learning model, the test message, and the interaction message includes: Obtaining multiple timestamps based on the test message and the interaction message; Based on each of the timestamps, obtaining an associated test message and an associated interaction message; Extracting key fields based on the association test message and the association interaction message; Based on the key fields and the machine learning model, a test report is generated.
6. The method according to claim 5, wherein Before generating a test report based on the key fields and the machine learning model, the method further includes: Obtain historical correlation test messages and historical correlation interaction messages; Marking historical key fields based on the historical correlation test message and the historical correlation interaction message; The historical key fields are classified, and a machine learning model is trained based on preset scenarios and the classified historical key fields.
7. A test device for port authentication and three-rights functions, characterized in that: The device comprises: The first network card module is used to generate a test message based on a preset authentication protocol and preset authentication information; A switch module, configured to send the test message to a switch, so that the switch completes port authentication and three-rights function testing; A second network card module is used to capture the interactive message between the switch and the remote user dial-up authentication server when the port status of the switch changes; A testing module, configured to obtain a test report based on a machine learning model, the test message, and the interaction message; The switch module is further configured to obtain a preset port status and preset three-weight parameters; generate a remote call request based on the preset port status and the preset three-weight parameters; set the port status and three-weight parameters of the switch based on the remote call request; and monitor the switch to ensure that the port status and three-weight parameters of the switch are consistent with the preset port status and the preset three-weight parameters.
8. A test device for port authentication and three-rights functions, characterized in that: The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the port authentication and three-rights function testing method according to any one of claims 1 to 6.
9. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the port authentication and three-rights function testing method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Port security automatic test method, device and equipment and storage medium
CN118713924A
Method for testing AAA server characteristics and apparatus thereof
CN1549516A