CN115913959A - Template-based equipment configuration method and device and electronic equipment - Google Patents

Template-based equipment configuration method and device and electronic equipment Download PDF

Info

Publication number
CN115913959A
CN115913959A CN202211707681.6A CN202211707681A CN115913959A CN 115913959 A CN115913959 A CN 115913959A CN 202211707681 A CN202211707681 A CN 202211707681A CN 115913959 A CN115913959 A CN 115913959A
Authority
CN
China
Prior art keywords
template
target
basic
equipment
script
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211707681.6A
Other languages
Chinese (zh)
Inventor
徐昆
许梦
郑瑞江
范小会
李梅
傅博
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Telecom Corp Ltd
Original Assignee
China Telecom Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Telecom Corp Ltd filed Critical China Telecom Corp Ltd
Priority to CN202211707681.6A priority Critical patent/CN115913959A/en
Publication of CN115913959A publication Critical patent/CN115913959A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Abstract

The application discloses a template-based equipment configuration method and device and electronic equipment. Wherein, the method comprises the following steps: receiving a device configuration request, wherein the device configuration request has a corresponding relation with a service scene; converting the basic template into a target template according to the request parameters in the equipment configuration request, wherein the basic template is a preset template; and issuing the target template to the target equipment. The method and the device solve the technical problems that in the prior art, the SDN controller uses the static template to render and issue, the template code needs to be re-developed during updating, and the adjusting time is long.

Description

