CN109634682A - The configuration file update method and device of application program - Google Patents

The configuration file update method and device of application program Download PDF

Info

Publication number
CN109634682A
CN109634682A CN201811440786.3A CN201811440786A CN109634682A CN 109634682 A CN109634682 A CN 109634682A CN 201811440786 A CN201811440786 A CN 201811440786A CN 109634682 A CN109634682 A CN 109634682A
Authority
CN
China
Prior art keywords
configuration
updated
node
file
item
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.)
Granted
Application number
CN201811440786.3A
Other languages
Chinese (zh)
Other versions
CN109634682B (en
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.)
Hundsun Technologies Inc
Original Assignee
Hundsun Technologies Inc
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 Hundsun Technologies Inc filed Critical Hundsun Technologies Inc
Priority to CN201811440786.3A priority Critical patent/CN109634682B/en
Publication of CN109634682A publication Critical patent/CN109634682A/en
Application granted granted Critical
Publication of CN109634682B publication Critical patent/CN109634682B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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
    • G06F9/4451User profiles; Roaming
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Abstract

The invention discloses the configuration file update methods and device of a kind of application program, when needing the configuration file to application program to update, the corresponding value of all configuration items to be updated for determining that preset in the deployment package of application program configuration parameter describes that document goes out, to each configuration node to be updated, the value for the target configuration item that target configuration node corresponding in original configuration file is included is updated to each configuration item and describes in configuration parameter value in file;After all corresponding values of configuration item to be updated are updated in original configuration file, updated configuration file is generated, so that application program is started using updated configuration file.Pass through the above method and device, so that engineering staff in disposing application program, only need to provide call parameter configuration information in appointed position, automatically updating to the configuration file of application program can be realized, a possibility that reducing artificial modification error, ensure that application program operates normally.

Description

The configuration file update method and device of application program
Technical field
The present invention relates to technical field of data processing, more specifically, it relates to a kind of configuration files of application program more New method and device.
Background technique
Include configuration file in application issued packet, the configuration for application program operation is stored in the configuration file Information, in these configuration informations, some configuration information is related with the actual deployment environment of application program, in application deployment journey When sequence, needing to be adjusted this part configuration information according to actual deployment environment just can be such that application program correctly runs.
Currently, above-mentioned configuration information is mostly adjusted by engineering staff according to actual deployment environment manually in disposing application program It is whole, and easily there is the situation that adjustment is wrong or adjustment information is not complete in the mode manually adjusted, and application program operation is caused to occur It is abnormal.
Summary of the invention
In view of the above problems, it proposes on the present invention overcomes the above problem or at least be partially solved in order to provide one kind State the configuration file update method and device of the application program of problem.Concrete scheme is as follows:
A kind of configuration file update method of application program, which comprises
Configuration parameter is obtained from the deployment catalogue of application program and describes file, and it includes extremely that the configuration parameter, which describes file, The configuration item to be updated that a few configuration node to be updated and each configuration node to be updated are included;
Determine the corresponding value of all configuration items to be updated;
To each configuration node to be updated, the determining and configuration node pair to be updated from original configuration file The target configuration node answered, and the value for the target configuration item that the target configuration node is included is updated to described to be updated The corresponding value of configuration item to be updated that configuration node is included;
After all corresponding values of configuration item to be updated are updated in the original configuration file, generate and update Configuration file afterwards, so that the application program is started using the updated configuration file.
Optionally, the method also includes:
Original configuration file is obtained from the deployment catalogue of application program;
Back up the original configuration file.
Optionally, the corresponding value of all configuration items to be updated of the determination, comprising:
To be updated match is obtained from any one or more positions in environmental variance, application configuration file and configuration center Set the corresponding value of item;
And/or the default value that configuration item to be updated is determined in file is described from the configuration parameter.
Optionally, after the corresponding value of all configuration items to be updated of the determination, the method also includes:
According to the information for the configuration item to be updated that the configuration node to be updated is included, needed described The corresponding value of the configuration item of update carries out classification merging, obtains the configuration item to be updated that each configuration node to be updated includes Value set.
Optionally, described that target configuration section corresponding with the configuration node to be updated is determined from original configuration file Point, comprising:
Traverse the configuration node in original configuration file;
If in the configuration node in the original configuration file including match corresponding with the configuration node to be updated Set node, it is determined that the configuration node is target configuration node corresponding with the configuration node to be updated;
If not including corresponding with the configuration node to be updated in the configuration node in the original configuration file Configuration node then creates configuration node corresponding with the configuration node to be updated in the original configuration file, and really Surely the configuration node created is target configuration node corresponding with the configuration node to be updated.
A kind of configuration file updating device of application program, described device include:
Acquiring unit describes file, the configuration parameter for obtaining configuration parameter from the deployment catalogue of application program Describe that file includes at least one configuration node to be updated and that each configuration node to be updated is included is to be updated Configuration item;
Determination unit, for determining the corresponding value of all configuration items to be updated;
Updating unit, for being determined from original configuration file and described to more to each configuration node to be updated The corresponding target configuration node of new configuration node, and the value for the target configuration item for being included by the target configuration node updates The corresponding value of configuration item to be updated for including by the configuration node to be updated;
Generation unit, for being updated in the original configuration file in all corresponding values of configuration item to be updated After, updated configuration file is generated, so that the application program is started using the updated configuration file.
Optionally, described device further include:
Backup units, for obtaining original configuration file from the deployment catalogue of application program;Back up the original configuration File.
Optionally, the determination unit is specifically used for:
To be updated match is obtained from any one or more positions in environmental variance, application configuration file and configuration center Set the corresponding value of item;
And/or the default value that configuration item to be updated is determined in file is described from the configuration parameter.
Optionally, described device further include:
Classify combining unit, for after the corresponding value of all configuration items to be updated of the determination, according to described to more The information for the configuration item to be updated that new configuration node is included, by the corresponding value of all configuration items to be updated Classification merging is carried out, the set of the value for the configuration item to be updated that each configuration node to be updated includes is obtained.
Optionally, the updating unit is specifically used for:
Traverse the configuration node in original configuration file;
If in the configuration node in the original configuration file including match corresponding with the configuration node to be updated Set node, it is determined that the configuration node is target configuration node corresponding with the configuration node to be updated;
If not including corresponding with the configuration node to be updated in the configuration node in the original configuration file Configuration node then creates configuration node corresponding with the configuration node to be updated in the original configuration file, and really Surely the configuration node created is target configuration node corresponding with the configuration node to be updated.
A kind of storage medium, the storage medium are stored with program, to realize the configuration text of application program as described above The step of part update method.
A kind of electronic equipment, comprising: memory and processor;The memory is stored with suitable for processor execution The step of program, configuration file update method to realize application program as described above.
By above-mentioned technical proposal, the configuration file update method and device of application program provided by the invention are being applied Preset configuration parameter describes file in the deployment package of program, when needing the configuration file to application program to update, determines configuration Parameter describes the corresponding value of all configuration items to be updated that document goes out, and to each configuration node to be updated, from original Determine corresponding with the configuration node to be updated target configuration node in beginning configuration file, and by the target configuration node It is corresponding that the value for the target configuration item for being included is updated to the configuration item to be updated that the configuration node to be updated is included Value;After all corresponding values of configuration item to be updated are updated in the original configuration file, generate updated Configuration file, so that the application program is started using the updated configuration file.By the above method and device, So that engineering staff in disposing application program, only need to provide call parameter configuration information in appointed position, correspondence can be realized With a possibility that the automatically updating, reduce artificial modification error of configuration file of program, it ensure that application program operates normally.
The above description is only an overview of the technical scheme of the present invention, in order to better understand the technical means of the present invention, And it can be implemented in accordance with the contents of the specification, and in order to allow above and other objects of the present invention, feature and advantage can It is clearer and more comprehensible, the followings are specific embodiments of the present invention.
Detailed description of the invention
By reading the following detailed description of the preferred embodiment, various other advantages and benefits are common for this field Technical staff will become clear.The drawings are only for the purpose of illustrating a preferred embodiment,
+ and be not to be construed as limiting the invention.And throughout the drawings, it is denoted by the same reference numerals identical Component.In the accompanying drawings:
Fig. 1 is a kind of flow diagram of the configuration file update method of application program disclosed by the embodiments of the present invention;
Fig. 2 is a kind of structural schematic diagram of the configuration file updating device of application program disclosed by the embodiments of the present invention.
Specific embodiment
Exemplary embodiments of the present disclosure are described in more detail below with reference to accompanying drawings.Although showing the disclosure in attached drawing Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure without should be by embodiments set forth here It is limited.On the contrary, these embodiments are provided to facilitate a more thoroughly understanding of the present invention, and can be by the scope of the present disclosure It is fully disclosed to those skilled in the art.
Attached drawing 1 is please referred to, Fig. 1 is a kind of stream of the configuration file update method of application program disclosed by the embodiments of the present invention Journey schematic diagram, the configuration file of application program are XML (Extentsible Markup Language, extensible markup language) File, this method comprises:
Step S100: configuration parameter is obtained from the deployment catalogue of application program and describes file, the configuration parameter description File, which includes at least one configuration node to be updated, and each configuration node to be updated is included to be updated matches Set item;
In a kind of embodiment, it is properties format that configuration parameter, which describes file,.
In a kind of embodiment, at least one described configuration node to be updated includes common configuration node and in groups Two class of configuration node, wherein common configuration node is configuration node with uniqueness, and configuration node is to match comprising multiple in groups Set the configuration node of item.
Described in file in configuration parameter, the title of configuration node by prefix, node type and node logical title this three Part forms, and decimally point () is distinguished between three parts, and specific example is as follows:
Common configuration node example:
Ares.node.bus_ar=//parent [@parentName] [1]
Configuration node example in groups:
Ares.groups.bus_ar=//parent [@parentName] [1]/members, 0,1
Wherein, prefix (" ares " in above-mentioned example) is saved for identifying parameter processing module belonging to the configuration node Vertex type is common configuration node (being indicated in above-mentioned example with node) or configuration node (uses groups table in groups in above-mentioned example Show), the entitled character string of node logical is defined as facilitating the title of user's identification being of practical significance (in such as above-mentioned example " bus_ar " shown).The value of common configuration node be XPath expression formula (in such as above-mentioned example " //parent [ ParentName] [1] "), for positioning the configuration node in application program original configuration file, in groups the value of configuration node by One XPath expression formula (" //parent [parentName] [1] " in such as above-mentioned example) and several logical names are (such as In above-mentioned example " members, 0,1 ") it forms, logical name is used to identify multiple configuration items that configuration node in groups includes, Separated between two logical names with English comma.
It is described in file in configuration parameter, the title of configuration item is made of prefix and several sub- Property Names, is specifically shown Under such as:
The configuration item example of common configuration node:
Ares.node.bus_ar.poolSize=
Ares.node.bus_ar.limit.licenseFile=
The configuration item example of configuration node in groups:
Ares.groups.bus_ar.0.member.no=
Ares.groups.bus_ar.0.member.address=
Ares.groups.bus_ar.0.member.port=
Ares.groups.bus_ar.1.member.no=
Text attribute example:
Ares.groups.eventchains.a.chain.text ()=
Ares.groups.eventchains.b.chain.text ()=
Wherein, prefix (" ares.node.bus_ar " and " ares.groups.bus_ar " in such as above-mentioned example) is to be somebody's turn to do The title of configuration node belonging to configuration item.The configuration item of configuration node is (in such as above-mentioned example in groups " ares.groups.bus_ar.0.member.no ") several sub- Property Names (0.member.no) in, first son belongs to Property title " 0 " be configuration node in groups a logical name, sub- Property Name " member " later is for identifying sub- configuration Node, last sub- Property Name " no " are used to identify the title of an attribute of sub- configuration node.Such as fruit configuration node One attribute is text attribute, then indicates sub- Property Name with " text () ".
Step S110: the corresponding value of all configuration items to be updated is determined;
In a kind of embodiment, can from any one in environmental variance, application configuration file and configuration center or The corresponding value of multiple all configuration items to be updated of position acquisition.The multiple of the same configuration item may be obtained from predeterminated position Value, at this point, the value of highest priority can be finally taken according to the priority of the multiple values got, in a kind of embodiment, Priority is determined that more rearward, the priority of value is higher for acquisition time point by acquisition time point.The deployment scenario of application program is not Together, predeterminated position also can be different, specifically, determine predeterminated position in combination with the deployment scenario of application program, obtain from predeterminated position Take the corresponding value of all configuration items to be updated.
The corresponding value of all configuration items to be updated may not be all from environmental variance, application configuration file and configuration center In any one or more positions in get, in a kind of embodiment, for can not be from environmental variance, application configuration The configuration item to be updated got in any one or more positions in file and configuration center can describe text from configuration parameter The default value of these configuration items to be updated is determined in part.Default value exists for empty situation.
Step S120: determining and described to be updated from original configuration file to each configuration node to be updated The corresponding target configuration node of configuration node, and the value for the target configuration item that the target configuration node is included is updated to institute State the corresponding value of configuration item to be updated that configuration node to be updated is included;
In a kind of embodiment, mesh corresponding with the configuration node to be updated is determined from original configuration file Mark configuration node can be accomplished in that
Traverse the configuration node in original configuration file;
If in the configuration node in the original configuration file including match corresponding with the configuration node to be updated Set node, it is determined that the configuration node is target configuration node corresponding with the configuration node to be updated;
If not including corresponding with the configuration node to be updated in the configuration node in the original configuration file Configuration node then creates configuration node corresponding with the configuration node to be updated in the original configuration file, and really Surely the configuration node created is target configuration node corresponding with the configuration node to be updated.
Step S130: all corresponding values of configuration item to be updated be updated in the original configuration file with Afterwards, updated configuration file is generated, so that the application program is started using the updated configuration file.
The configuration file update method of application program disclosed by the embodiments of the present invention is preset in the deployment package of application program Configuration parameter describes file, when needing the configuration file to application program to update, determines that configuration parameter describes document and goes out The corresponding value of all configuration items to be updated, and to each configuration node to be updated, determined from original configuration file with The corresponding target configuration node of the configuration node to be updated, and the target configuration item for being included by the target configuration node Value be updated to the corresponding value of configuration item to be updated that the configuration node to be updated is included;All to be updated After the corresponding value of configuration item is updated in the original configuration file, updated configuration file is generated, so that described answer Started with program using the updated configuration file.By the above method, so that engineering staff is in application deployment journey When sequence, only need to provide call parameter configuration information in appointed position, can be realized to the configuration file of application program it is automatic more Newly, a possibility that reducing artificial modification error, ensure that application program operates normally.
In a preferred embodiment, in the configuration file update method using application program disclosed in above-described embodiment Before being updated to the original configuration file of application program, original configuration text can be also obtained from the deployment catalogue of application program Part;The original configuration file is backed up, to prevent the original configuration information of application program from losing.
In a preferred embodiment, after the corresponding value of all configuration items to be updated of the determination, the method Further include: according to the information for the configuration item to be updated that the configuration node to be updated is included, needed described The corresponding value of the configuration item of update carries out classification merging, obtains the configuration item to be updated that each configuration node to be updated includes Value set.The value that when classification merges, can remove the prefix of configuration item, and exclude configuration item is empty configuration item, to improve The renewal speed of the configuration file of application program.
Based on the above embodiment, the embodiment of the invention also discloses a kind of tools of the configuration file update method of application program Body example, specific as follows:
Original XML configuration file segment is as follows:
It is as follows that configuration parameter describes file fragment:
Allocated segments comprising the corresponding value of configuration item to be updated are as follows:
Finally obtained XML configuration file segment is as follows:
Attached drawing 2 is please referred to, Fig. 2 is a kind of knot of the configuration file updating device of application program disclosed by the embodiments of the present invention Structure schematic diagram, the device include:
Acquiring unit 20 describes file, the configuration ginseng for obtaining configuration parameter from the deployment catalogue of application program Number description files include at least one configuration node to be updated and each configuration node to be updated is included to more New configuration item;
Determination unit 21, for determining the corresponding value of all configuration items to be updated;
Updating unit 22, for each configuration node to be updated, from original configuration file it is determining with it is described to The corresponding target configuration node of the configuration node of update, and the value for the target configuration item for being included by the target configuration node is more The corresponding value of configuration item to be updated for newly including by the configuration node to be updated;
Generation unit 23, for being updated to the original configuration file in all corresponding values of configuration item to be updated In after, updated configuration file is generated, so that the application program is started using the updated configuration file.
Optionally, described device further include:
Backup units, for obtaining original configuration file from the deployment catalogue of application program;Back up the original configuration File.
Optionally, the determination unit is specifically used for:
To be updated match is obtained from any one or more positions in environmental variance, application configuration file and configuration center Set the corresponding value of item;
And/or the default value that configuration item to be updated is determined in file is described from the configuration parameter.
Optionally, described device further include:
Classify combining unit, for after the corresponding value of all configuration items to be updated of the determination, according to described to more The information for the configuration item to be updated that new configuration node is included, by the corresponding value of all configuration items to be updated Classification merging is carried out, the set of the value for the configuration item to be updated that each configuration node to be updated includes is obtained.
Optionally, the updating unit is specifically used for:
Traverse the configuration node in original configuration file;
If in the configuration node in the original configuration file including match corresponding with the configuration node to be updated Set node, it is determined that the configuration node is target configuration node corresponding with the configuration node to be updated;
If not including corresponding with the configuration node to be updated in the configuration node in the original configuration file Configuration node then creates configuration node corresponding with the configuration node to be updated in the original configuration file, and really Surely the configuration node created is target configuration node corresponding with the configuration node to be updated.
It should be noted that the concrete function realization of above-mentioned each unit is described in detail in embodiment of the method, this reality Example is applied to repeat no more.
The configuration file updating device of the application program includes processor and memory, and above-mentioned acquiring unit determines list Member, updating unit and generation unit etc. store in memory as program unit, are stored in memory by processor execution In above procedure unit realize corresponding function.
Include kernel in processor, is gone in memory to transfer corresponding program unit by kernel.Kernel can be set one Or more, realize that the configuration file of application program automatically updates by adjusting kernel parameter.
Memory may include the non-volatile memory in computer-readable medium, random access memory (RAM) and/ Or the forms such as Nonvolatile memory, if read-only memory (ROM) or flash memory (flash RAM), memory include that at least one is deposited Store up chip.
The embodiment of the invention provides a kind of storage mediums, are stored thereon with program, real when which is executed by processor The configuration file update method of the existing application program.
The embodiment of the invention provides a kind of processor, the processor is for running program, wherein described program operation The configuration file update method of application program described in Shi Zhihang.
The embodiment of the invention provides a kind of equipment, equipment include processor, memory and storage on a memory and can The program run on a processor, processor perform the steps of when executing program
Configuration parameter is obtained from the deployment catalogue of application program and describes file, and it includes extremely that the configuration parameter, which describes file, The configuration item to be updated that a few configuration node to be updated and each configuration node to be updated are included;
Determine the corresponding value of all configuration items to be updated;
To each configuration node to be updated, the determining and configuration node pair to be updated from original configuration file The target configuration node answered, and the value for the target configuration item that the target configuration node is included is updated to described to be updated The corresponding value of configuration item to be updated that configuration node is included;
After all corresponding values of configuration item to be updated are updated in the original configuration file, generate and update Configuration file afterwards, so that the application program is started using the updated configuration file.
Optionally, the method also includes:
Original configuration file is obtained from the deployment catalogue of application program;
Back up the original configuration file.
Optionally, the corresponding value of all configuration items to be updated of the determination, comprising:
To be updated match is obtained from any one or more positions in environmental variance, application configuration file and configuration center Set the corresponding value of item;
And/or the default value that configuration item to be updated is determined in file is described from the configuration parameter.
Optionally, after the corresponding value of all configuration items to be updated of the determination, the method also includes:
According to the information for the configuration item to be updated that the configuration node to be updated is included, needed described The corresponding value of the configuration item of update carries out classification merging, obtains the configuration item to be updated that each configuration node to be updated includes Value set.
Optionally, described that target configuration section corresponding with the configuration node to be updated is determined from original configuration file Point, comprising:
Traverse the configuration node in original configuration file;
If in the configuration node in the original configuration file including match corresponding with the configuration node to be updated Set node, it is determined that the configuration node is target configuration node corresponding with the configuration node to be updated;
If not including corresponding with the configuration node to be updated in the configuration node in the original configuration file Configuration node then creates configuration node corresponding with the configuration node to be updated in the original configuration file, and really Surely the configuration node created is target configuration node corresponding with the configuration node to be updated.
Equipment herein can be server, PC, PAD, mobile phone etc..
Present invention also provides a kind of computer program products, when executing on data processing equipment, are adapted for carrying out just The program of beginningization there are as below methods step:
Configuration parameter is obtained from the deployment catalogue of application program and describes file, and it includes extremely that the configuration parameter, which describes file, The configuration item to be updated that a few configuration node to be updated and each configuration node to be updated are included;
Determine the corresponding value of all configuration items to be updated;
To each configuration node to be updated, the determining and configuration node pair to be updated from original configuration file The target configuration node answered, and the value for the target configuration item that the target configuration node is included is updated to described to be updated The corresponding value of configuration item to be updated that configuration node is included;
After all corresponding values of configuration item to be updated are updated in the original configuration file, generate and update Configuration file afterwards, so that the application program is started using the updated configuration file.
Optionally, the method also includes:
Original configuration file is obtained from the deployment catalogue of application program;
Back up the original configuration file.
Optionally, the corresponding value of all configuration items to be updated of the determination, comprising:
To be updated match is obtained from any one or more positions in environmental variance, application configuration file and configuration center Set the corresponding value of item;
And/or the default value that configuration item to be updated is determined in file is described from the configuration parameter.
Optionally, after the corresponding value of all configuration items to be updated of the determination, the method also includes:
According to the information for the configuration item to be updated that the configuration node to be updated is included, needed described The corresponding value of the configuration item of update carries out classification merging, obtains the configuration item to be updated that each configuration node to be updated includes Value set.
Optionally, described that target configuration section corresponding with the configuration node to be updated is determined from original configuration file Point, comprising:
Traverse the configuration node in original configuration file;
If in the configuration node in the original configuration file including match corresponding with the configuration node to be updated Set node, it is determined that the configuration node is target configuration node corresponding with the configuration node to be updated;
If not including corresponding with the configuration node to be updated in the configuration node in the original configuration file Configuration node then creates configuration node corresponding with the configuration node to be updated in the original configuration file, and really Surely the configuration node created is target configuration node corresponding with the configuration node to be updated.
It should be understood by those skilled in the art that, embodiments herein can provide as method, system or computer program Product.Therefore, complete hardware embodiment, complete software embodiment or reality combining software and hardware aspects can be used in the application Apply the form of example.Moreover, it wherein includes the computer of computer usable program code that the application, which can be used in one or more, The computer program implemented in usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) produces The form of product.
The application is referring to method, the process of equipment (system) and computer program product according to the embodiment of the present application Figure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructions The combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programs Instruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real The device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates, Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one The step of function of being specified in a box or multiple boxes.
In a typical configuration, calculating equipment includes one or more processors (CPU), input/output interface, net Network interface and memory.
Memory may include the non-volatile memory in computer-readable medium, random access memory (RAM) and/ Or the forms such as Nonvolatile memory, such as read-only memory (ROM) or flash memory (flash RAM).Memory is computer-readable Jie The example of matter.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method Or technology come realize information store.Information can be computer readable instructions, data structure, the module of program or other data. The example of the storage medium of computer includes, but are not limited to phase change memory (PRAM), static random access memory (SRAM), moves State random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electric erasable Programmable read only memory (EEPROM), flash memory or other memory techniques, read-only disc read only memory (CD-ROM) (CD-ROM), Digital versatile disc (DVD) or other optical storage, magnetic cassettes, tape magnetic disk storage or other magnetic storage devices Or any other non-transmission medium, can be used for storage can be accessed by a computing device information.As defined in this article, it calculates Machine readable medium does not include temporary computer readable media (transitory media), such as the data-signal and carrier wave of modulation.
It should also be noted that, the terms "include", "comprise" or its any other variant are intended to nonexcludability It include so that the process, method, commodity or the equipment that include a series of elements not only include those elements, but also to wrap Include other elements that are not explicitly listed, or further include for this process, method, commodity or equipment intrinsic want Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including element There is also other identical elements in process, method, commodity or equipment.
It will be understood by those skilled in the art that embodiments herein can provide as method, system or computer program product. Therefore, complete hardware embodiment, complete software embodiment or embodiment combining software and hardware aspects can be used in the application Form.It is deposited moreover, the application can be used to can be used in the computer that one or more wherein includes computer usable program code The shape for the computer program product implemented on storage media (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) Formula.
The above is only embodiments herein, are not intended to limit this application.To those skilled in the art, Various changes and changes are possible in this application.It is all within the spirit and principles of the present application made by any modification, equivalent replacement, Improve etc., it should be included within the scope of the claims of this application.

Claims (10)

1. a kind of configuration file update method of application program, which is characterized in that the described method includes:
Configuration parameter is obtained from the deployment catalogue of application program and describes file, and it includes at least one that the configuration parameter, which describes file, The configuration item to be updated that a configuration node to be updated and each configuration node to be updated are included;
Determine the corresponding value of all configuration items to be updated;
To each configuration node to be updated, determination is corresponding with the configuration node to be updated from original configuration file Target configuration node, and the value for the target configuration item that the target configuration node is included is updated to the configuration to be updated The corresponding value of configuration item to be updated that node is included;
After all corresponding values of configuration item to be updated are updated in the original configuration file, generate updated Configuration file, so that the application program is started using the updated configuration file.
2. the method according to claim 1, wherein the method also includes:
Original configuration file is obtained from the deployment catalogue of application program;
Back up the original configuration file.
3. the method according to claim 1, wherein the corresponding value of all configuration items to be updated of the determination, packet It includes:
Configuration item to be updated is obtained from any one or more positions in environmental variance, application configuration file and configuration center Corresponding value;
And/or the default value that configuration item to be updated is determined in file is described from the configuration parameter.
4. the method according to claim 1, wherein in the corresponding value of all configuration items to be updated of the determination Afterwards, the method also includes:
It, will be described all to be updated according to the information for the configuration item to be updated that the configuration node to be updated is included The corresponding value of configuration item carry out classification merging, obtain the value for the configuration item to be updated that each configuration node to be updated includes Set.
5. the method according to claim 1, wherein it is described from original configuration file determine with it is described to be updated The corresponding target configuration node of configuration node, comprising:
Traverse the configuration node in original configuration file;
If in the configuration node in the original configuration file including configuration section corresponding with the configuration node to be updated Point, it is determined that the configuration node is target configuration node corresponding with the configuration node to be updated;
If in the configuration node in the original configuration file not including configuration corresponding with the configuration node to be updated Node then creates configuration node corresponding with the configuration node to be updated in the original configuration file, and determines wound The configuration node built is target configuration node corresponding with the configuration node to be updated.
6. a kind of configuration file updating device of application program, which is characterized in that described device includes:
Acquiring unit describes file, the configuration parameter description for obtaining configuration parameter from the deployment catalogue of application program File, which includes at least one configuration node to be updated, and each configuration node to be updated is included to be updated matches Set item;
Determination unit, for determining the corresponding value of all configuration items to be updated;
Updating unit, for being determined from original configuration file and described to be updated to each configuration node to be updated The corresponding target configuration node of configuration node, and the value for the target configuration item that the target configuration node is included is updated to institute State the corresponding value of configuration item to be updated that configuration node to be updated is included;
Generation unit, for all corresponding values of configuration item to be updated be updated in the original configuration file with Afterwards, updated configuration file is generated, so that the application program is started using the updated configuration file.
7. device according to claim 6, which is characterized in that described device further include:
Backup units, for obtaining original configuration file from the deployment catalogue of application program;Back up the original configuration file.
8. device according to claim 6, which is characterized in that the determination unit is specifically used for:
Configuration item to be updated is obtained from any one or more positions in environmental variance, application configuration file and configuration center Corresponding value;
And/or the default value that configuration item to be updated is determined in file is described from the configuration parameter.
9. a kind of storage medium, which is characterized in that the storage medium is stored with program, to realize any one of claim 1-5 The step of configuration file update method of the application program.
10. a kind of electronic equipment characterized by comprising memory and processor;The memory is stored with suitable for the place The program that device executes is managed, the step of configuration file update method to realize the described in any item application programs of claim 1-5.
CN201811440786.3A 2018-11-29 2018-11-29 Configuration file updating method and device for application program Active CN109634682B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811440786.3A CN109634682B (en) 2018-11-29 2018-11-29 Configuration file updating method and device for application program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811440786.3A CN109634682B (en) 2018-11-29 2018-11-29 Configuration file updating method and device for application program

Publications (2)

Publication Number Publication Date
CN109634682A true CN109634682A (en) 2019-04-16
CN109634682B CN109634682B (en) 2022-02-15

Family

ID=66069743

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811440786.3A Active CN109634682B (en) 2018-11-29 2018-11-29 Configuration file updating method and device for application program

Country Status (1)

Country Link
CN (1) CN109634682B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110727477A (en) * 2019-10-12 2020-01-24 上海陆家嘴国际金融资产交易市场股份有限公司 Component loading method and device, computer equipment and storage medium
CN110941460A (en) * 2019-11-22 2020-03-31 北京金山云网络技术有限公司 Application program starting method and device, electronic equipment, system and storage medium
CN111142903A (en) * 2019-12-23 2020-05-12 杭州安恒信息技术股份有限公司 Configuration file interactive updating method and device based on file comparison
CN112711540A (en) * 2021-01-11 2021-04-27 杭州萤石软件有限公司 Method, device, equipment and storage medium for synchronizing configuration items of application
CN112988220A (en) * 2021-03-17 2021-06-18 恒安嘉新(北京)科技股份公司 Application configuration updating method and device, storage medium and server
CN113515322A (en) * 2021-06-29 2021-10-19 平安养老保险股份有限公司 Application program loading method and device, computer equipment and readable storage medium

Citations (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102662705A (en) * 2012-03-31 2012-09-12 中国工商银行股份有限公司 System and method for upgrading system environment of computer cluster
US20130074112A1 (en) * 2011-09-16 2013-03-21 Elwha LLC, a limited liability company of the State of Delaware Secure electronic media for in-transit passenger usage
CN103117918A (en) * 2013-01-21 2013-05-22 苏州阔地网络科技有限公司 Automatic parameter configuration method and system using the same
CN103631623A (en) * 2013-11-29 2014-03-12 浪潮(北京)电子信息产业有限公司 Method and device for allocating application software in trunking system
CN103777987A (en) * 2014-01-26 2014-05-07 宝龙计算机系统(湖南)有限公司 Method and device for upgrading unix-like operating system
CN104158692A (en) * 2014-08-25 2014-11-19 烽火通信科技股份有限公司 Method of implementing configuration and management of data of home gateway based on XML (Extensible Markup Language)
CN104601377A (en) * 2015-01-13 2015-05-06 北京中交兴路车联网科技有限公司 Multi-node multi-web-server based management device
US20150256538A1 (en) * 2014-03-06 2015-09-10 Delta Networks, Inc. Network system and communication device therein
CN105607935A (en) * 2015-12-24 2016-05-25 北京奇虎科技有限公司 Application updating method and terminal and server
CN105871649A (en) * 2016-06-21 2016-08-17 上海帝联信息科技股份有限公司 Node server, service side and configuration file updating method thereof and updating control method
CN106357465A (en) * 2016-11-10 2017-01-25 合肥工业大学 Quick establishment method of easy-to-configure Internet of Things monitoring system
US20170048318A1 (en) * 2012-04-17 2017-02-16 Nimbix, Inc. System and method for managing heterogeneous data for cloud computing applications
CN106603281A (en) * 2016-12-07 2017-04-26 乐视控股(北京)有限公司 Configuration file management method and system
CN106873966A (en) * 2016-12-27 2017-06-20 北京五八信息技术有限公司 A kind of application development method and device
CN107330761A (en) * 2017-06-29 2017-11-07 北京三快在线科技有限公司 Method for providing service information and device and computing device based on geographical position
CN108037961A (en) * 2017-12-07 2018-05-15 北京锐安科技有限公司 A kind of application program collocation method, device, server and storage medium
CN108121559A (en) * 2017-12-29 2018-06-05 重庆金融资产交易所有限责任公司 Configuration file method for pushing, server and storage medium
CN108229112A (en) * 2016-12-22 2018-06-29 阿里巴巴集团控股有限公司 A kind of operation method and device for protecting application program, application program
CN108717360A (en) * 2018-08-24 2018-10-30 江苏神州信源系统工程有限公司 A kind of software version updating method and device
CN108762800A (en) * 2018-05-23 2018-11-06 北京五八信息技术有限公司 The dynamic updating method and device of application program

Patent Citations (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130074112A1 (en) * 2011-09-16 2013-03-21 Elwha LLC, a limited liability company of the State of Delaware Secure electronic media for in-transit passenger usage
CN102662705A (en) * 2012-03-31 2012-09-12 中国工商银行股份有限公司 System and method for upgrading system environment of computer cluster
US20170048318A1 (en) * 2012-04-17 2017-02-16 Nimbix, Inc. System and method for managing heterogeneous data for cloud computing applications
CN103117918A (en) * 2013-01-21 2013-05-22 苏州阔地网络科技有限公司 Automatic parameter configuration method and system using the same
CN103631623A (en) * 2013-11-29 2014-03-12 浪潮(北京)电子信息产业有限公司 Method and device for allocating application software in trunking system
CN103777987A (en) * 2014-01-26 2014-05-07 宝龙计算机系统(湖南)有限公司 Method and device for upgrading unix-like operating system
US20150256538A1 (en) * 2014-03-06 2015-09-10 Delta Networks, Inc. Network system and communication device therein
CN104158692A (en) * 2014-08-25 2014-11-19 烽火通信科技股份有限公司 Method of implementing configuration and management of data of home gateway based on XML (Extensible Markup Language)
CN104601377A (en) * 2015-01-13 2015-05-06 北京中交兴路车联网科技有限公司 Multi-node multi-web-server based management device
CN105607935A (en) * 2015-12-24 2016-05-25 北京奇虎科技有限公司 Application updating method and terminal and server
CN105871649A (en) * 2016-06-21 2016-08-17 上海帝联信息科技股份有限公司 Node server, service side and configuration file updating method thereof and updating control method
CN106357465A (en) * 2016-11-10 2017-01-25 合肥工业大学 Quick establishment method of easy-to-configure Internet of Things monitoring system
CN106603281A (en) * 2016-12-07 2017-04-26 乐视控股(北京)有限公司 Configuration file management method and system
CN108229112A (en) * 2016-12-22 2018-06-29 阿里巴巴集团控股有限公司 A kind of operation method and device for protecting application program, application program
CN106873966A (en) * 2016-12-27 2017-06-20 北京五八信息技术有限公司 A kind of application development method and device
CN107330761A (en) * 2017-06-29 2017-11-07 北京三快在线科技有限公司 Method for providing service information and device and computing device based on geographical position
CN108037961A (en) * 2017-12-07 2018-05-15 北京锐安科技有限公司 A kind of application program collocation method, device, server and storage medium
CN108121559A (en) * 2017-12-29 2018-06-05 重庆金融资产交易所有限责任公司 Configuration file method for pushing, server and storage medium
CN108762800A (en) * 2018-05-23 2018-11-06 北京五八信息技术有限公司 The dynamic updating method and device of application program
CN108717360A (en) * 2018-08-24 2018-10-30 江苏神州信源系统工程有限公司 A kind of software version updating method and device

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110727477A (en) * 2019-10-12 2020-01-24 上海陆家嘴国际金融资产交易市场股份有限公司 Component loading method and device, computer equipment and storage medium
CN110941460A (en) * 2019-11-22 2020-03-31 北京金山云网络技术有限公司 Application program starting method and device, electronic equipment, system and storage medium
CN110941460B (en) * 2019-11-22 2023-09-01 北京金山云网络技术有限公司 Application program starting method and device, electronic equipment, system 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
CN112711540A (en) * 2021-01-11 2021-04-27 杭州萤石软件有限公司 Method, device, equipment and storage medium for synchronizing configuration items of application
CN112988220A (en) * 2021-03-17 2021-06-18 恒安嘉新(北京)科技股份公司 Application configuration updating method and device, storage medium and server
CN113515322A (en) * 2021-06-29 2021-10-19 平安养老保险股份有限公司 Application program loading method and device, computer equipment and readable storage medium
CN113515322B (en) * 2021-06-29 2022-11-01 平安养老保险股份有限公司 Application program loading method and device, computer equipment and readable storage medium

Also Published As

Publication number Publication date
CN109634682B (en) 2022-02-15

Similar Documents

Publication Publication Date Title
CN109634682A (en) The configuration file update method and device of application program
US9785417B2 (en) Managing reusable artifacts using placeholders
US9778926B2 (en) Minimizing image copying during partition updates
CN110058856A (en) Page configuration method and device
CN109784058A (en) Version strong consistency method of calibration, client, server and storage medium
CN106897342B (en) Data verification method and equipment
CN104298588A (en) Continuous integration implementation method and device
CN106201861A (en) The detection method of a kind of code quality and device
CN106528071B (en) The choosing method and device of object code
CN106325826A (en) Configuration file detection method and apparatus
CN109857516A (en) Cluster moving method and device based on container
CN106878365B (en) data synchronization method and device
US20130290301A1 (en) Efficient file path indexing for a content repository
CN111984666A (en) Database access method and device, computer readable storage medium and computer equipment
CN109471901B (en) Data synchronization method and device
CN107861751A (en) The amending method and device of configuration file
CN109388644A (en) A kind of data-updating method and device
CN111131474A (en) Method, device and medium for managing user protocol based on block chain
CN109582384A (en) The update method and device of configuration information
CN113608831B (en) Plug-in instance management method, system, storage medium and equipment
CN109086362A (en) The management method of multimode project
CN109101514A (en) Data lead-in method and device
CN110019508A (en) A kind of method of data synchronization, apparatus and system
CN110968888B (en) Data processing method and device
CN109299125A (en) Database update method and device

Legal Events

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