Configuration management method and device, electronic equipment and storage medium

By obtaining the target device and configuration template identification and generating configuration files for edge devices, the problem that traditional configuration management solutions cannot adapt to device differences is solved, and the effect of flexibility and cost saving is achieved.

CN119201279APending Publication Date: 2024-12-27BEIJING QIYI CENTURY SCI & TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411335119.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-24
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

Traditional configuration management solutions cannot adapt to the differences in edge devices, resulting in too many configuration file versions, which brings huge maintenance costs to business personnel.

Method used

By obtaining the target device identification and target configuration template identification, obtaining the corresponding target configuration template and configuration information, generating the target device configuration file from the database, quickly update the configuration file using pre-set configuration templates and collected configuration information, and reducing manual maintenance .

Benefits of technology

Improves the flexibility of configuration management, saves maintenance costs, and realizes rapid updates and version management of configuration files.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119201279A_ABST
    Figure CN119201279A_ABST
Patent Text Reader

Abstract

Embodiments of the invention provide a configuration management method and apparatus, an electronic device and a storage medium, the method comprising: obtaining a target device identifier and a target configuration template identifier, the target device identifier being an identifier of a target device of a to-be-generated configuration file; obtaining a target configuration template corresponding to the target configuration template identifier; obtaining target configuration information corresponding to the target equipment identifier from a database; and generating a configuration file corresponding to the target device identifier according to the target configuration template and the target configuration information. According to the embodiment of the invention, business personnel do not need to prepare corresponding configuration files, the flexibility of configuration management is improved, each configuration file does not need manual maintenance, and the maintenance cost can be saved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a configuration management method, device, electronic equipment and storage medium. Background Art

[0002] The traditional configuration management solution is for business personnel to upload the prepared complete configuration file to the storage for the edge to download and use. This solution cannot adapt to the differences in edge devices. That is, if the configuration file involves the special configuration of the edge device, then once the special configuration of the edge device changes, the business personnel need to upload a new configuration file for version upgrade, which makes configuration management inflexible. Moreover, this traditional solution will result in a large number of configuration file versions, which will cause great maintenance costs for business personnel. Summary of the invention

[0003] The purpose of the embodiments of the present invention is to provide a configuration management method, device, electronic device and storage medium to improve the flexibility of configuration management and save maintenance costs. The specific technical solution is as follows:

[0004] In a first aspect of the present invention, a configuration management method is provided, comprising:

[0005] Obtaining a target device identifier and a target configuration template identifier, wherein the target device identifier is an identifier of a target device for which a configuration file is to be generated;

[0006] Acquire a target configuration template corresponding to the target configuration template identifier;

[0007] Acquire target configuration information corresponding to the target device identifier from a database;

[0008] A configuration file corresponding to the target device identifier is generated according to the target configuration template and the target configuration information.

[0009] In a second aspect of the present invention, there is also provided a configuration management device, comprising:

[0010] An identification acquisition module, used to acquire a target device identification and a target configuration template identification, wherein the target device identification is an identification of a target device for which a configuration file is to be generated;

[0011] A template acquisition module, used to acquire a target configuration template corresponding to the target configuration template identifier;

[0012] A configuration information acquisition module, used to acquire target configuration information corresponding to the target device identifier from a database;

[0013] The configuration file generation module is used to generate a configuration file corresponding to the target device identifier according to the target configuration template and the target configuration information.

[0014] In a third aspect of the present invention, there is also provided an electronic device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;

[0015] Memory, used to store computer programs;

[0016] The processor is used to implement the configuration management method steps described in the first aspect when executing the program stored in the memory.

[0017] In another aspect of the present invention, a computer-readable storage medium is provided, wherein instructions are stored in the computer-readable storage medium, and when the computer-readable storage medium is executed on a computer, the computer executes any of the configuration management methods described above.

[0018] In yet another aspect of the present invention, a computer program product comprising instructions is provided, which, when executed on a computer, enables the computer to execute any of the configuration management methods described above.