Template-based equipment configuration method and device and electronic equipment
Technical Field
The present application relates to the field of network communications, and in particular, to a template-based device configuration method and apparatus, and an electronic device.
Background
In the field of operator network communication, there are two main ways for configuration and control of network devices: and integrating a commercial manual operation and maintenance mode and an SDN controller mode.
The manual maintenance mode of the integrated business generally uses the CLI command mode to directly interact with the equipment to complete the operations of equipment opening, backbone relay opening, service opening, equipment upgrading maintenance and the like. However, this method is greatly affected by space and time and is limited by the technical level and work efficiency of network engineers. Once a critical failure is not responded quickly enough, an unpredictable loss of customer service may result.
The SDN controller is provided with a globally controllable control plane and an efficient forwarding plane, and a controller user can make a decision based on Network information of the whole Network and adjust and optimize according to real-time changes of Network traffic. The adjustment and optimization comprise equipment issuing, maintenance change, service opening and the like. The existing SDN controller-to-device configuration scheme includes: 1) The method is easy for a network engineer to read and has the defects that the CLI command is fused with various protocol contents, no standard exists for the division of a minimum issuing unit, and the practical problem is difficult to accurately solve. 2) Based on the YANG file of the existing manufacturer, the code structure is abstracted, and the relation between the protocols is realized through the mutual reference between the objects. The method is based on a manufacturer YANG file, and can well adapt the minimum delivery capacity unit supported by the equipment, but the method has inflexible support on the manufacturer version upgrading due to the method of rendering and delivering by using a static template, when the YANG file is changed due to the manufacturer version upgrading, codes need to be redeveloped for adapting, the adjustment period is long, and the manufacturer upgrading change cannot be quickly responded.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
The embodiment of the application provides a template-based equipment configuration method and device and electronic equipment, and aims to at least solve the technical problems that in the prior art, template codes need to be redeveloped when an SDN controller is updated in a rendering and issuing mode by using a static template, and the adjustment time is long.
According to an aspect of an embodiment of the present application, there is provided a template-based device configuration method, including: receiving a device configuration request, wherein the device configuration request has a corresponding relation with a service scene; converting a basic template into a target template according to request parameters in the equipment configuration request, wherein the basic template is a preset template; and issuing the target template to the target equipment.
Optionally, converting the base template into the target template comprises: determining a target service scene of the target equipment according to the request parameters; acquiring a script language in a basic template under a target service scene, wherein the script language is determined by identifying special characters and script grammar in the basic template; and operating the script language, and converting the basic template into the target template.
Optionally, converting the base template into the target template comprises: acquiring first script information in a basic template; loading the atomic capability corresponding to the device role according to the device role of the target device and the first script information; responding to variable information selected by the target object, filling the variable information into the basic template according to the variable identifier and the variable name, and updating the first script information according to the variable information; and running the updated first script information to obtain the target template.
Optionally, the base template is determined by: acquiring a service scene applicable to target equipment and acquiring the atomic capability of the target equipment; and determining a basic template according to the service scene and the atomic capability.
Optionally, before issuing the target template to the target device, the method further includes: and verifying the parameter information of the target template.
Optionally, issuing the target template to the target device includes: acquiring each parameter information in a target template; verifying whether each parameter information meets a preset condition, wherein the preset condition is the atomic capability range of the target equipment; when at least one parameter information does not meet the preset condition, determining that the target template fails to be verified, and returning the parameter information which fails to be verified to the target object; and under the condition that each parameter information meets the preset condition, determining that the target template passes the verification, and issuing the target template to the target equipment.
Optionally, the method further comprises: under the condition that the atomic capability of the target equipment is updated, receiving an updating instruction of the target object, wherein the updating instruction is used for updating the script language in the target template; and executing the script language in the target template according to the updating instruction.
According to another aspect of the embodiments of the present application, there is also provided a template-based device configuration apparatus, including: the device comprises a receiving module, a processing module and a processing module, wherein the receiving module is used for receiving a device configuration request, and the device configuration request has a corresponding relation with a service scene; the conversion module is used for converting the basic template into a target template according to the request parameters in the equipment configuration request, wherein the basic template is a preset template; and the issuing module is used for issuing the target template to the target equipment.
According to another aspect of the embodiments of the present application, there is also provided an electronic device, including: a memory for storing program instructions; a processor coupled to the memory for executing program instructions that implement the functions of: receiving a device configuration request, wherein the device configuration request has a corresponding relation with a service scene; converting a basic template into a target template according to request parameters in the equipment configuration request, wherein the basic template is a preset template; and issuing the target template to the target equipment.
According to another aspect of the embodiments of the present application, a non-volatile storage medium is further provided, where the non-volatile storage medium includes a stored computer program, and a device in which the non-volatile storage medium is located executes the template-based device configuration method by running the computer program.
In the embodiment of the application, a device configuration request is received, wherein the device configuration request has a corresponding relation with a service scene; converting the basic template into a target template according to the request parameters in the equipment configuration request, wherein the basic template is a preset template; the target template is issued to the target equipment, so that the aim of converting the basic template into the required target template according to the request parameters in the equipment configuration request is fulfilled, the technical effects of converting different target templates according to the service scene and avoiding the need of re-developing the template codes are achieved, and the technical problems that in the prior art, the SDN controller uses a static template to render and issue, the template codes need to be re-developed during updating, and the adjustment time is long are solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
fig. 1 is a block diagram of a hardware structure of a computer terminal (or an electronic device) for implementing a template-based device configuration method according to an embodiment of the present application;
FIG. 2 is a flow chart of a method for template-based device configuration according to an embodiment of the present application;
fig. 3 is a block diagram of a template-based device configuration apparatus according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
First, some terms or expressions appearing in the course of explanation of the embodiments of the present application are applied to the following explanations:
the Command-Line Interface (CLI) is the most widely used user Interface before graphical user interfaces have become popular, and generally does not support a mouse, and a user inputs instructions through a keyboard and the computer executes the instructions after receiving the instructions. Also known as a Character User Interface (CUI).
The template-based device configuration method provided by the embodiment of the application can be executed in a mobile terminal, a computer terminal or a similar operation device. Fig. 1 shows a hardware configuration block diagram of a computer terminal (or electronic device) for implementing a template-based device configuration method. As shown in fig. 1, the computer terminal 10 (or electronic device 10) may include one or more processors (shown in the figures as 102a, 102b, … …,102 n) (which may include, but are not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data, and a transmission module 106 for communication functions. In addition, the method can also comprise the following steps: a display, an input/output interface (I/O interface), a Universal Serial Bus (USB) port (which may be included as one of the ports of the I/O interface), a network interface, a power source, and/or a camera. It will be understood by those skilled in the art that the structure shown in fig. 1 is only an illustration and is not intended to limit the structure of the electronic device. For example, the computer terminal 10 may also include more or fewer components than shown in FIG. 1, or have a different configuration than shown in FIG. 1.
It should be noted that the one or more processors and/or other data processing circuitry described above may be referred to generally herein as "data processing circuitry". The data processing circuitry may be embodied in whole or in part in software, hardware, firmware, or any combination thereof. Further, the data processing circuit may be a single stand-alone processing module or incorporated, in whole or in part, into any of the other elements in the computer terminal 10 (or electronic device). As referred to in the embodiments of the application, the data processing circuit acts as a processor control (e.g. selection of a variable resistance termination path connected to the interface).
The memory 104 may be used to store software programs and modules of application software, such as program instructions/data storage devices corresponding to the template-based device configuration method in the embodiment of the present application, and the processor executes various functional applications and data processing by running the software programs and modules stored in the memory 104, so as to implement the above-mentioned template-based device configuration method. The memory 104 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory remotely located from the processor, which may be connected to the computer terminal 10 over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission module 106 is used to receive or transmit data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the computer terminal 10. In one example, the transmission module 106 includes a Network adapter (NIC) that can be connected to other Network devices through a base station to communicate with the internet. In one example, the transmission module 106 may be a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
The display may be, for example, a touch screen type Liquid Crystal Display (LCD) that may enable a user to interact with the user interface of the computer terminal 10 (or electronic device).
It should be noted that, in some alternative embodiments, the computer device (or electronic device) shown in fig. 1 may include hardware elements (including circuitry), software elements (including computer code stored on a computer-readable medium), or a combination of both hardware and software elements. It should be noted that fig. 1 is only one example of a particular specific example and is intended to illustrate the types of components that may be present in the computer device (or electronic device) described above.
In the above operating environment, the embodiments of the present application provide a template-based device configuration method embodiment, it should be noted that the steps shown in the flowchart of the drawings may be executed in a computer system such as a set of computer-executable instructions, and that although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in an order different from that shown.
Fig. 2 is a flowchart of a template-based device configuration method according to an embodiment of the present application, and as shown in fig. 2, the method includes the following steps:
step S202, receiving a device configuration request, wherein the device configuration request has a corresponding relation with a service scene;
step S204, converting a basic template into a target template according to the request parameters in the equipment configuration request, wherein the basic template is a preset template;
and step S206, issuing the target template to the target equipment.
In the above steps S202 to S206, for the way of rendering and issuing static templates of the past SDN controller, in order to solve the problem that different templates are generated according to the atomic capability difference required by different parameters in the same service scene, and that logical processing is required in the templates, and configuration and issuing of different services are efficiently completed, the present application provides a corresponding solution, which is described in detail below.
In step S204 of the template-based device configuration method, the method for converting a basic template into a target template specifically includes the following steps: determining a target service scene of the target equipment according to the request parameters; acquiring a script language in a basic template under a target service scene, wherein the script language is determined by identifying special characters and script grammar in the basic template; and running the script language and converting the basic template into the target template.
In step S204 in the above template-based device configuration method, converting the basic template into the target template specifically includes the following steps: acquiring first script information in a basic template; loading the atomic capability corresponding to the device role according to the device role of the target device and the first script information; responding to variable information selected by the target object, filling the variable information into the basic template according to the variable identifier and the variable name, and updating the first script information according to the variable information; and running the updated first script information to obtain the target template.
In the above template-based device configuration method, the basic template is determined by: acquiring a service scene applicable to target equipment and acquiring the atomic capability of the target equipment; and determining a basic template according to the service scene and the atomic capability.
In the embodiment of the application, the template-based device configuration method comprises the following steps:
firstly, determining a basic template, compiling the basic template according to different service scenes and atomic capabilities, and persisting the basic template.
And secondly, after the basic template is determined, determining a target service scene of the target equipment according to a request parameter in the equipment configuration request, wherein the request parameter can be a parameter related to the scene, and analyzing and assembling the issued scene and the parameter by analyzing the scene parameter so as to select different basic templates.
And step three, dynamically rendering the basic template, dynamically rendering different basic templates through the logic scripts in the template according to the basic template and the equipment parameters (namely the variable information) selected by the services of different scenes, and performing parameter standard verification. The process of converting the basic template into the dynamic template comprises the following steps: and performing logic processing on the parameters and the scripts by the background according to the script language (ftl language) implanted in the basic template through different parameters of the equipment configuration request. The basic template is dynamically converted into different issuing templates (namely the target template) by identifying parameters and scripts and operating a script language and combining the persisted atomic capability in the application. And when the background identifies the script language in the template, the background discriminates the script language according to the grammar semanteme and the special characters of the script defined in advance.
And fourthly, template display and update, namely rendering a basic template in a file system (or a database or a cache library) and displaying the basic template to a front-end page, simultaneously supporting an online editing template structure of the front-end page and a logic script in the template, synchronously persisting the updated basic template to the file system, and enabling the template to take effect in real time after a user starts, thereby realizing the non-stop service change.
And fifthly, performing effectiveness verification on a dynamic issuing template which is rendered by the basic template by combining with the atom capability of the latest version, and configuring and issuing the target equipment by the issuing template after the verification is passed.
In step S206 of the above template-based device configuration method, before issuing the target template to the target device, the method further includes the following steps: and verifying the parameter information of the target template.
In step S206 in the above template-based device configuration method, issuing a target template to a target device specifically includes the following steps: acquiring each parameter information in a target template; verifying whether each parameter information meets a preset condition, wherein the preset condition is the atomic capability range of the target equipment; when at least one parameter information does not meet the preset condition, determining that the target template fails to verify, and returning the parameter information which fails to verify to the target object; and under the condition that each parameter information meets the preset condition, determining that the target template passes the verification, and issuing the target template to the target equipment.
In the embodiment of the present application, the target device may be, for example, a router, a switch, or the like.
In the above template-based device configuration method, the method further includes the steps of: under the condition that the atomic capability of the target equipment is updated, receiving an updating instruction of the target object, wherein the updating instruction is used for updating the script language in the target template; and executing the script language in the target template according to the updating instruction.
In the embodiment of the application, a basic template is manufactured according to a service scene and the atomic capability of the SDN latest version, the basic template is placed in a file system for persistence, the basic template is dynamically rendered according to different request parameters, a dynamic atomic capability template which accords with the service and can be configured and issued to equipment is generated, online updating of the dynamic template through a front-end page is supported, and CLI configuration dynamic display of equipment of different equipment manufacturers and version control of the dynamic template in different periods are supported. The above steps are explained by taking the issue of the basic configuration of the router as an example.
1. Through the summary of the operation issued by the actual service CLI, the atomic capability matched with the operation is selected, the corresponding basic template is compiled, and the template can be created and imported through the page. In the actual use process, the updating can be realized without stopping the machine if the change occurs, and the logic script can be implanted into the template file, thereby further improving the flexibility of the template.
2. When the basic configuration of the router is issued, a user selects a router device in a certain province, the back end loads a specified basic template through the loopback address corresponding to the router device, parameter information such as basic planning of the device, and the like, and renders a dynamic template (i.e. the target template) conforming to the device through the parameters and a logic script in the template, for example: one main and two standby ip information planned by NTP is needed in the template, and the system can render the three ip information through the for script in the dynamic template; different bgp atomic capability information needs to be rendered through different device roles in the template, the system can judge different device roles to load different atomic capabilities according to role variables through an if script (namely the first script information) in the dynamic script, and accurately fill different variables into the template through variable identifiers and variable names in the template or variable information selected by a database or a user, and the variable filling can be used in combination with the for tag and the if tag and supports other logic scripts, for example: the method comprises the following steps of performing related operations such as trinocular operation, character splicing, character interception, numerical operation and the like, supporting expansion of a script library, and supporting more complex logic script rendering such as groovy and the like by a system. And after the rendering is finished, generating tree structure information with better visualization and returning the tree structure information to the user, and automatically compiling and running the script by the background system to process the logic in real time and efficiently.
3. After the user selection equipment obtains the rendered dynamic template tree structure, the dynamic template tree structure can be directly selected and issued, or parameters in the template can be edited through a page according to actual conditions and then issued, and when the user issues the dynamic template, the system rechecks the dynamic template (namely the parameter information of the verification target template). And (3) checking all the parameters of the template, for example, whether the ip meets the specified regulation or not, whether the parameter return meets the specified range of the atomic capability or not, for example, the range is 1-20, the user is filled with 21, and the like, and returning the checking result (namely the parameter information failed in checking) to the user if the checking fails. If the verification is passed, the corresponding template is converted into an atomic capability template pattern required by configuration issuing, the atomic capability template pattern is issued to a router selected by a user, and information about whether the issuing is successful is informed to the user.
4. In an actual service scenario, for example, if the ifm atomic capability of the router is updated, the dynamic template parameters need to be updated again. The user can directly edit the template on the page, and the complicated updating can also realize the template change with strong logicality through a script mode. After the template is started, the subsequent router basic configuration issuing operation is issued by using the new template. The method really realizes the updating of function upgrading without stopping the machine and updating codes. Under the scheme without dynamic scripts and online updating, if atomic capability updating is needed, a new template needs to be made again, and the background service can be reused after code is modified, upgraded and released. Therefore, the dynamic scripted loading scheme not only greatly improves the timeliness of service change, but also reduces the frequency of system iteration, and simultaneously slows down the work of users and developers.
The template-based equipment configuration method provided by the embodiment of the application has the following advantages: 1. the template to be issued is dynamically generated according to the service scene and the unified atomic capability, so that only one basic template is used for the same issue, the configuration cost is effectively reduced, and the one-to-one correlation maintainability of the template and the service can be improved; 2. the template is dynamically generated and linked with the atomic capability, and the page is visually controlled, the non-dynamic template technology in the prior art can only configure different templates according to different services, the templates need to be reconfigured and recoded to update the application when new services exist, the time cost is high, the dynamic template technology in the application can realize that one basic template corresponds to multiple services, the template style can be dynamically converted according to different service parameters, the template can be persistent and can be flexibly edited on the page, and the service upgrading is realized under the condition of not updating the application; 3. the script is embedded into the template, so that the flexibility of the template is higher, the logical processing is realized through the script, only the template rendering can be performed in the prior art, the processing logic is not available, the script can be implanted into the template, the template can also realize the logical processing, so that the template can more flexibly deal with different services, and can be more quickly adapted to various conditions in the frequent change of atomic capability; 4. the script library can be expanded, the script library applied in the application can be expanded, and besides the self-defined script, the script library can be compatible with other agile development languages based on JVM (Java virtual machine), such as open-source el expressions, spel languages, groovy languages and the like.
Fig. 3 is a block diagram of a template-based device configuration apparatus according to an embodiment of the present application, as shown in fig. 3, the apparatus including:
a receiving module 302, configured to receive a device configuration request, where the device configuration request has a corresponding relationship with a service scenario;
a conversion module 304, configured to convert the basic template into a target template according to a request parameter in the device configuration request, where the basic template is a preset template;
and the issuing module 306 is configured to issue the target template to the target device.
In the conversion module in the above template-based device configuration apparatus, converting the basic template into the target template specifically includes the following processes: determining a target service scene of the target equipment according to the request parameters; acquiring a script language in a basic template under a target service scene, wherein the script language is determined by identifying special characters and script grammar in the basic template; and running the script language and converting the basic template into the target template.
In the conversion module in the above template-based device configuration apparatus, converting the basic template into the target template specifically includes the following processes: acquiring first script information in a basic template; loading the atomic capability corresponding to the device role according to the device role of the target device and the first script information; responding to variable information selected by the target object, filling the variable information into the basic template according to the variable identifier and the variable name, and updating the first script information according to the variable information; and running the updated first script information to obtain the target template.
In the above template-based device configuration apparatus, the basic template is determined by: acquiring a service scene applicable to target equipment and acquiring the atomic capability of the target equipment; and determining a basic template according to the service scene and the atomic capability.
In the issuing module in the device configuration apparatus based on the template, before the target template is issued to the target device, the issuing module is further configured to verify parameter information of the target template.
In the issuing module in the device configuration apparatus based on the template, issuing the target template to the target device specifically includes the following processes: acquiring each parameter information in a target template; verifying whether each parameter information meets a preset condition, wherein the preset condition is the atomic capability range of the target equipment; when at least one parameter information does not meet the preset condition, determining that the target template fails to verify, and returning the parameter information which fails to verify to the target object; and under the condition that each parameter information meets the preset condition, determining that the target template passes the verification, and issuing the target template to the target equipment.
In the template-based device configuration apparatus, the apparatus further includes an update module 308, configured to receive an update instruction of the target object when the atomic capability of the target device is updated, where the update instruction is used to update the scripting language in the target template; and executing the script language in the target template according to the updating instruction.
It should be noted that the device configuration apparatus based on the template shown in fig. 3 is used to execute the device configuration method based on the template shown in fig. 2, and therefore, the related explanation in the device configuration method based on the template is also applicable to the device configuration apparatus based on the template, and is not described herein again.
The embodiment of the application further provides a nonvolatile storage medium, which includes a stored computer program, where the device where the nonvolatile storage medium is located executes the following template-based device configuration method by running the computer program: receiving a device configuration request, wherein the device configuration request has a corresponding relation with a service scene; converting a basic template into a target template according to request parameters in the equipment configuration request, wherein the basic template is a preset template; and issuing the target template to the target equipment.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
In the above embodiments of the present application, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed technology can be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units may be a logical division, and in actual implementation, there may be another division, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
The foregoing is only a preferred embodiment of the present application and it should be noted that those skilled in the art can make several improvements and modifications without departing from the principle of the present application, and these improvements and modifications should also be considered as the protection scope of the present application.

Claims (10)

1. A template-based device configuration method, comprising:
receiving a device configuration request, wherein the device configuration request has a corresponding relation with a service scene;
converting a basic template into a target template according to request parameters in the equipment configuration request, wherein the basic template is a preset template;
and issuing the target template to target equipment.
2. The method of claim 1, wherein converting the base template into a target template comprises:
determining a target service scene of the target equipment according to the request parameters;
acquiring a script language in the basic template in the target service scene, wherein the script language is determined by identifying special characters and script grammar in the basic template;
and operating the script language and converting the basic template into the target template.
3. The method of claim 2, wherein converting the base template into the target template comprises:
acquiring first script information in the basic template;
loading the atomic capability corresponding to the device role according to the device role of the target device and the first script information;
responding to variable information selected by a target object, filling the variable information into the basic template according to a variable identifier and a variable name, and updating first script information according to the variable information;
and running the updated first script information to obtain the target template.
4. The method of claim 1, wherein the base template is determined by:
acquiring a service scene applicable to the target equipment and acquiring the atomic capability of the target equipment;
and determining the basic template according to the service scene and the atomic capability.
5. The method of claim 1, wherein before issuing the target template to the target device, the method further comprises: and verifying the parameter information of the target template.
6. The method of claim 5, wherein issuing the target template to a target device comprises:
acquiring each parameter information in the target template;
verifying whether each piece of parameter information meets a preset condition, wherein the preset condition is an atomic capability range of the target device;
when at least one parameter information does not meet the preset condition, determining that the target template fails to be verified, and returning the parameter information which fails to be verified to the target object;
and under the condition that each parameter information meets the preset condition, determining that the target template passes verification, and issuing the target template to the target equipment.
7. The method of claim 1, further comprising:
receiving an update instruction of a target object under the condition that the atomic capability of the target device is updated, wherein the update instruction is used for updating the script language in the target template;
and running the script language in the target template according to the updating instruction.
8. A template-based device configuration apparatus, comprising:
the device comprises a receiving module, a processing module and a processing module, wherein the receiving module is used for receiving a device configuration request, and the device configuration request has a corresponding relation with a service scene;
the conversion module is used for converting a basic template into a target template according to the request parameters in the equipment configuration request, wherein the basic template is a preset template;
and the issuing module is used for issuing the target template to the target equipment.
9. An electronic device, comprising:
a memory for storing program instructions;
a processor coupled to the memory for executing program instructions that implement the functions of: receiving a device configuration request, wherein the device configuration request has a corresponding relation with a service scene; converting a basic template into a target template according to a request parameter in the equipment configuration request, wherein the basic template is a preset template; and issuing the target template to target equipment.
10. A non-volatile storage medium, comprising a stored computer program, wherein a device on which the non-volatile storage medium is located executes the template-based device configuration method according to any one of claims 1 to 7 by running the computer program.
CN202211707681.6A 2022-12-27 2022-12-27 Template-based equipment configuration method and device and electronic equipment Pending CN115913959A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211707681.6A CN115913959A (en) 2022-12-27 2022-12-27 Template-based equipment configuration method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211707681.6A CN115913959A (en) 2022-12-27 2022-12-27 Template-based equipment configuration method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN115913959A true CN115913959A (en) 2023-04-04

Family

ID=86484670

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211707681.6A Pending CN115913959A (en) 2022-12-27 2022-12-27 Template-based equipment configuration method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN115913959A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116578650A (en) * 2023-07-11 2023-08-11 太平金融科技服务(上海)有限公司 Data synchronization method, device, computer equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116578650A (en) * 2023-07-11 2023-08-11 太平金融科技服务(上海)有限公司 Data synchronization method, device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
US11630646B2 (en) Software defined network controller
CN110389900B (en) Distributed database cluster testing method and device and storage medium
CN111245898A (en) Network equipment online method, device, server and storage medium
CN105630488A (en) Docker container technology-based continuous integration realizing method
EP3373518A1 (en) Service configuration method and device for network service
CN106126273A (en) A kind of method of upgrading BIOS
CN114205230B (en) Configuration method, system, medium and electronic equipment of cloud primary network element
CN104239114A (en) Application compiling method and device
CN115220874B (en) Kubernetes cluster deployment method, device, equipment and storage medium
CN115913959A (en) Template-based equipment configuration method and device and electronic equipment
CN112035121A (en) Edge application deployment method and system
CN110557281B (en) Intelligent operation and maintenance method and device based on CMDB and alarm map
WO2020199597A1 (en) Blockchain node management agent service installation method, electronic apparatus and storage medium
CN111045940A (en) Software automation test method, device, architecture, server and storage medium
CN117453240A (en) RAID configuration method, device, equipment and medium of bare metal server
CN102736926B (en) The upgrade method of a kind of task based access control template and device, batch upgrading system
CN114338820A (en) Network access method, device, electronic equipment and storage medium
CN112291081B (en) Method, system and storage medium for auditing controller cluster data by cloud management platform
CN112099902A (en) Network adapter configuration method and device of virtual machine, electronic device and storage medium
CN113468067B (en) Application program debugging method and device, electronic equipment and computer readable medium
CN106301877A (en) The upgrade method of a kind of Virtual NE and device
CN115268951A (en) Installation method, device, equipment and storage medium of operating system
CN111580857B (en) Equipment firmware online configuration method, device and system
CN113268252A (en) Mirror image manufacturing method and system based on virtual chemical industry control equipment and storage medium
CN107577519A (en) A kind of virtual machine pressure method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination