Port authentication and three-right function test method and device, equipment and storage medium
Through the combination of dual network card collaboration and machine learning algorithms, network device port authentication and three-rights functions are realized, solving the problems of low test efficiency and insufficient use case coverage in the existing technology, and providing a multi-dimensional performance evaluation report.
Patent Information
- Application Number
- CN202510451521.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-11
- Publication Date
- 2025-05-13
- Estimated Expiration
- 2045-04-11
AI Technical Summary
In the prior art, port authentication and three-rights function testing of network equipment mostly rely on manual or semi-automated tools, test cases are insufficient, inefficient, and it is difficult to judge whether the switch processing logic is abnormal in real time.
A test method for port authentication and three-rights functions is proposed, using dual network cards division of labor and cooperation, the first network card simulates the client, the second network card monitors the switch status and controls the monitoring server, realizes a closed-loop process of authentication request sending, response capture, and result analysis, and provides multi-dimensional performance evaluation reports through machine learning algorithms.
It realizes automated testing of port authentication and three-rights functions, improves testing efficiency and accuracy, and can judge whether the switch processing logic is abnormal in real time, meeting the testing needs of large-scale equipment or complex scenarios.
Smart Images

Figure CN119996241A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a method, device, equipment and storage medium for testing port authentication and three-rights functions. Background Art
[0002] Currently, port authentication (such as 802.1X) and three-rights functions, namely AAA (authentication, authorization, and accounting) function testing for network devices (such as switches and routers) mostly rely on manual or semi-automated tools. The test case coverage is insufficient and the efficiency is low. The test results need to be manually compared 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-rights functions is an issue that needs to be solved urgently.
[0004] The above contents are only used to assist in understanding the technical solution of the present application and do not constitute an admission that the above contents are 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 realize 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: A method for testing port authentication and three-rights functions, the method for testing port authentication and three-rights functions is applied to an automated test terminal in a test system for port authentication and three-rights functions, the test system for port authentication and three-rights functions comprises a switch and the automated test terminal, wherein the automated test terminal comprises 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 state of the switch changes, capturing the interactive message between the switch and the remote user dial-up authentication server; A test report is obtained based on the machine learning model, the test message and the interaction message.
[0007] In one embodiment, 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.
[0008] 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: 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 three-weight parameters of the switch are consistent with the preset port status and the preset three-weight parameters.
[0009] In one embodiment, 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.
[0010] In one embodiment, when the port state of the switch changes, after capturing the interactive message between the switch and the remote user dial-up authentication server, 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.
[0011] In one embodiment, obtaining a test report based on the machine learning model, the test message, and the interaction message includes: Based on the test message and the interaction message, obtain multiple timestamps; 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.
[0012] In one embodiment, 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; Based on the historical association test message and the historical association interaction message, marking historical key fields; The historical key fields are classified, and a machine learning model is trained based on preset scenarios and the classified historical key fields.
[0013] In addition, to achieve the above 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: A first network card module, used to generate a test message based on a preset authentication protocol and preset authentication information; A switch module, used for sending the test message to the switch, so that the switch completes the port authentication and three-rights function test; A second network card module, used for capturing the interactive message between the switch and the remote user dial-up authentication server when the port state of the switch changes; The test module is used to obtain a test report based on the machine learning model, the test message and the interaction message.
[0014] In addition, to achieve the above-mentioned objectives, the present application also proposes a testing device for port authentication and three-authority functions, the device comprising: a memory, a processor, and a computer program stored on the memory and executable on the processor, the computer program being configured to implement the steps of the testing method for port authentication and three-authority functions as described above.
[0015] 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-authority function testing method as described above are implemented.
[0016] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the port authentication and three-rights function testing method as described above are implemented.
[0017] 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, wherein 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 state of the switch changes, the interactive message between the switch and the remote user dial-up authentication server is captured; based on the machine learning model, the test message and the interactive message, a test report is obtained. 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 state and controlling the monitoring server. In the stage of result analysis, the machine learning algorithm is used to statistically analyze indicators such as authentication success rate, response delay, and concurrent session capacity, and a multi-dimensional performance evaluation report is provided. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] 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.
[0019] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0020] Figure 1 A flow chart of the first embodiment of the method for testing the port authentication and three-rights functions of the present application; Figure 2 A brief flowchart of the test method for port authentication and three-rights functions provided in Example 1 of the present application; 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; Figure 4 This is a schematic diagram of the device structure of the hardware operating environment involved in the port authentication and three-rights function testing method in the embodiment of the present application.
[0021] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0022] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0023] 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.
[0024] 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 state of the switch changes, the interaction 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 interaction message.
[0025] The existing technology currently relies on manual or semi-automated tools to test the port authentication (such as 802.1X) and three-rights functions, namely AAA (authentication, authorization, and accounting) functions of network devices (such as switches and routers). The test cases are not well covered and the efficiency is low. The test results need to be manually compared with logs and packet capture data, which makes it difficult to determine in real time whether the switch processing logic is abnormal. 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.
[0026] The present application provides a solution, which 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. The first network card simulates the client, and the second network card monitors the switch status and controls the monitoring server. In the result analysis stage, the authentication success rate, response delay, concurrent session capacity and other indicators are statistically analyzed through machine learning algorithms to provide a multi-dimensional performance evaluation report.
[0027] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of realizing the above functions, etc. The following takes a computer as an example to illustrate this embodiment and the following embodiments.
[0028] Based on this, an embodiment of the present application provides a method for testing port authentication and three-power functions. The method for testing 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.
[0029] It should be noted that the automated test terminal can be a computer including 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 the status changes of the switch port.
[0030] Reference Figure 1 , Figure 1 This is a flow chart of the first embodiment of the test method for port authentication and three-authority functions of the present application.
[0031] In this embodiment, the port authentication and three-rights function testing method includes steps S10 to S40: Step S10, generating a test message based on a preset authentication protocol and preset authentication information; It should be noted that the preset authentication protocol refers to the network communication specification or standard that can realize the three rights function (AAA function). The three rights include identity verification, authority control and behavior audit. Identity verification refers to verifying the authenticity of the user or device identity. Authority control refers to defining the scope of resources that can be accessed by authenticated users or devices. Behavior audit refers to recording the network behavior of users or devices (such as online time, traffic consumption) for billing or security analysis. Preset authentication information refers to the credentials or rule set pre-configured by the network system for verifying the identity of users or devices. Test messages refer to network data packets constructed in accordance with the specifications of specific authentication protocols (such as RADIUS, 802.1X, etc.) combined with pre-configured user or device identity credentials, authorization policies and other parameters to simulate the real authentication process.
[0032] It can be understood 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.
[0033] 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.
[0034] 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 in the 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.
[0035] In this implementation, it supports extending the authentication protocol through the configuration file, breaking through the limitation of the existing technology on supporting complex security protocols, thereby improving the flexibility of the port test and the automated test of the three rights functions.
[0036] 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.
[0037] Step S20, sending the test message to the switch, so that the switch completes the port authentication and three-rights function test; 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.
[0038] It is understandable that completing port authentication and three-authority function testing based on test messages can ensure data consistency. Systematic port authentication and three-authority function testing can ensure that network access is secure and controllable and meet corporate compliance requirements.
[0039] In a feasible implementation, before step S20, the steps may include obtaining a preset port status and preset three-power parameters; generating a remote call request based on the preset port status and the preset three-power parameters; setting the port status and three-power parameters of the switch based on the remote call request; and monitoring 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.
[0040] It should be noted that the preset port status can be authorized or unauthorized, and the preset three-rights 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.
[0041] Specifically, the setting of 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.
[0042] It should be noted that the remote call request can be an API request, which allows the switch parameters (such as ACL rules and RADIUS server address) to be dynamically adjusted through the API to adapt to multiple scenario tests. Role permissions can include administrators and ordinary guests.
[0043] It is understandable that by using preset configurations and API requests, we can ensure the standardization of configurations, realize automatic distribution of configurations, avoid manual input errors, so as to accurately configure the switch and ensure that the configuration results meet expectations.
[0044] 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.
[0045] Step S30, when the port state of the switch changes, capturing the interactive message between the switch and the remote user dial-up authentication server; It should be noted that the remote user dial-up authentication server is a RADIUS server. The interactive message refers to the message exchanged between the switch and the RADIUS server during the three-rights function verification, which usually carries key information about the authentication result. The port status can include blocked and open states. After the port authentication is successful, the port changes from blocked to open. At this time, the interactive message between the switch and the remote user dial-up authentication server can be captured.
[0046] 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.
[0047] In a feasible implementation manner, step S30 may include: obtaining an interaction message timestamp and an authentication message based on the interaction message; judging 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, performing troubleshooting based on the authentication message to obtain an authentication result.
[0048] 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 it does not exceed the preset critical threshold, it is considered that the switch is synchronized with the remote user dial-up authentication server.
[0049] In this implementation, 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.
[0050] 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.
[0051] Step S40, obtaining a test report based on the machine learning model, the test message and the interaction message.
[0052] 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-power function testing, which may include authentication success rate and abnormal event log.
[0053] 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.
[0054] 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.
[0055] 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, and the key field can be a field in the message containing key information, such as the version number and the RADIUS return code.
[0056] Specifically, before generating a test report based on the key fields and the machine learning model, it 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.
[0057] It should be noted that historical association test messages and historical association 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 VLAN not issued, etc.
[0058] In this implementation, 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.
[0059] 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.
[0060] 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, wherein 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 state of the switch changes, the interactive message between the switch and the remote user dial-up authentication server is captured; based on the machine learning model, the test message and the interactive message, a test report is obtained. 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 state and controlling the monitoring server. In the stage of result analysis, the machine learning algorithm is used to statistically analyze indicators such as authentication success rate, response delay, and concurrent session capacity, and a multi-dimensional performance evaluation report is provided.
[0061] 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-mentioned embodiment 1, please refer to Figure 2 , Figure 2 A brief flow chart of the test method of port authentication and three-rights function is provided, specifically: The first network card module is used to simulate an authentication client or a security protocol channel, and a test message is generated 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.
[0062] 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.
[0063] The switch port status change is monitored through the second network card module (status monitoring / setting server), the interaction message between the switch and the RADIUS server is captured, and then the interaction message timestamp and authentication message are obtained based on the interaction message; based on the interaction message timestamp and the preset key threshold, it is judged 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 the authentication result; at the same time, based on the test message and the exchange message, multiple timestamps are obtained; 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.
[0064] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the test methods for port authentication and three-rights functions of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.
[0065] This application also provides a test device for port authentication and three-rights functions, please refer to Figure 3 The test device for port authentication and three-rights functions includes: The first network card module 10 is used to generate a test message based on a preset authentication protocol and preset authentication information; The switch module 20 is used to send the test message to the switch so that the switch completes the port authentication and three-rights function test; 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 state of the switch changes; The testing module 40 is used to obtain a test report based on the machine learning model, the test message and the interaction message.
[0066] The port authentication and three-power function testing device provided by the present application adopts the port authentication and three-power function testing method in the above-mentioned embodiment, which can solve the technical problems of port authentication and three-power function testing. Compared with the prior art, the beneficial effects of the port authentication and three-power function testing device provided by the present application are the same as the beneficial effects of the port authentication and three-power function testing method provided by the above-mentioned embodiment, and other technical features in the port authentication and three-power function testing device are the same as the features disclosed in the above-mentioned embodiment method, which will not be repeated here.
[0067] The first network card module 10 is further used 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.
[0068] The switch module 20 is also used to obtain a 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; set the port status and three-power parameters of the switch based on the remote call request; 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.
[0069] The switch module 20 is also 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; when the configuration is not feasible, set the configuration of the switch to the current port status and the current three-power parameters.
[0070] The second network card module 30 is also 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.
[0071] The test module 40 is also 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.
[0072] The test module 40 is also used to obtain historical association test messages and historical association interaction messages; mark historical key fields based on the historical association test messages and the historical association interaction messages; classify the historical key fields, and train a machine learning model based on preset scenarios and the classified historical key fields.
[0073] The present application provides a test device for port authentication and three-authority functions, and the test device for port authentication and three-authority functions 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 so that the at least one processor can execute the test method for port authentication and three-authority functions in the above-mentioned embodiment one.
[0074] 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 of the embodiment of the present application. The test device for port authentication and three-authority functions in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 4 The port authentication and three-authority function testing equipment shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0075] like Figure 4 As shown, the port authentication and three-authority function test equipment may include a processing device 1001 (such as a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a ROM (Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (Random Access Memory) 1004. Various programs and data required for the operation of the port authentication and three-authority function test equipment are also stored in the RAM 1004. The processing device 1001, the ROM 1002, and the RAM 1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to the I / O interface 1006: input devices 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 1003 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 1009. The 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 it is not required to implement or have all the systems shown. More or fewer systems may be implemented or have instead.
[0076] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a 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 through 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.
[0077] The port authentication and three-power function test device provided by the present application adopts the port authentication and three-power function test method in the above-mentioned embodiment, which can solve the technical problems of port authentication and three-power function testing. Compared with the prior art, the beneficial effects of the port authentication and three-power function test device provided by the present application are the same as the beneficial effects of the port authentication and three-power function test method provided by the above-mentioned embodiment, and other technical features in the port authentication and three-power function test device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0078] It should be understood that the various parts disclosed in this application can be implemented by 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.
[0079] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0080] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, the computer-readable program instructions being used to execute the port authentication and three-authority function testing method in the above-mentioned embodiment.
[0081] The computer-readable storage medium provided in the present application 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 of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM: Random Access Memory), a read-only memory (ROM: Read Only Memory), an erasable programmable read-only memory (EPROM: Erasable Programmable Read Only Memory or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM: CD-Read Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency: Radio Frequency), etc., or any suitable combination of the above.
[0082] 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.
[0083] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by the port authentication and three-power function test device, the port authentication and three-power function test device: generates a test message based on a preset authentication protocol and preset authentication information; sends the test message to the switch so that the switch completes the port authentication and three-power function test; captures the interaction message between the switch and the remote user dial-up authentication server when the port state of the switch changes; and obtains a test report based on the machine learning model, the test message and the interaction message.
[0084] 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 separate 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 through 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).
[0085] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the 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 square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square 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 square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0086] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0087] The readable storage medium provided by the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned port authentication and three-power function testing method, and can solve the technical problems of port authentication and three-power function testing. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as the beneficial effects of the port authentication and three-power function testing method provided by the above-mentioned embodiment, and will not be repeated here.
[0088] 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.
[0089] The computer program product provided by the present application can solve the technical problems of port authentication and the testing of the three rights functions. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as the beneficial effects of the port authentication and the testing method of the three rights functions provided by the above-mentioned embodiment, which will not be repeated here.
[0090] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications 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 comprises a switch and the automated test terminal, wherein the automated test terminal comprises 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 state of the switch changes, capturing the interactive message between the switch and the remote user dial-up authentication server; A test report is obtained based on the machine learning model, the test message and the interaction message.
2. The method according to claim 1, characterized in that 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, characterized in that Before sending the test message to the switch so that the switch completes the port authentication and the 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 three-weight parameters of the switch are consistent with the preset port status and the preset three-weight parameters.
4. The method according to claim 3, characterized in that 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.
5. The method according to claim 1, characterized in that When the port state of the switch changes, after capturing the interactive message between the switch and the remote user dial-up authentication server, 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.
6. The method according to claim 1, characterized in that The obtaining of a test report based on the machine learning model, the test message and the interaction message includes: Based on the test message and the interaction message, obtain multiple timestamps; 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.
7. The method according to claim 6, characterized in that 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; Based on the historical association test message and the historical association interaction message, marking historical key fields; The historical key fields are classified, and a machine learning model is trained based on preset scenarios and the classified historical key fields.
8. A test device for port authentication and three-rights functions, characterized in that: The device comprises: A first network card module, used to generate a test message based on a preset authentication protocol and preset authentication information; A switch module, used for sending the test message to the switch, so that the switch completes the port authentication and three-rights function test; A second network card module, used for capturing the interactive message between the switch and the remote user dial-up authentication server when the port state of the switch changes; The test module is used to obtain a test report based on the machine learning model, the test message and the interaction message.
9. A test device for port authentication and three-rights functions, characterized in that: The device comprises: 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-authority function testing method according to any one of claims 1 to 7.
10. 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-authority function testing method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Testing device and method for authentication authorized charging server
CN101132321A
Method and device for fault detection of authentication authorization statistics (AAA)
CN111130848A
Port security automatic test method, device and equipment and storage medium
CN118713924A
Method for testing AAA server characteristics and apparatus thereof
CN1549516A
Testing system and method for automation test of Ethernet switch access control system
CN1992653A
Cited By
Server dead time management method and device, equipment and storage medium
CN122317082A