[0019] The configuration management method, apparatus, electronic device and storage medium provided by the embodiments of the present invention obtain the target configuration template corresponding to the target configuration template identifier after obtaining the target device identifier and the target configuration template identifier, and obtain the target configuration information corresponding to the target device identifier from a database, and generate a configuration file corresponding to the target device identifier according to the target configuration template and the target configuration information. Since the configuration file of the target device can be generated based on the preset configuration template and the collected target configuration information, the configuration file can be quickly updated when the configuration information of the device changes, and there is no need for business personnel to prepare the corresponding configuration file, thereby improving the flexibility of configuration management. In addition, each configuration file does not require manual maintenance, which can save maintenance costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art are briefly introduced below.

[0021] Figure 1 is a flow chart of a configuration management method provided by an embodiment of the present invention;

[0022] Figure 2 is a flow chart of a configuration management method provided by an embodiment of the present invention;

[0023] Figure 3is an implementation flow chart of a configuration management method provided by an embodiment of the present invention;

[0024] Figure 4 is a structural diagram of a configuration management device provided by an embodiment of the present invention;

[0025] Figure 5 It is a structural schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0026] The technical solutions in the embodiments of the present invention will be described below in conjunction with the accompanying drawings in the embodiments of the present invention.

[0027] Figure 1 1 is a flow chart of a configuration management method provided by an embodiment of the present invention. The configuration management method is applicable to the scenario of managing the configuration files of the device and can be executed by the cloud server. Figure 1 As shown, the configuration management method includes the following steps:

[0028] Step 110: Obtain a target device identifier and a target configuration template identifier, wherein the target device identifier is an identifier of a target device for which a configuration file is to be generated.

[0029] The configuration template syntax and specifications can be set in advance through the configuration management platform provided by the cloud server, and demonstration examples can also be provided. Business personnel design configuration templates based on the syntax and specifications of configuration templates in the configuration management platform. Configuration templates are templates of configuration files, and the configuration templates are saved in the cloud server. When designing configuration templates, the common parts of configuration files of different devices can be made into templates, and the semantics of template rendering (such as placeholders) can be defined. The semantics of template rendering generally render different information for different devices.

[0030] The cloud server can display the existing device identifiers and configuration template identifiers through the configuration management platform. Business personnel can select the device to be upgraded based on the displayed device identifier. The cloud server obtains the target device identifier specified by the business personnel, and the business personnel selects the configuration template identifier to be used based on the displayed configuration template identifier.

[0031] Step 120: Acquire a target configuration template corresponding to the target configuration template identifier.

[0032] A target configuration template corresponding to the target configuration template identifier is obtained from the storage location of the configuration template.

[0033] Step 130: Acquire target configuration information corresponding to the target device identifier from a database.

[0034] The cloud server collects detailed configuration information of the device in advance, including the computer room to which it belongs, the port number to be detected and opened, resource information (such as resource hardware specifications), etc., and stores the collected configuration information in the database. Exemplarily, when collecting the configuration information of the device, an agent module can be set in the device, and the configuration information of the device is collected through the agent module, and the collected configuration information is sent to the cloud server, and the cloud server stores the configuration information in the database, so that the database stores the latest configuration information of the device. Among them, the device can be a physical device in the cluster, for example, it can be an edge device.

[0035] When it is necessary to generate a configuration file corresponding to the target device identifier, the target device identifier may be queried from the database, and the target configuration information corresponding to the queried target device identifier may be obtained.

[0036] Step 140: Generate a configuration file corresponding to the target device identifier according to the target configuration template and the target configuration information.

[0037] Fill the target configuration information into the corresponding position in the target configuration template to obtain the configuration file corresponding to the target device identifier.

[0038] The configuration management method provided by the embodiment of the present invention obtains the target configuration template corresponding to the target configuration template identifier after obtaining the target device identifier and the target configuration template identifier, and obtains the target configuration information corresponding to the target device identifier from a database, and generates a configuration file corresponding to the target device identifier according to the target configuration template and the target configuration information. Since the configuration file of the target device can be generated based on the preset configuration template and the collected target configuration information, the configuration file can be quickly updated when the configuration information of the device changes, and there is no need for business personnel to prepare the corresponding configuration file, thereby improving the flexibility of configuration management, and each configuration file does not need to be manually maintained, which can save maintenance costs.

[0039] On the basis of the above technical solution, the configuration file corresponding to the target device identifier is generated according to the target configuration template and the target configuration information, including: searching for the placeholder in the target configuration template, filling the target configuration information into the position of the placeholder in the target configuration template, and obtaining the configuration file corresponding to the target device identifier.

[0040] Among them, a placeholder is a symbol that occupies a fixed position first, and then content can be added to it.

[0041] When setting the configuration template, the common parts of different devices are configured as templates, and the different parts of each device are filled with placeholders in the template. The placeholders can be preset symbols. In this way, when generating a configuration file, the placeholders can be found from the target configuration template. After finding the placeholders, the target configuration information is filled into the placeholder position in the target configuration template to obtain the configuration file corresponding to the target device identifier.

[0042] By searching for placeholders in the target configuration template and filling the target configuration information at the location of the placeholder, the placeholder can be identified relatively quickly and filled with the corresponding target configuration information, thereby improving the efficiency of generating the configuration file.

[0043] On the basis of the above technical solution, the process of searching for the placeholder in the target configuration template, filling the target configuration information into the position of the placeholder in the target configuration template, and obtaining the configuration file corresponding to the target device identifier includes: searching for the placeholder in the target configuration template, and identifying the variable name in the placeholder; obtaining the variable value corresponding to the variable name from the target configuration information; filling the variable value into the position of the placeholder in the target configuration template, and obtaining the configuration file corresponding to the target device identifier.

[0044] In the target configuration template, each placeholder represents a different variable. The placeholder includes a variable name, which is used to represent that the position of the placeholder needs to be filled with the variable represented by the variable name. The target configuration information is the variable value corresponding to each variable name.

[0045] When generating a target configuration file, search for each placeholder in the target configuration template. When a placeholder is found, identify the variable name in the placeholder, and search for the variable value corresponding to the variable name from the target configuration information. Fill the variable value into the position of the placeholder of the variable name in the target configuration template. Fill in the variable value in this way for each placeholder to obtain the configuration file corresponding to the target device identifier.

[0046] For example, suppose the configuration template is as follows:

[0047] worker_processes{{worker}};

[0048] http{

[0049] sendfile on;

[0050] keepalive_timeout 65;

[0051] server{

[0052] listen {{port}};

[0053] }

[0054] }

[0055] In the above configuration template, the placeholder is defined as "{{}}", and two variables (worker and port) are specified in the configuration template to be rendered.

[0056] The device configuration information stored in the database includes the configuration information of device A and the configuration information of device B. The configuration information of device A stored is as follows:

[0057] {

[0058] 'worker':8,

[0059] 'port':8080,

[0060] }

[0061] The stored configuration information of device B is as follows:

[0062] {

[0063] 'worker':16,

[0064] 'port':8090,

[0065] }

[0066] From the configuration information of device A and device B, it can be seen that the configuration information of the devices stored in the database is the differentiated information of each device. When it is necessary to generate the configuration file of device B, the variable values ​​corresponding to the worker and port of device B are taken out from the database, and the variable values ​​are filled into the placeholder positions, that is, the variable value corresponding to the worker is filled into the position of the placeholder {{worker}} in the configuration template, and the variable value corresponding to the port is filled into the position of the placeholder {{port}} in the configuration template. The configuration file of device B is as follows:

[0067] worker_processes 16;

[0068] http{

[0069] sendfile on;

[0070] keepalive_timeout 65;

[0071] server{

[0072] listen 8090;

[0073] }

[0074] }

[0075] After finding the placeholder in the target configuration template, the variable name in the placeholder is identified, and the variable value corresponding to the variable name in the target configuration information is filled into the position of the placeholder, so that the accuracy of the configuration file generation can be improved.

[0076] Figure 2 1 is a flow chart of a configuration management method provided by an embodiment of the present invention. The configuration management method is applicable to the scenario of managing the configuration files of the device and can be executed by the cloud server. Figure 2 As shown, the configuration management method includes the following steps:

[0077] Step 210: Obtain a target device identifier and a target configuration template identifier, wherein the target device identifier is an identifier of a target device for which a configuration file is to be generated.

[0078] Step 220: Acquire a target configuration template corresponding to the target configuration template identifier.

[0079] Step 230: Acquire target configuration information corresponding to the target device identifier from a database.

[0080] Step 240: Generate a configuration file corresponding to the target device identifier according to the target configuration template and the target configuration information.

[0081] Step 250: Save the configuration file and the target device identifier in correspondence with each other, and save the version information corresponding to the configuration file.

[0082] After the configuration file is generated, the configuration file and the target device identifier are saved in correspondence. It is determined whether the target device identifier has the version information of the existing configuration file. If the target device identifier has the version information of the existing configuration file, the version information of the newly generated configuration file is determined based on the version information of the existing configuration file. If the target device identifier does not have the version information of the existing configuration file, the version information of the configuration file is determined to be the initial version information. When the configuration file and the target device identifier are saved in correspondence, the version information corresponding to the configuration file is saved in correspondence at the same time.

[0083] Exemplarily, the configuration file corresponding to the target device identifier may be uploaded to a storage system for corresponding storage, and version information of the configuration file corresponding to the target device identifier, that is, configuration version control information of device granularity, is stored in the storage system.

[0084] The configuration management method provided in this embodiment saves the configuration file and the target device identifier correspondingly after the configuration file is generated, and saves the version information corresponding to the configuration file at the same time. This eliminates the need for manual maintenance of the configuration file's version information, thus saving the configuration file's version maintenance cost.

[0085] On the basis of the above technical solution, after saving the configuration file and the target device identifier in correspondence and saving the version information corresponding to the configuration file, it also includes: sending download prompt information to the target device, and the download prompt information is used to prompt the target device to download the configuration file.

[0086] After generating a configuration file for the target device identification and saving the configuration file and the target identification, the target device may be notified to download the configuration file, and download prompt information may be sent to the target device to notify the target device to download the configuration file.

[0087] By sending download prompt information to the target device, the device can be notified in time to download and update the configuration file.

[0088] On the basis of the above technical solution, after sending the download prompt information to the target device corresponding to the target device identifier, it also includes: receiving a configuration file download request from the target device, the configuration file download request includes the target device identifier; obtaining the configuration file according to the target device identifier, and sending the configuration file to the target device.

[0089] After the cloud server sends the download prompt information to the target device, the target device sends a configuration file download request to the cloud server. The configuration file download request includes the target device identifier. Based on the target device identifier, the cloud server searches the storage system for the configuration file corresponding to the target device identifier and sends the found configuration file to the target device.

[0090] When receiving a configuration file download request from the target device, the configuration file corresponding to the target device identifier is sent to the target device, so that the target device can update the corresponding configuration file in time.

[0091] Figure 3 is an implementation flow chart of a configuration management method provided by an embodiment of the present invention, such as Figure 3 As shown, the configuration management method can be implemented according to the following steps:

[0092] Step 1: The edge end delivers device information (i.e., device configuration information);

[0093] Step 2: The cloud gateway writes the device information into the database;

[0094] Step 3: Business personnel submit configuration templates to the configuration management platform;

[0095] Step 4, the configuration management platform queries the device information from the database;

[0096] Step 5: Render the configuration template and device information into a configuration file, and upload the configuration file to the storage system for storage;

[0097] Step 6: The edge downloads the configuration file from the storage system through the cloud gateway.

[0098] The embodiment of the present invention supports business personnel to create configuration templates. The cloud system automatically renders and generates a complete configuration file based on the differences in edge devices. The configuration template can be submitted once and automatically adapted to different devices to achieve the "polymorphism" of the configuration file. Moreover, the configuration management system can maintain the difference information of the configuration template and edge devices to reduce the maintenance cost of business personnel.

[0099] Figure 4 is a schematic diagram of the structure of a configuration management device provided by an embodiment of the present invention, such as Figure 4 As shown, the configuration management device includes:

[0100] An identification acquisition module 410 is used to acquire a target device identification and a target configuration template identification, wherein the target device identification is an identification of a target device for which a configuration file is to be generated;

[0101] The template acquisition module 420 is used to acquire the target configuration template corresponding to the target configuration template identifier;

[0102] The configuration information acquisition module 430 is used to acquire the target configuration information corresponding to the target device identifier from the database;

[0103] The configuration file generating module 440 is used to generate a configuration file corresponding to the target device identifier according to the target configuration template and the target configuration information.

[0104] Optionally, the configuration file generating module is specifically used for:

[0105] The placeholder in the target configuration template is searched, and the target configuration information is filled into the position of the placeholder in the target configuration template to obtain a configuration file corresponding to the target device identifier.

[0106] Optionally, the configuration file generating module includes:

[0107] A placeholder identification unit, used to search for placeholders in the target configuration template and identify variable names in the placeholders;

[0108] A variable value obtaining unit, used to obtain the variable value corresponding to the variable name from the target configuration information;

[0109] The configuration file generating unit is used to fill the variable value into the position of the placeholder in the target configuration template to obtain the configuration file corresponding to the target device identifier.

[0110] Optionally, the device further comprises:

[0111] A saving module is used to save the configuration file and the target device identification in correspondence with each other after the configuration file corresponding to the target device identification is generated, and save the version information corresponding to the configuration file.

[0112] Optionally, the device further comprises:

[0113] The download prompt sending module is used to send download prompt information to the target device after saving the configuration file and the target device identifier in correspondence and saving the version information corresponding to the configuration file. The download prompt information is used to prompt the target device to download the configuration file.

[0114] Optionally, the device further comprises:

[0115] a download request receiving module, configured to receive a configuration file download request from the target device after sending the download prompt information to the target device corresponding to the target device identifier, wherein the configuration file download request includes the target device identifier;

[0116] The configuration file sending module is used to obtain the configuration file according to the target device identifier and send the configuration file to the target device.

[0117] The configuration management device provided by the embodiment of the present invention obtains the target configuration template corresponding to the target configuration template identifier after obtaining the target device identifier and the target configuration template identifier, and obtains the target configuration information corresponding to the target device identifier from a database, and generates a configuration file corresponding to the target device identifier according to the target configuration template and the target configuration information. Since the configuration file of the target device can be generated based on the preset configuration template and the collected target configuration information, the configuration file can be quickly updated when the configuration information of the device changes, and there is no need for business personnel to prepare the corresponding configuration file, thereby improving the flexibility of configuration management. In addition, each configuration file does not require manual maintenance, which can save maintenance costs.

[0118] The embodiment of the present invention further provides an electronic device, such as Figure 5As shown, it includes a processor 501, a communication interface 502, a memory 503 and a communication bus 504, wherein the processor 501, the communication interface 502, and the memory 503 communicate with each other through the communication bus 504.

[0119] Memory 503, used for storing computer programs;

[0120] The processor 501 is used to execute the program stored in the memory 503, and implements the following steps:

[0121] Obtaining a target device identifier and a target configuration template identifier, wherein the target device identifier is an identifier of a target device for which a configuration file is to be generated;

[0122] Acquire a target configuration template corresponding to the target configuration template identifier;

[0123] Acquire target configuration information corresponding to the target device identifier from a database;

[0124] A configuration file corresponding to the target device identifier is generated according to the target configuration template and the target configuration information.

[0125] Optionally, generating a configuration file corresponding to the target device identifier according to the target configuration template and the target configuration information includes:

[0126] The placeholder in the target configuration template is searched, and the target configuration information is filled into the position of the placeholder in the target configuration template to obtain a configuration file corresponding to the target device identifier.

[0127] Optionally, searching for a placeholder in the target configuration template, filling the target configuration information into a location of the placeholder in the target configuration template, and obtaining a configuration file corresponding to the target device identifier includes:

[0128] Finding a placeholder in the target configuration template and identifying a variable name in the placeholder;

[0129] Obtaining a variable value corresponding to the variable name from the target configuration information;

