Network switch management method and device based on representational state transfer interface, equipment and storage medium

By adopting a network switch management method based on a descriptive state transition interface, the problem of low network management efficiency in existing technologies is solved, and unified management and efficient operation and maintenance of network switches are achieved.

CN120567683BActive Publication Date: 2025-11-18SHENZHEN FENGRUNDA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511062823.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-31
Publication Date
2025-11-18
Estimated Expiration
2045-07-31

AI Technical Summary

Technical Problem

Existing network management protocols such as SNMP and CLI are inefficient in managing large-scale network devices, especially in high-performance network environments where unified management is difficult to achieve.

Method used

The network switch management method based on the Representational State Transition Interface (RESTful API) is adopted. It receives configuration commands, executes operations and returns results, obtains running status data, generates historical reports, and periodically verifies the consistency of configuration status.

Benefits of technology

It enables unified management of network switches, improves equipment management efficiency and security, and supports efficient operation and maintenance of large-scale network devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120567683B_ABST
    Figure CN120567683B_ABST
Patent Text Reader

Abstract

The application discloses a network switch management method and device based on a representational state transfer interface, equipment and a storage medium, relates to the technical field of switch management, and the network switch management method based on the representational state transfer interface comprises the following steps: receiving a configuration instruction of a request end; calling a management function through a representational state transfer interface, executing the configuration instruction on a network switch, and returning an operation result to the request end; obtaining running state data of the network switch through the representational state transfer interface, and generating a history report; and periodically verifying the consistency of the configuration state of the network switch through the representational state transfer interface. The application can improve the efficiency of network equipment management.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of switch management technology, and in particular to a network switch management method, apparatus, device, and storage medium based on a representational state transition interface. Background Technology

[0002] Currently, many network switches, especially in high-performance network environments, rely on traditional network management protocols such as SNMP (Simple Network Management Protocol) and CLI (Command Line Interface). While these protocols provide basic network management and configuration functions, they have key shortcomings. Protocols like CLI and SNMP lack support for unified management of large-scale network devices, resulting in low maintenance and management efficiency, particularly in large-scale switch cluster environments. Therefore, improving the efficiency of network device management remains a problem that needs to be addressed.

[0003] The above content is only used to help understand the technical solution of this application and does not represent an admission that the above content is prior art. Summary of the Invention

[0004] The main objective of this application is to provide a network switch management method, apparatus, device, and storage medium based on a descriptive state transition interface, aiming to solve the technical problem of how to improve the efficiency of network device management.

[0005] To achieve the above objectives, this application proposes a network switch management method based on a representational state transition interface. The method includes: receiving a configuration instruction from a requesting end; invoking a management function through the representational state transition interface to execute the configuration instruction on the network switch and returning the operation result to the requesting end; obtaining the operating status data of the network switch through the representational state transition interface and generating a historical report; and periodically verifying the consistency of the configuration status of the network switch through the representational state transition interface.

[0006] In one embodiment, the step of invoking the management function through the descriptive state transition interface to execute the configuration command on the network switch and returning the operation result to the requesting end includes:

[0007] The device add request is executed through the descriptive state transition interface, and a new switch entity is created, resulting in the add operation.

[0008] The device deletion request is executed through the descriptive state transition interface, and the specified switch entity is removed to obtain the deletion operation result.

[0009] The device query request is executed through the descriptive state transition interface and the current set of device parameters is returned to obtain the query operation result.

[0010] The device modification request is executed through the descriptive state transition interface, and the configuration parameters of the target switch are updated to obtain the result of the modification operation.

[0011] The results of the add operation, the delete operation, the query operation, and the modify operation are returned to the requesting client.

[0012] In one embodiment, the step of obtaining the network switch's operational status data through the expressive state transition interface and generating a historical report includes:

[0013] Obtain the data collection frequency and data collection metrics;

[0014] The network switch's operating status data is obtained through the descriptive state transition interface according to the acquisition frequency and the acquisition indicators;

[0015] The running status data is sorted by time to obtain the sorting result;

[0016] A historical report is generated based on the sorting results.

[0017] In one embodiment, the step of periodically verifying the consistency of the configuration state of the network switch through the expressive state transition interface includes:

[0018] Obtain the set of baseline configuration parameters for the network switch;

[0019] The network switch's real-time configuration parameter set is collected in real time through the expressive state transition interface;

[0020] Compare the deviation values ​​between the baseline configuration parameter set and the real-time configuration parameter set;

[0021] The consistency of the network switch's configuration status is verified based on the deviation value.

[0022] In one embodiment, after verifying the consistency of the network switch's configuration state based on the deviation value, the method further includes:

[0023] When the consistency requirements are met, a verification report is generated;

[0024] When the consistency requirement is not met, the configuration parameters of the network switch are modified according to the baseline configuration parameter set, and an alarm message is generated based on the deviation value.

[0025] In one embodiment, after receiving the configuration instruction from the requesting end, the method further includes:

[0026] Verify the digital certificate and access token of the requesting party;

[0027] The access token's operation permission scope is parsed;

[0028] When the configuration instruction exceeds the scope of the operation permission, the configuration instruction is intercepted and an error code is returned through the expressive state transition interface.

[0029] In one embodiment, after receiving the configuration instruction from the requesting end, the method further includes:

[0030] Parse the batch operation parameters in the configuration instructions;

[0031] The batch operation parameters are split into atomic configuration tasks;

[0032] Add the atomic configuration task to the asynchronous execution queue;

[0033] Execute the configured tasks in the asynchronous execution queue in sequence;

[0034] When an abnormality is detected in the execution of the configuration task, it will automatically roll back to the previous valid configuration state.

[0035] Furthermore, to achieve the above objectives, this application also proposes a network switch management device based on a representational state transition interface, the network switch management device based on a representational state transition interface comprising:

[0036] The receiving module is used to receive configuration instructions from the requesting end;

[0037] The execution module is used to call the management function through the descriptive state transition interface, execute the configuration instructions on the network switch, and return the operation results to the requesting end.

[0038] The acquisition module is used to acquire the operating status data of the network switch through the expressive state transition interface and generate a historical report;

[0039] The verification module is used to periodically verify the consistency of the configuration state of the network switch through the expressive state transition interface.

[0040] Furthermore, to achieve the above objectives, this application also proposes a network switch management device based on a representational state transition interface. The device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. The computer program is configured to implement the steps of the network switch management method based on a representational state transition interface as described above.

[0041] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements the steps of the network switch management method based on the expressive state transition interface described above.

[0042] In addition, to achieve the above objectives, this application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the network switch management method based on the expressive state transition interface described above.

[0043] This application provides a network switch management method based on a representational state transition interface. The method includes receiving configuration instructions from a requesting client; invoking management functions through the representational state transition interface to execute the configuration instructions on the network switch and returning the operation results to the requesting client; obtaining the network switch's operating status data through the representational state transition interface and generating historical reports; and periodically verifying the consistency of the network switch's configuration status through the representational state transition interface.

[0044] In summary, this application uses the descriptive state transition interface to call management functions to uniformly manage network switch applications, thereby improving the efficiency of network device management. Attached Figure Description

[0045] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0046] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0047] Figure 1 This is a flowchart illustrating an embodiment of the network switch management method based on a descriptive state transition interface provided in this application.

[0048] Figure 2 This is a flowchart illustrating Embodiment 2 of the network switch management method based on the descriptive state transition interface of this application.

[0049] Figure 3 This is a schematic diagram of the module structure of a network switch management device based on a descriptive state transition interface, as described in an embodiment of this application.

[0050] Figure 4This is a schematic diagram of the device structure of the hardware operating environment involved in the network switch management method based on the descriptive state transition interface in the embodiments of this application.

[0051] 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 Implementation

[0052] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.

[0053] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.

[0054] The main solution of this application is to receive configuration instructions from the requesting end; to call management functions through a descriptive state transition interface to execute the configuration instructions on the network switch and return the operation results to the requesting end; to obtain the operating status data of the network switch through the descriptive state transition interface and generate historical reports; and to periodically verify the consistency of the configuration status of the network switch through the descriptive state transition interface.

[0055] Currently, many network switches, especially in high-performance network environments, rely on traditional network management protocols such as SNMP (Simple Network Management Protocol) and CLI (Command Line Interface). While these protocols provide basic network management and configuration functions, they have key shortcomings. Protocols like CLI and SNMP lack support for unified management of large-scale network devices, resulting in low maintenance and management efficiency, particularly in large-scale switch cluster environments. Therefore, improving the efficiency of network device management remains a problem that needs to be addressed.

[0056] This application uses a descriptive state transition interface to call management functions to uniformly manage network switch applications, thereby improving the efficiency of network device management.

[0057] Based on this, embodiments of this application provide a network switch management method based on a descriptive state transition interface, referring to... Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the network switch management method based on the descriptive state transition interface of this application.

[0058] In this embodiment, the network switch management method based on the representational state transition interface includes steps S10 to S40:

[0059] Step S10: Receive configuration instructions from the requesting end;

[0060] It should be noted that the executing entity in this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, or mobile phone, or an electronic device capable of implementing the above functions, a network switch management device based on a representational state transition interface, etc. The following description uses a network switch management device based on a representational state transition interface as an example to illustrate this embodiment and the subsequent embodiments.

[0061] Understandably, configuration commands include instructions for adding, deleting, querying, and modifying devices. Administrators send requests to add or delete devices, view device status, or modify device configurations.

[0062] Step S20: Invoke the management function through the descriptive state transition interface to execute the configuration command on the network switch and return the operation result to the requesting end;

[0063] Understandably, the Representational State Transfer API (RESTful API) is a web service interface designed based on the REST architectural style. Through this RESTful API, a unified and concise data exchange method is provided, facilitating integration with different operating systems and device management platforms. All API interfaces adhere to the RESTful style, use the HTTP protocol, and follow a "resource + operation" model in their design. Data is formatted using JSON or XML for easy parsing and processing. Response data includes device status information, configuration data, or operation results. Appropriate HTTP status codes are used to represent different request statuses in the API design, such as 200 (success), 400 (error), and 500 (server error). The Representational State Transfer API uses the HTTP-based RESTful API for data transmission. Administrators use GET requests to query device status, POST requests to add new devices, PUT requests to update device information, and DELETE requests to delete devices.

[0064] In one feasible approach, the step of invoking management functions through a descriptive state transition interface to execute the configuration command on the network switch and returning the operation result to the requesting end includes: executing a device add request and creating a new switch entity through the descriptive state transition interface, obtaining an add operation result; executing a device delete request and removing the specified switch entity through the descriptive state transition interface, obtaining a delete operation result; executing a device query request and returning the current device parameter set through the descriptive state transition interface, obtaining a query operation result; executing a device modify request and updating the configuration parameters of the target switch through the descriptive state transition interface, obtaining a modify operation result; and returning the add operation result, the delete operation result, the query operation result, and the modify operation result to the requesting end.

[0065] Understandably, the device management system, upon receiving a request, invokes the internal management functions of the Sonic switch system to execute the corresponding device operations and returns the results to the administrator in JSON format. Adding, deleting, modifying, and querying devices are all performed through a unified API interface, thus simplifying management operations.

[0066] In one feasible approach, after receiving the configuration instruction from the requesting end, the method further includes: verifying the digital certificate and access token of the requesting end; parsing the operation permission range of the access token; and when the configuration instruction exceeds the operation permission range, intercepting the configuration instruction and returning an error code through the expressive state transition interface.

[0067] Understandably, verifying the digital certificate and access token of the requesting end aims to ensure API security through encrypted communication and access control, preventing external attacks and data leaks. All API requests use HTTPS for encrypted communication, ensuring secure data transmission and preventing man-in-the-middle attacks and data leaks. An I-key-based authentication mechanism is implemented in the API interface to ensure that only authenticated users can access the management interface. Administrators need to authenticate using a key when accessing the API. Access control: By setting user roles and access controls (such as administrators, regular users, etc.), it is ensured that users with different roles can only access functions within their authorized scope.

[0068] In one feasible approach, after receiving the configuration instruction from the requesting end, the method further includes: parsing the batch operation parameters in the configuration instruction; splitting the batch operation parameters into atomic configuration tasks; adding the atomic configuration tasks to an asynchronous execution queue; executing the configuration tasks in the asynchronous execution queue in sequence; and automatically rolling back to the previous valid configuration state when an execution error of the configuration task is detected.

