Configuration file management method, device, computer equipment and storage medium

By adding configuration file information to the management library and operating according to processing instructions, the complexity of configuration file management is solved, intelligent and efficient modification of configuration files is realized, operation and maintenance efficiency is improved, and operation costs are reduced.

CN110196725BActive Publication Date: 2024-12-31PING AN TECH (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201910328461.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-04-23
Publication Date
2024-12-31
Estimated Expiration
2039-04-23

AI Technical Summary

Technical Problem

In the Internet era, the complexity of the IT industry's business chain has led to complex configuration file management, which has brought a lot of repetitive work to operation, maintenance and R&D personnel, making it difficult to efficiently handle configuration file changes and updates.

Method used

Through a configuration file management method, the configuration file information in the program is read and added to the management library, the processing instructions are received, the configuration files are operated in the management library according to the instructions, and the configuration files are updated based on the operation results to realize the configuration Intelligent and efficient modification of files.

Benefits of technology

It simplifies the modification of configuration files, improves the efficiency of operation and maintenance personnel, makes the management of configuration files more intelligent, safe and reliable, and reduces the operating costs of software maintenance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN110196725B_ABST
    Figure CN110196725B_ABST
Patent Text Reader

Abstract

The present application belongs to the field of program maintenance, and relates to a configuration file management method, including reading a configuration file in a program, adding configuration file information to a management library; receiving processing instructions for the configuration file, the processing instructions including file information and operation instructions, wherein the file information is used to specify the configuration file to be operated, and the operation instructions are used to determine the processing program of the configuration file; according to the operation instructions and file information, the specified configuration file to be operated is operated in the management library; based on the operation results, the configuration file is updated simultaneously in the management library and the program. The present application simplifies the modification operation of the configuration file, facilitates the maintenance and operation of the system by operation and maintenance personnel, and makes the modification of the configuration file more intelligent and efficient. The present application also provides a configuration file management device, a computer device, and a storage medium.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, specifically to the field of program maintenance technology, and in particular to a configuration file management method, apparatus, computer equipment and storage medium. Background Art

[0002] The information that needs to be configured when the program starts is generally managed by the configuration file, that is, the configuration file contains the information that needs to be configured when the program starts. For example, the configuration files of some software are used to store some information of related software, such as initialization information, initial path and account, etc. For example, when a user logs in to a computer based on Microsoft Windows XP, Windows 2000 or Windows NT Workstation, the system will create a dedicated configuration file to save the user's screen color, network connection, printer connection, mouse settings, window size and position and other configuration information.

[0003] In the prior art, some software features can be customized at any time by modifying the configuration file, without the need to modify the software and then recompile, thus facilitating the porting of the program. The configuration file contains the information needed to configure the program when it is started. For example, when we usually start a newly installed software, some controls for filling in registration information will appear, and you will be asked whether you want to check the boxes of remember password, automatic login next time, etc. These registration information will be written into the configuration file of the corresponding program. When the program is started next time, it will automatically read the configuration file and configure the program. In this way, we don't have to fill in the registration information every time, and the program will start automatically.

[0004] With the rapid development of the current Internet era, the business chain of the IT industry is becoming more and more complex. Due to business needs, the configuration files in the system need to be constantly maintained and updated. The management of configuration files is becoming more and more complicated, which brings a lot of repetitive work to operation and maintenance and R&D personnel. Summary of the invention

[0005] The purpose of the embodiments of the present application is to propose a configuration file management method, apparatus, computer equipment and storage medium to simplify the operation and modification of configuration files so that operation and maintenance personnel and developers can efficiently handle operations such as changing and updating configuration files, thereby improving efficiency.

[0006] In order to solve the above technical problems, the present application provides a configuration file management method, which adopts the following technical solution:

[0007] A configuration file management method comprises the following steps:

[0008] Read the configuration file in the program and add the configuration file information to the management library;

[0009] receiving a processing instruction for the configuration file, the processing instruction comprising file information and an operation instruction, wherein the file information is used to specify the configuration file to be operated, and the operation instruction is used to determine a processing procedure for the configuration file;

[0010] According to the operation instruction and the file information, operating the configuration file to be operated in the management library;

[0011] The configuration file is updated simultaneously in the management library and the program based on the operation result.

[0012] Further, the operation instruction includes an operation code and an operand, the file information includes a unit address of a configuration file to be operated, and the step of operating the specified configuration file to be operated in the management library according to the operation instruction and the file information includes the following steps:

[0013] Read the information of the configuration file according to the unit address of the configuration file to be operated;

[0014] Acquire a processing program for the configuration file according to the operation code;

[0015] Based on the information of the configuration file read, acquiring data for processing the configuration file and a unit address where the data is located according to the operand;

[0016] The configuration file is modified based on the processing program, the data and the unit address where the data is located.

[0017] Furthermore, the step of modifying the configuration file based on the processing program, the data, and the unit address where the data is located includes:

[0018] According to the processing program, the data is written to the unit address and / or the data in the unit address is modified.

[0019] Further, the operation instruction also includes an instruction to change the content of the configuration file and / or an instruction to perform a file operation on the configuration file; the step of operating the specified configuration file to be operated in the management library includes the following steps;

[0020] In the management library, a change operation is performed on the content of the specified configuration file to be operated and / or a file operation is performed on the configuration file.

[0021] Furthermore, the step of modifying the content of the specified configuration file to be operated and / or performing a file operation on the configuration file in the management library includes the following steps:

[0022] When modifying the contents of the configuration file, the operation instructions are parsed into corresponding read and write operations;

[0023] Determine whether there is a dependency between the parsed read and write operations;

[0024] When there is a dependency, the write operation that the read operation depends on is first performed on the content of the configuration file according to the dependency, and then the read operation is performed according to the configuration when the write operation is performed.

[0025] Furthermore, when the write operation that the read operation depends on is first performed on the content of the configuration file according to the dependency relationship, the data of the write operation is written into the cache and the database.

[0026] Furthermore, the step of modifying the content of the specified configuration file to be operated and / or performing a file operation on the configuration file in the management library includes the following steps:

[0027] When the content of the configuration file is modified, each modification information of the configuration file is recorded;

[0028] A historical version file carrying the modification time is generated based on each change information and saved in the management library so as to restore one of the historical version configuration files later.

[0029] In order to solve the above technical problems, the embodiment of the present application also provides a configuration file management device, which adopts the following technical solution:

[0030] A configuration file management device, comprising:

[0031] The reading module is used to read the configuration file in the program and add the configuration file information to the management library;

[0032] An instruction receiving module, used for receiving an instruction for processing the configuration file, the processing instruction including file information and an operation instruction, wherein the file information is used for specifying the configuration file to be operated, and the operation instruction is used for determining a processing procedure for the configuration file;

[0033] An operation module, used to operate the configuration file to be operated in the management library according to the operation instruction and the file information;

[0034] An updating module is used to update the configuration file in the management library and the program simultaneously based on the operation result.

[0035] In order to solve the above technical problems, the embodiment of the present application further provides a computer device, which adopts the following technical solution:

[0036] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the configuration file management method described above when executing the computer program.

[0037] In order to solve the above technical problems, the embodiment of the present application further provides a computer-readable storage medium, which adopts the following technical solution:

[0038] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the configuration file management method described above are implemented.

[0039] Compared with the prior art, the embodiments of the present application mainly have the following beneficial effects: the configuration file management method provided in the embodiments of the present application includes taking the configuration file in the program and adding the configuration file information to the management library; receiving a processing instruction for the configuration file, the processing instruction includes file information and operation instructions, wherein the file information is used to specify the configuration file to be operated, and the operation instruction is used to determine the processing program of the configuration file; according to the operation instruction and file information, the specified configuration file to be operated is operated in the management library; based on the operation result, the configuration file is updated in the management library and the program at the same time. The method described in the present application operates on the selected configuration file through the management library, modifies the configuration file information, and saves the operation result in the management library and the program at the same time, which simplifies the modification operation of the configuration file, facilitates the maintenance and operation of the system by the operation and maintenance personnel, and makes the modification of the configuration file more intelligent and efficient. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the scheme in the present application, a brief introduction is given below to the drawings required for use in the description of the embodiments of the present application. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0041] Figure 1 is an exemplary system architecture diagram to which the present application may be applied;