[0130] The variable value is filled into the position of the placeholder in the target configuration template to obtain a configuration file corresponding to the target device identifier.

[0131] Optionally, after generating the configuration file corresponding to the target device identifier, the method further includes:

[0132] The configuration file and the target device identifier are saved in correspondence, and version information corresponding to the configuration file is saved.

[0133] Optionally, after the configuration file and the target device identifier are saved in correspondence with each other and the version information corresponding to the configuration file is saved, the method further includes:

[0134] Send download prompt information to the target device, where the download prompt information is used to prompt the target device to download the configuration file.

[0135] Optionally, after sending the download prompt information to the target device corresponding to the target device identifier, the method further includes:

[0136] Receive a configuration file download request of the target device, wherein the configuration file download request includes the target device identifier;

[0137] The configuration file is obtained according to the target device identifier, and the configuration file is sent to the target device.

[0138] The communication bus mentioned in the above terminal can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0139] The communication interface is used for communication between the above terminal and other devices.

[0140] The memory may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0141] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0142] In another embodiment of the present invention, a computer-readable storage medium is provided. The computer-readable storage medium stores instructions. When the instructions are executed on a computer, the computer executes the configuration management method described in any one of the above embodiments.

[0143] In another embodiment of the present invention, a computer program product including instructions is provided. When the computer program product is run on a computer, the computer executes the configuration management method described in any one of the above embodiments.

[0144] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk Solid State Disk (SSD)), etc.

[0145] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0146] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0147] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims

1. A configuration management method, characterized in that: include: Obtaining a target device identifier and a target configuration template identifier, wherein the target device identifier is an identifier of a target device for which a configuration file is to be generated; Acquire a target configuration template corresponding to the target configuration template identifier; Acquire target configuration information corresponding to the target device identifier from a database; A configuration file corresponding to the target device identifier is generated according to the target configuration template and the target configuration information.

2. The method according to claim 1, characterized in that: The step of generating a configuration file corresponding to the target device identifier according to the target configuration template and the target configuration information includes: The placeholder in the target configuration template is searched, and the target configuration information is filled into the position of the placeholder in the target configuration template to obtain a configuration file corresponding to the target device identifier.

3. The method according to claim 2, characterized in that The searching for the placeholder in the target configuration template, filling the target configuration information into the location of the placeholder in the target configuration template, and obtaining the configuration file corresponding to the target device identifier includes: Finding a placeholder in the target configuration template and identifying a variable name in the placeholder; Obtaining a variable value corresponding to the variable name from the target configuration information; The variable value is filled into the position of the placeholder in the target configuration template to obtain a configuration file corresponding to the target device identifier.

4. The method according to claim 1, characterized in that: After generating the configuration file corresponding to the target device identifier, the method further includes: The configuration file and the target device identifier are saved in correspondence, and version information corresponding to the configuration file is saved.

5. The method according to claim 4, characterized in that After the configuration file and the target device identifier are saved in correspondence with each other and the version information corresponding to the configuration file is saved, the method further includes: Send download prompt information to the target device, where the download prompt information is used to prompt the target device to download the configuration file.

6. The method according to claim 5, characterized in that After sending the download prompt information to the target device corresponding to the target device identifier, the method further includes: receiving a configuration file download request of the target device, wherein the configuration file download request includes the target device identifier; The configuration file is obtained according to the target device identifier, and the configuration file is sent to the target device.

7. A configuration management device, characterized in that: include: An identification acquisition module, used to acquire a target device identification and a target configuration template identification, wherein the target device identification is an identification of a target device for which a configuration file is to be generated; A template acquisition module, used to acquire a target configuration template corresponding to the target configuration template identifier; A configuration information acquisition module, used to acquire target configuration information corresponding to the target device identifier from a database; The configuration file generation module is used to generate a configuration file corresponding to the target device identifier according to the target configuration template and the target configuration information.

8. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, for implementing the method steps described in any one of claims 1 to 6 when executing a program stored in a memory.

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

10. A computer program product, comprising instructions, characterized in that: When the computer program product is executed on a computer, the computer is enabled to implement the method according to any one of claims 1 to 6.