Network service configuration method, computer device, readable storage medium and program product

By receiving network service configuration information, generating and sending it to the connection subsystem for configuration, the automatic configuration of devices and modules is achieved, solving the problem of low efficiency in traditional methods, providing a visual interactive interface, and improving configuration efficiency and accuracy.

CN119676076BActive Publication Date: 2025-09-19PURPLE MOUNTAIN LAB
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411845475.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-13
Publication Date
2025-09-19
Estimated Expiration
2044-12-13

AI Technical Summary

Technical Problem

Traditional network service configuration methods are inefficient in scenarios with numerous and complex management devices, and are unable to be managed efficiently. They also involve excessive manual operations, high costs, and low efficiency. Configuration content is difficult to record, services are easily confused, and are costly and inefficient to use.

Method used

By receiving network service configuration information, parsing devices and modules, determining resource allocation and dependencies, generating command lines and sending them to the connection subsystem for configuration, the automatic configuration of devices and modules is achieved.

Benefits of technology

It realizes the simultaneous configuration of multiple equipment modules, reduces costs, improves configuration efficiency, provides a visual interactive interface, can directly locate problems, improves the convenience of operation, reduces the utilization rate of equipment resources, and improves the accuracy and efficiency of operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119676076B_ABST
    Figure CN119676076B_ABST
Patent Text Reader

Abstract

The present application relates to a network service configuration method, computer device, computer-readable storage medium, and computer program product. The method comprises: receiving network service configuration information; parsing the network service configuration information to obtain each device to be configured and each module to be configured in each device to be configured; determining the allocated resources of each module to be configured in each device to be configured, and determining the allocatable resources based on the allocated resources; determining the dependency relationship between each module to be configured for each device to be configured; generating a configuration command line list for each module to be configured in each device to be configured based on the dependency relationship and the allocatable resources; sending the configuration command line list to a connection subsystem, wherein the connection subsystem is configured to configure the network services of each module to be configured in each device to be configured based on the configuration command line list. The use of this method can reduce costs and improve efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a network service configuration method, computer equipment, computer-readable storage medium, and computer program product. Background Art

[0002] With the rapid development of communications technology, network scale continues to grow rapidly, and the scale and complexity of information systems are also increasing. Application requirements such as network operation and maintenance, and device management and control are particularly important in production operations. Network system management faces significant challenges, including the need for convenient business management, rapid device response, configuration visualization, and data security.

[0003] Traditionally, network service configurations were delivered using a remote shell terminal. Network administrators used remote terminal tools such as Xshell or MobaXterm to log in to network devices through protocols such as SSH or Telnet, and then delivered service configurations.

[0004] However, using a remote shell terminal requires administrators to log in to network devices and then use command lines to configure them. This method is generally only suitable for small-scale configurations and simple business scenarios. When managing numerous devices and configuring complex services, this method requires extensive manual effort, makes configuration details difficult to record, and can easily lead to confusion about services, resulting in high costs and low efficiency. Summary of the Invention

[0005] Based on this, it is necessary to provide a network service configuration method, computer device, computer-readable storage medium and computer program product that can reduce costs and improve efficiency in response to the above technical problems.

[0006] In a first aspect, the present application provides a network service configuration method, which is applied to a primary service system, and the method includes:

[0007] receiving network service configuration information;

[0008] Parsing the network service configuration information to obtain each device to be configured and each module to be configured in each device to be configured;

[0009] Determining allocated resources of each module to be configured of each device to be configured, and determining allocatable resources based on the allocated resources;

[0010] For each device to be configured, determining the dependency relationship between each module to be configured;

[0011] Based on the dependency relationship and the allocatable resources, generating a configuration command line list for each module to be configured in each device to be configured;

[0012] The configuration command line list is sent to a connection subsystem, and the connection subsystem is used to configure network services of the modules to be configured in the devices to be configured based on the configuration command line list.

[0013] In one embodiment, parsing the network service configuration information to obtain each device to be configured and each module to be configured in each device to be configured includes:

[0014] Obtain a pre-generated target network topology;

[0015] Determine the current network topology based on the access point information of each device to be configured in the network service configuration information and the target network topology;

[0016] Determining each device to be configured based on the current network topology;

[0017] Determine each module to be configured in each device to be configured based on the network service configuration information.

[0018] In one embodiment, determining the allocatable resources based on the allocated resources includes:

[0019] Determining total resources corresponding to modules to be configured of the same type in each of the devices to be configured;

[0020] Allocable resources are determined based on allocated resources of the modules to be configured of the same type in each of the devices to be configured and the corresponding total resources.

[0021] In one embodiment, determining the dependency relationship between the modules to be configured for the devices to be configured includes:

[0022] For each device to be configured, selecting a module to be configured currently, and detecting whether the module to be configured currently depends on other modules to be configured;

[0023] If the current module to be configured does not depend on other modules to be configured, a separate dependency tree is generated for the current module to be configured in the dependency tree, the next module to be configured is obtained as the current module to be configured, and the step of detecting whether the current module to be configured depends on other modules to be configured is continued until all modules to be configured in the device to be configured are traversed;

[0024] If the current module to be configured depends on other modules to be configured, and the other modules to be configured are not in the dependency tree, the current module to be configured is used as a node in a new dependency tree, the next module to be configured is obtained as the current module to be configured, and the step of detecting whether the current module to be configured depends on other modules to be configured is continued until all modules to be configured in the device to be configured are traversed;