[0069] Understandably, the API interface implements task queue management, adding requests to the queue and executing them sequentially to ensure the smooth execution of configuration tasks. It also supports rollback operations for configuration tasks, allowing restoration to the original configuration in case of problems.

[0070] Step S30: Obtain the operating status data of the network switch through the expressive state transition interface and generate a historical report;

[0071] Understandably, a RESTful API allows administrators to obtain real-time operational status data for network switches, including device traffic, port status, CPU and memory usage, helping them understand device performance and troubleshoot as needed. The specific steps involve periodically requesting device performance data via the API. GET requests are used to retrieve device status data, including switch port status, network traffic, CPU and memory usage. This data is generated by the switch system's internal monitoring module and returned to the administrator via the API. The data format is typically JSON or XML, facilitating further processing and display on the management platform. A scheduled task is implemented within the system to periodically request device status data and store it in a database for generating historical reports or conducting analysis.

[0072] In one feasible approach, the step of obtaining the network switch's operational status data through the expressive state transition interface and generating a historical report includes: obtaining the collection frequency and collection indicators; obtaining the network switch's operational status data through the expressive state transition interface according to the collection frequency and collection indicators; sorting the operational status data by time to obtain a sorting result; and generating a historical report based on the sorting result.

[0073] Understandably, the sampling frequency determines the data collection interval, and the sampling metrics determine the content of the collected device data. Users can define the sampling frequency and sampling metrics according to their needs. The collected operational status data can be displayed in chronological order. For numerical data, such as CPU utilization and memory utilization, historical reports can show the changing trends and more clearly display the switch status.

[0074] Step S40: Periodically verify the consistency of the configuration state of the network switch through the expressive state transition interface.

[0075] Understandably, the configuration items of the network switch can be retrieved periodically through the RESTful API, and the consistency of the network switch's configuration status can be verified by comparing the configuration items before and after.

[0076] Understandably, by defining clear interface standards, new devices or functions can be implemented by extending existing API interfaces. For example, if support for new switch hardware or new management functions is needed in the future, only the interfaces need to be extended and the functions integrated on the existing system, without modifying the existing interface design. It supports compatibility with multiple operating systems and device management platforms, and through standardized API interfaces, it can seamlessly interface with other devices and management platforms to form a unified device management and operation and maintenance platform.

[0077] This embodiment provides a network switch management method based on a representational state transition interface. The method involves receiving a configuration command from a requesting end; invoking a management function through the representational state transition interface to execute the configuration command on the network switch and returning the operation result to the requesting end; obtaining the network switch's operating status data through the representational state transition interface and generating a historical report; and periodically verifying the consistency of the network switch's configuration status through the representational state transition interface.

[0078] In summary, this embodiment improves the efficiency of network device management by using the descriptive state transition interface to call management functions and uniformly manage network switch applications.

[0079] Based on the first embodiment of this application, in the second embodiment of this application, the content that is the same as or similar to that in the first embodiment described above can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 2 Step S40 also includes steps S401 to S404:

[0080] Step S401: Obtain the set of baseline configuration parameters for the network switch;

[0081] Understandably, the baseline configuration parameter set refers to the standard configuration preset by the administrator.

[0082] Step S402: Collect the real-time configuration parameter set of the network switch in real time through the expressive state transition interface;

[0083] Understandably, the real-time configuration parameter set refers to the network switch's real-time configuration data. This real-time configuration parameter set can be obtained periodically through the aforementioned descriptive state transition interface.

[0084] Step S403: Compare the deviation values ​​between the baseline configuration parameter set and the real-time configuration parameter set;

[0085] By comparing the baseline configuration parameter set with the real-time configuration parameter set, the deviation value can be obtained. The deviation value can reflect the difference between the state of the network switch and the ideal state.

[0086] Step S404: Verify the consistency of the configuration status of the network switch based on the deviation value.

[0087] Understandably, the deviation value can be used to determine the configuration status of the network switch and verify its consistency with the preset status. Automated configuration and maintenance of devices are achieved through API interfaces. Administrators can write scripts to configure parameters of multiple devices in batches via the API, reducing manual operations. It supports sending device configuration parameters as scripts to the server via POST requests, automating configuration tasks. For example, an administrator can write a script to update network device configurations, IP addresses, or security settings in batches.

[0088] In one feasible approach, after verifying the consistency of the network switch's configuration status based on the deviation value, the method further includes: generating a verification report when the consistency meets the requirements; and modifying the network switch's configuration parameters according to the baseline configuration parameter set and generating alarm information based on the deviation value when the consistency does not meet the requirements.

[0089] Understandably, when the network switch configuration parameters differ significantly from the baseline configuration parameters, a RESTful API can be used to update the network switch configuration and maintain consistency.

[0090] This embodiment obtains the baseline configuration parameter set of the network switch; collects the real-time configuration parameter set of the network switch in real time through the expressive state transition interface; compares the deviation value between the baseline configuration parameter set and the real-time configuration parameter set; and verifies the consistency of the configuration state of the network switch based on the deviation value.

[0091] This embodiment verifies the consistency of the network switch's configuration state through a descriptive state transition interface, which can keep the network switch in an ideal state and improve the efficiency of network device management.

[0092] This application also provides a network switch management device based on a descriptive state transition interface. Please refer to [link / reference]. Figure 3 The network switch management device based on the expressive state transition interface includes:

[0093] The receiving module 10 is used to receive configuration instructions from the requesting end;

[0094] Execution module 20 is used to call management functions through the descriptive state transition interface, execute the configuration instructions on the network switch, and return the operation results to the requesting end;

[0095] The acquisition module 30 is used to acquire the operating status data of the network switch through the expressive state transition interface and generate a historical report;

[0096] The verification module 40 is used to periodically verify the consistency of the configuration state of the network switch through the expressive state transition interface.

[0097] This embodiment provides a network switch management method based on a representational state transition interface. The method involves receiving a configuration command from a requesting end; invoking a management function through the representational state transition interface to execute the configuration command on the network switch and returning the operation result to the requesting end; obtaining the network switch's operating status data through the representational state transition interface and generating a historical report; and periodically verifying the consistency of the network switch's configuration status through the representational state transition interface.

[0098] In summary, this embodiment improves the efficiency of network device management by using the descriptive state transition interface to call management functions and uniformly manage network switch applications.

[0099] In one embodiment, the execution module 20 is further configured to execute a device add request and create a new switch entity through a descriptive state transition interface, obtaining an add operation result; execute a device delete request and remove a specified switch entity through a descriptive state transition interface, obtaining a delete operation result; execute a device query request and return the current device parameter set through a descriptive state transition interface, obtaining a query operation result; execute a device modify request and update the configuration parameters of the target switch through a descriptive state transition interface, obtaining a modify operation result; and return the add operation result, the delete operation result, the query operation result, and the modify operation result to the requesting end.

[0100] In one embodiment, the acquisition module 30 is further configured to acquire the acquisition frequency and acquisition indicators; acquire the operating status data of the network switch according to the acquisition frequency and acquisition indicators through the descriptive state transition interface; sort the operating status data by time to obtain a sorting result; and generate a historical report based on the sorting result.

[0101] In one embodiment, the verification module 40 is further configured to obtain a baseline configuration parameter set of the network switch; collect a real-time configuration parameter set of the network switch in real time through the expressive state transition interface; compare the deviation value between the baseline configuration parameter set and the real-time configuration parameter set; and verify the consistency of the configuration state of the network switch based on the deviation value.

[0102] In one embodiment, the verification module 40 is further configured to generate a verification report when the consistency requirement is met; and to modify the configuration parameters of the network switch according to the baseline configuration parameter set when the consistency requirement is not met, and to generate alarm information according to the deviation value.

[0103] In one embodiment, the receiving module 10 is further configured to verify the digital certificate and access token of the requesting end; parse the operation permission range of the access token; and when the configuration instruction exceeds the operation permission range, intercept the configuration instruction and return an error code through the expressive state transition interface.

