Network service fulfillment method, electronic device and computer program product
By responding to the execution result of network element failure in the network management system and sending a rollback command to restore the network element to its previous state, the problems of configuration conflicts and dirty configuration residues during network service activation are resolved, achieving rapid rollback and reducing the probability of errors.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ZTE CORP
- Filing Date
- 2026-02-12
- Publication Date
- 2026-04-17
AI Technical Summary
During network operation, when activating network services for customers, existing technologies cannot effectively avoid configuration conflicts and dirty configuration residues, resulting in long-term impact on network stability and complex rollback operations, making it difficult to guarantee that dirty configurations remaining on all network elements are cleared.
By responding to the execution result of a network element failure in the network management system, a rollback command carrying the target network service identifier information is sent to restore the network element to its state before configuration, avoiding reverse service configuration commands and achieving fast rollback.
It reduces the impact of dirty configurations on network stability, lowers the probability of rollback errors, and allows rollback to be performed without the need for reverse business configuration commands.
Smart Images

Figure CN121887647A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, and in particular to a method for activating network services, an electronic device, and a computer program product. Background Technology
[0002] During network operation, activating a network service for a customer requires issuing corresponding configuration commands to multiple network elements through the network management system, and then having the network elements execute these commands. This process is prone to configuration conflicts and the problem of residual dirty configurations in case of anomalies. To address this, a conventional approach is to provide corresponding reverse service configuration commands for the service configuration commands, executing these reverse commands when network service configuration fails. However, it is difficult to anticipate all possible anomalies, and writing a set of reverse service configuration commands is a complex and error-prone process. Rollback operations are complex and time-consuming, leading to prolonged impacts on network stability from dirty configurations, and it cannot guarantee that residual dirty configurations on all network elements will be cleared. Summary of the Invention
[0003] This disclosure provides a method for activating network services, an electronic device, and a computer program product.
[0004] In a first aspect, embodiments of this disclosure provide a method for enabling network services, applied to a network management system, comprising:
[0005] In response to an execution result indicating execution failure returned by any network element involved in the configuration of the target network service, a rollback command carrying the identification information of the target network service is sent to the network element whose execution result indicates that the target network service configuration command is effective. The rollback command is used to restore the configuration of the network element whose execution result indicates that the target network service configuration command is effective to the configuration before the target network service was configured. The target network service configuration command is the command corresponding to the network element involved in the configuration of the target network service in the set of service configuration commands.
[0006] The execution result indicating failure is sent when the network element to be configured for the target network service fails to execute at any configuration stage during the configuration process.
[0007] Secondly, embodiments of this disclosure provide a method for enabling network services, applied to a network element, including:
[0008] In response to a rollback command carrying identification information of the target network service, the configuration of the network element is restored to the configuration before the target network service corresponding to the identification information was configured. The rollback command is a command sent by the network management system to the network element whose execution result indicates that the target network service configuration command has taken effect, in response to the network element whose execution result indicates that the execution has failed when the execution result returned by the network element that is configuring any service to be configured involving the target network service.
[0009] The execution result indicating failure is sent when any configuration step in the configuration of the target network service by the corresponding network element to be configured fails; the target network service configuration command is the command corresponding to the network element to be configured in the set of service configuration commands related to the target network service.
[0010] Thirdly, embodiments of this disclosure provide an electronic device, which includes a memory and a processor; the memory stores a computer program that can be executed by the processor, and when the computer program is executed by the processor, it implements any of the network service activation methods provided in embodiments of this disclosure.
[0011] Fourthly, this disclosure provides a computer program product, which includes a computer program that, when executed by a processor, implements any of the network service activation methods provided in this disclosure.
[0012] The network service activation method in this embodiment responds to an execution result indicating execution failure returned by any network element involved in the configuration of the target network service. It then sends a rollback command carrying the identification information of the target network service to the network element whose execution result indicates the target network service configuration command is effective. This allows the configuration of the network element whose execution result indicates the target network service configuration command is effective to be quickly restored to the configuration before configuring the target network service, reducing the impact of dirty configuration on network stability. Furthermore, rollback can be achieved without a reverse service configuration command, reducing the probability of rollback errors. Attached Figure Description
[0013] In the accompanying drawings of the embodiments disclosed herein:
[0014] Figure 1 This diagram illustrates a flowchart of a network service activation method provided in an embodiment of this disclosure;
[0015] Figure 2 A flowchart illustrating another network service activation method provided in this disclosure embodiment is shown.
[0016] Figure 3 A flowchart illustrating another method for enabling network services provided in an embodiment of this disclosure is shown;
[0017] Figure 4 This diagram illustrates a block diagram of an electronic device provided in an embodiment of the present disclosure. Detailed Implementation
[0018] To enable those skilled in the art to better understand the technical solutions of this disclosure, the embodiments of this disclosure will be described in detail below with reference to the accompanying drawings.
[0019] The present disclosure will be described more fully below with reference to the accompanying drawings; however, the embodiments shown may be embodied in different forms, and the present disclosure should not be construed as limited to the embodiments set forth below. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will enable those skilled in the art to fully understand the scope of the disclosure.
[0020] The accompanying drawings of the embodiments of this disclosure are provided to further illustrate the embodiments of this disclosure and form part of the specification. They are used together with the detailed embodiments to explain this disclosure and do not constitute a limitation thereof. The above and other features and advantages will become more apparent to those skilled in the art from the description of the detailed embodiments with reference to the accompanying drawings.
[0021] Where there is no conflict, the various embodiments of this disclosure and the features thereof in the embodiments may be combined with each other.
[0022] The terminology used in this disclosure is for the purpose of describing particular embodiments only and is not intended to limit the disclosure. The term "and / or" as used in this disclosure includes any and all combinations of one or more of the associated enumerated entries. The singular forms "a" and "the" as used in this disclosure are also intended to include the plural forms, unless the context clearly indicates otherwise. The terms "comprising," "made of," etc., as used in this disclosure specify the presence of the stated feature, integral, step, operation, element, and / or component, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components, and / or groups thereof.
[0023] Unless otherwise specified, all terms used in this disclosure (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant art and this disclosure, and will not be interpreted as having an idealized or overly formal meaning, unless expressly so defined in this disclosure.
[0024] This disclosure is not limited to the embodiments shown in the accompanying drawings, but includes modifications to the configuration based on the manufacturing process. Therefore, the areas illustrated in the drawings are schematic, and the shapes of the areas shown illustrate specific shapes of areas of an element, but are not intended to be limiting.
[0025] In a first aspect, embodiments of this disclosure provide a method for enabling network services, which is applied to a network management system.
[0026] Figure 1 A flowchart illustrating a network service activation method provided in an embodiment of this disclosure is shown. Figure 1 As shown in the embodiments of this disclosure, the method for activating network services includes:
[0027] Step S101: In response to the execution result indicating execution failure returned by any network element involved in the configuration of the target network service, a rollback command carrying the identification information of the target network service is sent to the network element whose execution result indicates that the target network service configuration command is effective.
[0028] In this embodiment of the disclosure, the rollback command is used to restore the configuration of the network element whose execution result indicates that the target network service configuration command has taken effect to the configuration before the target network service was configured. The target network service configuration command is the command corresponding to the network element to be configured in the set of service configuration commands involved in the target network service.
[0029] In this embodiment of the disclosure, the target network service may involve one or more network elements to be configured, including but not limited to network devices such as routers and switches.
[0030] In this embodiment, the configuration process of the target network service includes multiple configuration steps. Each configuration step in the process of executing the target network service configuration command returns an execution result to the network management system. The execution result includes execution failure and execution success. Execution failure and execution success are used to mark the execution results of each configuration step in the target network service configuration process. Specifically, an execution result indicating execution failure is sent by the corresponding network element to be configured when any configuration step in the target network service configuration process fails, while an execution result indicating execution success is sent by the corresponding network element to be configured after the target network service configuration command takes effect.
[0031] In some embodiments, the configuration phase of the target network service configuration process includes at least a target network service configuration command execution phase, and may also include at least one of the following optional phases: network connection phase, exclusive lock preemption phase, manual submission mode switching phase, target network service configuration command execution phase, and submission command phase. These phases are arranged in a sequential execution order, with the target network service configuration command execution phase following the manual submission mode switching phase and preceding the submission command phase. In actual configuration, one or more phases can be selected as needed. For example, in one embodiment, the configuration phase of the target network service configuration process may sequentially include a network connection phase and a target network service configuration command execution phase; in another embodiment, the configuration phase may sequentially include a network connection phase, exclusive lock preemption phase, target network service configuration command execution phase, and submission phase; and in yet another embodiment, the configuration phase may sequentially include a network connection phase, exclusive lock preemption phase, manual submission mode switching phase, target network service configuration command execution phase, and submission command phase. The configuration phase of the target network service configuration process includes one or a group of optional phases, including the target network service configuration command execution phase.
[0032] Configuration failures include at least one of the following: network connection failure, failure to preempt exclusive lock, failure to switch to manual submission mode, failure to execute target network service configuration command, and failure to execute submission command.
[0033] For a network element to be configured with services, once the target network service configuration command is successfully executed and takes effect, the execution results of each configuration step returned by the network element to be configured indicate successful execution, so that the network management system can determine that the network element is the network element for which the target network service configuration command has taken effect.
[0034] The target network service configuration command is a set of commands within the service configuration command set. Different network elements may execute the same or different target network service configuration commands. Before activating the target network service, the user can plan the target network service configuration commands for each network element according to the target network service plan. This disclosure does not limit the target network service configuration command set or the target network service configuration commands corresponding to each network element.
[0035] In this embodiment, the identification information of the target network service is a unique identifier for identifying the target network service. When executing the rollback command, the network element restores the configuration information to the state before the target network service was configured, based on the identification information of the target network service.
[0036] The network service activation method in this embodiment responds to the execution result indicating execution failure returned by any network element involved in the configuration of the target network service. It sends a rollback command carrying the identification information of the target network service to the network element whose execution result indicates that the target network service configuration command is effective. This allows the configuration of the network element whose execution result indicates that the target network service configuration command is effective to be quickly restored to the configuration before the target network service was configured, thus shortening the impact of dirty configuration on network stability. Moreover, rollback can be achieved without the need for a reverse service configuration command, which can reduce the probability of rollback errors.
[0037] In some embodiments, the network service activation method further includes: issuing a target network service configuration command corresponding to the network element to be configured for the target network service.
[0038] During the network service activation process, after all network elements awaiting service configuration have returned execution results, it can be determined which network elements failed to execute their target network tasks and which succeeded.
[0039] For example, the network management system issues a target network service configuration command to the network element involved in the target network service. After receiving the execution results returned by all the network elements to be configured, the network management system determines whether the execution results returned by each network element indicate that the target network task was executed successfully by checking the failure and success flags in the execution results. If the execution result returned by any network element indicates failure, a rollback command is sent to the network element whose execution result indicates that the target network task was executed successfully (i.e., the target network service configuration command is effective). The rollback command carries the identification information of the target network service, so that the network element whose execution result indicates that the target network service configuration command is effective can restore its configuration to the configuration before the target network service was configured.
[0040] In some embodiments, after any network element to be configured for a service returns an execution result, it is immediately determined whether the execution result of the network element to be configured for the service has failed.
[0041] For example, the network management system issues a target network service configuration command to the network element involved in the target network service. When the network management system receives the execution result returned by the network element to be configured, it determines whether the execution of the network element to be configured has failed by checking the failure and success flags in the execution result. If the execution result of the network element to be configured indicates failure, a rollback command carrying the identification information of the target network service is issued to the network element that received the execution result indicating that the target network service configuration command is effective. It should be noted that the network element that receives the execution result indicating that the target network service configuration command is effective includes both network elements that received the execution result indicating that the execution has failed before receiving the execution result, and network elements that received the execution result indicating that the target network service configuration command is effective after receiving the execution result.
[0042] In some embodiments, before issuing a target network service configuration command corresponding to the network element to be configured to the target network service, the method further includes:
[0043] A preemption command for a preemptive exclusive lock is sent to the network element to which the service is to be configured. The exclusive lock is used by the network management system to acquire the exclusive right to send the target network service configuration command and the submit command to the network element to which the service is to be configured. The submit command is the command that makes the target network service configuration command effective. If the network element to which the service is to be configured returns a message indicating that the preemption was successful, the target network service configuration command corresponding to the network element to which the service is to be configured is issued to the network elements involved in the target network service.
[0044] In this embodiment, the preemption command is a command by which the network management system acquires the exclusive right to send target network service configuration commands and submit commands to the network element to be configured with services. When the preemption of the exclusive lock on the network element to be configured with services is successful, the network management system can send the target network service configuration commands and submit commands to that network element. When the preemption of the exclusive lock on the network element to be configured with services fails, the network management system cannot send the target network service configuration commands and submit commands to that network element. For example, if the network management system successfully preempts the exclusive lock on the network element to be configured with services, it can send the target network service configuration commands and submit commands to the network element through southbound protocols such as the Command Line Interface (CLI) protocol, the NetConf protocol, and the Simple Network Management (SNMP) protocol.
[0045] In this embodiment of the disclosure, the preemption command varies depending on the network element to be configured with the service, and this embodiment of the disclosure does not limit the specific form of the preemption command. For example, the preemption command is configure exclusive.
[0046] In some embodiments, after a network element to be configured with a service grants an exclusive lock to the network management system, if no new commands are received within a preset time threshold, the exclusive lock is automatically released. This prevents the exclusive lock from being occupied, thus preventing other devices from sending commands to the network element to be configured with the service. The time threshold can be set by the user, such as 30 minutes.
[0047] In this embodiment, the submission command step in configuring the network element to be configured with the service adopts an automatic submission mode. That is, in the automatic submission mode, the network connection step, the preemption and exclusive lock step, and the target network service configuration step are automatically executed after the target network service configuration command step is completed, so that the target network service configuration command can take effect without waiting for manual instructions.
[0048] In some embodiments, before issuing the target network service configuration command corresponding to the network element to be configured for the target network service, the method further includes: sending a command to switch to manual submission mode to the network element to be configured. The command to switch to manual submission mode is used to switch the network element from the current submission mode to manual submission mode. Manual submission mode refers to manually sending a submission command, which is a command that makes the target network service configuration command take effect.
[0049] In this embodiment, the submission methods for making the target network service configuration command effective to the network element include manual submission mode and automatic submission mode. Manual submission mode means that after the network element executes the target network service configuration command, a submission command needs to be manually sent to the network element. Automatic submission mode means that the target network service configuration command takes effect immediately after the network element executes it. This can be achieved by setting the network element's CLI interface to automatic submission mode. To avoid the target network service configuration command taking effect immediately, the network element's submission mode needs to be switched to manual submission mode. After receiving the sent target network service configuration command, the network element logically executes the command, but it does not take effect until a submission command is received. Compared to automatic submission mode, manual submission mode avoids the situation where some commands in the target network service configuration command take effect while others do not. In this case, the commands that have already taken effect cannot be revoked, resulting in dirty configurations remaining in the network element awaiting service configuration.
[0050] In this embodiment, the specific form of the command for switching to manual submission mode differs for different network elements, and this embodiment does not limit the specific form of the command for switching to manual submission mode. For example, the command for switching to manual submission mode is "configure terminal manual".
[0051] In some embodiments, after a network element successfully switches to manual handover mode, it returns a handover success message to the network management system. Upon receiving the successful handover message from the network element, the network management system issues the corresponding target network service configuration command to the network element to be configured with the service. That is, it executes the issuance of the target network service configuration command to the network element involved in the target network service. In this embodiment, the configuration process for configuring the network element to be configured with the service includes a network connection step, a manual handover submission step, and a target network service configuration step. After the target network service configuration command step is completed, it is necessary to wait for the manual submission command to take effect.
[0052] In some embodiments, before issuing the target network service configuration command corresponding to the network element to be configured for the target network service, the method further includes: sending a preemption command to the network element to be configured to acquire an exclusive lock. The exclusive lock is used by the network management system to acquire the exclusive right to send the target network service configuration command and the submission command to the network element to be configured. The submission command is the command that makes the target network service configuration command effective.
[0053] If the exclusive lock of the network element to which the service is to be configured is successfully acquired, a command to switch to manual submission mode is sent to the network element. The command to switch to manual submission mode is used to switch the network element from the current submission mode to manual submission mode. Manual submission mode means sending the submission command manually. The submission command is the command that makes the target network service configuration command take effect.
[0054] In this embodiment, the specific form of the submission command differs for different network elements, and this embodiment does not limit the specific form of the submission command. For example, the format of the submission command is "commit comment". <service-name>The service-name is the identifier of the target network service and is globally unique.
[0055] Upon receiving a message from a network element indicating a successful handover, the system executes a command to configure the target network service, corresponding to the network element involved in the service configuration.
[0056] For example, the network management system sends a preemption command to the network element to be configured with a service to acquire an exclusive lock. After successfully acquiring the exclusive lock, the system sends a command to switch to manual submission mode. Upon receiving a message from the network element indicating a successful switch, the system issues a target network service configuration command corresponding to the network element to be configured. In this embodiment, the configuration process for configuring the network element includes a network connection step, an exclusive lock acquisition step, a manual submission step, a target network service configuration step, and a manual submission step. After the target network service configuration command step is completed, the system must wait for the manual submission command to take effect.
[0057] In some embodiments, after receiving a message indicating successful preemption from the network element to be configured for the service, the method further includes: if the network element to be configured for the service returns an execution result indicating execution failure, sending a release command to the network element whose execution result indicates execution failure, wherein the release command is used to cause the network element that received the release command to release the exclusive lock.
[0058] For example, when the network management system and the network element to be configured for the service fail to execute any subsequent configuration step after successfully preempting the exclusive lock, a release command is sent to the network element whose execution result indicates failure. Upon receiving the release command, the network element to be configured for the service releases the exclusive lock. The subsequent configuration step includes any step among the manual submission step, the target network service configuration step, and the manual submission step.
[0059] In some embodiments, if the execution results returned by all network elements to be configured with services indicate successful execution, a release command is sent to all network elements.
[0060] For example, when all network elements involved in the target network service successfully complete all configuration steps, such as network connection, preemption of exclusive lock, switching manual submission mode command, target network service configuration command, and submission command, the returned execution result indicates that the target task has been successfully executed. The network management system then sends a release command to all network elements, and the network elements that receive the release command release the exclusive lock.
[0061] In some embodiments, after receiving a message indicating that the network element that successfully executed the rollback command has successfully executed the rollback command, a release command is sent to the network element that successfully executed the rollback command.
[0062] For example, after the network element to be configured with the service successfully executes the rollback command, it sends a rollback success message to the network management system. After receiving the success rollback message, the network management system sends a release command to the network element that successfully executed the rollback command. The network element that receives the release command releases the exclusive lock.
[0063] In some embodiments, a command to revoke an executed configuration is sent to a network element whose execution result indicates failure. The executed configuration command is a command executed by the network element for each configuration step in the process of configuring the target network service.
[0064] For example, when the network element to be configured for a service returns an execution result indicating failure, a command to revoke the configuration steps already executed by that network element is sent. The network element to be configured sequentially revokes each configuration step in the process of executing the target network service, such as revoking the executed target network service configuration command, exiting manual submission mode, and releasing the exclusive lock. For example, the revocation command is `discard configurationcandidate`, the command to exit manual submission mode is `end`, and the command to release the exclusive lock is `no configureexclusive`.
[0065] During the network connection process, if the network connection fails, the network element to be configured with the service sends a network connection failure message to the network management system; if the network connection succeeds, the network element to be configured with the service sends a network connection success message to the network management system.
[0066] During the exclusive lock acquisition process, if the exclusive lock acquisition is successful, the network element with the service to be configured sends a successful acquisition message to the network management system; if the exclusive lock acquisition fails, the network element with the service to be configured sends a failed acquisition message to the network management system.
[0067] During the manual submission mode switching process, if the network element for the service to be configured successfully switches to manual submission mode, it sends a successful switch message to the network management system. If the network element for the service to be configured fails to switch to manual submission mode, it sends a failed switch message to the network management system. Upon receiving the failed switch message, the network management system sends a release command to the network element for the service to be configured, so that the network element for the service to be configured releases its exclusive lock.
[0068] During the target network service configuration phase, if the network element of the service to be configured successfully executes the target network service configuration command, the network element of the service to be configured sends a target network service configuration success message to the network management system; if the network element of the service to be configured fails to execute the target network service configuration command, the network element of the service to be configured sends a target network service configuration failure message to the network management system. After receiving the target network service configuration failure message, the network management system sends a release command and an exit command to the network element of the service to be configured, so that the network element of the service to be configured releases the exclusive lock and switches to the automatic submission mode.
[0069] During the command submission phase, if the network element to be configured successfully executes the submission command, it sends a submission success message to the network management system. If the network element to be configured fails to execute the submission command, it sends a submission failure message to the network management system. Upon receiving the submission failure message, the network management system sends a release command, an exit command, and a revocation command to the network element to be configured, so that it can revoke the executed target network configuration service configuration command, release the exclusive lock, and switch to automatic submission mode.
[0070] In some embodiments, before issuing a target network service configuration command corresponding to the network element to be configured for the target network service, the method further includes: sending a network connection command to the network element to be configured; and, upon receiving a connection success message returned by the network element, issuing a target network service configuration command for the target network service to each network element to be configured for the target network service.
[0071] The network connection command carries access parameters such as IP address, username, password, port, and CLI protocol. If these access parameters are correct, the network management system will successfully connect to the network element. If any one of the access parameters is incorrect or the network connection is interrupted, the connection to the network element may fail.
[0072] Secondly, this disclosure provides a method for enabling network services, applied to a network element.
[0073] Figure 2 A flowchart illustrating another network service activation method provided by an embodiment of this disclosure is shown. Figure 2 As shown in the embodiments of this disclosure, the method for activating network services includes:
[0074] Step S201: In response to the rollback command carrying the identification information of the target network service, the configuration of the network element is restored to the configuration before the target network service corresponding to the configuration identification information. The rollback command is a command sent by the network management system to the network element that indicates the target network service configuration command is effective when the execution result returned by the network element that is configuring any service to be configured involving the target network service indicates that the execution has failed.
[0075] In this embodiment of the disclosure, the execution result indicating execution failure is sent when any configuration step of the network element to be configured fails during the configuration of the target network service; the target network service configuration command is the command corresponding to the network element to be configured in the set of service configuration commands related to the target network service.
[0076] In this embodiment of the disclosure, the target network service may involve one or more network elements to be configured, including but not limited to network devices such as routers and switches.
[0077] During the execution of the target network service configuration command, the network element to be configured returns an execution result to the network management system. The execution result includes execution failure and execution success. Specifically, the execution result indicating execution failure is sent by the corresponding network element to be configured when any configuration step in the process of configuring the target network service fails, and the execution result indicating execution success is sent by the corresponding network element to be configured when any configuration step in the process of configuring the target network service succeeds.
[0078] In this embodiment, the configuration process of the target network service includes multiple configuration steps. If any of these configuration steps fails, the execution result returned by the network element configuring the service indicates failure. Configuration step failure includes at least one of the following: network connection failure, failure to preempt the exclusive lock, failure to switch to manual submission mode, failure to execute the target network service configuration command, and failure to execute the submission command. When each configuration step executes successfully, the execution result returned by the network element configuring the service indicates that the target network service configuration command has taken effect.
[0079] The target network service configuration command is a set of commands within the service configuration command set. Different network elements may execute the same or different target network service configuration commands. Before activating the target network service, the user can plan the target network service configuration commands for each network element according to the target network service plan. This disclosure does not limit the target network service configuration command set or the target network service configuration commands corresponding to each network element.
[0080] In this embodiment, the identification information of the target network service is a unique identifier for identifying the target network service. When executing the rollback command, the network element restores the configuration information to the state before the target network service was configured, based on the identification information of the target network service.
[0081] In some embodiments, the network service activation method further includes: responding to a network service command initiated by the network management system, executing the configuration step indicated by the network service command, and returning the execution result of the network service command to the network management system after the configuration step is completed. The network service command includes commands for any configuration step in the process of configuring the target network service.
[0082] In some embodiments, the configuration phase of the target network service configuration process includes at least a target network service configuration command execution phase, and may also include at least one of the following optional phases: network connection phase, exclusive lock preemption phase, manual submission mode switching phase, target network service configuration command execution phase, and submission command phase. These phases are arranged in a sequential execution order, with the target network service configuration command execution phase following the manual submission mode switching phase and preceding the submission command phase. In actual configuration, one or more phases can be selected as needed. For example, in one embodiment, the configuration phase of the target network service configuration process may sequentially include a network connection phase and a target network service configuration command execution phase; in another embodiment, the configuration phase may sequentially include a network connection phase, exclusive lock preemption phase, target network service configuration command execution phase, and submission phase; and in yet another embodiment, the configuration phase may sequentially include a network connection phase, exclusive lock preemption phase, manual submission mode switching phase, target network service configuration command execution phase, and submission command phase. The configuration phase of the target network service configuration process includes one or a group of optional phases, including the target network service configuration command execution phase.
[0083] The network connection command is used to establish a network connection between the network element and the network management system. The network management system sends the network connection command to the network element to be configured with services. Upon receiving a connection success message from the network element, the system sequentially issues other network service commands to the network element besides the network connection command.
[0084] The preemption command is used by the network management system to acquire an exclusive lock for sending target network service configuration commands and submit commands to the network element to which the service is to be configured. In other words, the preemption command is a command to obtain the exclusive right to send these commands to the network element. When the preemption of the exclusive lock on the network element to which the service is to be configured is successful, the network management system can send the target network service configuration commands and submit commands to that network element. If the preemption of the exclusive lock on the network element to which the service is to be configured fails, the network management system cannot send these commands. In some embodiments, the network management system issues a preemption command to the network element upon receiving a connection success message from the network element.
[0085] The release command is a command sent by the network management system to a network element to release the exclusive lock. In this embodiment, the network management system sends the release command to a network element that returns an execution result indicating execution failure after receiving a message indicating successful preemption from the network element to be configured for the service. For example, the release command is sent to a network element that failed to execute a handover instruction, failed to execute a target network configuration command, or failed to execute a submit command, in order to release the exclusive lock of these network elements.
[0086] In some embodiments, if the execution result returned by all network elements to be configured with services indicates that the target network service configuration command is effective, the release command is sent to all network elements.
[0087] In some embodiments, after receiving a message indicating that the target network service configuration command has taken effect, the network element that successfully executed the rollback command is sent a release command to the network element that successfully executed the rollback command.
[0088] The command to switch to manual submission mode is a command sent by the network management system to the network element that needs to be configured, causing the network element to switch from the current submission mode to manual submission mode.
[0089] In some embodiments, the submission methods for making a target network service configuration command effective to a network element include manual submission mode and automatic submission mode. Manual submission mode means that after the network element executes the target network service configuration command, a submission command needs to be manually sent to the network element. Automatic submission mode means that the target network service configuration command takes effect immediately after the network element executes it; for example, setting the network element's CLI interface to automatic submission mode can achieve automatic submission mode. To avoid the target network service configuration command taking effect immediately, the network element's submission mode needs to be switched to manual submission mode. After receiving the sent target network service configuration command, the network element logically executes the target network service configuration command, but it does not take effect until a submission command is received. Compared to automatic submission mode, manual submission mode can avoid the situation where some commands in the target network service configuration command take effect while others do not. In this case, the commands that have already taken effect cannot be revoked, resulting in dirty configurations remaining in the network element awaiting service configuration.
[0090] The exit command is a command sent by the network management system to the network element that needs to be configured, causing the network element to switch from manual submission mode to automatic submission mode.
[0091] In some embodiments, when the network element to be configured fails to execute the target network service configuration command and the submission command, an exit command is executed. The exit command switches the network element to be configured from manual submission mode to automatic submission mode.
[0092] In some embodiments, upon receiving a successful execution message from a network element regarding the target network service configuration command, the network management system issues a submission command to the network element. This submission command is sent by the network management system to the network element handling the configuration of the target network service, making the configuration command effective. In related technologies, the submission command step employs an automatic submission mode. In this mode, the submission command is executed automatically after the target network service configuration command is completed, without requiring manual intervention. In manual submission mode, the configuration command takes effect only after the network element handling the configuration of the target network service receives the submission command.
[0093] In the network service activation method of this embodiment, the network element to be configured responds to a rollback command carrying the identification information of the target network service, and restores the configuration of the network element to the configuration before the target network service corresponding to the configuration identification information. This allows the configuration of the network element whose execution result indicates that the target network service configuration command has taken effect to be quickly restored to the configuration before the target network service was configured, thus shortening the impact of dirty configuration on network stability. Moreover, rollback can be achieved without a reverse service configuration command, which can reduce the probability of rollback errors.
[0094] Before receiving network service configuration commands from the network management system, the network element to be configured with services also needs to receive network connection commands from the network management system. These commands carry access parameters such as IP address, username, password, port, and CLI protocol. If these access parameters are correct, the network management system and the network element will connect successfully. Incorrect access parameters or a network disconnection may cause the connection to the network element to fail.
[0095] To better understand this disclosure, the following is in conjunction with the appendix. Figure 3 The method for activating network services provided in the embodiments of this disclosure is further explained.
[0096] Figure 3 A flowchart illustrating another method for enabling network services provided in an embodiment of this disclosure is shown. Figure 3 As shown, the network service activation method provided in this embodiment includes:
[0097] Step S301: Determine the network elements of the services to be configured and the corresponding service configuration commands according to the target network services, and generate the identification information of the target network services for the target network services.
[0098] Step S302: The network management system sends a network connection command to the network element of the service to be configured that is involved in the target network service.
[0099] For example, the network management system sends a network connection command to the network element to be configured via the CLI interface. The number of network elements to be configured can be n, where n is an integer greater than or equal to 1.
[0100] This embodiment uses network element 1, which is the service to be configured, as an example for illustration. Other network elements that are the service to be configured have the same interaction method as network element 1, and will not be described in detail below.
[0101] Step S303: Determine whether the network connection is successful. If the network connection is successful, proceed to step S304; if the network connection fails, proceed to step S313.
[0102] In step S303, the network management system determines whether the connection with network element 1 of the service to be configured is successful. If the network connection is successful, step S304 is executed.
[0103] In step S304, the network management system sends a preemption command to network element 1, which is to be configured with the service.
[0104] The network management system sends a preemption command to network element 1, which is to be configured with the service, through the CLI interface in order to obtain the exclusive lock of network element 1, which is to be configured with the service.
[0105] Step S305: Determine whether the preemption was successful. If it was, proceed to step S306; if it failed, proceed to step S314.
[0106] Step S306: The network management system sends a command to network element 1, which is to be configured with services, to switch to manual submission mode.
[0107] Step S307: Determine whether the switch was successful. If yes, proceed to step S308; otherwise, proceed to step S315.
[0108] In step S307, it is determined whether network element 1, which is to be configured with the service, has switched to manual submission mode. If so, step S308 is executed.
[0109] Step S308: Send and execute the target network service configuration command to network element 1, which is to be configured with the service.
[0110] The network management system sends a target network service configuration command to network element 1, which is to be configured with the service, and network element 1 executes the target network service configuration command.
[0111] Step S309: Determine whether the target network service configuration command was executed successfully. If yes, proceed to step S310; otherwise, proceed to step S316.
[0112] In step S310, the network management system sends a submit command to network element 1, which is to be configured with the service.
[0113] Step S311: Determine whether the submit command was executed successfully. If yes, proceed to step S312; otherwise, proceed to step S317.
[0114] In step S312, the network element 1, which is to be configured with the service, sends an execution result indicating that the target network task has been successfully executed to the network management system, and then jumps to step S318.
[0115] In step S312, the submission command is executed successfully, and the network element 1 of the service to be configured sends an indication to the network management system that the target network task has been executed successfully. At this time, the target network service configuration command takes effect.
[0116] In step S313, network element 1, which is to be configured with the service, sends an indication of the execution failure, and then proceeds to step S318.
[0117] In step S313, the network element 1, which is to be configured with the service, sends an execution result indicating that the execution failed to the network management system.
[0118] In step S314, network element 1, which is to be configured with the service, sends an indication of the execution failure, and then proceeds to step S318.
[0119] In step S314, the network element 1, which is to be configured with the service, sends an execution result indicating that the execution failed to the network management system.
[0120] In step S315, the network element 1 of the service to be configured sends an execution result indicating that the execution failed to the network management system. The network management system sends a release command to the network element 1 of the service to be configured, and then jumps to step S318.
[0121] In step S315, the network element 1 of the service to be configured sends an execution result indicating execution failure to the network management system, and the network management system sends a release command to the network element 1 of the service to be configured, so that the network element 1 of the service to be configured releases the exclusive lock.
[0122] In step S316, the network management system sends an exit command and a release command to network element 1, which is to be configured with the service. Network element 1, which is to be configured with the service, switches to automatic submission mode and releases the exclusive lock. Then, it jumps to step S318.
[0123] In step S316, the network management system sends an exit command and a release command to the network element 1 of the service to be configured, so that the network element 1 of the service to be configured switches the submission mode to the automatic submission mode and releases the exclusive lock.
[0124] In step S317, the network management system sends a cancellation command, an exit command, and a release command to network element 1, which is configuring the service. Network element 1 switches to automatic submission mode and releases the exclusive lock, and then jumps to step S318.
[0125] In step S317, the network management system sends a cancellation command, an exit command, and a release command to the network element 1 of the service to be configured, so that the network element 1 of the service to be configured cancels the executed configuration command, switches the submission mode to the automatic submission mode, and releases the exclusive lock.
[0126] Step S318: The network management system checks the execution result returned by network element 1, which is to be configured with the service.
[0127] In step S318, when the target network service involves multiple network elements of services to be configured, the network management system checks the execution results returned by all network elements of services to be configured involved in the target network service.
[0128] Step S319: Determine whether the execution results of all network elements indicate that the target network service configuration command has taken effect. If yes, proceed to step S320; otherwise, proceed to step S321.
[0129] In step S320, the network management system sends a release command to all network elements 1 of the service to be configured, so that all network elements 1 release their exclusive locks.
[0130] At this point, the target network service has been successfully activated.
[0131] The following description uses network element 1 as an example. The execution steps for other network elements are the same as those for network element 1, and will not be repeated here.
[0132] Step S321: The network management system checks the execution result of network element 1 for the service to be configured.
[0133] Step S322: Determine whether the execution result indicates that the target network service configuration command has taken effect. If yes, proceed to step S323; otherwise, end.
[0134] In step S323, the network management system sends a rollback command to network element 1 of the service to be configured, so that network element 1 of the service to be configured can be rolled back to the configuration before the target network service corresponding to the configuration identification information.
[0135] When the rollback command is executed on network element 1, which is to be configured with a service, the rollback operation is performed according to the identification information of the target network service. The configuration is restored to the previous configuration of the target network service corresponding to the identification information, which can avoid rollback errors.
[0136] Step S324: The network management system sends a release command to network element 1, which is to be configured with the service, so that network element 1 releases the exclusive lock.
[0137] At this point, the activation of the target network service has failed.
[0138] Thirdly, embodiments of this disclosure provide an electronic device.
[0139] Figure 4 This diagram illustrates a block diagram of an electronic device provided in an embodiment of the present disclosure. Figure 4 As shown, an electronic device provided in this embodiment includes a processor 401 and a memory 402; the memory 402 stores a computer program that can be executed by the processor 401, and when the computer program is executed by the processor 401, it implements any of the network service activation methods of this embodiment.
[0140] In some embodiments, the electronic device further includes an I / O interface (read / write interface) 403, which is connected between the processor 401 and the memory 402 and enables information interaction between the memory 402 and the processor 401. The I / O interface 403 includes, but is not limited to, a data bus.
[0141] Among them, the processor is a device with data processing capabilities, including but not limited to the central processing unit (CPU); the memory is a device with data storage capabilities, including but not limited to random access memory (RAM, more specifically SDRAM, DDR, etc.), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), and flash memory (FLASH); the I / O interface (read-write interface) is connected between the processor and the memory, enabling information exchange between the memory and the processor, including but not limited to the data bus (Bus).
[0142] Those skilled in the art will understand that all or some of the steps, systems, and devices disclosed above, as functional modules / units, can be implemented as software, firmware, hardware, or suitable combinations thereof.
[0143] This disclosure also provides a computer-readable medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements any of the network service activation methods described in the above embodiments.
[0144] This disclosure also provides a computer program product, which includes a computer program that, when executed by a processor, implements any of the network service activation methods described in the above embodiments.
[0145] In hardware implementations, the division between functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be executed by several physical components working together.
[0146] Those skilled in the art will understand that all or some of the steps, systems, and devices disclosed above, as functional modules / units, can be implemented as software, firmware, hardware, or suitable combinations thereof.
[0147] In hardware implementations, the division between functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be executed by several physical components working together.
[0148] Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit (CPU), digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit (ASIC). Such software may be distributed on a computer-readable medium, which may include computer storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technique for storing information (such as computer-readable commands, data structures, program modules, or other data). Computer storage media include, but are not limited to, random access memory (RAM, more specifically SDRAM, DDR, etc.), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory (FLASH) or other disk storage; read-only optical disc (CD-ROM), digital versatile disc (DVD) or other optical disc storage; magnetic cartridges, magnetic tapes, disk storage or other magnetic storage; and any other media that can be used to store desired information and can be accessed by a computer. Furthermore, as is known to those skilled in the art, communication media typically contain computer-readable commands, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.
[0149] This disclosure has disclosed exemplary embodiments, and although specific terminology has been used, it is for general illustrative purposes only and should not be construed as limiting. In some instances, it will be apparent to those skilled in the art that features, characteristics, and / or elements described in conjunction with particular embodiments may be used alone, or in combination with features, characteristics, and / or elements described in conjunction with other embodiments, unless otherwise expressly indicated. Therefore, those skilled in the art will understand that various changes in form and detail may be made without departing from the scope of this disclosure as set forth by the appended claims.
Claims
1. A method for activating network services, applied to a network management system, comprising: In response to an execution result indicating execution failure returned by any network element involved in the configuration of the target network service, a rollback command carrying the identification information of the target network service is sent to the network element whose execution result indicates that the target network service configuration command is effective. The rollback command is used to restore the configuration of the network element whose execution result indicates that the target network service configuration command is effective to the configuration before the target network service was configured. The target network service configuration command is the command corresponding to the network element involved in the configuration of the target network service in the set of service configuration commands. The execution result indicating failure is sent when the network element to be configured for the target network service fails to execute at any configuration stage during the configuration process.
2. The method according to claim 1, wherein, Also includes: A target network service configuration command corresponding to the network element to be configured is issued to the network element involved in the target network service.
3. The method according to claim 2, wherein, Before issuing the target network service configuration command corresponding to the network element to be configured for the target network service, the method further includes: Send a preemption command to the network element to be configured with the service to preempt the exclusive lock; Upon receiving a message indicating successful preemption from the network element to be configured with the service, the system executes the step of issuing a target network service configuration command corresponding to the network element to be configured with the service involved in the target network service. The exclusive lock is used by the network management system to obtain the exclusive right to send the target network service configuration command and the submit command to the network element to be configured with the service. The submit command is the command that makes the target network service configuration command effective.
4. The method according to claim 2, wherein, Before issuing the target network service configuration command corresponding to the network element to be configured for the target network service, the method further includes: A command to switch to manual submission mode is sent to the network element to be configured with the service. The command to switch to manual submission mode is used to switch the network element from the current submission mode to manual submission mode. The manual submission mode refers to manually sending a submission command, which is a command to make the target network service configuration command take effect. Upon receiving a message from the network element indicating a successful handover, the system executes the step of issuing a target network service configuration command corresponding to the network element involved in the target network service configuration.
5. The method according to claim 2, wherein, Before issuing the target network service configuration command corresponding to the network element to be configured for the target network service, the method further includes: A preemption command for a preemptive exclusive lock is sent to the network element to be configured with services. The exclusive lock is used by the network management system to obtain the exclusive right to send the target network service configuration command and the submit command to the network element to be configured with services. The submit command is a command that makes the target network service configuration command effective. If the exclusive lock of the network element to be configured with the service is successfully acquired, a command to switch to manual submission mode is sent to the network element. The command to switch to manual submission mode is used to switch the network element from the current submission mode to manual submission mode. The manual submission mode refers to manually sending the submission command, which is a command to make the target network service configuration command take effect. Upon receiving a message from the network element indicating a successful handover, the system executes the step of issuing a target network service configuration command corresponding to the network element involved in the target network service configuration.
6. The method according to claim 3 or 5, wherein, After receiving a message from the network element indicating successful preemption from the network element to be configured for the service, the process also includes: If the network element to which the service is to be configured returns an indication of execution failure, a release command is sent to the network element that indicated the execution failure. The release command is used to cause the network element that received the release command to release the exclusive lock. Alternatively, if the execution results returned by all the network elements to be configured with services indicate that the target network service configuration command has taken effect, the release command is sent to all the network elements. Alternatively, after receiving a message indicating that the target network service configuration command has taken effect, the network element that successfully executed the rollback command may send a release command to the network element that successfully executed the rollback command.
7. The method according to claim 1, wherein, Also includes: Send a command to the network element whose execution result indicates failure to revoke the executed configuration command, wherein the executed configuration command is the command executed by the network element in each configuration step during the configuration of the target network service.
8. The method according to claim 1, wherein, The failure to execute the configuration step includes at least one of the following: network connection failure, failure to preempt the exclusive lock, failure to switch to manual submission mode, failure to execute the target network service configuration command, and failure to execute the submission command.
9. A method for activating network services, applied to a network element, comprising: In response to a rollback command carrying identification information of the target network service, the configuration of the network element is restored to the configuration before the target network service corresponding to the identification information was configured. The rollback command is a command sent by the network management system to the network element whose execution result indicates that the target network service configuration command has taken effect, in response to the network element whose execution result indicates that the execution has failed when the execution result returned by the network element that is configuring any service to be configured involving the target network service. The execution result indicating failure is sent when any configuration step in the configuration of the target network service by the corresponding network element to be configured fails; the target network service configuration command is the command corresponding to the network element to be configured in the set of service configuration commands related to the target network service.
10. The method according to claim 9, wherein, Also includes: In response to a network service command initiated by the network management system, the system executes the configuration step indicated by the network service command, and after completing the configuration step, returns the execution result of the network service command to the network management system. The network service command includes commands for any configuration step in the process of configuring the target network service.
11. The method according to claim 10, wherein, The network service commands include the target network service configuration command, and at least one of the following: a network connection command, a preemption command, a release command, a switch to manual submission mode command, an exit command, a submission command, and a revocation command. The network connection command is used to establish a network connection between the network element and the network management system that sends the command. The preemption command is used by the network management system to acquire an exclusive lock to send the target network service configuration command and the submission command to the network element to be configured. The release command is used to cause the network element to release the exclusive lock on the network management system that sends the command. The switch to manual submission mode command is used to switch the network element from the current submission mode to manual submission mode. The exit command is used to switch the network element from manual submission mode to automatic submission mode. The submission command is used to make the target network service configuration command effective. Manual submission mode refers to manually sending the submission command. The revocation command is used to revoke the executed target network service configuration command.
12. An electronic device comprising a memory and a processor; the memory storing a computer program executable by the processor, wherein the computer program, when executed by the processor, implements the network service activation method according to any one of claims 1 to 8 or claims 9 to 11.
13. A computer program product comprising a computer program that, when executed by a processor, implements the network service activation method according to any one of claims 1 to 8 or 9 to 11.