[0025] If the current module to be configured depends on other modules to be configured, and the other modules to be configured are already in one of the dependency trees, the current module to be configured is added to the corresponding dependency tree and becomes dependent on the other configuration modules, a next module to be configured is obtained as the current module to be configured, and the step of detecting whether the current module to be configured depends on other modules to be configured is continued until all modules to be configured in the device to be configured are traversed;

[0026] A dependency relationship is generated based on each of the dependency relationship trees.

[0027] In one embodiment, generating a configuration command line list for each module to be configured in each device to be configured based on the dependency relationship and the allocatable resources includes:

[0028] Acquire first modules to be configured based on the dependency tree, and generate configuration command lines corresponding to the first modules to be configured based on the allocatable resources, wherein the first modules to be configured correspond to nodes without dependencies in the dependency tree;

[0029] When all first modules to be configured corresponding to nodes without dependencies in the dependency tree are processed, deleting the nodes corresponding to the first modules to be configured from the dependency tree, and continuing to perform the step of obtaining the first modules to be configured based on the dependency tree until no nodes exist in the dependency tree;

[0030] A configuration command line list is generated based on the obtained configuration command lines.

[0031] In a second aspect, the present application further provides a network service configuration method, which is applied to a connection subsystem, comprising:

[0032] Receive a configuration command line list, wherein the configuration command line list is generated based on the above-mentioned network service configuration method;

[0033] The current configuration command line in the configuration command line list is read, and the current configuration command line is sent to the corresponding device to be configured through a remote connection channel.

[0034] In one embodiment, after the sending of the information to the corresponding device to be configured through the remote connection channel, the method includes:

[0035] receiving the echo content and the return result of the device to be configured for each of the current configuration command lines, and returning the echo content and the return result to the terminal;

[0036] When the return result is abnormal, stop sending the current configuration command line to the corresponding device to be configured through the remote connection channel, and send the abnormal return result to the main business system. The main business system is used to re-package the abnormal return result and send the re-packaged return result to the terminal.

[0037] In one embodiment, the method further includes any one of the following:

[0038] receiving a new configuration command line list returned by the primary service system, where the new configuration command line list is generated by the primary service system based on the network service configuration information modified by the terminal; or

[0039] A first repair command sent by the terminal is received, and the first repair command is sent to the to-be-configured device corresponding to the abnormal return result, where the first repair command is used to modify the to-be-configured device corresponding to the abnormal return result.

[0040] In one embodiment, the method further comprises:

[0041] receiving a connection instruction from another terminal, and connecting to the device to be configured corresponding to the abnormal return result based on the connection instruction;

[0042] A second repair command sent by the other terminal is received, and the second repair command is sent to the to-be-configured device corresponding to the abnormal return result, where the second repair command is used to modify the to-be-configured device corresponding to the abnormal return result.

[0043] In a third aspect, the present application further provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method in any one of the above embodiments when executing the computer program.

[0044] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of the method in any one of the above-mentioned embodiments when the computer program is executed by a processor.

[0045] In a fifth aspect, the present application also provides a computer program product, comprising a computer program, which implements the steps of the method in any one of the above embodiments when executed by a processor.

[0046] The network service configuration method, computer device, computer-readable storage medium, and computer program product described above receive network service configuration information; parse the network service configuration information to obtain each device to be configured and each module to be configured in each device to be configured; determine allocated resources for each module to be configured in each device to be configured, and determine allocatable resources based on the allocated resources; determine dependencies between the modules to be configured for each device to be configured; generate a configuration command line list for each module to be configured in each device to be configured based on the dependencies and the allocatable resources; and send the configuration command line list to a connection subsystem. The connection subsystem is configured to configure the network service of each module to be configured in each device to be configured based on the configuration command line list. By parsing the network service configuration information and combining resource allocation and dependencies, the configuration command line list for each module to be configured in the device to be configured can be determined. Thus, the main service system can configure multiple modules to be configured in multiple devices to be configured at one time, reducing costs and improving configuration efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following briefly introduces the drawings required for use in the embodiments of the present application or related technical descriptions. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying any creative work.

[0048] Figure 1 A diagram illustrating an application environment of a network service configuration method according to an embodiment;

[0049] Figure 2 A flowchart of a method for configuring network services in one embodiment;

[0050] Figure 3 A flowchart of the steps of parsing network service configuration information in one embodiment;

[0051] Figure 4 A schematic diagram of the steps for generating a dependency tree between modules to be configured in one embodiment;

[0052] Figure 5 A flowchart of a network service configuration method according to another embodiment;

[0053] Figure 6is a flowchart of a repair method in one embodiment;

[0054] Figure 7 A flowchart of a network service configuration method in yet another embodiment;

[0055] Figure 8 It is a structural block diagram of a network service configuration device in one embodiment;

[0056] Figure 9 It is a structural block diagram of a network service configuration device in another embodiment;

[0057] Figure 10 FIG. 1 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0058] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0059] The network service configuration method provided in the embodiment of the present application can be applied to Figure 1 The network service configuration system shown in the figure includes a terminal, a main service system, a connection subsystem, and various devices to be configured. The terminal is configured with a web terminal page, which includes a service configuration area and a terminal visual interaction area. The service configuration area presents the specific service information and results to be configured in a form. This page is filled out by the system administrator and typically uses the HTTP protocol to exchange messages with the main service system.

[0060] Specifically, the terminal interacts with the service management module of the main service system through the service configuration domain to generate a configuration command line list. The terminal visualization interaction domain module on the web terminal page, located next to the associated service, contains a terminal view for each device to be configured, displaying the specific configuration command lines issued and the device's response results in real time. Administrators can also interact directly with the device remotely through the terminal view.

[0061] The service management module of the main service system is specifically used to process the form configured in the service configuration domain to obtain a configuration command line list of the module to be configured of each device to be configured.

[0062] The device management module in the main business system manages the list of configuration command lines to be executed by each device, handing them off to the subsequent connection subsystem for processing. It also receives the execution results of the subsystem's configuration command line list and reports them to the service management module. Specifically, the device management module in the main business system sends the configuration command line list to the device connection module in the connection subsystem.

[0063] The device connection module of the connection subsystem manages and establishes remote connections with each device to be configured. It has three main functions: 1. Receives the configuration command line list from the main business system, such as Figure 1 1. Receives left and right movement commands from the terminal and forwards them to the device to be configured. 2. Receives real-time interactive commands (i.e., up and down movement commands) from the administrator via the terminal visualization domain and forwards them to the device to be configured. 3. Receives configuration results from the device to be configured and passes them back to the terminal connection module and the device management module of the main business system.

[0064] The connection subsystem also includes a terminal connection module, which corresponds to the device connection module and is used to manage the two-way transmission of the terminal view of the manager and the content in the device connection module.

[0065] The connection subsystem in the aforementioned network service configuration system establishes three channels with the main service system, the web terminal page, and the device to be configured, decoupling the service from the associated device configuration. The system also displays the entire intermediate process of command lines being sent to the device to be configured in real time, achieving unified visualization of the page form configuration and the associated underlying device command line content. When a service configuration issue occurs, the terminal can directly and accurately locate the problematic command line view, eliminating the need for manual troubleshooting through logs or device configuration. At the same time, the interactive capabilities of the visual terminal provide a multi-user shared channel for quick repairs, greatly improving operational convenience and accuracy while reducing device resource utilization. Furthermore, by combining resource allocation and dependencies, the configuration command line list for each module to be configured in the device to be configured can be determined. This allows the main service system to configure multiple modules on multiple devices to be configured at once, reducing costs and improving configuration efficiency.

[0066] In an exemplary embodiment, Figure 2 As shown, a network service configuration method is provided, which is applied to Figure 1 The main business system in FIG is taken as an example to illustrate, including the following steps 202 to 212. Among them:

[0067] S202: Receive network service configuration information.

[0068] Network service configuration information is obtained by filling in the service configuration field on the web terminal page and clicking Confirm. This network service configuration information is sent to the service management module of the main service system. The service configuration field and the service management module can communicate via HTTP or other communication methods, which are not specifically limited here.

[0069] The network service configuration information may be described in natural language, for example, filling in information: opening a VLAN network between device A and device D to achieve communication.

[0070] S204: Parse the network service configuration information to obtain each device to be configured and each module to be configured in each device to be configured.

[0071] The service management module is used to parse the network service configuration information and convert it into command lines to be issued based on the device to be configured. Figure 3 As shown, Figure 3 The flowchart of the network service configuration information parsing step in one embodiment includes parsing a form list, obtaining device allocated resources, calculating allocatable resources, calculating dependencies, and generating a configuration command line list based on the dependencies and allocatable resources.

[0072] The network service configuration information is parsed to obtain each device to be configured and each module to be configured in each device to be configured.

[0073] Specifically, network service configuration information includes the corresponding network service, the device to be configured associated with the service, and the modules to be configured within the device. Continuing with the previous example, the service management module can recognize the natural language input in the information and identify device A and device D as the devices to be configured. Based on the VLAN network, the VLAN module of device A and the VLAN module of device D are identified as the modules to be configured.

[0074] S206: Determine the allocated resources of each module to be configured of each device to be configured, and determine the allocatable resources based on the allocated resources.

[0075] The allocated resources of each module to be configured of each device to be configured may be obtained based on the configuration information of the device to be configured, and allocatable resources of various types may be determined based on the allocated resources.

[0076] For example, the allocated resources of each module to be configured of each device to be configured are obtained. The resources corresponding to the modules to be configured of the same type are of the same type. Therefore, the allocatable resources of the modules to be allocated can be determined based on the allocated resources corresponding to the modules to be configured of the same type.

[0077] S208: For each device to be configured, determine the dependency relationship between each module to be configured.

[0078] The dependency relationship is the dependency relationship between each module to be configured in each device to be configured. In this embodiment, a dependency tree of each device to be configured can be generated by traversing the dependencies, and the dependency tree is used as the dependency relationship of the module to be configured.

[0079] S210: Based on the dependency relationship and the allocatable resources, generate a configuration command line list for each module to be configured in each device to be configured.

[0080] In this embodiment, the dependency tree is traversed by pruning to generate configuration command lines corresponding to the modules to be configured based on the allocatable resources, thereby obtaining a configuration command line list based on the configuration command lines.

[0081] S212: Send the configuration command line list to the connection subsystem, and the connection subsystem is used to configure the network service of each module to be configured in each device to be configured based on the configuration command line list.

