CN110196725A - Configuration file management method, apparatus, computer equipment and storage medium - Google Patents

Configuration file management method, apparatus, computer equipment and storage medium Download PDF

Info

Publication number
CN110196725A
CN110196725A CN201910328461.4A CN201910328461A CN110196725A CN 110196725 A CN110196725 A CN 110196725A CN 201910328461 A CN201910328461 A CN 201910328461A CN 110196725 A CN110196725 A CN 110196725A
Authority
CN
China
Prior art keywords
configuration file
file
management
information
configuration
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910328461.4A
Other languages
Chinese (zh)
Inventor
王建华
石海威
芦凡
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201910328461.4A priority Critical patent/CN110196725A/en
Publication of CN110196725A publication Critical patent/CN110196725A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application belongs to program maintenance field, is related to a kind of configuration file management method, and including the configuration file in reading program, profile information is added to management library;The process instruction to configuration file is received, process instruction includes the file information and operational order, and wherein the file information is used to determine the processing routine of configuration file for specified configuration file to be operated, operational order;According to operational order and the file information, specified configuration file to be operated is operated in management library;Based on operating result management library and program in simultaneously more new configuration file.The application simplifies the modification operation of configuration file, facilitates operation maintenance personnel to the maintenance and operation of system, keeps the modification of configuration file more intelligent, more efficient.The application also provides a kind of configuration file management device, computer equipment and storage medium.

Description

Configuration file management method, apparatus, computer equipment and storage medium
Technical field
This application involves field of computer technology, and in particular to program maintenance technical field more particularly to configuration file pipe Manage method, apparatus, computer equipment and storage medium.
Background technique
Program needs the information configured to program to be generally managed by configuration file when starting, i.e., in configuration file The information for needing to configure program when program starting is put, such as the configuration file of some softwares is for storing related software Some information, such as initialization information, initial path and account number etc..For example, user is logging in a stylobate in Microsoft When on the computer of Windows XP, 2000 Windows or Windows NT Workstation, system just will create one Dedicated configuration file, for saving the big of the screen color of user, network connection, printer connection, mouse setting and window Small and position etc. configuration information.
It in the prior art, can be at any time by the characteristic of some softwares of modification configuration file customization, without modifying It is recompiled after software, to facilitate the transplanting of program.It is unfolded to need to carry out program when putting program starting in whole configuration files The information of configuration, such as when we usually start a software just installed, it may appear that the control of some filling registration informations, and Inquire whether you will choose the check box for remembeing password, next automated log on etc., these registration informations have just been written into corresponding journey In the configuration file of sequence, when program will read configuration file next time automatically on startup, program is configured, in this way we Just do not have to fill in these registration informations every time, program just will start automatically.
Fast-developing with regard to current Internet era, IT profession chain becomes increasingly complex, because of the demand of business, in system Configuration file needs not stop operation, the management of configuration file such as maintenance update and becomes increasingly complex, bring greatly to O&M, research staff The duplication of labour of amount.
Summary of the invention
The purpose of the embodiment of the present application is to propose a kind of configuration file management method, apparatus, computer equipment and storage Medium simplifies the operation modification of configuration file, so as to the behaviour such as change, update of O&M, developer's efficient process configuration file Make, improves efficiency.
In order to solve the above-mentioned technical problem, the embodiment of the present application provides a kind of configuration file management method, uses as follows The technical solution:
A kind of configuration file management method, includes the following steps:
Profile information is added to management library by the configuration file in reading program;
It receiving to the process instruction of the configuration file, the process instruction includes the file information and operational order, wherein The file information is used to determine the processing journey of the configuration file for specified configuration file to be operated, the operational order Sequence;
According to the operational order and the file information, to the specified configuration file to be operated in the management library It is operated;
The configuration file is updated simultaneously in the management library and described program based on operating result.
Further, the operational order includes operation code and operand, and the file information includes to operative configuration text The element address of part, it is described according to the operational order and the file information, to specified institute to be operated in the management library The step of configuration file is operated is stated to include the following steps:
The information of the configuration file is read according to the element address to operative configuration file;
The processing routine to the configuration file is obtained according to the operation code;
Based on the information of the read configuration file, the number for handling the configuration file is obtained according to the operand According to and the data where element address;
The configuration file is modified based on the element address where the processing routine and the data and the data.
Further, institute is modified in the element address based on where the processing routine and the data and the data The step of stating configuration file include:
According to the processing routine, be written in the data and/or the modification element address in the element address Data.
Further, the operational order further includes the instruction being modified to the content of the configuration file and/or right The configuration file carries out the instruction of file operation;It is described in the management library to the specified configuration file to be operated The step of being operated includes the following steps;
Operation is modified to the content of the specified configuration file to be operated in the management library and/or to institute It states configuration file and carries out file operation.
Further, described that the content of the specified configuration file to be operated is modified in the management library It operates and/or includes the following steps: the step of carrying out file operation to the configuration file
When the content to configuration file is modified operation, operational order is parsed into corresponding read operation and writes behaviour Make;
Read operation and write operation after judgement parsing whether there is dependence;
When there are dependence, is first carried out according to content of the dependence to the configuration file and relied on by read operation Write operation, read operation is then executed according to configuration when executing write operation.
Further, described first carried out according to content of the dependence to the configuration file is write by what read operation was relied on It, will be in the data write-in caching and database of write operation when operation.
Further, described that the content of the specified configuration file to be operated is modified in the management library It operates and/or includes the following steps: the step of carrying out file operation to the configuration file
When the content to configuration file is modified operation, the change information of the configuration file each time is recorded;
One is generated based on change information each time and carries the old version file of modification time, and is stored in described It manages in library, so as to the subsequent configuration file for restoring one of old version.
In order to solve the above-mentioned technical problem, the embodiment of the present application also provides a kind of configuration file management device, uses such as The lower technical solution:
A kind of configuration file management device, comprising:
Profile information is added to management library for the configuration file in reading program by read module;
Command reception module, for receiving the process instruction to the configuration file, the process instruction includes file letter Breath and operational order, wherein the file information is for specified configuration file to be operated, the operational order is for determining institute State the processing routine of configuration file;
Operation module is used for according to the operational order and the file information, to specified wait operate in the management library The configuration file operated;
Update module, for updating the configuration text simultaneously in the management library and described program based on operating result Part.
In order to solve the above-mentioned technical problem, the embodiment of the present application also provides a kind of computer equipment, uses as described below Technical solution:
A kind of computer equipment, including memory and processor are stored with computer program, the place in the memory The step of reason device realizes configuration file management method described above when executing the computer program.
In order to solve the above-mentioned technical problem, the embodiment of the present application also provides a kind of computer readable storage medium, uses Technical solution as described below:
A kind of computer readable storage medium is stored with computer program on the computer readable storage medium, described The step of configuration file management method described above is realized when computer program is executed by processor.
Compared with prior art, the embodiment of the present application mainly has following the utility model has the advantages that matching provided by the embodiment of the present application File management method is set, including the configuration file in program fetch, profile information is added to management library;Reception is matched to described The process instruction of file is set, the process instruction includes the file information and operational order, wherein the file information is for specifying Configuration file to be operated, the operational order are used to determine the processing routine of the configuration file;According to the operational order And the file information, the specified configuration file to be operated is operated in the management library;Existed based on operating result The configuration file is updated in the management library and described program simultaneously.Herein described method is by management library to selected configuration File is operated, and profile information is modified, and is made operating result while being stored in management library and described program, is simplified The modification operation of configuration file, facilitates the operation maintenance personnel to keep the modification of configuration file more intelligent the maintenance and operation of system Change, is more efficient.
Detailed description of the invention
It, below will be to needed in the embodiment of the present application description in order to illustrate more clearly of the scheme in the application Attached drawing makees a simple introduction, it should be apparent that, the accompanying drawings in the following description is some embodiments of the present application, for this field For those of ordinary skill, without creative efforts, it is also possible to obtain other drawings based on these drawings.
Fig. 1 is that this application can be applied to exemplary system architecture figures therein;
Fig. 2 is according to the flow chart of one embodiment of the configuration file management method of the application;
Fig. 3 is a kind of flow chart of specific embodiment of step 203 in Fig. 2;
Fig. 4 is the flow chart according to another embodiment of the configuration file management method of the application;
Fig. 5 is the structural schematic diagram of one embodiment of the configuration file management device of the application;
Fig. 6 is the structural schematic diagram according to one embodiment of the computer equipment of the application.
Specific embodiment
Unless otherwise defined, all technical and scientific terms used herein and the technical field for belonging to the application The normally understood meaning of technical staff is identical;It is specific that description is intended merely in the term used in the description of application herein Embodiment purpose, it is not intended that in limitation the application;The description and claims of this application and above-mentioned Detailed description of the invention In term " includes " and " having " and their any deformation, it is intended that cover and non-exclusive include.The application's says Bright book and claims or term " first " in above-mentioned attached drawing, " second " etc. rather than are used for distinguishing different objects In description particular order.
Referenced herein " embodiment " is it is meant that a particular feature, structure, or characteristic described can wrap in conjunction with the embodiments It is contained at least one embodiment of the application.Each position in the description occur the phrase might not each mean it is identical Embodiment, nor the independent or alternative embodiment with other embodiments mutual exclusion.Those skilled in the art explicitly and Implicitly understand, embodiment described herein can be combined with other embodiments.
In order to make those skilled in the art more fully understand application scheme, below in conjunction with attached drawing, to the application reality The technical solution applied in example is clearly and completely described.
Referring to Fig. 1, being the implementation environment schematic diagram of configuration file management method provided by the embodiment of the present application, the reality Apply includes terminal device 101,102,103, network 104 and server 105 in environment.Wherein, network 104 is in terminal device 101, the medium of communication link is provided between 102,103 and server 105.Network 104 may include various connection types, such as Wired, wireless communication link or fiber optic cables etc..
User can be used terminal device 101,102,103 and be interacted by network 104 with server 105, to receive or send out Send message etc..Various telecommunication customer end applications can be installed, such as web browser is answered on terminal device 101,102,103 With, shopping class application, searching class application, instant messaging tools, mailbox client, social platform software etc..
Terminal device 101,102,103 can be the various electronic equipments with display screen and supported web page browsing, packet It includes but is not limited to user equipment, the network equipment or user equipment and the network equipment is integrated constituted equipment by network.Institute Stating user equipment, it includes but is not limited to any mobile electronic product that can carry out human-computer interaction by touch tablet with user, Such as smart phone, tablet computer etc., the mobile electronic product can use any operating system, be as android is operated System, iOS operating system etc..Wherein, the network equipment include it is a kind of can according to the instruction for being previously set or storing, automatically into Line number value calculate and information processing electronic equipment, hardware include but is not limited to microprocessor, specific integrated circuit (ASIC), Programmable gate array (FPGA), digital processing unit (DSP), embedded device etc..The network equipment its include but is not limited to count The cloud that calculation machine, network host, single network server, multiple network server collection or multiple servers are constituted;Here, Yun Youji It is constituted in a large number of computers or network servers of cloud computing (Cloud Computing), wherein cloud computing is distributed computing One kind, a virtual supercomputer consisting of a loosely coupled set of computers.The network includes but is not limited to Internet, wide area network, Metropolitan Area Network (MAN), local area network, VPN network, wireless self-organization network (Ad Hoc network) etc..Certainly, this field Technical staff will be understood that above-mentioned terminal device is only for example, other terminal devices that are existing or being likely to occur from now on can such as fit It for the application, should also be included within the application protection scope, and be incorporated herein by reference.
Server 105 can be a server, or the server cluster consisted of several servers or one A cloud computing service center.It is also possible to provide the server of various services, such as shows on terminal device 101,102,103 The page shown provides the background server supported.
It should be noted that configuration file management method provided by the embodiment of the present application can be set and hold in the server Row, also can be set and executes in terminal device, be distributed in other equipment again by upload server.Correspondingly, configuration text Part managing device is set in server or terminal device.
It should be understood that the number of terminal device, network and server in Fig. 1 is only schematical.According to realization need It wants, can have any number of terminal device, network and server.
Please continue to refer to Fig. 2, described a kind of one embodiment of configuration file management method provided by the present application is shown Flow chart, the method for the configuration file management the following steps are included:
S201: profile information is added to management library by the configuration file in reading program.
In the embodiment of the present application, the configuration file is information required for configurator starts, and is according to different right As and environment carry out different configuration of file.The management library is to refer to for the configuration file of program in terminal In equipment, the configuration file of all programs is placed in a management library and is managed.
In the embodiment of the present application, the profile information refers to the letter of a variety of attributes of the configuration file setting Breath, including filename, file type, file size, creation time, user, renewal time, storing path etc..Wherein, the text Part name is used to identify will be using the specific file or subdirectory of unique configuration setting, and the file type is for identifying the configuration The type of file, the creation time, renewal time are used to record the modification record of the configuration file, and the user refers to pair The user that the configuration file is operated.The storing path is used to register the save location of the configuration file.
Further, the present embodiment manages the configuration file using binary tree structure.Specifically, a program is at least Including a configuration file, and all configuration files are placed in an administrative directory and are managed.Wherein, the administrative directory It include multiple subdirectories or configuration file in the root, the subdirectory can be into one with the entitled first class catalogue of program Step includes next stage catalogue or configuration file.
Specifically, described program configures different files according to exploitation, production, test environment actual needs.One environment is matched The file set is stored in a catalogue or subdirectory.For example, system should when hardware profile is included in startup program The equipment of starting, and use the series of instructions being arranged in each equipment.To the configuration file of the different hardware of required starting It is stored under a catalogue or subdirectory.
More specifically, a program can be equipped in catalogue or the subdirectory of multiple peers according to different objects.Example As (user defines the setting of environment needed for system loads and the set of file when logging in user profile.It includes that user is special Configuration setting, such as size and the position of procedural item, screen color, network connection, printer connection, mouse setting and window Set and personal information, such as bookmark, password and preference etc.), computer program can possess multiple user profiles, These user profiles form catalogue at the same level or subdirectory, belong under a catalogue file.
S202: the process instruction to configuration file is received, process instruction includes the file information and operational order.
In the present embodiment, the process instruction includes the file information and operational order, wherein the file information is used for Specified configuration file to be operated, the operational order are used to determine the processing routine of the configuration file.
In the embodiment of the present application, the corresponding administrative directory of program, the present embodiment be visualized operation in institute It states in the catalogue or subdirectory in management library and searches and specify configuration file to be dealt with.Further, it receives to configuration When the process instruction of file, the file information includes the element address of configuration file to be operated in the management library, is used for Specified configuration file to be operated, and read the information of the configuration file.The operational order is for specified to the configuration Any operation carried out to its content for file.
S203: according to operational order and the file information, specified configuration file to be operated is grasped in management library Make.
In the present embodiment, the process instruction includes the instruction operated to the content in the configuration file and right Described configuration file itself carries out the instruction of file operation.Wherein, the finger that the content to the configuration file is modified Order includes: that addition, deletion, inquiry and modification are carried out read operation to the configuration file and/or write by these process instructions Operation, to obtain and/or add, delete, modify and inquire the data in corresponding configuration file.Specifically, to described The instruction that the content of configuration file is modified when being executed, is resolvable to corresponding read operation and write operation.More specifically, solution There may be dependences for read operation and write operation after analysis, for first carrying out there are the read operation of dependence and write operation Then the write operation relied on by read operation executes read operation according to configuration when executing write operation.
Further, the instruction for carrying out file operation to the configuration file includes copying, deleting, moving, renaming, looking into It sees, by file operations such as copy, deletion, movement, renamings, modifies the configuration of project user, checked by described, comparative run The configuration of purpose modification front and back.Specifically, to the configuration file carry out delete operation when, can only delete select files it is current Version file, and it is that logic is deleted, logic deletion, which refers to, multiple goes through the file of deletion and this document are corresponding History version file is stored in the specified storage location of system, is not thorough deletion, subsequent to restore from the storage location.To described Configuration file is checked include the following: all configuration files for checking in technical routine check that specified configuration file is corresponding The record information of multiple old version files and the old version for checking specified file.In the embodiment of the present application, it checks When, it can also contrastively show selected configuration file and its a certain old version, and it is modified with the display of highlight color Content.
More specifically, the configuration file is the file configured to different objects, the configuration files of different objects it Between some configuration files can share, such as environment profile, hardware profile.Matching between these objects Setting file can be shared by operations such as copy, removal, movements, to improve the configuration information of each object.For example, certain user lacks Environment profile can copy the configuration information to improve its own from the configuration file of another user.
Further, in the management library, to the configuration file of content change and file operation can be carried out with bright Color is shown, to the dark-coloured display of the configuration file that can only carry out file operation.It in the embodiment of the present application, can be by quick Key, hot key or manual operation etc. directly carry out file operation to the selected configuration file.Pass through double-click or other touchings The content of the configuration file is modified in the modification interface of the selected configuration file of originating party formula entrance.Further Ground, the modification to the configuration file include the modification to parameter and parameter value.
Referring to Fig. 3, the step S203 for showing one embodiment of the management method of herein described configuration file is implemented Specific flow chart, the step S203 matches specified to be operated in management library according to operational order and the file information Set file operated specifically includes the following steps:
S301: the information of configuration file is read according to the element address to operative configuration file.
S302: the processing routine to configuration file is obtained according to operation code.
S303: the information based on the read configuration file obtains the data of processing configuration file according to operand And its element address at place.
S304: configuration file is modified based on the element address at processing routine and data and its place.
In the present embodiment, the operational order includes operation code and operand, and the file information includes matching wait operate Set the element address of file.Wherein the operation code is used to determine the processing routine of the configuration file, and the operand is used for The element address of the data and its place that handle the configuration file is obtained, the element address to operative configuration file is used for The file information and data information for reading the configuration file, according to the processing routine, described in the write-in of the element address Data in data and/or the modification element address.
Specifically, it the instruction being modified for the content to the configuration file: adds, delete, inquire and repairs Change, and carry out the instruction of file operation to the configuration file: copy, deletes, moves, renames, checks etc. operating, be arranged Different operation codes.The processing routine to the configuration file is obtained by the operation code, it is such as logical to complete different functions The change to the configuration file is crossed, adds, modify and/or delete the data in the configuration file, and data result is write Enter the element address where the data.Alternatively, by the data copy of configuration file or being moved to other by file operation Element address and all data for deleting configuration file.
Further, after obtaining to the operation code of the configuration file, the operation code need to be decoded, to obtain Corresponding processing routine.For example, to the instruction that the content of the configuration file is modified need to be parsed into corresponding read operation and Write operation is modified with the data to the configuration file.Specifically, for there are the read operation of dependence and write behaviour Make, parsing read operation and write operation after, first carry out the write operation relied on by read operation, then according to execute write operation when Configuration is to execute read operation.
It further, need to be according in given addressing system and address field after by being compiled to operation code The address of content formation operation number, and with this address read operands, it is needed with configuration file described in acquisition or editing and processing The data wanted.
In the present embodiment, instruction execution refers to the requirement according to operation code, completes to instruct defined function, in this phase Between, operation result is write in register or main memory.
S204: the profile information in the management library and described program is being updated simultaneously based on operating result.
In the embodiment of the present application, to the operation of configuration file include to configuration file content carry out operate and configure text Part itself carries out file operation.Which kind of no matter carries out operate the profile information of the configuration file to be all updated, matches The corresponding update such as filename, file size, creation time, modification time, renewal time, storing path, user of file is set, is matched File content is set only to update in described program.Specifically, the file information of the configuration file is updated in the management library, The content of the configuration file is updated in the project procedure, and the two updates simultaneously.
In the embodiment of the present application, the configuration file management method can be to the configuration text of system on some lines or under line Part, configuration file including xml, properties, text etc. type carry out visualized management, heat change deployment, can be with Version management is carried out to the configuration file of change.Configuration file management method described in the embodiment of the present application is visually directed to selected Configuration file carries out operation modification user configuration and system configuration, simplifies the modification operation of configuration file, facilitates operation maintenance personnel To the maintenance and operation of system, keep the modification of configuration file more intelligent, more efficient and safe and reliable, and reduces to soft The operation cost of part maintenance.
Referring to Fig. 4, the step for showing another embodiment of the management method of herein described configuration file in figure is specific Flow chart, the management method of the configuration file specifically includes the following steps:
S401: the process instruction to configuration file is received.
In the embodiment of the present application, the process instruction includes the file information and operational order, wherein the file information For specified configuration file to be operated, and read the information of the configuration file.The operational order is for determining described match Set the processing routine of file.
S402: judge whether process instruction is file operation instruction, if so, executing step S403, otherwise, execute step S404。
In the present embodiment, the process instruction be divided into the instruction that the content of the configuration file is modified and/or The instruction of file operation is carried out to the configuration file.Specifically, the finger that the content to the configuration file is modified Order includes: that addition, deletion, inquiry and modification are carried out read operation to the configuration file and/or write by these process instructions Operation, to obtain and/or add, delete, modify and inquire corresponding profile data.Further, match to described Setting file and carrying out the instruction of file operation includes copying, deleting, move, rename, checking, passes through copy, deletion, movement, again The file operations such as name, modify the configuration of project user, are checked by described, can check the details of the configuration file, and The configuration of comparative run purpose modification front and back.
In the embodiment of the present application, file operation is carried out to the configuration file, i.e., the configuration file is carried out " multiple After the file operations such as system, mobile, renaming ", the content of the configuration file does not change, and file size is constant, does not also produce Raw new old version file.It modifies to different scenes/user configuration of the project.
S403: file operation instruction is executed, profile information is updated.
It in the embodiment of the present application, is in the pipe by file operations such as " copy, mobile, renaming and the deletions " It is operated in the catalogue in reason library, a profile information for configuration files is only changed in these operations, to the configuration file Content does not make change,.
Specifically, described " duplication " operation, which refers to, copies the configuration file to another catalogue from a directory entry In, " movement " operation refers to moves on to the configuration file in another catalogue from a catalogue, and after mobile, this is described Configuration file is not present in former catalogue, and the store path of the configuration file is changed." deletion " operation refers to will be described Configuration file is deleted from the catalogue, and " renaming " is to the configuration file more changed name." the checking " is used for It checks one of old version file of the configuration file, and is compared.
S404: executing the instruction changed to configuration file content, updates the content of profile information and configuration file.
In the embodiment of the present application, it is described to match after the configuration file carries out " increase, delete, changing " operation to its content/data The content and profile information for setting file change.
Further, the instruction that the content to the configuration file is modified includes the increasing to the configuration file (addition), delete, look into, changing in one or more requests.When executing instruction, by these request analysis at corresponding read operation and Write operation.Wherein, the data of configuration file are saved into caching and/or database according to the write operation requests that parsing obtains, Then write operation result is returned.Further, it is obtained from caching and/or database according to the read operation request that parsing obtains Corresponding query result is taken, the query result is then returned.
Specifically, the data in the configuration file, such as parameter or parameter value, by execute it is described operation (increase, Delete, change) it is configured.When to the configuration file increasing (addition), delete, look into, change in one or more requests places After reason instruction is parsed into read operation and/or write operation, for there are the read operation of dependence and write operations, in parsing read operation And after write operation, the write operation relied on by read operation is first carried out, is then executed according to configuration when executing write operation and reads behaviour Make.More specifically, profile data is written in caching and database when carrying out write operation, and will be written by caching Data be back to the page management platform in management library, the final page management platform for managing library is to application services manager Show that this writes whether configuration file operation succeeds.
Further, when the content to the configuration file carries out operation change, in order to assist maintenance and management library The server of example, the management library creates the version with timestamp of original configuration file on startup.Management operation is led Any other configuration modification caused can all allow original document automated back-up, and one of example work is backed up and can be reserved for drawing With or rollback.This filing function can be extended to preservation, load and delete server configuration snapshot, thus allow adjust back and Rollback scene.
S405: when the content to configuration file is modified operation, the configuration file more converting to each time is recorded Breath.
In the embodiment of the present application, the modification each time of the configuration file, the version number of the configuration file will all increase Add, forms an old version file.The change of the old version document track file, record when, who more The information such as what content of file are changed.Specifically, it when the content of the configuration file changes, records and marks change Position, and explained, such as with the data of light tone color display modification, and user and note that annotation explains modification be set Record modified data.
S406: one is generated based on change information each time and carries the old version file of modification time, and is saved In management library, so as to the subsequent configuration file for restoring one of old version.
In the embodiment of the present application, the old version file is using its modification time as version number, the old version It saves after file generated into storage server, storage server is identified and returned to FileVersion according to the version number of generation Shelves.
Further, the configuration file of current version in management library can only be operated in the management library.Specifically, After the configuration file carries out file operation, the modification time of the configuration file with/attributes are corresponding repairs by storage location, user etc. Change.After carrying out " increase, delete, changing " operation to the content of the configuration file, substantial variation occurs for the content of the configuration file, Generate the configuration file of new version.Described " checking " can check any old version file of chosen configuration file, and Display is compared with the configuration file of currently used version.
In the embodiment of the present application, the initial version of the configuration file is matched according to the determination of the development baseline of project demands Set item.During the maintenance and upgrade of project, the version based on development baseline, according to developing required target version, when When generation demand changes, by the assessment to Xiang Mingda, the coverage of change, the version to the configuration item being affected are determined It modifies, makes the edition tree of configuration item continue to extend or generate new branch according to the property of change, form new target version This, and the configuration item for not influenced by change should not then send out generation variation.Meanwhile it should be able to be generated to version by change Influence carry out recording and tracking.It can also return back to pervious version when necessary.Such as when exploitation demand or demand change quilt When cancellation, it is necessary to have the ability version rollback to development baseline version or other old versions.
In the embodiment of the present application, the configuration file management method can be to the configuration text of system on some lines or under line Part, configuration file including xml, properties, text etc. type carry out visualized management, heat change deployment, can be with Version management is carried out to the configuration file of change.The embodiment of the present application the method facilitates maintenance and behaviour of the operation maintenance personnel to system Make, keeps it more intelligent, more efficient and safe and reliable.
Those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, being can be with Relevant hardware is instructed to complete by computer program, which can be stored in a computer-readable storage and be situated between In matter, the program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Wherein, storage medium above-mentioned can be The non-volatile memory mediums such as magnetic disk, CD, read-only memory (Read-Only Memory, ROM) or random storage note Recall body (Random Access Memory, RAM) etc..
It should be understood that although each step in the flow chart of attached drawing is successively shown according to the instruction of arrow, These steps are not that the inevitable sequence according to arrow instruction successively executes.Unless expressly stating otherwise herein, these steps Execution there is no stringent sequences to limit, can execute in the other order.Moreover, at least one in the flow chart of attached drawing Part steps may include that perhaps these sub-steps of multiple stages or stage are not necessarily in synchronization to multiple sub-steps Completion is executed, but can be executed at different times, execution sequence, which is also not necessarily, successively to be carried out, but can be with other At least part of the sub-step or stage of step or other steps executes in turn or alternately.
With further reference to Fig. 5, as the realization to method shown in above-mentioned Fig. 2, this application provides a kind of configuration file pipes One embodiment of device is managed, the Installation practice is corresponding with embodiment of the method shown in Fig. 2, which can specifically apply In various electronic equipments.
As shown in figure 5, configuration file management device 500 described in the present embodiment includes: read module 501, command reception Module 502, operation module 503 and update module 504.Wherein:
Profile information is added to management library for the configuration file in program fetch by read module 501;
Command reception module 502, for receiving the process instruction to the configuration file, the process instruction includes file Information and operational order, wherein the file information is for specified configuration file to be operated, the operational order is for determining The processing routine of the configuration file;
Operation module 503 is used for according to the operational order and the file information, to specified wait grasp in the management library The configuration file made is operated;
Update module 504, for updating the configuration simultaneously in the management library and described program based on operating result File.
In the present embodiment, profile information all in 501 reading system of read module, and visualize, with Just user checks and selectes configuration file to be operated.Command reception module 502 receives the place to specified file to be operated Reason instruction, is operated in the management library by the operation module 503, and update module 504 exists operating result simultaneously It is updated in management library and program.
This implementation to operate by visually carrying out operation modification profile information for selected configuration file As a result it is stored in management library and described program simultaneously, simplifies the modification operation of configuration file, facilitate operation maintenance personnel to system Maintenance and operation, keep the modification of configuration file more intelligent, more efficient.
In order to solve the above technical problems, the embodiment of the present application also provides computer equipment.It is this referring specifically to Fig. 6, Fig. 6 Embodiment computer equipment basic structure block diagram.
The computer equipment 6 includes that connection memory 61, processor 62, network interface are in communication with each other by system bus 63.It should be pointed out that the computer equipment 6 with component 61-63 is illustrated only in figure, it should be understood that simultaneously should not Realistic to apply all components shown, the implementation that can be substituted is more or less component.Wherein, those skilled in the art of the present technique It is appreciated that computer equipment here is that one kind can be automatic to carry out numerical value calculating according to the instruction for being previously set or storing And/or the equipment of information processing, hardware include but is not limited to microprocessor, specific integrated circuit (Application Specific Integrated Circuit, ASIC), programmable gate array (Field-Programmable Gate Array, FPGA), digital processing unit (Digital Signal Processor, DSP), embedded device etc..
The computer equipment can be the calculating such as desktop PC, notebook, palm PC and cloud server and set It is standby.The computer equipment can carry out people by modes such as keyboard, mouse, remote controler, touch tablet or voice-operated devices with user Machine interaction.
The memory 61 include at least a type of readable storage medium storing program for executing, the readable storage medium storing program for executing include flash memory, Hard disk, multimedia card, card-type memory (for example, SD or DX memory etc.), random access storage device (RAM), static random are visited It asks memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), may be programmed read-only deposit Reservoir (PROM), magnetic storage, disk, CD etc..In some embodiments, the memory 61 can be the computer The internal storage unit of equipment 6, such as the hard disk or memory of the computer equipment 6.In further embodiments, the memory 61 are also possible to the plug-in type hard disk being equipped on the External memory equipment of the computer equipment 6, such as the computer equipment 6, Intelligent memory card (Smart Media Card, SMC), secure digital (Secure Digital, SD) card, flash card (Flash Card) etc..Certainly, the memory 61 can also both including the computer equipment 6 internal storage unit and also including outside it Portion stores equipment.In the present embodiment, the memory 61 is installed on the operating system of the computer equipment 6 commonly used in storage With types of applications software, such as the program code of configuration file management method etc..In addition, the memory 61 can be also used for temporarily When store the Various types of data that has exported or will export.
The processor 62 can be in some embodiments central processing unit (Central Processing Unit, CPU), controller, microcontroller, microprocessor or other data processing chips.The processor 62 is commonly used in the control meter Calculate the overall operation of machine equipment 6.In the present embodiment, the processor 62 is for running the program generation stored in the memory 61 Code or processing data, such as run the program code of the configuration file management method.
The network interface 63 may include radio network interface or wired network interface, which is commonly used in Communication connection is established between the computer equipment 6 and other electronic equipments.
Present invention also provides another embodiments, that is, provide a kind of computer readable storage medium, the computer Readable storage medium storing program for executing is stored with configuration file program, and the configuration file program can be executed by least one processor, so that institute At least one processor is stated to execute such as the step of above-mentioned configuration file management method.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Based on this understanding, the technical solution of the application substantially in other words does the prior art The part contributed out can be embodied in the form of software products, which is stored in a storage medium In (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that a terminal device (can be mobile phone, computer, clothes Be engaged in device, air conditioner or the network equipment etc.) execute each embodiment of the application described in configuration file management method.
Obviously, embodiments described above is merely a part but not all of the embodiments of the present application, attached The preferred embodiment of the application is given in figure, but is not intended to limit the scope of the patents of the application.The application can be with many differences Form realize, on the contrary, purpose of providing these embodiments is keeps the understanding to disclosure of this application more thorough Comprehensively.Although the application is described in detail with reference to the foregoing embodiments, for coming for those skilled in the art, Can still modify to technical solution documented by aforementioned each specific embodiment, or to part of technical characteristic into Row equivalence replacement.All equivalent structures done using present specification and accompanying drawing content, are directly or indirectly used in other Relevant technical field, similarly within the application scope of patent protection.

Claims (10)

1. a kind of configuration file management method, which is characterized in that include the following steps:
Profile information is added to management library by the configuration file in reading program;
The process instruction to the configuration file is received, the process instruction includes the file information and operational order, wherein described The file information is used to determine the processing routine of the configuration file for specified configuration file to be operated, the operational order;
According to the operational order and the file information, the specified configuration file to be operated is carried out in the management library Operation;
The configuration file is updated simultaneously in the management library and described program based on operating result.
2. configuration file management method according to claim 1, which is characterized in that the operational order include operation code and Operand, the file information include the element address to operative configuration file, described to be believed according to the operational order and file The step of ceasing, operating in the management library to the specified configuration file to be operated includes the following steps:
The information of the configuration file is read according to the element address to operative configuration file;
The processing routine to the configuration file is obtained according to the operation code;
Based on the information of the read configuration file, obtained according to the operand data for handling the configuration file and Element address where the data;
The configuration file is modified based on the element address where the processing routine and the data and the data.
3. configuration file management method according to claim 2, which is characterized in that described to be based on the processing routine and institute Stating the step of configuration file is modified in the element address where data and the data includes:
According to the processing routine, the data in the data and/or the modification element address are written in the element address.
4. configuration file management method according to claim 2, which is characterized in that the operational order further includes to described The instruction that the content of configuration file is modified and/or the instruction to configuration file progress file operation;It is described described The step of operating in management library to the specified configuration file to be operated includes the following steps;
Operation is modified to the content of the specified configuration file to be operated in the management library and/or is matched to described It sets file and carries out file operation.
5. configuration file management method according to claim 4, which is characterized in that it is described in the management library to specified The configuration file to be operated content be modified operation and/or to the configuration file carry out file operation the step of Include the following steps:
When the content to configuration file is modified operation, operational order is parsed into corresponding read operation and write operation;
Read operation and write operation after judgement parsing whether there is dependence;
When there are dependence, is first carried out according to content of the dependence to the configuration file and write by what read operation was relied on Then operation executes read operation according to configuration when executing write operation.
6. configuration file management method according to claim 5, which is characterized in that described to be matched according to dependence to described It, will be in the data write-in caching and database of write operation when setting the content of file and first carrying out the write operation relied on by read operation.
7. configuration file management method according to claim 4, which is characterized in that it is described in the management library to specified The configuration file to be operated content be modified operation and/or to the configuration file carry out file operation the step of Include the following steps:
When the content to configuration file is modified operation, the change information of the configuration file each time is recorded;
One is generated based on change information each time and carries the old version file of modification time, and is stored in the management In library, so as to the subsequent configuration file for restoring one of old version.
8. a kind of configuration file management device characterized by comprising
Profile information is added to management library for the configuration file in reading program by read module;
Command reception module, for receiving the process instruction to the configuration file, the process instruction include the file information and Operational order, wherein the file information is for specified configuration file to be operated, the operational order is for determining described match Set the processing routine of file;
Operation module is used for according to the operational order and the file information, to specified institute to be operated in the management library Configuration file is stated to be operated;
Update module, for updating the configuration file simultaneously in the management library and described program based on operating result.
9. a kind of computer equipment, which is characterized in that including memory and processor, computer journey is stored in the memory Sequence, the processor realize the configuration file management as described in any one of claims 1 to 7 when executing the computer program The step of method.
10. a kind of computer readable storage medium, which is characterized in that be stored with computer on the computer readable storage medium Program realizes the configuration file management as described in any one of claims 1 to 7 when the computer program is executed by processor The step of method.
CN201910328461.4A 2019-04-23 2019-04-23 Configuration file management method, apparatus, computer equipment and storage medium Pending CN110196725A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910328461.4A CN110196725A (en) 2019-04-23 2019-04-23 Configuration file management method, apparatus, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910328461.4A CN110196725A (en) 2019-04-23 2019-04-23 Configuration file management method, apparatus, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN110196725A true CN110196725A (en) 2019-09-03

Family

ID=67751930

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910328461.4A Pending CN110196725A (en) 2019-04-23 2019-04-23 Configuration file management method, apparatus, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110196725A (en)

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110543627A (en) * 2019-09-10 2019-12-06 北京搜狐新媒体信息技术有限公司 Method and system for storing report configuration information
CN110618791A (en) * 2019-09-10 2019-12-27 北京浪潮数据技术有限公司 CFS storage domain configuration method, device, equipment and readable storage medium
CN110764835A (en) * 2019-09-18 2020-02-07 平安科技(深圳)有限公司 File configuration method and device of application environment, computer equipment and storage medium
CN111008006A (en) * 2019-10-18 2020-04-14 宇龙计算机通信科技(深圳)有限公司 RFC file modification method and device, storage medium and terminal
CN111142903A (en) * 2019-12-23 2020-05-12 杭州安恒信息技术股份有限公司 Configuration file interactive updating method and device based on file comparison
CN111159148A (en) * 2019-12-11 2020-05-15 北京达佳互联信息技术有限公司 Configuration information state management method and device, electronic equipment and storage medium
CN111897782A (en) * 2020-08-19 2020-11-06 百度时代网络技术(北京)有限公司 File control method, device, equipment and storage medium
CN112306563A (en) * 2020-11-03 2021-02-02 深圳软牛科技有限公司 Method, device, equipment and storage medium for resetting IOS screen use time password
CN112667261A (en) * 2020-12-30 2021-04-16 深圳市九洲电器有限公司 Method and device for updating shortcut key function, network terminal equipment and server
CN112765102A (en) * 2021-01-26 2021-05-07 建信金融科技有限责任公司 File system management method and device
CN112948020A (en) * 2021-03-18 2021-06-11 海南视联通信技术有限公司 Configuration file processing method and device
CN113079269A (en) * 2021-03-17 2021-07-06 杭州思看科技有限公司 Three-dimensional scanning system, method, electronic device, and storage medium
CN113342395A (en) * 2021-06-04 2021-09-03 中国工商银行股份有限公司 Dependency package management method and device
CN113438095A (en) * 2020-03-23 2021-09-24 华为技术有限公司 Method, device and equipment for managing configuration data and storage medium
CN113822002A (en) * 2021-08-31 2021-12-21 上海商汤阡誓科技有限公司 Data processing method and device, computer equipment and storage medium
CN114237171A (en) * 2021-11-25 2022-03-25 上海繁易信息科技股份有限公司 Edge and cloud fused industrial automatic maintenance method and system
CN114661372A (en) * 2022-03-03 2022-06-24 北京达佳互联信息技术有限公司 Configuration information processing method and device and server
CN115098126A (en) * 2022-06-06 2022-09-23 北京结慧科技有限公司 Configuration file management method, system, computer equipment and program product

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160350097A1 (en) * 2015-06-01 2016-12-01 Wipro Limited Method for updating firmware and configuration file and a firmware-configuration file management system therefor
CN106326411A (en) * 2016-08-23 2017-01-11 北京奇艺世纪科技有限公司 Configuration change method and device
CN107506218A (en) * 2017-09-14 2017-12-22 北京京东尚科信息技术有限公司 The management method and management system of a kind of configuration file
CN108920938A (en) * 2018-06-26 2018-11-30 南通森雅商务服务有限公司 A kind of method and device for managing function privilege concentratedly
CN109460358A (en) * 2018-10-22 2019-03-12 杭州电魂网络科技股份有限公司 Configuring management method and system based on Cmdb
CN109542865A (en) * 2018-12-03 2019-03-29 郑州云海信息技术有限公司 Distributed cluster system configuration file synchronous method, device, system and medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160350097A1 (en) * 2015-06-01 2016-12-01 Wipro Limited Method for updating firmware and configuration file and a firmware-configuration file management system therefor
CN106326411A (en) * 2016-08-23 2017-01-11 北京奇艺世纪科技有限公司 Configuration change method and device
CN107506218A (en) * 2017-09-14 2017-12-22 北京京东尚科信息技术有限公司 The management method and management system of a kind of configuration file
CN108920938A (en) * 2018-06-26 2018-11-30 南通森雅商务服务有限公司 A kind of method and device for managing function privilege concentratedly
CN109460358A (en) * 2018-10-22 2019-03-12 杭州电魂网络科技股份有限公司 Configuring management method and system based on Cmdb
CN109542865A (en) * 2018-12-03 2019-03-29 郑州云海信息技术有限公司 Distributed cluster system configuration file synchronous method, device, system and medium

Cited By (29)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110543627A (en) * 2019-09-10 2019-12-06 北京搜狐新媒体信息技术有限公司 Method and system for storing report configuration information
CN110618791A (en) * 2019-09-10 2019-12-27 北京浪潮数据技术有限公司 CFS storage domain configuration method, device, equipment and readable storage medium
CN110543627B (en) * 2019-09-10 2023-08-11 北京搜狐新媒体信息技术有限公司 Report configuration information storage method and system
CN110618791B (en) * 2019-09-10 2022-03-22 北京浪潮数据技术有限公司 CFS storage domain configuration method, device, equipment and readable storage medium
CN110764835A (en) * 2019-09-18 2020-02-07 平安科技(深圳)有限公司 File configuration method and device of application environment, computer equipment and storage medium
CN110764835B (en) * 2019-09-18 2024-01-26 平安科技(深圳)有限公司 File configuration method and device for application environment, computer equipment and storage medium
CN111008006A (en) * 2019-10-18 2020-04-14 宇龙计算机通信科技(深圳)有限公司 RFC file modification method and device, storage medium and terminal
CN111159148A (en) * 2019-12-11 2020-05-15 北京达佳互联信息技术有限公司 Configuration information state management method and device, electronic equipment and storage medium
CN111159148B (en) * 2019-12-11 2024-04-30 北京达佳互联信息技术有限公司 Configuration information state management method and device, electronic equipment and storage medium
CN111142903A (en) * 2019-12-23 2020-05-12 杭州安恒信息技术股份有限公司 Configuration file interactive updating method and device based on file comparison
CN111142903B (en) * 2019-12-23 2023-09-22 杭州安恒信息技术股份有限公司 Configuration file interactive updating method and device based on file comparison
WO2021189895A1 (en) * 2020-03-23 2021-09-30 华为技术有限公司 Configuration data management method, apparatus and device, and storage medium
CN113438095A (en) * 2020-03-23 2021-09-24 华为技术有限公司 Method, device and equipment for managing configuration data and storage medium
CN111897782A (en) * 2020-08-19 2020-11-06 百度时代网络技术(北京)有限公司 File control method, device, equipment and storage medium
CN111897782B (en) * 2020-08-19 2024-04-26 百度时代网络技术(北京)有限公司 File control method, device, equipment and storage medium
CN112306563A (en) * 2020-11-03 2021-02-02 深圳软牛科技有限公司 Method, device, equipment and storage medium for resetting IOS screen use time password
CN112306563B (en) * 2020-11-03 2023-11-17 深圳软牛科技有限公司 Method, device, equipment and storage medium for resetting IOS screen using time password
CN112667261A (en) * 2020-12-30 2021-04-16 深圳市九洲电器有限公司 Method and device for updating shortcut key function, network terminal equipment and server
CN112765102B (en) * 2021-01-26 2022-11-15 建信金融科技有限责任公司 File system management method and device
CN112765102A (en) * 2021-01-26 2021-05-07 建信金融科技有限责任公司 File system management method and device
CN113079269B (en) * 2021-03-17 2024-01-02 思看科技(杭州)股份有限公司 Three-dimensional scanning system, method, electronic device and storage medium
CN113079269A (en) * 2021-03-17 2021-07-06 杭州思看科技有限公司 Three-dimensional scanning system, method, electronic device, and storage medium
CN112948020A (en) * 2021-03-18 2021-06-11 海南视联通信技术有限公司 Configuration file processing method and device
CN113342395A (en) * 2021-06-04 2021-09-03 中国工商银行股份有限公司 Dependency package management method and device
CN113822002B (en) * 2021-08-31 2024-03-26 上海商汤阡誓科技有限公司 Data processing method, device, computer equipment and storage medium
CN113822002A (en) * 2021-08-31 2021-12-21 上海商汤阡誓科技有限公司 Data processing method and device, computer equipment and storage medium
CN114237171A (en) * 2021-11-25 2022-03-25 上海繁易信息科技股份有限公司 Edge and cloud fused industrial automatic maintenance method and system
CN114661372A (en) * 2022-03-03 2022-06-24 北京达佳互联信息技术有限公司 Configuration information processing method and device and server
CN115098126A (en) * 2022-06-06 2022-09-23 北京结慧科技有限公司 Configuration file management method, system, computer equipment and program product

Similar Documents

Publication Publication Date Title
CN110196725A (en) Configuration file management method, apparatus, computer equipment and storage medium
CN102667772B (en) File level hierarchical storage management system, method, and apparatus
CN105335253B (en) The method and apparatus for creating virtual machine system disk snapshot
US10740093B2 (en) Advanced packaging techniques for improving work flows
CN109086071A (en) A kind of method and server of management software version information
US6857000B2 (en) Object-oriented data storage and retrieval system using index table
CN101563671B (en) Bridging human machine interface technologies in process automation and information management environment
CN104298478B (en) The deduction acted based on filename to thesaurus
CN102754104B (en) The system and method for shared computation operating result between associated computing system
CA2831381C (en) Recovery of tenant data across tenant moves
CN101826029B (en) Methods and systems for merging virtualization sublayers
CN100530184C (en) Method and device of graphical display of hierarchical hardlinks to files in a file system
CN100514331C (en) Method of converting a filesystem while the filesystem remains in an active state
US20060101092A1 (en) Computer system and method for managing file versions
CN101308505A (en) Dynamic data access in a computer system via remote services
CN109863474A (en) Update migratory system and method
CN103975312A (en) Local storage linked to networked storage system
US11144292B2 (en) Packaging support system and packaging support method
CN102289513A (en) Method and system for obtaining internal files of virtual machine
CN100424702C (en) Method and apparatus for finding lost objects in a file system having a namespace
CN112947992B (en) Code version management method and device
CN103309696B (en) Method and device for updating Java card extended library, and Java card
CN110119386A (en) Data processing method, data processing equipment, medium and calculating equipment
CN103389909B (en) Rendering farm node virtualization deployment system and application thereof
CN114816470A (en) Metadata database management method and device, electronic equipment and medium

Legal Events

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