Representation state transition interface-based network switch management method, apparatus and device, and storage medium

Through the network switch management method based on the expressive state transfer interface, the problem of inefficient network equipment management in the prior art is solved, efficient unified management and automated operation and maintenance are achieved, and configuration consistency and security are ensured.

CN120567683AActive Publication Date: 2025-08-29SHENZHEN FENGRUNDA TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

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

Method used

The network switch management method based on the expressive state transfer interface (RESTful API) is adopted. By receiving configuration instructions, executing operations and returning results, obtaining running status data, generating historical reports, and periodically verifying the consistency of configuration status.

Benefits of technology

It realizes unified management of network switches, improves equipment management efficiency, supports the integration and automated operation and maintenance of large-scale network equipment, and ensures configuration consistency and security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120567683A_ABST
    Figure CN120567683A_ABST
Patent Text Reader

Abstract

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

Description

Technical Field

[0001] The present 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 transfer interface. Background Art

[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 capabilities, they have key shortcomings. Protocols like CLI and SNMP lack support for the unified management of large-scale network devices, resulting in low maintenance and management efficiency, especially in large-scale switch clusters. Therefore, improving the efficiency of network device management remains an unresolved issue.

[0003] The above content is only used to assist in understanding the technical solution of this application and does not constitute an admission that the above content is prior art. Summary of the Invention

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

[0005] To achieve the above-mentioned objectives, the present application proposes a network switch management method based on a representational state transfer interface, the method comprising: receiving configuration instructions from a requesting end; calling a management function through the representational state transfer interface, executing the configuration instructions on the network switch, and returning the operation results to the requesting end; obtaining the operating status data of the network switch through the representational state transfer interface and generating a historical report; and periodically verifying the consistency of the configuration status of the network switch through the representational state transfer interface.

[0006] In one embodiment, the step of calling the management function through the representational state transfer interface, executing the configuration instruction on the network switch, and returning the operation result to the requesting end includes: Execute the device add request and create a new switch entity through the representational state transfer interface, and obtain the add operation result; Execute the device deletion request and remove the specified switch entity through the representational state transfer interface to obtain the deletion operation result; Execute device query requests through the representational state transfer interface and return the current device parameter set to obtain query operation results; Execute the device modification request through the representational state transfer interface and update the configuration parameters of the target switch to obtain the modification operation result; The adding operation result, the deleting operation result, the query operation result and the modifying operation result are returned to the requesting end.

[0007] In one embodiment, the step of obtaining the operating status data of the network switch through the representational state transfer interface and generating a history report includes: Get the collection frequency and collection indicators; Acquiring the operating status data of the network switch through the representational state transfer interface according to the acquisition frequency; Sorting the operating status data by time to obtain a sorting result; A history report is generated according to the ranking results.

[0008] In one embodiment, the step of periodically verifying the consistency of the configuration state of the network switch through the representational state transfer interface includes: Obtaining a set of baseline configuration parameters of the network switch; Collecting a real-time configuration parameter set of the network switch in real time through the representational state transfer interface; Comparing the deviation value between the baseline configuration parameter set and the real-time configuration parameter set; The consistency of the configuration state of the network switch is verified according to the deviation value.

[0009] In one embodiment, after verifying the consistency of the configuration state of the network switch according to the deviation value, the method further includes: When the consistency meets the requirements, a verification report is generated; When the consistency does not meet the requirement, the configuration parameters of the network switch are modified according to the reference configuration parameter set, and an alarm message is generated according to the deviation value.

[0010] In one embodiment, after receiving the configuration instruction from the requesting end, the method further includes: Verify the digital certificate and access token of the requesting end; Parsing the operation permission scope of the access token; When the configuration instruction exceeds the scope of the operation authority, the configuration instruction is intercepted and an error code is returned through the representational state transfer interface.

[0011] In one embodiment, after receiving the configuration instruction from the requesting end, the method further includes: Parsing batch operation parameters in the configuration instruction; Splitting the batch operation parameters into atomic configuration tasks; Adding the atomic configuration task to an 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 is automatically rolled back to the last valid configuration state.

[0012] In addition, to achieve the above-mentioned purpose, the present application also proposes a network switch management device based on a representational state transfer interface, wherein the network switch management device based on the representational state transfer interface includes: A receiving module, used for receiving configuration instructions from the requesting end; An execution module, configured to call a management function through a representational state transfer interface, execute the configuration instruction on the network switch, and return the operation result to the requesting end; an acquisition module, configured to acquire the operating status data of the network switch through the representational state transfer interface and generate a history report; A verification module is used to periodically verify the consistency of the configuration state of the network switch through the representational state transfer interface.

[0013] In addition, to achieve the above-mentioned purpose, the present application also proposes a network switch management device based on a representational state transfer interface, 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 network switch management method based on the representational state transfer interface as described above.

[0014] 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 network switch management method based on the representational state transfer interface as described above are implemented.

[0015] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program. When the computer program is executed by a processor, it implements the steps of the network switch management method based on the representational state transfer interface as described above.

[0016] The present application provides a network switch management method based on a representational state transfer interface. The present application receives configuration instructions from a requesting end; calls a management function through the representational state transfer interface, executes 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 transfer interface and generates a historical report; and periodically verifies the consistency of the configuration status of the network switch through the representational state transfer interface.

[0017] In summary, the present application uniformly manages network switch declarations by calling management functions through the representational state transfer interface, thereby improving the efficiency of network device management. BRIEF DESCRIPTION OF THE DRAWINGS 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.

[0018] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0019] Figure 1 A flowchart of the first embodiment of the network switch management method based on the representational state transfer interface of the present application is provided; Figure 2 A flowchart of the second embodiment of the network switch management method based on the representational state transfer interface of the present application is provided; Figure 3 This is a schematic diagram of the module structure of a network switch management device based on a representational state transfer interface according to an embodiment of the present application; Figure 4 Schematic diagram of the device structure of the hardware operating environment involved in the network switch management method based on the representational state transfer interface in the embodiment of the present application.