[0082] After the service management module obtains the configuration command line list, it sends the configuration command line list to the device management module. The device management module sends the configuration command line list to the connection subsystem, so that the connection subsystem can execute the command lines in the configuration command line list in sequence to configure the network services of each module to be configured in each device to be configured.

[0083] The communication between the device management module and the device connection module may be implemented using an RPC channel or other protocols, such as HTTP.

[0084] Among them, the remote connection channel established between the connection subsystem and the device can adopt methods such as SSH and Telnet. The specific protocol is determined by the main business system and is pluggable and embedded.

[0085] Optionally, the connection module in the subsystem reads a command line from the configuration command line list and sends it to the corresponding module of the device to be configured via a remote connection channel, obtaining the command's echo content and return result. Commands are sent one by one, line by line. During this process, the device to be configured will continuously return the corresponding echo content and result information of the command line. The terminal connection module will forward the return result and echo content of the device to be configured to the device terminal view of the web terminal page via a WebSocket channel established with the web terminal page and record it in the log. If there are no exceptions during the configuration process, the next command line in the configuration command list will be sent in sequence.

[0086] If an exception occurs during the configuration process, delivery of the next command line in the configuration command list is stopped. The connected subsystem then sends the exception result back to the main business system via the RPC channel. The main business system repackages the exception information and displays the exception result. At the same time, the administrator's web terminal will directly stop at the command line configuration where the problem occurred, allowing the administrator to directly identify the problem and facilitate repair.

[0087] The above-mentioned network service configuration method receives network service configuration information; parses the network service configuration information to obtain each device to be configured and each module to be configured in each device to be configured; determines the allocated resources of each module to be configured in each device to be configured, and determines the allocatable resources based on the allocated resources; determines the dependency relationship between each module to be configured for each device to be configured; generates a configuration command line list for each module to be configured in each device to be configured based on the dependency relationship and the allocatable resources; sends the configuration command line list to the connection subsystem, and the connection subsystem is used to configure the network service of each module to be configured in each device to be configured based on the configuration command line list. By parsing the network service configuration information and combining the resource allocation and dependency relationship, the configuration command line list of each module to be configured in the device to be configured can be determined, so that the configuration of multiple modules to be configured in multiple devices to be configured can be realized at one time through the main service system, thereby reducing costs and improving configuration efficiency.

[0088] In one of the optional embodiments, the network service configuration information is parsed to obtain each device to be configured and each module to be configured in each device to be configured, including: obtaining a pre-generated target network topology structure; determining the current network topology structure based on the entry point information of each device in the network service configuration information and the target network topology structure; determining each device to be configured based on the current network topology structure; and determining each module to be configured in each device to be configured based on the network service configuration information.

[0089] The target network topology is a pre-generated network topology that includes all devices. For example, the main business system obtains the device information of each managed device, and then generates the target network topology based on the device information. The connections in the target network topology are communication links between devices.

[0090] The current network topology is determined based on the entry point information of each device in the network service configuration information and the target network topology. Specifically, the network service configuration information carries the access point information of each device associated with this service. The service management module described above can recognize the natural language of the filled-in information and obtain device A and device D as devices to be configured. Device A and device D also serve as device access points, so that device access point information can be obtained. Access points are usually at the edge of the network. The routing path between each device can be calculated based on the target network topology. For example, the device to be configured is determined based on the network service configuration information, and then the device to be configured is located in the target network topology to obtain the current network topology. For example, the routing path between device A and device D also includes device B and device C, so the devices to be configured include device A, device B, device C, and device D.

[0091] Based on the network configuration information, the modules to be configured corresponding to each device to be configured are determined. Continuing from the above, for example, based on the VLAN network, the VLAN modules of device A and device D are determined to be modules to be configured, and the VXLAN modules of device B and device C are determined to be modules to be configured.

[0092] In the above embodiment, the device to be configured and the module to be configured in the device to be configured can be determined through the target network topology and network configuration information, which lays a foundation for generating the configuration command line list below.

[0093] In one optional embodiment, determining the allocatable resources based on the allocated resources includes: determining the total resources corresponding to the same type of modules to be configured in each device to be configured; and determining the allocatable resources based on the allocated resources and the corresponding total resources of the same type of modules to be configured in each device to be configured.

[0094] The total resources are generally fixed, for example, the range of VLAN resources is 0 to 4095. One type of total resources is allocated to one type of module to be configured, for example, VLAN resources are allocated to VLAN modules to be configured.

[0095] The allocatable resources are the total resources of the same type minus the allocated resources of the corresponding modules of the same type to be allocated.

[0096] Taking VLAN assignment as an example: Since the VLAN number for a new service should be different from the existing VLAN numbers, the "smallest set sorting method" can be used. Specifically, the VLAN numbers of A and D are sorted to obtain {1, 2, 3, 4, 8}. Then, the first unassigned VLAN number, "5," is searched from smallest to largest and is used as the VLAN number for the new service.

[0097] In the above embodiment, allocable resources are first obtained to determine the optional range of resources corresponding to the service, which facilitates the subsequent generation of command lines.