[0042] Figure 2 A flowchart of an embodiment of a configuration file management method according to the present application;

[0043] Figure 3 yes Figure 2 A flowchart of a specific implementation of step 203;

[0044] Figure 4is a flow chart of another embodiment of a configuration file management method according to the present application;

[0045] Figure 5 is a structural diagram of an embodiment of a configuration file management device of the present application;

[0046] Figure 6 It is a structural diagram of an embodiment of a computer device according to the present application. DETAILED DESCRIPTION

[0047] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by technicians in the technical field of the present application; the terms used in the specification of the application herein are only for the purpose of describing specific embodiments and are not intended to limit the present application; the terms "including" and "having" and any variations thereof in the specification and claims of the present application and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of the present application or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.

[0048] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0049] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings.

[0050] See also Figure 1 , is a schematic diagram of an implementation environment of the configuration file management method provided in an embodiment of the present application, and the implementation environment includes terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is a medium for providing a communication link between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0051] Users can use terminal devices 101, 102, 103 to interact with server 105 through network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, 103, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.

[0052] The terminal devices 101, 102, and 103 may be various electronic devices with display screens and supporting web browsing, including but not limited to user devices, network devices, or devices formed by integrating user devices and network devices through a network. The user devices include but are not limited to any mobile electronic products that can interact with users through a touch panel, such as smart phones, tablet computers, etc. The mobile electronic products may use any operating system, such as an Android operating system, an iOS operating system, etc. Among them, the network device includes an electronic device that can automatically perform numerical calculations and information processing according to pre-set or stored instructions, and its hardware includes but is not limited to a microprocessor, an application-specific integrated circuit (ASIC), a programmable gate array (FPGA), a digital processor (DSP), an embedded device, etc. The network device includes but is not limited to a computer, a network host, a single network server, a plurality of network server sets, or a cloud composed of a plurality of servers; here, the cloud is composed of a large number of computers or network servers based on cloud computing (Cloud Computing), wherein cloud computing is a type of distributed computing, a virtual supercomputer composed of a group of loosely coupled computer sets. The network includes but is not limited to the Internet, a wide area network, a metropolitan area network, a local area network, a VPN network, a wireless self-organizing network (Ad Hoc network), etc. Of course, those skilled in the art should understand that the above-mentioned terminal devices are only examples, and other existing or future terminal devices, if applicable to the present application, should also be included in the scope of protection of the present application and are included here by reference.