[0020] The purpose, features and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0021] It should be understood that the specific embodiments described herein are merely used to explain the technical solutions of the present application and are not intended to limit the present application.

[0022] 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.

[0023] The main solution of this application is to receive configuration instructions from the requesting end; call the management function through the representational state transfer interface, execute the configuration instructions on the network switch, and return the operation results to the requesting end; obtain the operating status data of the network switch through the representational state transfer interface and generate a historical report; and periodically verify the consistency of the configuration status of the network switch through the representational state transfer interface.

[0024] 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 capabilities, they have key shortcomings. Protocols like CLI and SNMP lack support for the unified management of large-scale network devices, resulting in low maintenance and management efficiency, especially in large-scale switch clusters. Therefore, improving the efficiency of network device management remains an unresolved issue.

[0025] This application uses the representational state transfer interface to call the management function to uniformly manage network switch declarations, thereby improving the efficiency of network device management. Based on this, the embodiment of the present application provides a network switch management method based on a representational state transfer interface, referring to Figure 1 , Figure 1 This is a flowchart of the first embodiment of the network switch management method based on the representational state transfer interface of the present application.

[0026] In this embodiment, the network switch management method based on the representational state transfer interface includes steps S10 to S40: Step S10: receiving configuration instructions from the requesting end; It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, mobile phone, etc., or an electronic device capable of implementing the above functions, a network switch management device based on the representational state transfer interface, etc. The following describes this embodiment and the following embodiments using a network switch management device based on the representational state transfer interface as an example.

[0027] It is understood that configuration instructions include instructions for adding, deleting, checking, and modifying devices. Administrators send requests to add or delete devices, view device status, or modify device configuration.

[0028] Step S20: calling the management function through the representational state transfer interface, executing the configuration instruction on the network switch, and returning the operation result to the requesting end; The Representational State Transfer API (RESTful API) is a network service interface designed based on the REST architectural style. Through RESTful APIs, it provides a unified and concise data exchange method, facilitating integration with various operating systems and device management platforms. All API interfaces adhere to the RESTful style and utilize the HTTP protocol. The interface design follows a "resource + operation" model. Data is formatted in JSON or XML for easy parsing and processing. Response data includes device status information, configuration data, or operation results. During API design, appropriate HTTP status codes are used to represent different request statuses, such as 200 (success), 400 (request error), and 500 (server error). The Representational State Transfer API utilizes 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.