[0098] In one of the optional embodiments, for each device to be configured, the dependency relationship between each module to be configured is determined, including: for each device to be configured, selecting a current module to be configured, and detecting whether the current module to be configured depends on other modules to be configured; if the current module to be configured does not depend on other modules to be configured, generating a separate dependency tree for the current module to be configured in the dependency tree, obtaining the next module to be configured as the current module to be configured, and continuing to execute the step of detecting whether the current module to be configured depends on other modules to be configured until all modules to be configured in the device to be configured are traversed; if the current module to be configured depends on other modules to be configured, and the other modules to be configured are not in the dependency tree, the current module to be configured is added to the dependency tree. The configuration module serves as a node of a new dependency tree, obtains the next module to be configured as the current module to be configured, and continues to execute the step of detecting whether the current module to be configured depends on other modules to be configured until all modules to be configured in the device to be configured are traversed; if the current module to be configured depends on other modules to be configured, and the other modules to be configured are already in one of the dependency trees, the current module to be configured is added to the corresponding dependency tree and depends on the other configuration modules, obtains the next module to be configured as the current module to be configured, and continues to execute the step of detecting whether the current module to be configured depends on other modules to be configured until all modules to be configured in the device to be configured are traversed; and generates dependency relationships based on each dependency tree.

[0099] Combine Figure 4 As shown, Figure 4 This is a schematic diagram of the steps for generating a dependency tree between modules to be configured in one embodiment. In this embodiment, a "traversal dependency" method is adopted, with nodes in the tree represented as modules. The specific process includes:

[0100] The first module to be configured is selected. If it has no dependencies on other modules, the process stops. A new module is selected. If it has dependencies on other modules, and the dependent modules are already in another tree, the new module is added to that tree. Otherwise, the process continues to traverse the modules based on their dependencies until all modules are traversed, resulting in a "dependency tree." After traversing all modules, the "dependency trees" are obtained, forming a "dependency forest."

[0101] For example, the device has the following service modules to be deployed: a, b, c, d, and e. Among them, b depends on c, d depends on c, and e depends on d. Module a is an independent module and has no dependencies on other modules. Its dependency tree is generated as follows: Module a has no dependencies, resulting in an independent tree. Module b depends on c, so c is added to the tree. Since c has no dependencies on other modules, module d is read. Since module d depends on module c, it is added to the existing tree. Similarly, since module d has no dependencies on other modules, module e is read and added to the tree based on its dependencies, ultimately forming a dependency forest consisting of two dependency trees.

[0102] In the above embodiment, dependency relationships are generated by traversing dependencies, laying a foundation for the subsequent generation of a configuration command line list.

[0103] In one of the optional embodiments, based on dependencies and allocatable resources, a configuration command line list is generated for each module to be configured in each device to be configured, including: obtaining a first module to be configured based on a dependency tree, and generating a configuration command line corresponding to each first module to be configured based on the allocatable resources, wherein the first module to be configured corresponds to a node without dependencies in the dependency tree; when the first modules to be configured corresponding to each node without dependencies in the dependency tree are processed, the node corresponding to the first module to be configured is deleted from the dependency tree, and the step of obtaining the first module to be configured based on the dependency tree is continued until no node exists in the dependency tree; and a configuration command line list is generated based on each obtained configuration command line.

[0104] Among them, the command lines of each module to be configured are generated in sequence according to the dependency trees obtained above, mainly using the "pruning" method. This step is the reverse process of dependency generation: that is, the modules to be configured without dependencies in the dependency tree are selected in turn, and the command lines of the modules to be configured are generated. Then, the dependencies are removed, that is, "pruning", exposing other modules to be configured without dependencies, and the configurations of these modules to be configured without dependencies are generated again, until the configurations of all modules to be configured are generated, and the final configuration command line list of the device to be configured is obtained.

[0105] Still Figure 4 For example, first generate the configurations of the non-dependent modules to be configured a and c. After "pruning" modules to be configured a and c, expose the non-dependent modules to be configured b and d, generate their configurations, and finally generate the configuration of module to be configured e.

[0106] In the above embodiment, the configuration command line list is generated based on the dependency tree and the branch reduction method, which can ensure the integrity of the configuration command line list.

[0107] In an exemplary embodiment, Figure 5 As shown, a network service configuration method is provided, which is applied to Figure 1 The main business system in FIG is taken as an example to illustrate, including the following steps 502 to 504. Among them:

[0108] S502: Receive a configuration command line list, where the configuration command line list is generated based on the network service configuration method in any one of the above embodiments.

[0109] The detailed configuration of the command list generation method can be found above. After the main business system generates the command list, it sends it to the device connection module through the device management module. Specifically, the device management module uses the RPC channel to remotely call the connection subsystem and wait for the subsystem to return the execution result information.

[0110] S504: Read the current configuration command line in the configuration command line list, and send the current configuration command line to the corresponding device to be configured through the remote connection channel.

[0111] The connection module in the subsystem reads a command line from each module in the device list and sends it to the device to be configured through the remote connection channel to obtain the command echo content and return result.

[0112] It should be noted that the commands are issued one by one based on the behavior.

[0113] In one of the optional embodiments, after being sent to the corresponding device to be configured through the remote connection channel, it includes: receiving the echo content and return result of the device to be configured for each current configuration command line, and returning the echo content and return result to the terminal; if the return result is abnormal, stop sending the current configuration command line to the corresponding device to be configured through the remote connection channel, and send the abnormal return result to the main business system, the main business system is used to re-encapsulate the abnormal return result, and send the re-encapsulated return result to the terminal.

[0114] After receiving the command from the command line, the device to be configured returns the corresponding echo content and result information. The terminal connection will forward the response of the device to be configured to the device terminal view of the web terminal page through the WebSocket channel established with the web terminal page and record it in the log.

[0115] If a command line is issued without any exception, the next command line is issued. The command configuration content and results are displayed synchronously on the web terminal page.

[0116] If a command line returns an abnormal result, subsequent command line delivery is halted. The subsystem sends the abnormal result back to the main business system via the RPC channel. The main business system repackages the abnormal information and displays the abnormal result. Meanwhile, the administrator's web terminal page will directly stay at the command line configuration where the problem occurred.

[0117] In one of the optional embodiments, the method also includes any one of the following: receiving a new configuration command line list returned by the main business system, the new configuration command line list is generated by the main business system based on the network business configuration information modified by the terminal; or receiving a first repair command issued by the terminal, sending the first repair command to the device to be configured corresponding to the abnormal return result, the first repair command is used to modify the device to be configured corresponding to the abnormal return result.

[0118] Among them, the administrator's Web terminal page will directly stay at the command line configuration where the problem occurs. The administrator can directly view the abnormal information returned by the device on the Web terminal page and directly locate the cause of the problem in one step. At this time, the following two methods can be used to repair it. Specifically, you can combine Figure 6 As shown:

[0119] Method 1: Re-issue the configuration of the module to be configured through the edit form to reconfigure it. This method is generally suitable for simple exceptions, and the interface of the main business system has the ability to modify the problem.

[0120] Method 2: Repair the problem using the interactive command line interface on the web terminal. For example, if simply re-editing the form fails to fix the problem, and the device's web terminal interface is currently stuck at the abnormality information point, the administrator can directly interact with the device through the terminal to issue repair commands. The commands are then sent to the device to be configured through the terminal connection and the device connection. After the repair is successful, the subsequent configuration commands in the list can be read until all configurations are successful.

[0121] In one of the optional embodiments, the method further includes: receiving a connection instruction from another terminal, and connecting to the device to be configured corresponding to the abnormal return result based on the connection instruction; receiving a second repair command issued by the other terminal, and sending the second repair command to the device to be configured corresponding to the abnormal return result, wherein the second repair command is used to modify the device to be configured corresponding to the abnormal return result.

[0122] In this embodiment, management personnel can collaborate with each other and execute repair measures through the device terminal. Multiple user terminals share the same device connection under the same service, and will not occupy additional resources of the underlying device.

[0123] For ease of understanding, combined Figure 7 As shown, Figure 7This is a flowchart of a network service configuration method in another embodiment. A user creates a service through a form. The service manager parses the service information and obtains various configuration lists (i.e., the configuration command line list mentioned above). The device manager uses the list to call the connection subsystem via an RPC channel, obtains the corresponding device connection, sends a command line to the device through the device connection, and determines whether there are subsequent command lines. If so, the next command line is obtained and sent to the device via a remote connection. The device returns an echo and execution result, which is forwarded to the web terminal page via WebSocket. The execution result of the command line is then determined to be abnormal. If there are no abnormalities, the process continues with the step of determining whether there are subsequent command lines.

[0124] If there is an exception, the business display fails to be delivered, and it is determined whether it can be repaired by re-editing the form. If so, the user repairs the abnormal module by editing the form. If not, the user's Web terminal stays at the abnormal point and directly enters the repair command line through the terminal.

[0125] In the above embodiment, the business is decoupled from the associated device configuration, and the entire intermediate process of the command line being sent to the device to be configured is echoed in real time, thereby realizing the unified visualization of the page form configuration and the associated underlying device command line content. When a business configuration problem occurs, the terminal can directly and accurately locate the problem command line view, without the need for manual troubleshooting through logs or device configuration. At the same time, the interactive capability of the visual terminal provides a channel for quick repairs shared by multiple users, greatly improving the convenience and accuracy of operations and reducing device resource utilization. In addition, the configuration command line list of each module to be configured in the device to be configured can be determined in combination with resource allocation and dependency relationships, so that the configuration of multiple modules to be configured in multiple devices to be configured can be achieved at one time through the main business system, reducing costs and improving configuration efficiency.

[0126] It should be understood that, although the steps in the flowcharts of the above embodiments are shown in sequence as indicated by the arrows, these steps are not necessarily performed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be performed in other orders. Moreover, at least a portion of the steps in the flowcharts of the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily performed at the same time, but can be performed at different times. The execution order of these steps or stages is not necessarily to be performed in sequence, but can be performed in turn or alternately with other steps or at least a portion of steps or stages in other steps.

[0127] Based on the same inventive concept, embodiments of the present application further provide a network service configuration device for implementing the aforementioned network service configuration method. The implementation solution provided by this device is similar to the implementation solution described in the aforementioned method. Therefore, the specific limitations in one or more embodiments of the network service configuration device provided below can be found in the above-mentioned limitations on the network service configuration method and will not be further elaborated here.

[0128] In an exemplary embodiment, Figure 8 As shown, a network service configuration device is provided, including: a first receiving module 801, a parsing module 802, a resource determination module 803, a dependency determination module 804, a command line generation module 805 and a sending module 806, wherein:

[0129] A first receiving module 801 is configured to receive network service configuration information;

[0130] The parsing module 802 is used to parse the network service configuration information to obtain each device to be configured and each module to be configured in each device to be configured;

[0131] The resource determination module 803 is configured to determine the allocated resources of each module to be configured of each device to be configured, and determine the allocatable resources based on the allocated resources;

[0132] A dependency determination module 804 is configured to determine the dependency between modules to be configured for each device to be configured;

[0133] The command line generation module 805 is used to generate a configuration command line list for each module to be configured in each device to be configured based on the dependency relationship and the allocatable resources;

[0134] The sending module 806 is configured to send the configuration command line list to the connection subsystem, and the connection subsystem is configured to configure the network service of each module to be configured in each device to be configured based on the configuration command line list.

[0135] In one of the optional embodiments, the above-mentioned parsing module 802 is specifically used to obtain a pre-generated target network topology structure; determine the current network topology structure based on the access point information of each device to be configured in the network service configuration information and the target network topology structure; determine each device to be configured based on the current network topology structure; and determine each module to be configured in each device to be configured based on the network service configuration information.

[0136] In one of the optional embodiments, the resource determination module 803 is specifically used to determine each total resource, where one total resource is allocated to one type of module to be configured; and the allocable resources are determined based on the allocated resources of the same type of module to be configured in each device to be configured and the corresponding total resources.

[0137] In one of the optional embodiments, the dependency determination module 804 is specifically used to select the current module to be configured for each device to be configured, and detect whether the current module to be configured depends on other modules to be configured; if the current module to be configured does not depend on other modules to be configured, a separate dependency tree is generated for the current module to be configured in the dependency tree, the next module to be configured is obtained as the current module to be configured, and the step of detecting whether the current module to be configured depends on other modules to be configured is continued until all modules to be configured in the device to be configured are traversed; if the current module to be configured depends on other modules to be configured, and the other modules to be configured are not in the dependency tree, the current module to be configured is used as A node in a new dependency tree is obtained, the next module to be configured is obtained as the current module to be configured, and the step of detecting whether the current module to be configured depends on other modules to be configured is continued until all modules to be configured in the device to be configured are traversed; if the current module to be configured depends on other modules to be configured, and the other modules to be configured are already in one of the dependency trees, the current module to be configured is added to the corresponding dependency tree and depends on the other configuration modules, the next module to be configured is obtained as the current module to be configured, and the step of detecting whether the current module to be configured depends on other modules to be configured is continued until all modules to be configured in the device to be configured are traversed; and dependency relationships are generated based on each dependency tree.

[0138] In one of the optional embodiments, the above-mentioned command line generation module 805 is specifically used to obtain the first module to be configured based on the dependency tree, and generate a configuration command line corresponding to each first module to be configured based on the allocatable resources, wherein the first module to be configured corresponds to a node without a dependency in the dependency tree; when the first modules to be configured corresponding to each node without a dependency in the dependency tree are processed, the node corresponding to the first module to be configured is deleted from the dependency tree, and the step of obtaining the first module to be configured based on the dependency tree is continued until no node exists in the dependency tree; and a configuration command line list is generated based on each obtained configuration command line.

[0139] In an exemplary embodiment, Figure 9 As shown, a network service configuration device is provided, including: a second receiving module 901 and a configuration module 902, wherein:

[0140] A second receiving module 901 is configured to receive a configuration command line list, where the configuration command line list is generated based on the network service configuration apparatus in any one of the above embodiments;

[0141] The configuration module 902 is configured to read the current configuration command line in the configuration command line list and send the current configuration command line to the corresponding device to be configured through a remote connection channel.

[0142] In one of the optional embodiments, the above-mentioned device also includes: a display module, used to receive the echo content and return result of each current configuration command line of the device to be configured, and return the echo content and return result to the terminal; when the return result is abnormal, stop sending the current configuration command line to the corresponding device to be configured through the remote connection channel, and send the abnormal return result to the main business system, the main business system is used to re-encapsulate the abnormal return result, and send the re-encapsulated return result to the terminal.

[0143] In one of the optional embodiments, the above-mentioned device also includes: a first repair module, used to perform exception repair based on any one of the following: receiving a new configuration command line list returned by the main business system, the new configuration command line list is generated by the main business system based on the network business configuration information modified by the terminal; or receiving a first repair command issued by the terminal, sending the first repair command to the device to be configured corresponding to the abnormal return result, the first repair command is used to modify the device to be configured corresponding to the abnormal return result.

[0144] In one of the optional embodiments, the above-mentioned device also includes: a second repair module, which is used to receive connection instructions from other terminals, and connect to the device to be configured corresponding to the abnormal return result based on the connection instructions; receive a second repair command issued by other terminals, and send the second repair command to the device to be configured corresponding to the abnormal return result, and the second repair command is used to modify the device to be configured corresponding to the abnormal return result.

[0145] Each module in the above-mentioned network service configuration device can be implemented in whole or in part through software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in the computer device in the form of software, so that the processor can call and execute the corresponding operations of each module.

[0146] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Figure 10As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, abbreviated as I / O) and a communication interface. The processor, memory and input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The database of the computer device is used to store network service configuration information. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a network service configuration method is implemented.

[0147] Those skilled in the art will understand that Figure 10 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0148] In one embodiment, a computer device is further provided, including a memory and a processor. The memory stores a computer program, and the processor implements the steps in the above method embodiments when executing the computer program.

[0149] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0150] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0151] Those skilled in the art will understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. In particular, any reference to memory, database, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The databases involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the various embodiments provided herein may be, but are not limited to, general-purpose processors, central processing units (CPUs), graphics processing units (GPUs), digital signal processors (DSPs), programmable logic devices (PLDs), quantum computing-based data processing logic devices, artificial intelligence (AI) processors, and the like.

[0152] The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0153] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.

Claims

1. A network service configuration method, characterized in that: Applied to the main business system, the method includes: receiving network service configuration information; Parsing the network service configuration information to obtain each device to be configured and each module to be configured in each device to be configured; Determining allocated resources of each module to be configured of each device to be configured, and determining allocatable resources based on the allocated resources; For each device to be configured, determining the dependency relationship between each module to be configured; Based on the dependency relationship and the allocatable resources, generating a configuration command line list for each module to be configured in each device to be configured; The configuration command line list is sent to a connection subsystem, and the connection subsystem is used to configure network services of the modules to be configured in the devices to be configured based on the configuration command line list.

2. The method according to claim 1, characterized in that The parsing of the network service configuration information to obtain each device to be configured and each module to be configured in each device to be configured includes: Obtain a pre-generated target network topology; Determine the current network topology based on the access point information of each device to be configured in the network service configuration information and the target network topology; Determining each device to be configured based on the current network topology; Determine each module to be configured in each device to be configured based on the network service configuration information.

3. The method according to claim 1, characterized in that The determining the allocatable resources based on the allocated resources includes: Determining total resources corresponding to modules to be configured of the same type in each of the devices to be configured; Allocable resources are determined based on allocated resources of the modules to be configured of the same type in each of the devices to be configured and the corresponding total resources.

4. The method according to claim 1, wherein The step of determining, for each device to be configured, the dependency relationship between the modules to be configured includes: For each device to be configured, selecting a module to be configured currently, and detecting whether the module to be configured currently depends on other modules to be configured; If the current module to be configured does not depend on other modules to be configured, a separate dependency tree is generated for the current module to be configured in the dependency tree, the next module to be configured is obtained as the current module to be configured, and the step of detecting whether the current module to be configured depends on other modules to be configured is continued until all modules to be configured in the device to be configured are traversed; If the current module to be configured depends on other modules to be configured, and the other modules to be configured are not in the dependency tree, the current module to be configured is used as a node in a new dependency tree, the next module to be configured is obtained as the current module to be configured, and the step of detecting whether the current module to be configured depends on other modules to be configured is continued until all modules to be configured in the device to be configured are traversed; If the current module to be configured depends on other modules to be configured, and the other modules to be configured are already in one of the dependency trees, the current module to be configured is added to the corresponding dependency tree and becomes dependent on the other configuration modules, a next module to be configured is obtained as the current module to be configured, and the step of detecting whether the current module to be configured depends on other modules to be configured is continued until all modules to be configured in the device to be configured are traversed; A dependency relationship is generated based on each of the dependency relationship trees.

5. The method according to claim 4, characterized in that The generating, based on the dependency relationship and the allocatable resources, a configuration command line list for each module to be configured in each device to be configured, includes: Acquire first modules to be configured based on the dependency tree, and generate configuration command lines corresponding to the first modules to be configured based on the allocatable resources, wherein the first modules to be configured correspond to nodes without dependencies in the dependency tree; When all first modules to be configured corresponding to nodes without dependencies in the dependency tree are processed, deleting the nodes corresponding to the first modules to be configured from the dependency tree, and continuing to perform the step of obtaining the first modules to be configured based on the dependency tree until no nodes exist in the dependency tree; A configuration command line list is generated based on the obtained configuration command lines.

6. A network service configuration method, characterized in that: Applied to connecting subsystems, including: Receive a configuration command line list, wherein the configuration command line list is generated based on the network service configuration method according to any one of claims 1 to 5; The current configuration command line in the configuration command line list is read, and the current configuration command line is sent to the corresponding device to be configured through a remote connection channel.

7. The method according to claim 6, characterized in that After being sent to the corresponding device to be configured through the remote connection channel, the following steps are included: receiving the echo content and the return result of each current configuration command line of the device to be configured, and returning the echo content and the return result to the terminal; When the return result is abnormal, stop sending the current configuration command line to the corresponding device to be configured through the remote connection channel, and send the abnormal return result to the main business system. The main business system is used to re-package the abnormal return result and send the re-packaged return result to the terminal.

8. The method according to claim 7, characterized in that The method further includes any of the following: receiving a new configuration command line list returned by the primary service system, where the new configuration command line list is generated by the primary service system based on the network service configuration information modified by the terminal; or A first repair command sent by the terminal is received, and the first repair command is sent to the to-be-configured device corresponding to the abnormal return result, where the first repair command is used to modify the to-be-configured device corresponding to the abnormal return result.

9. The method according to claim 7, characterized in that The method further comprises: receiving a connection instruction from another terminal, and connecting to the device to be configured corresponding to the abnormal return result based on the connection instruction; A second repair command sent by the other terminal is received, and the second repair command is sent to the to-be-configured device corresponding to the abnormal return result, where the second repair command is used to modify the to-be-configured device corresponding to the abnormal return result.

10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 9 are implemented.

11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 9 are implemented.

12. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 9 are implemented.

Citation Information

Patent Citations

  • Service scheduling method, service management method and devices

    CN108512672A

  • Network configuration method and device and storage medium

    CN111404755A