[0053] The server 105 may be a single server, a server cluster consisting of several servers, or a cloud computing service center. It may also be a server that provides various services, such as a backend server that provides support for pages displayed on the terminal devices 101, 102, and 103.

[0054] It should be noted that the configuration file management method provided in the embodiment of the present application can be set to be executed in a server or in a terminal device, and then distributed to other devices by uploading to the server. Accordingly, the configuration file management device is set in a server or a terminal device.

[0055] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0056] Please continue reading Figure 2 , showing a flowchart of an embodiment of a configuration file management method provided by the present application, the configuration file management method comprises the following steps:

[0057] S201: Read the configuration file in the program and add the configuration file information to the management library.

[0058] In the embodiment of the present application, the configuration file is the information required for starting the configuration program, and is a file that is configured differently according to different objects and environments. The management library is for the configuration file of the program, which means that in the terminal device, the configuration files of all programs are placed in a management library for management.

[0059] In the embodiment of the present application, the configuration file information refers to information of various attributes set by the configuration file, including file name, file type, file size, creation time, user, update time, save path, etc. Among them, the file name is used to identify a specific file or subdirectory to which a unique configuration setting is to be applied, the file type is used to identify the type of the configuration file, the creation time and update time are used to record the modification record of the configuration file, and the user refers to the user who operates the configuration file. The save path is used to register the save location of the configuration file.

[0060] Furthermore, this embodiment uses a binary tree structure to manage the configuration files. Specifically, a program includes at least one configuration file, and all configuration files are placed in a management directory for management. The management directory uses the program name as the first-level directory, and the root directory contains multiple sub-directories or configuration files, and the sub-directories can further contain next-level directories or configuration files.

[0061] Specifically, the program configures different files according to the actual needs of the development, production, and test environments. The files configured for one environment are saved in a directory or subdirectory. For example, a hardware configuration file includes the devices that the system should start when starting the program, and a series of instructions set in each device. The configuration files for different hardware that need to be started are saved in a directory or subdirectory.

[0062] More specifically, a program can have multiple directories or subdirectories at the same level according to different objects. For example, a user configuration file (a collection of settings and files that define the environment required for the system to load when the user logs in. It includes user-specific configuration settings such as program items, screen colors, network connections, printer connections, mouse settings, and window sizes and positions, as well as personal information such as bookmarks, passwords, and preferences), a computer program can have multiple user configuration files, which form directories or subdirectories at the same level and belong to the same directory file.

[0063] S202: Receive a processing instruction for a configuration file, where the processing instruction includes file information and an operation instruction.

[0064] In this embodiment, the processing instruction includes file information and operation instructions, wherein the file information is used to specify the configuration file to be operated, and the operation instruction is used to determine the processing procedure of the configuration file.

[0065] In the embodiment of the present application, one program corresponds to one management directory. This embodiment is to visually search and specify the configuration file to be processed in the directory or subdirectory of the management library. Further, when receiving a processing instruction for the configuration file, the file information includes the unit address of the configuration file to be operated in the management library, which is used to specify the configuration file to be operated and read the information of the configuration file. The operation instruction is used to specify what operation to perform on the configuration file or its content.

[0066] S203: According to the operation instruction and the file information, an operation is performed on the specified configuration file to be operated in the management library.

[0067] In this embodiment, the processing instructions include instructions for operating the content in the configuration file and instructions for performing file operations on the configuration file itself. Among them, the instructions for changing the content of the configuration file include: adding, deleting, querying and modifying. Through these processing instructions, the configuration file is read and / or written, so as to obtain and / or add, delete, modify and query the data in the corresponding configuration file. Specifically, the instructions for changing the content of the configuration file are parsed into corresponding read operations and write operations when executed. More specifically, the parsed read operations and write operations may have a dependency relationship. For read operations and write operations that have a dependency relationship, the write operation that the read operation depends on is first executed, and then the read operation is executed according to the configuration when the write operation is executed.

[0068] Furthermore, the instructions for performing file operations on the configuration file include copying, deleting, moving, renaming, and viewing. The configuration of the project user is modified through file operations such as copying, deleting, moving, and renaming. Through the viewing, the configuration of the project before and after the modification is compared. Specifically, when the configuration file is deleted, only the current version file of the selected file can be deleted, and it is a logical deletion. The logical deletion refers to saving the deleted file and the multiple historical version files corresponding to the file in a storage location specified by the system. It is not completely deleted and can be restored from the storage location later. Viewing the configuration file includes the following: viewing all configuration files in the specified project, viewing the multiple historical version files corresponding to the specified configuration file, and viewing the record information of the historical version of the specified file. In an embodiment of the present application, when viewing, the selected configuration file and a certain historical version thereof can also be displayed comparatively, and its modified content can be displayed in a highlighted color.

[0069] More specifically, the configuration files are files for configuring different objects, and some configuration files between configuration files of different objects can be shared, such as environment configuration files, hardware configuration files, etc. The configuration files between these objects can be shared through operations such as copying, removing, and moving to improve the configuration information of each object. For example, if a user lacks an environment configuration file, he can copy it from another user's configuration file to improve his own configuration information.

[0070] Furthermore, in the management library, the configuration files that can be modified and operated on are displayed in bright colors, and the configuration files that can only be operated on are displayed in dark colors. In the embodiment of the present application, file operations can be directly performed on the selected configuration files through shortcut keys, hot keys or manual operations. The contents of the configuration files can be modified by double-clicking or other triggering methods to enter the modification interface of the selected configuration files. Furthermore, the modification of the configuration files includes the modification of parameters and parameter values.

[0071] See also Figure 3 , shows a specific flow chart of the implementation of step S203 of an embodiment of the configuration file management method of the present application, wherein step S203 operates the specified configuration file to be operated in the management library according to the operation instruction and the file information, and specifically includes the following steps:

[0072] S301: Read information of the configuration file according to the unit address of the configuration file to be operated.

[0073] S302: Obtain a processing program for the configuration file according to the operation code.

[0074] S303: Based on the information of the read configuration file, obtain the data of the processing configuration file and the unit address where the data is located according to the operand.

[0075] S304: Modify the configuration file based on the processing program and data and the unit address where they are located.

[0076] In this embodiment, the operation instruction includes an operation code and an operand, and the file information includes a unit address of the configuration file to be operated. The operation code is used to determine the processing program of the configuration file, the operand is used to obtain the data for processing the configuration file and the unit address where it is located, and the unit address of the configuration file to be operated is used to read the file information and data information of the configuration file, and write the data to the unit address and / or modify the data in the unit address according to the processing program.

[0077] Specifically, different operation codes are set for the instructions for changing the content of the configuration file: adding, deleting, querying and modifying, and the instructions for performing file operations on the configuration file: copying, deleting, moving, renaming, viewing and other operations. The processing program for the configuration file is obtained through the operation code to complete different functions, such as adding, modifying and / or deleting the data in the configuration file by changing the configuration file, and writing the data result to the unit address where the data is located. Alternatively, the data of the configuration file is copied or moved to other unit addresses and all the data of the configuration file is deleted through file operations.

[0078] Furthermore, after obtaining the operation code for the configuration file, the operation code needs to be decoded to obtain the corresponding processing program. For example, the instruction to change the content of the configuration file needs to be parsed into corresponding read operations and write operations to modify the data of the configuration file. Specifically, for the read operation and write operation with dependency, after parsing the read operation and the write operation, the write operation that the read operation depends on is first executed, and then the read operation is executed according to the configuration when the write operation is executed.

[0079] Furthermore, after the opcode is compiled, the address of the operand is formed according to the given addressing mode and the content in the address field, and the operand is read using this address to obtain or edit the data required for processing the configuration file.

[0080] In this embodiment, instruction execution refers to completing the function specified by the instruction according to the requirements of the operation code. During this period, the operation result must be written to the register or main memory.

[0081] S204: Based on the operation result, the configuration file information in the management library and the program is updated simultaneously.

[0082] In the embodiment of the present application, the operation on the configuration file includes the operation on the content of the configuration file and the file operation on the configuration file itself. No matter which operation is performed, the configuration file information of the configuration file will be updated, and the file name, file size, creation time, modification time, update time, save path, user, etc. of the configuration file will be updated accordingly, and the configuration file content will only be updated in the program. Specifically, the file information of the configuration file is updated in the management library, and the content of the configuration file is updated in the project program, and the two are updated at the same time.

[0083] In the embodiment of the present application, the configuration file management method can visually manage and hot-change the configuration files of some online or offline systems, including configuration files of types such as xml, properties, and text, and can also perform version management on the modified configuration files. The configuration file management method described in the embodiment of the present application visually operates to modify user configuration and system configuration for the selected configuration file, simplifies the modification operation of the configuration file, facilitates the maintenance and operation of the system by the operation and maintenance personnel, makes the modification of the configuration file more intelligent, more efficient, safe and reliable, and reduces the operating cost of software maintenance.

[0084] See also Figure 4 , the figure shows a specific flow chart of another embodiment of the configuration file management method of the present application, and the configuration file management method specifically includes the following steps:

[0085] S401: Receive a processing instruction for a configuration file.

[0086] In the embodiment of the present application, the processing instruction includes file information and operation instructions, wherein the file information is used to specify the configuration file to be operated and read the information of the configuration file. The operation instruction is used to determine the processing procedure of the configuration file.

[0087] S402: Determine whether the processing instruction is a file operation instruction, if so, execute step S403, otherwise, execute step S404.

[0088] In this embodiment, the processing instructions are divided into instructions for changing the content of the configuration file and / or instructions for performing file operations on the configuration file. Specifically, the instructions for changing the content of the configuration file include: adding, deleting, querying and modifying. Through these processing instructions, the configuration file is read and / or written, so as to obtain and / or add, delete, modify and query the corresponding configuration file data. Furthermore, the instructions for performing file operations on the configuration file include copying, deleting, moving, renaming and viewing. Through file operations such as copying, deleting, moving and renaming, the configuration of the project user is modified. Through the viewing, the details of the configuration file can be viewed, and the configuration of the project before and after the modification can be compared.

[0089] In the embodiment of the present application, after performing file operations on the configuration file, i.e., performing file operations such as "copying, moving, renaming" on the configuration file, the content of the configuration file does not change, the file size does not change, and no new historical version file is generated. It modifies the configuration of different scenarios / users of the project.

[0090] S403: Execute the file operation instruction to update the configuration file information.

[0091] In the embodiment of the present application, the file operations such as "copy, move, rename and delete" are performed in the directory of the management library. These operations only change the configuration file information of the configuration file, and do not change the content of the configuration file.

[0092] Specifically, the "copy" operation refers to copying the configuration file from one directory item to another directory, and the "move" operation refers to moving the configuration file from one directory to another directory. After the move, the configuration file does not exist in the original directory, and the storage path of the configuration file is changed. The "delete" operation refers to deleting the configuration file from the directory, and the "rename" operation refers to changing the name of the configuration file. The "view" operation is used to view one of the historical version files of the configuration file and compare it.

[0093] S404: Execute the instruction to change the content of the configuration file, and update the configuration file information and the content of the configuration file.

[0094] In the embodiment of the present application, after the configuration file performs "addition, deletion, modification" operations on its content / data, both the content of the configuration file and the configuration file information are changed.

[0095] Furthermore, the instruction to change the content of the configuration file includes one or more requests for adding, deleting, checking, and modifying the configuration file. When executing the instruction, these requests are parsed into corresponding read operations and write operations. Among them, the data of the configuration file is saved to the cache and / or database according to the parsed write operation request, and then the write operation result is returned. Furthermore, the corresponding query result is obtained from the cache and / or database according to the parsed read operation request, and then the query result is returned.

[0096] Specifically, the data in the configuration file, such as parameters or parameter values, are configured by executing the operations (addition, deletion, modification). After the processing instructions of one or more requests for addition, deletion, query, and modification of the configuration file are parsed into read operations and / or write operations, for read operations and write operations that have a dependent relationship, after parsing the read operation and the write operation, the write operation that the read operation depends on is first executed, and then the read operation is executed according to the configuration when the write operation is executed. More specifically, when performing a write operation, it writes the configuration file data into the cache and the database, and the cache returns the written data to the page management platform of the management library. Finally, the page management platform of the management library displays to the application service program manager whether the configuration file writing operation is successful.

[0097] Furthermore, to assist in maintaining and managing the repository instance, the server managing the repository creates a timestamped version of the original configuration file upon startup when operational changes are made to the contents of the configuration file. Any additional configuration modifications resulting from administrative operations will result in the original file being automatically backed up, and a working copy of the instance being retained for reference or rollback. This archiving capability can be extended to save, load, and delete snapshots of the server configuration, allowing for callback and rollback scenarios.

[0098] S405: When the content of the configuration file is modified, each modification information of the configuration file is recorded.

[0099] In the embodiment of the present application, each time the configuration file is modified, the version number of the configuration file will be increased to form a historical version file. The historical version file tracks the changes of the file, and records information such as when and who changed what content of the file. Specifically, when the content of the configuration file changes, the location of the change is recorded and marked, and annotated, such as displaying the modified data in a bright color, setting the user who annotated the modification, and recording the modified data.

[0100] S406: Generate a historical version file with the modification time based on each change information, and save it in the management library so as to restore one of the historical version configuration files later.

[0101] In an embodiment of the present application, the historical version file uses its modification time as the version number. After the historical version file is generated, it is saved in the storage server, and the storage server identifies and archives the file version according to the generated version number.

[0102] Furthermore, the management library can only operate on the current version of the configuration file in the management library. Specifically, after the configuration file is operated, the modification time and / or storage location, user and other attributes of the configuration file are modified accordingly. After the content of the configuration file is "added, deleted, and modified", the content of the configuration file is substantially changed, and a new version of the configuration file is generated. The "View" can view any historical version file of the selected configuration file, and compare and display it with the configuration file of the currently used version.

[0103] In an embodiment of the present application, the initial version of the configuration file is to determine the configuration items according to the development baseline of the project requirements. During the maintenance and upgrade process of the project, based on the version of the development baseline, the required target version is developed. When the requirements change, the impact of the change is determined by evaluating the project changes, and the versions of the affected configuration items are modified. According to the nature of the change, the version tree of the configuration items continues to extend or generate new branches to form a new target version, and no changes should be made to the configuration items that are not affected by the change. At the same time, it should be possible to record and track the impact of the change on the version. If necessary, it is also possible to roll back to the previous version. For example, when the development requirements or requirements changes are canceled, it is necessary to be able to roll back the version to the development baseline version or other historical versions.

[0104] In the embodiment of the present application, the configuration file management method can perform visual management and hot change deployment of some online or offline system configuration files, including configuration files of types such as xml, properties, and text, and can also perform version management on the changed configuration files. The method described in the embodiment of the present application facilitates the maintenance and operation of the system by the operation and maintenance personnel, making it more intelligent, more efficient, safer and more reliable.

[0105] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the aforementioned storage medium can be a non-volatile storage medium such as a disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

[0106] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.

[0107] Further references Figure 5 , as a response to the above Figure 2The present application provides an embodiment of a configuration file management device, and the device embodiment is similar to Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.

[0108] like Figure 5 As shown, the configuration file management device 500 described in this embodiment includes: a reading module 501, an instruction receiving module 502, an operation module 503 and an update module 504. Among them:

[0109] The reading module 501 is used to obtain the configuration file in the program and add the configuration file information to the management library;

[0110] An instruction receiving module 502 is used to receive an instruction for processing the configuration file, wherein the processing instruction includes file information and an operation instruction, wherein the file information is used to specify the configuration file to be operated, and the operation instruction is used to determine a processing procedure for the configuration file;

[0111] An operation module 503 is used to operate the configuration file to be operated in the management library according to the operation instruction and the file information;

[0112] The updating module 504 is used to update the configuration file in the management library and the program simultaneously based on the operation result.

[0113] In this embodiment, the reading module 501 reads all configuration file information in the system and displays it visually so that the user can view and select the configuration file to be operated. The instruction receiving module 502 receives the processing instruction for the specified file to be operated, and performs the operation in the management library through the operation module 503, and the update module 504 updates the operation result in the management library and the program at the same time.

[0114] This implementation modifies the configuration file information by visually operating the selected configuration file and saves the operation results in the management library and the program at the same time, which simplifies the configuration file modification operation, facilitates the maintenance and operation of the system by operation and maintenance personnel, and makes the modification of the configuration file more intelligent and efficient.

[0115] To solve the above technical problems, the present application also provides a computer device. Figure 6 , Figure 6 This is a basic structural block diagram of the computer device in this embodiment.

[0116] The computer device 6 includes a memory 61, a processor 62, and a network interface 63 that are interconnected through a system bus. It should be noted that the figure only shows a computer device 6 with components 61-63, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), programmable gate arrays (Field-Programmable Gate Array, FPGA), digital processors (Digital Signal Processor, DSP), embedded devices, etc.

[0117] The computer device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The computer device may interact with a user through a keyboard, a mouse, a remote controller, a touch pad, or a voice control device.

[0118] The memory 61 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 61 can be an internal storage unit of the computer device 6, such as a hard disk or memory of the computer device 6. In other embodiments, the memory 61 can also be an external storage device of the computer device 6, such as a plug-in hard disk equipped on the computer device 6, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (FlashCard), etc. Of course, the memory 61 can also include both the internal storage unit of the computer device 6 and its external storage device. In this embodiment, the memory 61 is generally used to store the operating system and various application software installed on the computer device 6, such as the program code of the configuration file management method, etc. In addition, the memory 61 can also be used to temporarily store various types of data that have been output or are to be output.

[0119] The processor 62 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips in some embodiments. The processor 62 is generally used to control the overall operation of the computer device 6. In this embodiment, the processor 62 is used to run the program code stored in the memory 61 or process data, such as running the program code of the configuration file management method.

[0120] The network interface 63 may include a wireless network interface or a wired network interface. The network interface 63 is generally used to establish a communication connection between the computer device 6 and other electronic devices.

[0121] The present application also provides another implementation, namely, providing a computer-readable storage medium, wherein the computer-readable storage medium stores a configuration file program, and the configuration file program can be executed by at least one processor to enable the at least one processor to perform the steps of the configuration file management method as described above.

[0122] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment method can be implemented by means of software plus a necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the configuration file management method described in each embodiment of the present application.

[0123] Obviously, the embodiments described above are only some embodiments of the present application, rather than all embodiments. The preferred embodiments of the present application are given in the accompanying drawings, but they do not limit the patent scope of the present application. The present application can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present application more thorough and comprehensive. Although the present application is described in detail with reference to the aforementioned embodiments, for those skilled in the art, it is still possible to modify the technical solutions recorded in the aforementioned specific implementation methods, or to perform equivalent replacement of some of the technical features therein. Any equivalent structure made using the contents of the specification and drawings of this application, directly or indirectly used in other related technical fields, is similarly within the scope of patent protection of this application.

Claims