[0029] In a feasible manner, the steps of calling the management function through the representational state transfer interface, executing the configuration instructions on the network switch, and returning the operation results to the requesting end include: executing a device addition request through the representational state transfer interface and creating a new switch entity to obtain an addition operation result; executing a device deletion request through the representational state transfer interface and removing the specified switch entity to obtain a deletion operation result; executing a device query request through the representational state transfer interface and returning the current device parameter set to obtain a query operation result; executing a device modification request through the representational state transfer interface and updating the configuration parameters of the target switch to obtain a modification operation result; returning the addition operation result, the deletion operation result, the query operation result, and the modification operation result to the requesting end.

[0030] As you can see, the device management system, upon receiving the request, invokes the internal management functions of the Sonic switch system, performs the corresponding device operation, and returns the operation results to the administrator in JSON format. Device addition, deletion, modification, and query operations are all completed through a unified API interface, simplifying management operations.

[0031] In a feasible embodiment, after receiving the configuration instruction from the requesting end, it also includes: verifying the digital certificate and access token of the requesting end; parsing the operating authority scope of the access token; when the configuration instruction exceeds the operating authority scope, intercepting the configuration instruction and returning an error code through the representational state transfer interface.

[0032] It is understandable that the purpose of verifying the digital certificate and access token of the requesting end is to ensure the security of the API through encrypted communication and permission management to prevent external attacks and data leakage. All API requests use the HTTPS protocol for encrypted communication to ensure the security of the data transmission process and prevent man-in-the-middle attacks and data leakage. An authentication mechanism based on the I key is implemented in the API interface to ensure that only authenticated users can access the management interface. When accessing the API, the administrator needs to authenticate with the key. Permission control: By setting user roles and permission control (such as administrators, ordinary users, etc.), ensure that users of different roles can only access functions within their authorized scope.

[0033] In a feasible manner, after receiving the configuration instruction from the requesting end, it also 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 the 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 abnormality in the execution of the configuration task is detected.

[0034] It is understandable that task queue management is implemented in the API interface, and requests are queued and executed in order to ensure the smooth progress of configuration tasks. At the same time, the rollback operation of configuration tasks is supported to restore the original configuration in case of problems.

[0035] Step S30: obtaining the operating status data of the network switch through the representational state transfer interface and generating a history report; It is understandable that the real-time operating status of network switches, including device traffic, port status, CPU and memory usage, can be obtained through the RESTful API, helping administrators understand device performance in real time and perform troubleshooting as needed. The specific steps are to regularly request device performance data through the API. GET requests are used to obtain device status data, including the status of switch ports, network traffic, CPU and memory usage, etc. The data is generated by the monitoring module within the switch system and returned to the administrator through the API. The data format is usually JSON or XML, which facilitates further processing and display on the management platform. A scheduled task is implemented within the system to periodically request device status data and store this data in the database for generating historical reports or analysis.

[0036] In a feasible embodiment, the step of obtaining the operating status data of the network switch through the representational state transfer interface and generating a historical report includes: obtaining a collection frequency and a collection index; obtaining the operating status data of the network switch according to the collection frequency and index through the representational state transfer interface; sorting the operating status data by time to obtain a sorting result; and generating a historical report based on the sorting result.

[0037] As you can understand, the collection frequency determines the interval between data collection, while the collection metric determines the content of the device data collected. Users can define the collection frequency and metrics based on their needs. Collected operating status data can be displayed in chronological order. For numerical data such as CPU usage and memory usage, historical reports can reflect changing trends and more clearly display switch status.

[0038] Step S40: Periodically verifying the consistency of the configuration state of the network switch through the representational state transfer interface.

[0039] It is understandable that the configuration items of the network switch can be periodically obtained through the RESTful API, and the consistency of the configuration status of the network switch can be verified based on the comparison of the configuration items before and after.

[0040] It's understandable that by defining clear interface standards, new devices or new functions can be implemented by expanding existing APIs. For example, if support for new switch hardware or new management functions is needed in the future, simply expand the interface and integrate the functions within the existing system without modifying the existing interface design. Compatibility with multiple operating systems and device management platforms is supported, and standardized APIs enable seamless integration with other devices and management platforms, forming a unified device management and operations platform.