[0104] In one embodiment, the receiving module 10 is further configured to parse the batch operation parameters in the configuration instruction; split the batch operation parameters into atomic configuration tasks; add the atomic configuration tasks to the asynchronous execution queue; execute the configuration tasks in the asynchronous execution queue in sequence; and automatically roll back to the previous valid configuration state when an execution error of the configuration task is detected.

[0105] The network switch management device based on a representational state transition interface provided in this application, employing the network switch management method based on a representational state transition interface in the above embodiments, can solve the technical problem of how to improve the efficiency of network device management. Compared with the prior art, the beneficial effects of the network switch management device based on a representational state transition interface provided in this application are the same as the beneficial effects of the network switch management method based on a representational state transition interface provided in the above embodiments, and other technical features in the network switch management device based on a representational state transition interface are the same as the features disclosed in the methods of the above embodiments, and will not be repeated here.

[0106] This application provides a network switch management device based on a representational state transition interface. The network switch management device based on a representational state transition interface 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 execute the network switch management method based on a representational state transition interface in the above embodiment 1.

[0107] The following is for reference. Figure 4This document illustrates a schematic diagram of a network switch management device based on a representational state transition interface suitable for implementing embodiments of this application. The network switch management device based on a representational state transition interface in embodiments of this 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), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 4 The network switch management device based on the expressive state transition interface shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.

[0108] like Figure 4 As shown, a network switch management device based on a representational state transition interface may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in ROM (Read Only Memory) 1002 or a program loaded from storage device 1003 into RAM (Random Access Memory) 1004. RAM 1004 also stores various programs and data required for the operation of the network switch management device based on the representational state transition interface. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via bus 1005. 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 devices 1007 including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 1008 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 1003 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1009. Communication device 1009 allows the network switch management device based on the representational state transition interface to exchange data wirelessly or via wired communication with other devices. Although the figure shows a network switch management device based on the representational state transition interface with various systems, it should be understood that it is not required to implement or possess all the systems shown. More or fewer systems can be implemented or possessed alternatively.

[0109] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.

[0110] The network switch management device based on a representational state transition interface provided in this application, employing the network switch management method based on a representational state transition interface in the above embodiments, can solve the technical problem of how to improve the efficiency of network device management. Compared with the prior art, the beneficial effects of the network switch management device based on a representational state transition interface provided in this application are the same as the beneficial effects of the network switch management method based on a representational state transition interface provided in the above embodiments, and other technical features in this network switch management device based on a representational state transition interface are the same as those disclosed in the method of the previous embodiment, and will not be repeated here.

[0111] 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 suitable manner in one or more embodiments or examples.

[0112] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0113] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, which are used to execute the network switch management method based on the expressive state transition interface in the above embodiments.

[0114] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing 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.

[0115] The aforementioned computer-readable storage medium may be included in a network switch management device based on a representational state transition interface; or it may exist independently and not be assembled into a network switch management device based on a representational state transition interface.

[0116] The aforementioned computer-readable storage medium carries one or more programs. When these programs are executed by a network switch management device based on a representational state transition interface, the network switch management device based on the representational state transition interface causes the following: it receives configuration instructions from a requesting end; invokes management functions through the representational state transition interface to execute the configuration instructions on the network switch and returns the operation results to the requesting end; obtains the operating status data of the network switch through the representational state transition interface and generates historical reports; and periodically verifies the consistency of the configuration status of the network switch through the representational state transition interface.

[0117] Computer program code for performing the operations of this application can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can 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 can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0118] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0119] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.

[0120] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the network switch management method based on the expressive state transition interface described above, thereby solving the technical problem of how to improve the efficiency of network device management. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the network switch management method based on the expressive state transition interface provided in the above embodiments, and will not be repeated here.

[0121] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the network switch management method based on the expressive state transition interface described above.

[0122] The computer program product provided in this application can solve the technical problem of how to improve the efficiency of network device management. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as those of the network switch management method based on the expressive state transition interface provided in the above embodiments, and will not be repeated here.

[0123] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.

Claims

1. A network switch management method based on a representational state transition interface, characterized in that, The method includes: Receive configuration instructions from the requesting end; The management function is invoked through the descriptive state transition interface to execute the configuration instructions on the network switch and return the operation results to the requesting end. The network switch's operational status data is obtained through the expressive state transition interface, and a historical report is generated. The consistency of the network switch's configuration state is periodically verified through the expressive state transition interface. The step of obtaining the network switch's operational status data through the descriptive state transition interface and generating a historical report includes: Obtain the data collection frequency and data collection metrics; The network switch's operating status data is obtained through the descriptive state transition interface according to the acquisition frequency and the acquisition indicators; The running status data is sorted by time to obtain the sorting result; A historical report is generated based on the sorting results; The step of periodically verifying the consistency of the network switch's configuration state through the expressive state transition interface includes: Obtain the set of baseline configuration parameters for the network switch; The network switch's real-time configuration parameter set is collected in real time through the expressive state transition interface; Compare the deviation values ​​between the baseline configuration parameter set and the real-time configuration parameter set; The consistency of the network switch's configuration status is verified based on the deviation value.

2. The method as described in claim 1, characterized in that, The step of invoking the management function through the descriptive state transition interface, executing the configuration command on the network switch, and returning the operation result to the requesting end includes: The device add request is executed through the descriptive state transition interface, and a new switch entity is created, resulting in the add operation. The device deletion request is executed through the descriptive state transition interface, and the specified switch entity is removed to obtain the deletion operation result. The device query request is executed through the descriptive state transition interface and the current set of device parameters is returned to obtain the query operation result. The device modification request is executed through the descriptive state transition interface, and the configuration parameters of the target switch are updated to obtain the result of the modification operation. The results of the add operation, the delete operation, the query operation, and the modify operation are returned to the requesting client.

3. The method as described in claim 1, characterized in that, After verifying the consistency of the network switch's configuration state based on the deviation value, the method further includes: When the consistency requirements are met, a verification report is generated; When the consistency requirement is not met, the configuration parameters of the network switch are modified according to the baseline configuration parameter set, and an alarm message is generated based on the deviation value.

4. The method as described in claim 1, characterized in that, Following the configuration instructions from the receiving end, the system also includes: Verify the digital certificate and access token of the requesting party; The access token's operation permission scope is parsed; When the configuration instruction exceeds the scope of the operation permission, the configuration instruction is intercepted and an error code is returned through the expressive state transition interface.

5. The method as described in claim 1, characterized in that, Following the configuration instructions from the receiving end, the system also includes: Parse the batch operation parameters in the configuration instructions; The batch operation parameters are split into atomic configuration tasks; Add the atomic configuration task to the asynchronous execution queue; Execute the configured tasks in the asynchronous execution queue in sequence; When an abnormality is detected in the execution of the configuration task, it will automatically roll back to the previous valid configuration state.

6. A network switch management device based on a representational state transition interface, characterized in that, The device includes: The receiving module is used to receive configuration instructions from the requesting end; The execution module is used to call the management function through the descriptive state transition interface, execute the configuration instructions on the network switch, and return the operation results to the requesting end. The acquisition module is used to acquire the operating status data of the network switch through the expressive state transition interface and generate a historical report; The verification module is used to periodically verify the consistency of the configuration state of the network switch through the expressive state transition interface; The step of obtaining the network switch's operational status data through the descriptive state transition interface and generating a historical report includes: Obtain the data collection frequency and data collection metrics; The network switch's operating status data is obtained through the descriptive state transition interface according to the acquisition frequency and the acquisition indicators; The running status data is sorted by time to obtain the sorting result; A historical report is generated based on the sorting results; The step of periodically verifying the consistency of the network switch's configuration state through the expressive state transition interface includes: Obtain the set of baseline configuration parameters for the network switch; The network switch's real-time configuration parameter set is collected in real time through the expressive state transition interface; Compare the deviation values ​​between the baseline configuration parameter set and the real-time configuration parameter set; The consistency of the network switch's configuration status is verified based on the deviation value.

7. A network switch management device based on a representational state transition interface, characterized in that, The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the network switch management method based on the representational state transition interface as described in any one of claims 1 to 5.

8. 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, it implements the network switch management method based on the representational state transition interface as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Method and system for realizing automatic rollback of state of controllable processor based on Apache NiFi

    CN119292827A

  • Distributed quorum authorization enforcement through an API gateway

    US20240004983A1