1. A configuration file management method, characterized in that: The steps include: Read the configuration file in the program and add the configuration file information to the management library; receiving a processing instruction for the configuration file, the processing instruction comprising file information and an operation instruction, wherein the file information is used to specify the configuration file to be operated, and the operation instruction is used to determine a processing procedure for the configuration file; According to the operation instruction and the file information, operating the configuration file to be operated in the management library; Based on the operation result, the configuration file is updated simultaneously in the management library and the program; The management library refers to a terminal device in which configuration files of all programs are placed in a management library for management; the file information includes the unit address of the configuration file to be operated in the management library; the operation instruction is used to specify what operation to perform on the configuration file or its content; When deleting the configuration file, only the current version of the selected file can be deleted, and it is a logical deletion. The logical deletion means that the deleted file and multiple historical version files corresponding to the file are saved in the storage location specified by the system. It is not completely deleted and can be restored from the storage location later. Wherein, in the management library, the configuration files that can perform content modification and file operations are displayed in bright colors, and the configuration files that can only perform file operations are displayed in dark colors.

2. The configuration file management method according to claim 1, characterized in that: The operation instruction includes an operation code and an operand, the file information includes a unit address of a configuration file to be operated, and the step of operating the specified configuration file to be operated in the management library according to the operation instruction and the file information includes the following steps: Read the information of the configuration file according to the unit address of the configuration file to be operated; Acquire a processing program for the configuration file according to the operation code; Based on the information of the configuration file read, acquiring data for processing the configuration file and a unit address where the data is located according to the operand; The configuration file is modified based on the processing program, the data and the unit address where the data is located.

3. The configuration file management method according to claim 2, characterized in that: The step of modifying the configuration file based on the processing program, the data and the unit address where the data is located comprises: According to the processing program, the data is written to the unit address and / or the data in the unit address is modified.

4. The configuration file management method according to claim 2, characterized in that: The operation instruction also includes an instruction to change the content of the configuration file and / or an instruction to perform a file operation on the configuration file; the step of operating the specified configuration file to be operated in the management library includes the following steps; In the management library, a change operation is performed on the content of the specified configuration file to be operated and / or a file operation is performed on the configuration file.

5. The configuration file management method according to claim 4, characterized in that: The step of performing a modification operation on the content of the specified configuration file to be operated and / or performing a file operation on the configuration file in the management library comprises the following steps: When modifying the contents of the configuration file, the operation instructions are parsed into corresponding read and write operations; Determine whether there is a dependency between the parsed read and write operations; When there is a dependency, the write operation that the read operation depends on is first performed on the content of the configuration file according to the dependency, and then the read operation is performed according to the configuration when the write operation is performed.

6. The configuration file management method according to claim 5, characterized in that: When the write operation that the read operation depends on is first performed on the content of the configuration file according to the dependency relationship, the data of the write operation is written into the cache and the database.

7. The configuration file management method according to claim 4, characterized in that: The step of performing a modification operation on the content of the specified configuration file to be operated and / or performing a file operation on the configuration file in the management library comprises the following steps: When the content of the configuration file is modified, each modification information of the configuration file is recorded; A historical version file carrying the modification time is generated based on each change information and saved in the management library so as to restore one of the historical version configuration files later.

8. A configuration file management device, characterized in that: include: The reading module is used to read the configuration file in the program and add the configuration file information to the management library; An instruction receiving module, used for receiving an instruction for processing the configuration file, the processing instruction including file information and an operation instruction, wherein the file information is used for specifying the configuration file to be operated, and the operation instruction is used for determining a processing procedure for the configuration file; An operation module, used to operate the configuration file to be operated in the management library according to the operation instruction and the file information; An updating module, used for updating the configuration file in the management library and the program simultaneously based on the operation result; The management library refers to a terminal device in which configuration files of all programs are placed in a management library for management; the file information includes the unit address of the configuration file to be operated in the management library; the operation instruction is used to specify what operation to perform on the configuration file or its content; When deleting the configuration file, only the current version of the selected file can be deleted, and it is a logical deletion. The logical deletion means that the deleted file and multiple historical version files corresponding to the file are saved in the storage location specified by the system. It is not completely deleted and can be restored from the storage location later. Wherein, in the management library, the configuration files that can perform content modification and file operations are displayed in bright colors, and the configuration files that can only perform file operations are displayed in dark colors.

9. A computer device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the configuration file management method according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the configuration file management method according to any one of claims 1 to 7 are implemented.