[0041] This embodiment provides a network switch management method based on a representational state transfer interface. The present application receives configuration instructions from a requesting end; calls a management function through the representational state transfer interface, executes 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 transfer interface and generates a historical report; and periodically verifies the consistency of the configuration status of the network switch through the representational state transfer interface.

[0042] In summary, this embodiment uniformly manages network switch declarations by calling management functions through the representational state transfer interface, thereby improving the efficiency of network device management.

[0043] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above embodiment 1 can be referred to the above introduction and will not be described in detail later. Figure 2 , step S40 further includes steps S401 to S404: Step S401: Acquire a set of baseline configuration parameters of the network switch; It is understandable that the baseline configuration parameter set refers to a standard configuration preset by an administrator.

[0044] Step S402: collecting a real-time configuration parameter set of the network switch in real time through the representational state transfer interface; It is understandable that the real-time configuration parameter set is the real-time configuration data of the network switch, and the real-time configuration parameter set can be obtained regularly through the representational state transfer interface.

[0045] Step S403: comparing the deviation value between the reference configuration parameter set and the real-time configuration parameter set; By comparing the baseline configuration parameter set with the real-time configuration parameter set, a deviation value can be obtained, and the deviation value can reflect the gap between the state of the network switch and the ideal state.

[0046] Step S404: Verify the consistency of the configuration state of the network switch according to the deviation value.

[0047] As you can understand, the deviation value can be used to determine the configuration status of the network switch and determine its consistency with the preset state. The API interface enables automated device configuration and operation and maintenance. Administrators can write scripts to batch configure parameters for multiple devices through the API, reducing manual operations. Device configuration parameters can be sent to the server in the form of a script via a POST request, automating configuration tasks. For example, an administrator can write a script to batch update the configuration, IP addresses, or security settings of network devices.

[0048] In a feasible embodiment, after verifying the consistency of the configuration status of the network switch according to the deviation value, it also includes: when the consistency meets the requirements, generating a verification report; when the consistency does not meet the requirements, modifying the configuration parameters of the network switch according to the benchmark configuration parameter set, and generating alarm information according to the deviation value.

[0049] It is understandable that when the gap between the network switch and the baseline configuration parameters is too large, the RESTful API can be used to perform configuration update operations on the network switch to maintain the consistency of the network switch configuration.

[0050] This embodiment obtains a baseline configuration parameter set of the network switch; collects a real-time configuration parameter set of the network switch in real time through the representational state transfer interface; compares a 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.

[0051] This embodiment verifies the consistency of the configuration state of the network switch through the representational state transfer interface, which can keep the network switch in an ideal state and improve the efficiency of network device management.

[0052] This application also provides a network switch management device based on a representational state transfer interface, please refer to Figure 3 , the network switch management device based on the representational state transfer interface includes: Receiving module 10, used for receiving configuration instructions from the requesting end; An execution module 20 is configured to call a management function through a representational state transfer interface, execute the configuration instruction on the network switch, and return the operation result to the requesting end; an acquisition module 30, configured to acquire the operating status data of the network switch through the representational state transfer interface and generate a history report; The verification module 40 is configured to periodically verify the consistency of the configuration state of the network switch through the representational state transfer interface.

[0053] This embodiment provides a network switch management method based on a representational state transfer interface. The present application receives configuration instructions from a requesting end; calls a management function through the representational state transfer interface, executes 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 transfer interface and generates a historical report; and periodically verifies the consistency of the configuration status of the network switch through the representational state transfer interface.

[0054] In summary, this embodiment uniformly manages network switch declarations by calling management functions through the representational state transfer interface, thereby improving the efficiency of network device management.

[0055] In one embodiment, the execution module 20 is further configured to execute a device add request through a representational state transfer interface and create a new switch entity to obtain an add operation result; execute a device delete request through a representational state transfer interface and remove a specified switch entity to obtain a delete operation result; execute a device query request through a representational state transfer interface and return a current device parameter set to obtain a query operation result; execute a device modify request through a representational state transfer interface and update the configuration parameters of the target switch to obtain 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.

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

[0057] In one embodiment, the verification module 40 is further used to obtain a baseline configuration parameter set of the network switch; collect the real-time configuration parameter set of the network switch in real time through the representational state transfer 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.

[0058] In one embodiment, the verification module 40 is further configured to generate a verification report when the consistency meets the requirements; and to modify the configuration parameters of the network switch according to the benchmark configuration parameter set and generate an alarm message according to the deviation value when the consistency does not meet the requirements.

[0059] In one embodiment, the receiving module 10 is further used to verify the digital certificate and access token of the requesting end; parse the operating authority scope of the access token; when the configuration instruction exceeds the operating authority scope, intercept the configuration instruction and return an error code through the representational state transfer interface.

[0060] In one embodiment, the receiving module 10 is further used to parse the batch operation parameters in the configuration instructions; 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 last valid configuration state when an abnormality in the execution of the configuration task is detected.

[0061] The network switch management device based on a representational state transfer interface provided in this application, which utilizes the network switch management method based on a representational state transfer interface in the above-mentioned 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 transfer interface provided in this application are the same as the beneficial effects of the network switch management method based on a representational state transfer interface provided in the above-mentioned embodiments. The other technical features of the network switch management device based on a representational state transfer interface are the same as those disclosed in the above-mentioned embodiments and are not further described here.

[0062] The present application provides a network switch management device based on a representational state transfer interface. The network switch management device based on the representational state transfer 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 so that the at least one processor can execute the network switch management method based on the representational state transfer interface in the above-mentioned embodiment 1.

[0063] Reference below Figure 4 , which shows a schematic diagram of the structure of a network switch management device based on a representational state transfer interface suitable for implementing embodiments of the present application. The network switch management device based on the representational state transfer interface in the embodiments of the present application can 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 (such as in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 4 The network switch management device based on the representational state transfer interface shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0064] like Figure 4As shown, a network switch management device based on a representational state transfer interface may include a processing device 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes based on programs stored in a ROM (Read Only Memory) 1002 or programs loaded from a storage device 1003 into a 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 transfer interface. Processing device 1001, ROM 1002, and RAM 1004 are interconnected via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to I / O interface 1006: input device 1007 including, for example, a touch screen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; output device 1008 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage device 1003 including, for example, a magnetic tape, hard disk, etc.; and communication device 1009. Communication device 1009 can allow the network switch management device based on the representational state transfer interface to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows a network switch management device based on the representational state transfer interface with various systems, it should be understood that implementation or presence of all the illustrated systems is not required. More or fewer systems may be implemented or present instead.

[0065] In particular, according to the embodiments disclosed in the present application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, the embodiments disclosed in the present application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program comprising program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.

[0066] The network switch management device based on a representational state transfer interface provided in this application, which employs the network switch management method based on a representational state transfer interface in the above-mentioned embodiment, 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 transfer interface provided in this application are the same as the beneficial effects of the network switch management method based on a representational state transfer interface provided in the above-mentioned embodiment. The other technical features of the network switch management device based on a representational state transfer interface are the same as those disclosed in the above-mentioned embodiment and are not further described here.

[0067] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0068] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

[0069] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, a computer program) stored thereon, wherein the computer-readable program instructions are used to execute the network switch management method based on the representational state transfer interface in the above embodiment.

[0070] The computer-readable storage medium provided herein may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems, or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including, but not limited to, wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.

[0071] The computer-readable storage medium may be included in a network switch management device based on a representational state transfer interface; or may exist independently without being assembled into a network switch management device based on a representational state transfer interface.

[0072] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by a network switch management device based on a representational state transfer interface, the network switch management device based on the representational state transfer interface: receives configuration instructions from a requesting end; calls a management function through the representational state transfer interface, executes the configuration instructions on the network switch, and returns the operation results to the requesting end; obtains operating status data of the network switch through the representational state transfer interface and generates a historical report; and periodically verifies the consistency of the configuration status of the network switch through the representational state transfer interface.

[0073] Computer program code for performing the operations of the present application may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0074] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, program segment or a part of code, and the module, program segment or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented by a dedicated hardware-based system that performs the specified function or operation, or can be implemented by a combination of dedicated hardware and computer instructions.

[0075] The modules described in the embodiments of the present application may be implemented in software or hardware, wherein the name of a module does not necessarily limit the unit itself.

