Method and device for configuring OTN, IPRAN or PTN communication equipment
By converting configuration information based on the YANG model into XML format configuration files and issuing them to communication devices through the network configuration protocol, the problems of complex configuration and low degree of automation in the existing technology are solved, automated configuration and automatic rollback are realized, and configuration efficiency and reliability are improved.
Patent Information
- Application Number
- CN202411785933.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-05
- Publication Date
- 2025-03-25
AI Technical Summary
The existing communication device configuration technology relies on CLI or SNMP, lacks standardized interfaces, is difficult to recover configuration errors, and is complex in configuration comparison and analysis, making it difficult to achieve automated configuration and automatic rollback.
The configuration information based on the YANG model is used to convert it into an XML format configuration file, and is sent to the communication device through the network configuration protocol, and the response message is matched with the expected message, so as to realize automatic configuration and automatic rollback.
It realizes the automated configuration of communication equipment, automatically analyzes whether the configuration is successful or not, and automatically rolls back when the configuration fails, improving configuration efficiency and reliability.
Smart Images

Figure CN119697022A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present disclosure relate to the field of communication technology, and in particular to a method and apparatus for configuring OTN, IPRAN or PTN communication equipment. Background Art
[0002] Communication equipment, such as Optical Transport Network (OTN) communication equipment, IP Bearer Network (IPRAN) communication equipment and Packet Transport Network (PTN) communication equipment, is one of the core equipment in modern communication networks. It can support large-capacity optical fiber transmission and provide multiple services through multiplexing technology. However, as the scale and complexity of the network increase, it becomes increasingly difficult to manually manage and configure communication equipment.
[0003] At present, common communication equipment configuration technologies mainly rely on command line interface (CLI) or management methods based on simple network management protocol (SNMP). The disadvantages of these technologies are the lack of standardized interfaces, difficulty in recovering after configuration errors, and complex configuration comparison and analysis. Summary of the invention
[0004] In view of this, the present application provides an OTN, IPRAN or PTN communication equipment configuration method and apparatus, which can realize automatic configuration, automatically analyze whether the configuration is successful, and automatically roll back when the configuration is unsuccessful.
[0005] To solve the above technical problems, the technical solution of this application is implemented as follows: In one embodiment, a method for configuring an OTN, IPRAN or PTN communication device is provided, the method comprising: Selecting a networking mode for a communication device, and determining configuration information corresponding to the selected networking mode; wherein the configuration information is configured based on a YANG model; Generate a configuration file in XML format using the determined configuration information, and send it to the communication device through a network configuration protocol, so that the communication device executes the configuration file; In response to a first response message returned by the communication device when executing the configuration file to obtain an execution result, matching the first response message with a configured first expected message; If the match fails, a report on configuration information configuration error is output; and a rollback instruction is sent to the communication device, so that the communication device rolls back the configuration information; If the match is successful, the first associated information is stored; wherein the first associated information includes: communication device identification, networking mode and configuration information; the first associated information is used to query the configuration information and networking mode of the corresponding communication device.
[0006] The matching of the first response message with the configured first expected message includes: Respectively obtain field values corresponding to first designated fields in the first response message and the first expected message; the first designated field includes any one or any combination of the following: service bandwidth information, VLAN information, port information, and network protocol; Match the obtained field values corresponding to the same first specified field one by one respectively; If all of the first designated fields match, it is determined that the match is successful; otherwise, it is determined that the match is unsuccessful.
[0007] Before selecting a networking mode for the communication device, the method further includes: Establishing a connection with the communication device through a network configuration protocol; Sending a device information acquisition request to the communication device; In response to a second response message sent by the communication device, matching the second response message with a configured second expected message; If the match fails, a report indicating device information acquisition error will be output; If the match is successful, the second association information is stored; wherein the second association information includes: a communication device identification and device information; the second association information is used to query the device information of the communication device.
[0008] The matching of the second response message with the configured second expected message includes: Respectively obtain the field values corresponding to the second specified field in the second response message and the second expected message; wherein the second specified field includes any one or any combination of the following: network element name, UUID of the network element, running status of the network element, product name, software version, hardware version, network protocol supported by the network element, number of boards supported by the device, gateway information, and alarm information; Match the obtained field values corresponding to the same second specified field one by one respectively; If all of the second designated fields match, it is determined that the match is successful; otherwise, it is determined that the match is unsuccessful.
[0009] Wherein, after the matching fails and before the rollback instruction is sent to the communication device, the method further comprises: Obtaining whether the device state of the communication device is a dangerous state; In response to the device state being a non-dangerous state, outputting a report on configuration information configuration error, and sending a rollback instruction to the communication device; In response to the device being in a dangerous state, outputting an emergency state notification; If the dangerous state is not eliminated within a preset time, a report of configuration information configuration error is output, and a rollback instruction is sent to the communication device; If the dangerous state is eliminated within the preset time, the first associated information is stored.
[0010] Wherein, the method further comprises: Sending a performance reporting notification to the communication device; wherein the performance reporting notification carries a performance indicator that needs to be reported; the performance indicator includes one or any combination of the following: network bandwidth, device port status, number of error packets, error seconds, and bit error rate; In response to the performance abnormality notification reported by the communication device, obtaining the performance indicator and the performance indicator value in the performance abnormality notification; and storing; Analyze the stored performance indicators and the corresponding performance indicator values, obtain the causes of performance anomalies, and output a performance analysis report.
[0011] Wherein, the method further comprises: Sending an alarm reporting notification to the communication device; In response to the alarm notification reported by the communication device, obtaining the alarm content and the alarm time carried in the alarm notification and storing them; Analyze the stored alarm content and alarm time, obtain the frequency, duration and severity of the alarm, and output the alarm analysis report.
[0012] In another embodiment, an OTN, IPRAN or PTN communication equipment configuration device is provided, the device comprising: A determination unit, configured to select a networking mode for a communication device, and determine configuration information corresponding to the selected networking mode; wherein the configuration information is configured based on a YANG model; A generating unit, used for generating a configuration file in XML format from the determined configuration information; A sending unit, used for sending the configuration file to the communication device through a network configuration protocol, so that the communication device executes the configuration file; a matching unit, configured to, in response to a first response message returned by the communication device when executing the configuration file to obtain an execution result, match the first response message with a configured first expected message; A sending unit, configured to output a report of configuration information configuration error if the match fails; and send a rollback instruction to the communication device so that the communication device rolls back the configuration information; A storage unit is used to store first associated information if the match is successful; wherein the first associated information includes: communication device identification, networking mode and configuration information; the first associated information is used to query the configuration information and networking mode of the corresponding communication device.
[0013] In another embodiment, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements an OTN, IPRAN, or PTN communication device configuration method when executing the program.
[0014] In another embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, a method for configuring an OTN, IPRAN or PTN communication device is implemented.
[0015] As can be seen from the above technical solution, in the above embodiment, the configuration information configured based on the YANG model is converted into a configuration file in XML format, and sent to the communication device through the configuration protocol, and the first response message returned by the communication device when executing the configuration file to obtain the execution result is matched with the set first expected message to determine whether the configuration is successfully sent. If so, the configuration is sent and the relevant information of the configuration is stored; otherwise, a report on the configuration information configuration error is output, and the communication device is notified to roll back. This solution can realize automatic configuration, automatically analyze whether the configuration is successful, and automatically roll back if the configuration is unsuccessful. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0017] Figure 1 A schematic diagram of a process for obtaining device information of a communication device in an embodiment of the present application; Figure 2 A schematic diagram of a configuration process of an OTN, IPRAN or PTN communication device in an embodiment of the present application; Figure 3 A schematic diagram of another OTN, IPRAN or PTN communication equipment configuration process in an embodiment of the present application; Figure 4 This is a schematic diagram of the performance abnormality monitoring process in an embodiment of the present application; Figure 5 This is a schematic diagram of the alarm monitoring process in the embodiment of the present application; Figure 6This is a schematic diagram of the structure of an OTN, IPRAN or PTN communication equipment configuration device in an embodiment of the present application; Figure 7 A schematic diagram of the physical structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0018] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0019] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe the order or precedence of the objects. It should be understood that the data used in this way can be interchanged where appropriate, so that the implementation of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0020] The technical solution of the present invention is described in detail with specific embodiments below. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
[0021] Currently, common network device configuration technologies mainly rely on CLI or SNMP-based management methods. The disadvantages of these technologies are: Lack of standardized interfaces: CLI interfaces vary from vendor to vendor, making it difficult to reuse configuration scripts across devices. Difficulty recovering from configuration errors: When a configuration error occurs, restoring the device to its original state often requires manual operations by maintenance personnel, increasing the risk of human error and recovery time. Configuration comparison and analysis are complex: Existing technologies lack an efficient configuration comparison mechanism, making it difficult to accurately detect configuration differences, making it difficult to discover and repair configuration inconsistencies.
[0022] Based on the above problems, an OTN, IPRAN or PTN communication equipment configuration method is provided in an embodiment of the present application, that is, the method can be applied to OTN communication equipment, IPRAN communication equipment or PTN communication equipment, and the configuration information configured based on the YANG model is converted into a configuration file in XML format, and sent to the communication equipment through the configuration protocol, and the first response message returned by the communication equipment when executing the configuration file to obtain the execution result is matched with the set first expected message to determine whether the configuration is successfully sent. If so, the configuration is sent and the relevant information of the configuration is stored; otherwise, a report on the configuration information configuration error is output, and the communication equipment is notified to roll back. This solution can realize automatic configuration, automatically analyze whether the configuration is successful, and can automatically roll back if the configuration is unsuccessful.
[0023] The communication device in the embodiment of the present application may be an OTN device, an IPRAN device or a PTN device, and the implementation methods thereof are the same.
[0024] The following is a detailed description of the configuration process of OTN, IPRAN or PTN communication equipment implemented in the embodiment of the present application in conjunction with the accompanying drawings.
[0025] Before implementing the configuration of OTN, IPRAN or PTN communication equipment in the embodiment of the present application, it is necessary to pre-configure different configuration information for different networking modes, and configure the first expected message and the second expected message. The first expected message is used to determine whether the configuration of the configuration information is successful; the second expected message is used to determine whether the acquired configuration information meets expectations. When the first expected message and the second expected message are specifically implemented, they can also be implemented by saving relevant fields in XML format. In the embodiment of the present application, the method of pre-setting the content for example is not limited.
[0026] Configuration information is configured based on the YANG model. YANG is a data model language that can efficiently describe device configuration information when combined with the Network Configuration (NETCONF) protocol. Through the YANG model, the system can flexibly define the configuration structure of communication devices, provide precise configuration management and automation support, and avoid the limitations of traditional CLI interfaces.
[0027] In the embodiment of the present application, the device for configuring the configuration information of the communication device can be deployed on a server, or can be any device that can communicate with the communication device, such as a PC.
[0028] The network configuration protocol is a standard network device configuration information used to interact with communication devices through a secure communication channel. In the embodiment of the present application, after establishing a connection with the communication device through the network configuration protocol, device information is obtained based on the network configuration protocol, configuration information is automatically issued, performance anomalies are monitored, and alarm monitoring is performed.
[0029] See also Figure 1 , Figure 1 This is a flow chart of obtaining device information of a communication device in an embodiment of the present application. The specific steps are: Step 101: Establish a connection with a communication device through a network configuration protocol.
[0030] During the connection establishment process, if the connection is not established successfully, a connection establishment request is initiated to the communication device again until the connection is established successfully, or the establishment request is terminated when the number of establishment times reaches a preset number.
[0031] In subsequent communications with the communication device, interactions are performed through the established connection, and messages are transmitted through the network configuration protocol.
[0032] Step 102: Send a device information acquisition request to the communication device.
[0033] The communication device receives the device information acquisition request and responds with the corresponding device information of the request through a second response message.
[0034] In specific implementation, the device information includes multiple contents, which can be requested through one request message or through multiple messages.
[0035] Step 103: In response to the communication device sending a second response message, the second response message is matched with a configured second expected message.
[0036] The second expected message is pre-configured and used to determine whether the second message of the response meets the expectations; the second expected message includes a second specified field, and the second specified field includes any one or any combination of the following: network element name, UUID of the network element, operating status of the network element, product name, software version, hardware version, network protocols supported by the network element, the number of boards supported by the device, gateway information, and alarm information.
[0037] In this step, matching the second response message with the configured second expected message includes: Respectively obtain field values corresponding to the second specified field in the second response message and the second expected message; If the second designated field includes: product name, software version, hardware version; then obtain the field values of the three fields of product name, software version and hardware version in the second response message, such as T1, M1 and N1 respectively; obtain the field values of the three fields of product name, software version and hardware version in the second expected message, such as T2, M2 and N2 respectively; Match the obtained field values corresponding to the same second specified field one by one respectively; Match T1 and T2; match M1 and M2, and match N1 and N2; If all second designated fields match, it is determined that the match is successful; otherwise, it is determined that the match is unsuccessful.
[0038] In a specific embodiment, there is no restriction on the configuration of the matching rule. For example, the matching rules may be completely identical, or the matching rules may be determined to be matched if the similarity reaches a preset similarity value.
[0039] Step 104: If the matching fails, a report indicating a device information acquisition error is output, and this process ends.
[0040] Output device information acquisition error reports so that managers can promptly learn the specific causes of errors and solve the problems.
[0041] Step 105: If the match is successful, the second association information is stored; wherein the second association information includes: a communication device identification and device information, and the second association information is used to query the device information of the communication device.
[0042] Storing the device information of the communication device locally can be used to directly obtain the required device information locally and subsequently compare whether the device information has changed.
[0043] In the embodiment of the present application, the device information of the communication device can be automatically obtained, and when a failure to obtain the device information occurs, the cause of the failure can be promptly understood and then modified in a timely manner to avoid affecting subsequent communications of the communication device.
[0044] See also Figure 2 , Figure 2 This is a schematic diagram of a configuration process of an OTN, IPRAN or PTN communication device in an embodiment of the present application. The specific steps are: Step 201, select a networking mode for a communication device, and determine configuration information corresponding to the selected networking mode.
[0045] Different configuration information corresponding to different networking modes is pre-configured. After a networking mode is selected for a communication device, the configuration information of the communication device can be determined according to the networking mode.
[0046] Step 202: Generate a configuration file in XML format using the determined configuration information, and send it to the communication device through a network configuration protocol so that the communication device executes the configuration file.
[0047] When the communication device receives the configuration file, it automatically performs configuration based on the configuration file and returns the configuration result through the first response message.
[0048] Step 203: In response to a first response message returned by the communication device when executing the configuration file to obtain an execution result, the first response message is matched with a configured first expected message.
[0049] The first expected message is pre-configured and used to determine whether the first response message meets expectations; the first expected message includes a first specified field, and the first specified field includes any one or any combination of the following: service bandwidth information, VLAN information, port information, and network protocol.
[0050] In this step, the first response message is matched with the configured first expected message, including: Respectively obtain field values corresponding to the first specified field in the first response message and the first expected message; If the first designated field includes: port information and network protocol, then obtain the field values of the port information and network protocol fields in the first response message, such as A1 and B1 respectively; obtain the field values of the port information and network protocol fields in the first expected message, such as A2 and B2 respectively; Match the obtained field values corresponding to the same first specified field one by one respectively; Match A1 and A2; Match B1 and B2; If all first designated fields match, it is determined that the match is successful; otherwise, it is determined that the match is unsuccessful.
[0051] In a specific embodiment, there is no restriction on the configuration of the matching rule. For example, the matching rules may be completely identical, or the matching rules may be determined to be matched if the similarity reaches a preset similarity value.
[0052] Step 204: If the match fails, a report of configuration information error is output, and a rollback instruction is sent to the communication device, so that the communication device rolls back the configuration information. This process ends.
[0053] Output configuration information configuration error reports so that managers can promptly learn the specific causes of errors and solve the problems.
[0054] Step 205: If the match is successful, the first association information is stored; wherein the first association information includes: communication device identification, networking mode and configuration information; the first association information is used to query the configuration information and networking mode of the corresponding communication device.
[0055] In this embodiment, the configuration information configured based on the YANG model is converted into a configuration file in XML format, and sent to the communication device through the configuration protocol, and the first response message returned by the communication device when executing the configuration file to obtain the execution result is matched with the set first expected message to determine whether the configuration is successfully sent. If so, the configuration is sent and the relevant information of the configuration is stored; otherwise, a report on the configuration information configuration error is output, and the communication device is notified to roll back. This solution can realize automatic configuration, automatically analyze whether the configuration is successful, and automatically roll back if the configuration is unsuccessful.
[0056] See also Figure 3 , Figure 3 This is another OTN, IPRAN or PTN communication equipment configuration flow diagram in the embodiment of the present application. The specific steps are: Step 301: Select a networking mode for a communication device and determine configuration information corresponding to the selected networking mode.
[0057] Different configuration information corresponding to different networking modes is pre-configured. After a networking mode is selected for a communication device, the configuration information of the communication device can be determined according to the networking mode.
[0058] Step 302: Generate a configuration file in XML format using the determined configuration information, and send it to the communication device through a network configuration protocol so that the communication device executes the configuration file.
[0059] When the communication device receives the configuration file, it automatically performs configuration based on the configuration file and returns the configuration result through the first response message.
[0060] Step 303: In response to a first response message returned by the communication device when executing the configuration file to obtain an execution result, the first response message is matched with a configured first expected message.
[0061] The first expected message is pre-configured and used to determine whether the first response message meets expectations; the first expected message includes a first specified field, and the first specified field includes any one or any combination of the following: service bandwidth information, VLAN information, port information, and network protocol.
[0062] In this step, the first response message is matched with the configured first expected message, including: Respectively obtain field values corresponding to the first specified field in the first response message and the first expected message; Match the obtained field values corresponding to the same first specified field one by one respectively; If all first designated fields match, it is determined that the match is successful; otherwise, it is determined that the match is unsuccessful.
[0063] In a specific embodiment, there is no restriction on the configuration of the matching rule. For example, the matching rules may be completely identical, or the matching rules may be determined to be matched if the similarity reaches a preset similarity value.
[0064] Step 304 , if the match fails, determine whether the device state is a dangerous state; if so, execute step 305 ; otherwise, execute step 308 .
[0065] In specific implementation, it is possible to pre-configure which states are dangerous states, such as an alarm not being restored, a performance indicator exceeding a threshold, etc., which are determined as dangerous states; but it is not limited to this.
[0066] The alarm status is usually also carried in the first response message and can be directly obtained. If there is no way to carry it, the device status of the communication device is obtained from the communication device again.
[0067] Step 305: Output emergency status notification.
[0068] The emergency status notification here enables the administrator to promptly understand the dangerous status of the communication equipment and provide a timely solution.
[0069] Step 306: If the dangerous state is not eliminated within the preset time, a rollback instruction is sent to the communication device so that the communication device rolls back the configuration information. This process ends.
[0070] Step 307: If the dangerous state has been eliminated within the preset time, the first associated information is stored and the process ends.
[0071] This dangerous state-based processing is to prevent the dangerous state of the device due to hardware abnormalities such as fiber disconnection and optical module damage after the configuration information is issued. This kind of dangerous state can be solved by manually replacing the hardware. If the dangerous state is eliminated, there is no need to roll back.
[0072] Step 308: Output a report of configuration information configuration error, and send a rollback instruction to the communication device, so that the communication device rolls back the configuration information. This process ends.
[0073] Step 309: If the match is successful, the first association information is stored.
[0074] The first associated information includes: communication device identification, networking mode and configuration information; the first associated information is used to query the configuration information and networking mode of the corresponding communication device.
[0075] In this embodiment, the configuration information configured based on the YANG model is converted into a configuration file in XML format, and sent to the communication device through the configuration protocol, and the first response message returned by the communication device when executing the configuration file to obtain the execution result is matched with the set first expected message to determine whether the configuration is successfully sent. If so, the configuration is sent and the relevant information of the configuration is stored; otherwise, the device status of the communication device is first determined, and different processing methods are performed; if the dangerous state is eliminated, the configuration information is not rolled back; if it is not eliminated, or the configuration failure is not caused by the dangerous state itself, a report on the configuration error of the configuration information is output, and the communication device is notified to roll back. This solution can realize automatic configuration, automatically analyze whether the configuration is successful, and can automatically roll back if the configuration is unsuccessful.
[0076] See also Figure 4 , Figure 4 This is a schematic diagram of the performance abnormality monitoring process in the embodiment of this application. The specific steps are: Step 401: Send a performance reporting notification to a communication device; the performance reporting notification carries performance indicators that need to be reported.
[0077] The performance indicators include one or any combination of the following: network bandwidth, device port status, number of error packets, error seconds, and bit error rate.
[0078] The number of error packets can be the number of CRC error packets at the Ethernet layer, the errored seconds can be the errored seconds of the regeneration section of the SDH layer, the errored seconds of the multiplexing section, the errored seconds of the ODUK_PM layer, the errored seconds of the ODUK_SM layer, and the bit error rate can be the front and back error correction FEC bit error rate.
[0079] The above performance indicators are just examples and are not limited to them in specific implementation.
[0080] Step 402: In response to the performance abnormality notification reported by the communication device, obtain the performance indicator and the performance indicator value in the performance abnormality notification; and store them.
[0081] Step 403: Analyze the stored performance indicators and corresponding performance indicator values, obtain the causes of performance anomalies, and output a performance anomaly report.
[0082] The timely reporting of abnormal performance indicators in the embodiment of the present application can obtain the abnormal cause through the analysis of the performance indicators, so as to notify the management personnel, timely discover the abnormality of the communication equipment, and thus solve the problem. See also Figure 5 , Figure 5 This is a schematic diagram of the alarm monitoring process in the embodiment of this application. The specific steps are: Step 501: Send an alarm reporting notification to a communication device.
[0083] Step 502: In response to the alarm notification reported by the communication device, the alarm content and alarm time carried in the alarm notification are obtained and stored.
[0084] Step 503: Analyze the stored alarm content and alarm time, obtain the frequency, duration and severity of the alarm, and output an alarm analysis report.
[0085] In the embodiment of the present application, by monitoring the alarms, the frequency, duration and severity of the alarms can be analyzed in a timely manner, and an alarm analysis report can be output to the management personnel, so that the management personnel can understand the alarm status of the communication equipment in a timely manner and facilitate problem solving.
[0086] Based on the same inventive concept, an embodiment of the present application also provides an OTN, IPRAN or PTN communication equipment configuration device. Figure 6 , Figure 6 This is a schematic diagram of the structure of an OTN, IPRAN or PTN communication equipment configuration device in an embodiment of the present application. The device includes: The determining unit 601 is used to select a networking mode for the communication device and determine configuration information corresponding to the selected networking mode; wherein the configuration information is configured based on a YANG model; A generating unit 602 is used to generate a configuration file in XML format from the determined configuration information; The sending unit 603 is used to send the configuration file to the communication device through the network configuration protocol, so that the communication device executes the configuration file; A matching unit 604, configured to match the first response message with a configured first expected message in response to a first response message returned by the communication device when executing the configuration file to obtain an execution result; The sending unit 605 is used to output a report of configuration information error if the match fails; and send a rollback instruction to the communication device so that the communication device rolls back the configuration information; The storage unit 606 is used to store the first associated information if the match is successful; wherein the first associated information includes: communication device identification, networking mode and configuration information; the first associated information is used to query the configuration information and networking mode of the corresponding communication device.
[0087] In another example, The matching unit 604 is specifically used to obtain the field values corresponding to the first specified fields in the first response message and the first expected message respectively when matching the first response message with the configured first expected message; the first specified field includes any one or any combination of the following: service bandwidth information, VLAN information, port information, network protocol; the field values corresponding to the obtained same first specified fields are matched one by one; if all the first specified fields are matched, it is determined that the match is successful; otherwise, it is determined that the match is unsuccessful.
[0088] In another example, the apparatus further includes: an establishing unit 607; Establishing unit 607, used to establish a connection with the communication device through a network configuration protocol; The sending unit 605 is further used to send a device information acquisition request to the communication device; if the match fails, a device information acquisition error report is output; The matching unit 604 is further configured to match the second response message with the configured second expected message in response to the second response message sent by the communication device; The storage unit 606 is further used to store the second association information if the match is successful; wherein the second association information includes: a communication device identification and device information; and the second association information is used to query the device information of the communication device.
[0089] In another example, The matching unit 604 is specifically used to obtain the field values corresponding to the second specified field in the second response message and the second expected message when matching the second response message with the configured second expected message; wherein the second specified field includes any one or any combination of the following: network element name, UUID of the network element, operation status of the network element, product name, software version, hardware version, network protocol supported by the network element, number of boards supported by the device, gateway information, and alarm information; respectively match the field values corresponding to the obtained same second specified fields one by one; if all the second specified fields are matched, it is determined that the match is successful; otherwise, it is determined that the match is unsuccessful.
[0090] In another example, the apparatus further includes: an acquisition unit 608; An acquisition unit 608 is used to acquire whether the device state of the communication device is a dangerous state if the matching fails; The sending unit 605 is further configured to output a configuration information configuration error report in response to the device state being a non-dangerous state, and send a rollback instruction to the communication device; in response to the device state being a dangerous state, output an emergency state notification; if the dangerous state is not eliminated within a preset time, output a configuration information configuration error report and send a rollback instruction to the communication device; The storage unit 606 is further configured to store the first associated information if the dangerous state is eliminated within a preset time.
[0091] In another example, the apparatus further includes: an analysis unit; The sending unit 605 is further used to send a performance reporting notification to the communication device; wherein the performance reporting notification carries the performance indicators that need to be reported; the performance indicators include one or any combination of the following: network bandwidth, device port status, number of error packets, error seconds, and bit error rate; The storage unit 606 is further configured to obtain the performance indicator and the performance indicator value in the performance abnormality notification in response to the performance abnormality notification reported by the communication device, and store the performance indicator and the performance indicator value in the performance abnormality notification; An analysis unit 609 is used to analyze the stored performance indicators and the corresponding performance indicator values to obtain the reasons for the performance abnormality; The sending unit 605 is further configured to output a performance analysis report.
[0092] In another example, The sending unit 605 is further configured to send an alarm reporting notification to the communication device; The storage unit 606 is further configured to obtain, in response to the alarm notification reported by the communication device, the alarm content and the alarm time carried in the alarm notification, and store them; The analysis unit 609 is further used to analyze the stored alarm content and alarm time to obtain the frequency, duration and severity of the alarm; The sending unit 605 is further used to output an alarm analysis report.
[0093] In another embodiment, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the OTN, IPRAN, or PTN communication equipment configuration method when executing the program.
[0094] In another embodiment, a computer-readable storage medium is provided, on which computer instructions are stored, and when the instructions are executed by a processor, a method for configuring an OTN, IPRAN or PTN communication device is implemented.
[0095] Figure 7 Schematic diagram of the physical structure of an electronic device provided by an embodiment of the present invention. Figure 7 As shown, the electronic device may include: a processor (Processor) 710, a communication interface (Communications Interface) 720, a memory (Memory) 730 and a communication bus 740, wherein the processor 710, the communication interface 720, and the memory 730 communicate with each other through the communication bus 740. The processor 710 may call the logic instructions in the memory 730 to execute the following method: Selecting a networking mode for the communication device and determining configuration information corresponding to the selected networking mode; wherein the configuration information is configured based on a YANG model; Generate a configuration file in XML format from the determined configuration information, and send it to the communication device through a network configuration protocol, so that the communication device executes the configuration file; In response to a first response message returned by the communication device when executing the configuration file to obtain an execution result, matching the first response message with a configured first expected message; If the match fails, a report on configuration information configuration error is output; and a rollback instruction is sent to the communication device, so that the communication device rolls back the configuration information; If the match is successful, the first associated information is stored; wherein the first associated information includes: communication device identification, networking mode and configuration information; the first associated information is used to query the configuration information and networking mode of the corresponding communication device.
[0096] In addition, the logic instructions in the above-mentioned memory 730 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0097] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0098] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0099] The flow chart and block diagram in the accompanying drawings of the present application show the possible architecture, function and operation of the system, method and computer program product according to the various embodiments disclosed in the present application. In this regard, each box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the above-mentioned module, program segment or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the box can also occur in the order of the standards in different figures. For example, the boxes represented by two connections 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 or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0100] Those skilled in the art will appreciate that the features described in the various embodiments and / or claims disclosed in this application may be combined and / or combined in a variety of ways, even if such combinations and / or combinations are not explicitly described in this application. In particular, without departing from the spirit and teachings of this application, the features described in the various embodiments and / or claims of this application may be combined and / or combined in a variety of ways, and all of these combinations and / or combinations fall within the scope disclosed in this application.
[0101] Specific embodiments are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core ideas, and is not used to limit the present application. For those skilled in the art, changes can be made in the specific implementation methods and application scopes according to the ideas, spirits and principles of the present invention, and any modifications, equivalent substitutions, improvements, etc. made therein should be included in the scope of protection of this application.
Claims
1. A method for configuring an OTN, IPRAN or PTN communication device, characterized in that: The method comprises: Selecting a networking mode for a communication device, and determining configuration information corresponding to the selected networking mode; wherein the configuration information is configured based on a YANG model; Generate a configuration file in XML format using the determined configuration information, and send it to the communication device through a network configuration protocol, so that the communication device executes the configuration file; In response to a first response message returned by the communication device when executing the configuration file to obtain an execution result, matching the first response message with a configured first expected message; If the match fails, a report on configuration information configuration error is output; and a rollback instruction is sent to the communication device, so that the communication device rolls back the configuration information; If the match is successful, the first associated information is stored; wherein the first associated information includes: communication device identification, networking mode and configuration information; the first associated information is used to query the configuration information and networking mode of the corresponding communication device.
2. The method according to claim 1, characterized in that The matching the first response message with the configured first expected message includes: Respectively obtain field values corresponding to first designated fields in the first response message and the first expected message; the first designated field includes any one or any combination of the following: service bandwidth information, VLAN information, port information, and network protocol; Match the obtained field values corresponding to the same first specified field one by one respectively; If all of the first designated fields match, it is determined that the match is successful; otherwise, it is determined that the match is unsuccessful.
3. The method according to claim 1, characterized in that Before selecting a networking mode for the communication device, the method further comprises: Establishing a connection with the communication device through a network configuration protocol; Sending a device information acquisition request to the communication device; In response to a second response message sent by the communication device, matching the second response message with a configured second expected message; If the match fails, a report indicating device information acquisition error will be output; If the match is successful, the second association information is stored; wherein the second association information includes: a communication device identification and device information; the second association information is used to query the device information of the communication device.
4. The method according to claim 3, characterized in that The matching the second response message with the configured second expected message includes: Respectively obtain the field values corresponding to the second specified field in the second response message and the second expected message; wherein the second specified field includes any one or any combination of the following: network element name, UUID of the network element, running status of the network element, product name, software version, hardware version, network protocol supported by the network element, number of boards supported by the device, gateway information, and alarm information; Match the obtained field values corresponding to the same second specified field one by one respectively; If all of the second designated fields match, it is determined that the match is successful; otherwise, it is determined that the match is unsuccessful.
5. The method according to claim 1, characterized in that After the matching fails and before the rollback instruction is sent to the communication device, the method further comprises: Obtaining whether the device state of the communication device is a dangerous state; In response to the device state being a non-dangerous state, outputting a report on configuration information configuration error, and sending a rollback instruction to the communication device; In response to the device being in a dangerous state, outputting an emergency state notification; If the dangerous state is not eliminated within a preset time, a report of configuration information configuration error is output, and a rollback instruction is sent to the communication device; If the dangerous state is eliminated within the preset time, the first associated information is stored.
6. The method according to claim 1, characterized in that The method further comprises: Sending a performance reporting notification to the communication device; wherein the performance reporting notification carries a performance indicator that needs to be reported; the performance indicator includes one or any combination of the following: network bandwidth, device port status, number of error packets, error seconds, and bit error rate; In response to the performance abnormality notification reported by the communication device, obtaining the performance indicator and the performance indicator value in the performance abnormality notification; and storing; Analyze the stored performance indicators and the corresponding performance indicator values, obtain the causes of performance anomalies, and output a performance analysis report.
7. The method according to claim 1, characterized in that The method further comprises: Sending an alarm reporting notification to the communication device; In response to the alarm notification reported by the communication device, obtaining the alarm content and the alarm time carried in the alarm notification and storing them; Analyze the stored alarm content and alarm time, obtain the frequency, duration and severity of the alarm, and output the alarm analysis report.
8. An OTN, IPRAN or PTN communication equipment configuration device, characterized in that: The device comprises: A determination unit, configured to select a networking mode for a communication device, and determine configuration information corresponding to the selected networking mode; wherein the configuration information is configured based on a YANG model; A generating unit, used for generating a configuration file in XML format from the determined configuration information; A sending unit, used for sending the configuration file to the communication device through a network configuration protocol, so that the communication device executes the configuration file; a matching unit, configured to, in response to a first response message returned by the communication device when executing the configuration file to obtain an execution result, match the first response message with a configured first expected message; A sending unit, configured to output a report of configuration information configuration error if the match fails; and send a rollback instruction to the communication device so that the communication device rolls back the configuration information; A storage unit is used to store first associated information if the match is successful; wherein the first associated information includes: communication device identification, networking mode and configuration information; the first associated information is used to query the configuration information and networking mode of the corresponding communication device.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the method according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method described in any one of claims 1 to 7 is implemented.
Citation Information
Cited By
Network equipment configuration management method and device, electronic equipment and storage medium
CN121037218A