[0076] The computer-readable storage medium provided in this application stores computer-readable program instructions (i.e., a computer program) for executing the aforementioned method for managing a network switch based on a representational state transfer interface. This computer-readable storage medium can address the technical problem of improving the efficiency of network device management. Compared to the prior art, the beneficial effects of the computer-readable storage medium provided in this application are similar to those of the method for managing a network switch based on a representational state transfer interface provided in the aforementioned embodiments, and are not further elaborated here.

[0077] The present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned network switch management method based on the representational state transfer interface when executed by a processor.

[0078] The computer program product provided in this application can solve the technical problem of improving 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 representational state transfer interface provided in the above embodiment, and will not be repeated here.

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

Claims

1. A network switch management method based on a representational state transfer interface, characterized in that: The method includes: Receive configuration instructions from the requesting end; Invoke the management function through the representational state transfer interface, execute the configuration instruction on the network switch, and return the operation result to the requesting end; Obtaining the operating status data of the network switch through the representational state transfer interface and generating a historical report; The consistency of the configuration state of the network switch is periodically verified through the representational state transfer interface.

2. The method according to claim 1, wherein The step of calling the management function through the representational state transfer interface, executing the configuration instruction on the network switch, and returning the operation result to the requesting end includes: Execute the device add request and create a new switch entity through the representational state transfer interface, and obtain the add operation result; Execute the device deletion request and remove the specified switch entity through the representational state transfer interface to obtain the deletion operation result; Execute device query requests through the representational state transfer interface and return the current device parameter set to obtain query operation results; Execute the device modification request through the representational state transfer interface and update the configuration parameters of the target switch to obtain the modification operation result; The adding operation result, the deleting operation result, the query operation result and the modifying operation result are returned to the requesting end.

3. The method according to claim 1, wherein The step of obtaining the operating status data of the network switch through the representational state transfer interface and generating a history report includes: Get the collection frequency and collection indicators; Acquiring the operating status data of the network switch through the representational state transfer interface according to the acquisition frequency; Sorting the operating status data by time to obtain a sorting result; A history report is generated according to the ranking results.

4. The method according to claim 1, wherein The step of periodically verifying the consistency of the configuration state of the network switch through the representational state transfer interface includes: Obtaining a set of baseline configuration parameters of the network switch; Collecting a real-time configuration parameter set of the network switch in real time through the representational state transfer interface; Comparing the deviation value between the baseline configuration parameter set and the real-time configuration parameter set; The consistency of the configuration state of the network switch is verified according to the deviation value.

5. The method according to claim 4, wherein After verifying the consistency of the configuration state of the network switch according to the deviation value, the method further includes: When the consistency meets the requirements, a verification report is generated; When the consistency does not meet the requirement, the configuration parameters of the network switch are modified according to the reference configuration parameter set, and an alarm message is generated according to the deviation value.

6. The method according to claim 1, wherein After receiving the configuration instruction from the requesting end, the method further includes: Verify the digital certificate and access token of the requesting end; Parsing the operation permission scope of the access token; When the configuration instruction exceeds the scope of the operation authority, the configuration instruction is intercepted and an error code is returned through the representational state transfer interface.

7. The method according to claim 1, wherein After receiving the configuration instruction from the requesting end, the method further includes: Parsing batch operation parameters in the configuration instruction; Splitting the batch operation parameters into atomic configuration tasks; Adding the atomic configuration task to an 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 is automatically rolled back to the last valid configuration state.

8. A network switch management device based on a representational state transfer interface, characterized in that: The device comprises: A receiving module, used for receiving configuration instructions from the requesting end; An execution module, configured to call a management function through a representational state transfer interface, execute the configuration instruction on the network switch, and return the operation result to the requesting end; an acquisition module, configured to acquire the operating status data of the network switch through the representational state transfer interface and generate a history report; A verification module is used to periodically verify the consistency of the configuration state of the network switch through the representational state transfer interface.

9. A network switch management device based on a representational state transfer interface, characterized in that: The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the network switch management method based on the representational state transfer interface 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 network switch management method based on the representational state transfer interface according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

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

    CN119292827A

  • Object based modeling for software application query generation

    US20100153432A1

  • Telemetry-based network switch configuration validation

    US20210409271A1

  • Distributed quorum authorization enforcement through an API gateway

    US20240004983A1

  • Automated code verification service and infrastructure therefor

    WO2020046981A1