CN109766121A - Environment profile generation method, device, computer equipment and storage medium - Google Patents
Environment profile generation method, device, computer equipment and storage medium Download PDFInfo
- Publication number
- CN109766121A CN109766121A CN201811560866.2A CN201811560866A CN109766121A CN 109766121 A CN109766121 A CN 109766121A CN 201811560866 A CN201811560866 A CN 201811560866A CN 109766121 A CN109766121 A CN 109766121A
- Authority
- CN
- China
- Prior art keywords
- information
- environment
- configuration file
- modified
- file
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 50
- 230000007613 environmental effect Effects 0.000 claims abstract description 86
- 238000004590 computer program Methods 0.000 claims description 31
- 238000013524 data verification Methods 0.000 claims description 16
- 238000000605 extraction Methods 0.000 claims description 6
- 230000015572 biosynthetic process Effects 0.000 abstract description 18
- 230000008569 process Effects 0.000 abstract description 16
- 238000012986 modification Methods 0.000 description 9
- 230000004048 modification Effects 0.000 description 9
- 238000012360 testing method Methods 0.000 description 8
- 230000007547 defect Effects 0.000 description 7
- 238000010586 diagram Methods 0.000 description 6
- 239000000284 extract Substances 0.000 description 6
- 238000004519 manufacturing process Methods 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 3
- 238000012790 confirmation Methods 0.000 description 2
- 239000000203 mixture Substances 0.000 description 2
- 238000012795 verification Methods 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 230000002708 enhancing effect Effects 0.000 description 1
- 238000009434 installation Methods 0.000 description 1
- 238000007726 management method Methods 0.000 description 1
- 239000003550 marker Substances 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
Abstract
This application involves a kind of environment profile generation method, device, computer equipment and storage mediums.The described method includes: receiving the first environment configuration file and environmental form to be configured that terminal is sent;Configuration information corresponding with the environmental form to be configured is obtained from the information configuration table pre-established;Determine information to be modified corresponding with the configuration information in the first environment configuration file;It is modified based on the configuration information to the information to be modified, generates second environment configuration file.This method is based on exploitation auxiliary tool, realize the purpose for automatically generating environment profile corresponding with environmental form to be configured, without manually writing entire environment profile, simplify the product process of environment profile, the formation efficiency for improving environment profile, has saved human cost.
Description
Technical field
This application involves field of computer technology, more particularly to a kind of environment profile generation method, device, calculating
Machine equipment and storage medium.
Background technique
In field of computer technology, since the environmental variance of exploitation, test and production environment is different, therefore corresponding match
It is also different to set file (such as EXCEL file).
However, usually developer is multiple for needing to write during tradition writes environment profile
Environment profile is write manually one by one, and when deployment takes corresponding environment profile to be deployed in corresponding environment again.
But the process by writing entire environment profile manually is comparatively laborious, is easy to appear fault and omission, needs to examine repeatedly
It looks into and modifies, cause the formation efficiency of environment profile low.
Summary of the invention
Based on this, it is necessary to for the above-mentioned traditional technology technical problem low there are the formation efficiency of environment profile,
Environment profile generation method, device, the computer equipment of a kind of formation efficiency can be improved environment profile are provided
And storage medium.
A kind of environment profile generation method, which comprises
Receive the first environment configuration file and environmental form to be configured that terminal is sent;
Configuration information corresponding with the environmental form to be configured is obtained from the information configuration table pre-established;
Determine information to be modified corresponding with the configuration information in the first environment configuration file;
It is modified based on the configuration information to the information to be modified, generates second environment configuration file.
It is corresponding with the configuration information in the determination first environment configuration file in one of the embodiments,
Information to be modified, comprising:
Target string is extracted from the configuration information;
Obtain first identifier symbol corresponding with the target string and second identifier symbol;
Determine position to be modified corresponding with first identifier symbol in the first environment configuration file;
Information to be modified is identified as by matched character string is accorded with the second identifier in the position to be modified.
It is described in one of the embodiments, to be modified based on the configuration information to the information to be modified, it generates
Second environment configuration file, comprising:
Using the target string extracted in the configuration information as Template Information;
Establish the incidence relation of the Template Information with corresponding information to be modified in the first environment configuration file;
According to the incidence relation, information to be modified corresponding in the first environment configuration file is replaced with into the mould
Plate information generates second environment configuration file.
The target string carries target claim information in one of the embodiments,;
After information to be modified corresponding in the first environment configuration file is replaced with the Template Information, also wrap
It includes:
Search claim information of the information to be modified in the first environment configuration file;
The claim information found is replaced with into the target claim information.
In one of the embodiments, receive terminal send first environment configuration file and environmental form to be configured it
Before, further includes:
Obtain the environment profile of varying environment type;
Target string is extracted from each environment profile respectively, and to target string addition pair
The first identifier symbol and second identifier symbol answered;
From the target string of extraction, respectively by the target string for belonging to same environmental form and corresponding mark
Symbol is packaged, and configuration information corresponding with the environmental form is generated;
By the configuration information according to environmental form classification storage into the information configuration table pre-established.
In one of the embodiments, the method also includes:
Obtain data verification file corresponding with the second environment configuration file;
The second environment configuration file is verified according to the data verification file;
If confirming the second environment configuration file authentication error, second environment configuration file is regenerated;
If confirming, the second environment configuration file verifying is correct, and the second environment configuration file is stored.
In one of the embodiments, after being stored the second environment configuration file, further includes:
The second environment configuration file is sent to corresponding terminal;
The configuring request that the terminal is sent is received, the configuring request is that the terminal is configured according to the second environment
The request of file and the address generation to deployment services device;
According to the configuring request, it is corresponding to deployment services that the second environment configuration file is sent to the address
Device, the second environment configuration file described execute pair to deployment services device according to the second environment configuration file for triggering
The environment configurations operation answered.
A kind of environment profile generating means, described device include:
File reception module, for receiving the first environment configuration file and environmental form to be configured that terminal is sent;
Configuration information obtains module, for obtaining and the environmental form to be configured from the information configuration table pre-established
Corresponding configuration information;
Data obtaining module to be modified, it is corresponding with the configuration information in the first environment configuration file for determining
Information to be modified;
File generating module generates the second ring for modifying based on the configuration information to the information to be modified
Border configuration file.
A kind of computer equipment, including memory and processor, the memory are stored with computer program, the processing
Device performs the steps of when executing the computer program
Receive the first environment configuration file and environmental form to be configured that terminal is sent;
Configuration information corresponding with the environmental form to be configured is obtained from the information configuration table pre-established;
Determine information to be modified corresponding with the configuration information in the first environment configuration file;
It is modified based on the configuration information to the information to be modified, generates second environment configuration file.
A kind of computer readable storage medium, is stored thereon with computer program, and the computer program is held by processor
It is performed the steps of when row
Receive the first environment configuration file and environmental form to be configured that terminal is sent;
Configuration information corresponding with the environmental form to be configured is obtained from the information configuration table pre-established;
Determine information to be modified corresponding with the configuration information in the first environment configuration file;
It is modified based on the configuration information to the information to be modified, generates second environment configuration file.
Above-mentioned environment profile generation method, device, computer equipment and storage medium, by from the letter pre-established
It ceases and obtains configuration information corresponding with environmental form to be configured in allocation list, first environment configuration file is identified according to configuration information
In corresponding information to be modified, modify just for the information to be modified in first environment configuration file, to automatically generate
Two environment profiles, no longer by manually repeating to write entire environment profile, to simplify environment profile
Product process realizes the purpose for automatically generating environment profile corresponding with environmental form to be configured, improves environment and matches
The formation efficiency for setting file, has saved human cost;Meanwhile according to configuration information automatically to corresponding in first environment configuration file
Information to be modified modify, avoid and write environment profile manually and be easy to appear the defect of fault, to improve
The accuracy of the environment profile generated.
Detailed description of the invention
Fig. 1 is the application scenario diagram of environment configuration file generation method in one embodiment;
Fig. 2 is the flow diagram of environment configuration file generation method in one embodiment;
Fig. 3 is the step that information to be modified corresponding with configuration information in first environment configuration file is determined in one embodiment
Rapid flow diagram;
Fig. 4 is the flow diagram of environment configuration file generation method in another embodiment;
Fig. 5 is the structural block diagram of environment profile generating means in one embodiment;
Fig. 6 is the internal structure chart of computer equipment in one embodiment.
Specific embodiment
It is with reference to the accompanying drawings and embodiments, right in order to which the objects, technical solutions and advantages of the application are more clearly understood
The application is further elaborated.It should be appreciated that specific embodiment described herein is only used to explain the application, not
For limiting the application.
Environment profile generation method provided by the present application, can be applied in application environment as shown in Figure 1.Its
In, terminal 110 is communicated with server 120 by network.Terminal 110 is mounted with configuration file Core Generator, and terminal 110 is logical
It crosses identification user and file generated request is generated to the selection operation in the corresponding operation interface of configuration file Core Generator, and will
File generated request is sent to server 120.120 resolution file of server generates request, obtains the first environment of user's selection
Configuration file and environmental form to be configured;The information configuration table pre-established is inquired according to environmental form to be configured, is matched from information
It sets and obtains configuration information corresponding with environmental form to be configured in table;It determines corresponding with configuration information in first environment configuration file
Information to be modified, modification information is treated based on configuration information and is modified, generate second environment configuration file.Server 120
It is also used to the second environment configuration file of generation being back to terminal 110.Wherein, terminal 110 can be, but not limited to be various
People's computer, laptop, smart phone and tablet computer, server 120 can be either multiple with independent server
The server cluster of server composition is realized.
In one embodiment, it as shown in Fig. 2, providing a kind of environment profile generation method, applies in this way
It is illustrated for server in Fig. 1, comprising the following steps:
Step S201 receives first environment configuration file and environmental form to be configured that terminal is sent.
First environment configuration file refers to the file configured to operating environment, such as exploitation environment profile,
Test environment profile or production environment configuration file.Environmental form to be configured includes exploitation environmental form, test environment
Type or production environment type;The corresponding environment profile of varying environment type is different.
In the present embodiment, terminal responds user to configuration file Core Generator by installation configuration file Core Generator
First environment configuration file and environmental form to be configured in corresponding operation interface choose operation, and it is raw to generate corresponding file
At request, and by file generated request be sent to server, with trigger the server according to file generated request generate with it is to be configured
The corresponding environment profile of environmental form.Wherein, file generated request carries first environment configuration file and environment to be configured
Type.
Step S202 obtains configuration information corresponding with environmental form to be configured from the information configuration table pre-established.
Information configuration table can store the corresponding configuration information of varying environment type, can carry out online editing and update;
Configuration information refers to information inconsistent each other in multiple first environment configuration files.For example, server is based on big data, in advance
The corresponding first environment configuration file of multiple environmental forms is had collected, and will be inconsistent each other in multiple first environment configuration files
Information export come;Respectively will from each first environment configuration file derived information, as corresponding with each environmental form
Configuration information, to obtain the corresponding configuration information of multiple environmental forms;According to the corresponding configuration information of multiple environmental forms,
Information configuration table is established, subsequent query information configuration table is facilitated to obtain configuration information corresponding with environmental form to be configured.
The first environment configuration file and environmental form to be configured that server receiving terminal is sent;According to environmental classes to be configured
Type inquires the information configuration table pre-established, and configuration information corresponding with environmental form to be configured is obtained in information configuration table,
Facilitate it is subsequent modified according to configuration information to first environment configuration file, second environment configuration file is generated, without artificial
Entire environment profile is write manually, to improve the formation efficiency of environment profile.
Step S203 determines information to be modified corresponding with configuration information in first environment configuration file.
It include target string in configuration information, target string refers to the language being configured to environmental variance parameter
Sentence.Different environmental forms, corresponding environmental variance parameter is different, then corresponding target string is different, i.e., corresponding
Configuration information is different;For example, for split hair ring border the target string that is configured of environmental variance parameter with for pair
The target string that the environmental variance parameter of test environment is configured is different.
In addition to comprising target string, also including claim information, the other informations such as sentence explanation information in configuration information;Its
In, position of the target string in configuration information be it is fixed, have corresponding location identifier.Server can be based on mesh
Location identifier of the character string in configuration information is marked, from position to be extracted corresponding with location identifier in configuration information,
Extract corresponding target string.For example, server obtains the location identifier of target string, location identifier is for marking
Know to be extracted position of the target string in configuration information;According to location identifier, determine in configuration information with station location marker
Accord with corresponding position to be extracted;The target string of position to be extracted, acquisition and target string are extracted from configuration information
Corresponding identifier, identifier is for identifying information to be modified corresponding with target string in first environment configuration file;Root
According to identifier query first environment configuration file, determination is corresponding with target string to be modified from first environment configuration file
Information.By configuration information, information to be modified corresponding with configuration information in automatic identification first environment configuration file, after convenient
Continue according to configuration information, modifies to information to be modified corresponding in first environment configuration file, further simplify environment
The product process of configuration file improves the formation efficiency of environment profile.It should be noted that varying environment type is corresponding
Configuration information in target string be although different, but extract principle be it is the same, be all based on target character
The location identifier gone here and there in configuration information is extracted from position to be extracted corresponding with location identifier in configuration information
Corresponding target string.
Step S204 treats modification information based on configuration information and modifies, and generates second environment configuration file.
Second environment configuration file is the environment profile for being different from first environment configuration file, for example, server according to
Exploitation environment profile automatically generates test environment profile or production environment configuration file;In this process,
One environment profile refers to that exploitation environment profile, second environment configuration file refer to test environment profile or life
Produce environment profile.Information to be modified corresponding in first environment configuration file is replaced with configuration information by server, is obtained
Replaced first environment configuration file is deposited using replaced first environment configuration file as second environment configuration file
Storage, realizes the purpose for automatically generating second environment configuration file according to first environment configuration file, meets multiple environment
Configuration needs, without manually writing entire environment profile, to improve the formation efficiency of environment profile.
In above-mentioned environment profile generation method, by being obtained and ring to be configured from the information configuration table pre-established
Type corresponding configuration information in border identifies corresponding information to be modified in first environment configuration file, needle according to configuration information
It modifies to the information to be modified in first environment configuration file, to automatically generate second environment configuration file, no longer passes through
It is artificial to repeat to write entire environment profile, to simplify the product process of environment profile, realizes and automatically generate
The purpose of environment profile corresponding with environmental form to be configured improves the formation efficiency of environment profile, saves
Human cost;Meanwhile being modified automatically to information to be modified corresponding in first environment configuration file according to configuration information, it keeps away
The manual defect write environment profile and be easy to appear fault is exempted from, to improve the standard of the environment profile of generation
True property.
In one embodiment, as shown in figure 3, determining corresponding with configuration information to be modified in first environment configuration file
The step of information, specifically includes:
Step S301, extracts target string from configuration information.
Step S302 obtains first identifier symbol corresponding with target string and second identifier symbol.
Step S303 determines position to be modified corresponding with first identifier symbol in first environment configuration file.
Step S304 is identified as information to be modified for matched character string is accorded with second identifier in position to be modified.
Configuration information refers to code information, includes much information, for example claim information, sentence explain information etc..Server
It identifies configuration information, effective code information, such as target string is extracted from configuration information, can be avoided redundant information
Interference.In addition, first identifier symbol refers to for indicating to be modified position of the target string in first environment configuration file
Identification information, second identifier symbol refer to the word for indicating the position to be modified in target string and first environment configuration file
Accord with the matching relationship of string.
Server extracts target string from configuration information, obtain first identifier corresponding with target string accord with and
Second identifier symbol, according to first identifier symbol and second identifier symbol inquiry the first configuration file, from the first configuration file determine with
First identifier accords with corresponding position to be modified;It obtains and accords with matched character string in position to be modified with second identifier, and by the word
Symbol string is identified as information to be modified;It realizes according to corresponding to be modified in configuration information automatic identification first environment configuration file
The purpose of information, facilitate it is subsequent modified according to configuration information to information to be modified corresponding in first environment configuration file,
Without manually writing entire environment profile, the product process of environment profile is further simplified, ring is improved
The formation efficiency of border configuration file.
It is obtained in first environment configuration file after information to be modified corresponding with configuration information in server, it can be by the
Information to be modified in one environment profile replaces with configuration information, to generate second environment configuration file.Implement at one
In example, above-mentioned steps S204 treats modification information based on configuration information and modifies, and generates second environment configuration file, comprising:
Using the target string extracted in configuration information as Template Information;Establish Template Information with it is right in first environment configuration file
The incidence relation for the information to be modified answered;According to incidence relation, information to be modified corresponding in first environment configuration file is replaced
It is changed to Template Information, generates second environment configuration file.Incidence relation is for indicating Template Information and first environment configuration file
In matching relationship between corresponding information to be modified.
Server using the target string extracted from configuration information as Template Information, by Template Information with it is to be modified
Information is associated, and establishes the incidence relation between Template Information and information to be modified, it is therefore an objective to, according to incidence relation, i.e.,
It can recognize the replacement object of the information to be modified and information to be modified in first environment configuration file, i.e. Template Information, and
Information to be modified can be replaced with into Template Information, to generate second environment configuration file, to improve environment profile
Formation efficiency.
For example, the target string in configuration information is character string A and character string B, using character string A and character string B as
Template Information;The information to be modified that server recognizes first environment configuration file is character string A1 and character string B1 (default the
It does not need to modify elsewhere in one environment profile);By " character string A and character string B " and " character string A1 and character string
B1 " is associated, and establishes the incidence relation between " character string A and character string B " and " character string A1 and character string B1 ";According to
" character string A1 and character string B1 " in first environment configuration file is replaced with " character string A and word automatically by the incidence relation of foundation
Symbol string B ";It realizes and modifies automatically according to configuration information to information to be modified corresponding in first environment configuration file, and
The purpose for generating second environment configuration file enormously simplifies environment and matches without manually writing entire environment profile
The product process for setting file improves the formation efficiency of environment profile, significantly reduces human cost;It avoids simultaneously
The manual defect write environment profile and be easy to appear fault, improves the accuracy of the environment profile of generation.
In view of after information to be modified corresponding in first environment configuration file is replaced with Template Information, to guarantee
The integrality of the environment profile of generation, it is also necessary to which Template Information is modified in first environment configuration file by server
Claim information.In one embodiment, above-mentioned steps S204 is replaced by information to be modified corresponding in first environment configuration file
It is changed to after Template Information, further includes: search claim information of the information to be modified in first environment configuration file;It will find
Claim information replace with target claim information;Wherein, target string carries target claim information.Information to be modified is first
What claim information in environment profile indicated be in first environment configuration file, treat modification information carry out statement or
The information of description;What target claim information indicated is stated configuration information or is retouched in first environment configuration file
The information stated.For example, server deletes claim information of the information to be modified in first environment configuration file, and establish
Target claim information of the target string in first environment configuration file is conveniently subsequently generated effective second environment configuration text
Part, to ensure that the integrality of the environment profile of generation.
In view of needing to collect matching for varying environment type before obtaining configuration information corresponding with environmental form to be configured
Confidence breath, and stores into the information configuration table pre-established, facilitate it is subsequent obtained from information configuration table it is corresponding with confidence
Breath.In one embodiment, above-mentioned steps S201 is receiving the first environment configuration file and environmental classes to be configured that terminal is sent
Before type, further includes: obtain the environment profile of varying environment type;Mesh is extracted from each environment profile respectively
Character string is marked, and corresponding first identifier symbol and second identifier symbol are added to target string;From the target string of extraction,
The target string for belonging to same environmental form and corresponding identifier are packaged respectively, generated corresponding with environmental form
Configuration information;By configuration information according to environmental form classification storage into the information configuration table pre-established.It needs to illustrate
It is all target strings and corresponding identifier for belonging to same environmental form, is collectively as same environmental form
Configuration information.
Server extracts target string from the corresponding environment profile of each environmental form, and to target character
String adds corresponding identifier;By the target string for belonging to same environmental form and corresponding identifier is packaged into and environment
The corresponding configuration information of type, and by configuration information according to environmental form classification storage into information configuration table, be conducive to matching
Confidence breath carries out Classification Management, facilitates the subsequent acquisition configuration information corresponding with environmental form to be configured in information configuration table,
And modified according to configuration information to first environment configuration file, second environment configuration file is generated, ring is further improved
The formation efficiency of border configuration file.
In view of modifying according to configuration information to information to be modified corresponding in first environment configuration file, the is generated
There may be mistakes during two environment profiles needs to guarantee the accuracy of the second environment configuration file generated
The second environment configuration file of generation is verified.In one embodiment, environment profile generation method further include:
Obtain data verification file corresponding with second environment configuration file;According to data verification file to second environment configuration file into
Row verifying;If confirming second environment configuration file authentication error, second environment configuration file is regenerated;If confirming second environment
Configuration file verifying is correct, and second environment configuration file is stored.Data verification file is that one kind can be to environment configurations
The file that file format, file integrality of file etc. are verified.
Server carries out second environment configuration file according to data verification file corresponding with second environment configuration file
Verifying can guarantee the accuracy of the environment profile generated, and the environment profile generated is avoided mistake occur and cause
Unnecessary consequence;Correct environment profile will be verified simultaneously to store into database, facilitated subsequent according to ring to be configured
Border type queries database directly acquires environment profile corresponding with environmental form to be configured, further improves environment
The formation efficiency of configuration file.
After generating second environment configuration file, second environment configuration file can be sent to corresponding end by server
Second environment configuration file is sent to corresponding in deployment services device by end according to the request that terminal returns.Implement at one
In example, after second environment configuration file is stored, further includes: second environment configuration file is sent to corresponding end
End;The configuring request that terminal is sent is received, configuring request is terminal according to second environment configuration file and to deployment services device
The request that address generates;According to configuring request, it is corresponding to deployment services device that second environment configuration file is sent to address,
Two environment profiles execute corresponding environment configurations operation according to second environment configuration file to deployment services device for triggering.
For example, disposing corresponding test environment according to test environment profile to deployment services device.Server is by the second ring of generation
Border configuration file is sent to corresponding terminal, and according to the request that terminal returns, second environment configuration file is sent to accordingly
To deployment services device, corresponding environment configurations are executed according to second environment configuration file to deployment services device with triggering and are operated, from
And environment configurations process is simplified, effectively improve environment configurations efficiency.
In one embodiment, as shown in figure 4, providing another environment profile generation method, including following step
It is rapid:
Step S401 receives first environment configuration file and environmental form to be configured that terminal is sent.
Step S402 obtains configuration information corresponding with environmental form to be configured from the information configuration table pre-established.
Step S403, extracts target string from configuration information;Obtain first identifier corresponding with target string
Symbol and second identifier symbol;Determine position to be modified corresponding with first identifier symbol in first environment configuration file;By position to be modified
Matched character string, which is accorded with, with second identifier in setting is identified as information to be modified.
Step S404, using the target string extracted in configuration information as Template Information;Establish Template Information and
The incidence relation of corresponding information to be modified in one environment profile;It, will be in first environment configuration file according to incidence relation
Corresponding information to be modified replaces with Template Information;Claim information of the information to be modified in first environment configuration file is searched,
The claim information found is replaced with into target claim information, generates second environment configuration file;Wherein, target string carries
Target claim information.
Step S405 obtains data verification file corresponding with second environment configuration file;According to data verification file pair
Second environment configuration file is verified;If confirming second environment configuration file authentication error, second environment configuration is regenerated
File;If confirming, the verifying of second environment configuration file is correct, and second environment configuration file is stored.
Second environment configuration file is sent to corresponding terminal by step S406;The configuring request that terminal is sent is received, is matched
Setting request is the request that address of the terminal according to second environment configuration file and to deployment services device generates;According to configuring request,
Second environment configuration file is sent to address is corresponding to deployment services device, and second environment configuration file is for triggering wait dispose
Server executes corresponding environment configurations according to second environment configuration file and operates.
The environment profile generation method of the present embodiment, by from the information configuration table pre-established obtain with wait match
The corresponding configuration information of environmental form is set, corresponding information to be modified in first environment configuration file is identified according to configuration information,
It modifies just for the information to be modified in first environment configuration file, to automatically generate second environment configuration file, no longer
By manually repeating to write entire environment profile, to simplify the product process of environment profile, realize automatic
The purpose for generating environment profile corresponding with environmental form to be configured, improves the formation efficiency of environment profile, saves
About human cost;And information to be modified corresponding in first environment configuration file is repaired automatically according to configuration information
Change, the defect write environment profile manually and be easy to appear fault is avoided, to improve the environment configurations text of generation
The accuracy of part.Meanwhile the second environment configuration file of generation is verified, it is ensured that the environment profile of generation
Accuracy;And correct second environment configuration file will be verified and be sent to corresponding terminal, according to the request that terminal returns, by the
Two environment profiles are sent to accordingly to deployment services device, to trigger to deployment services device according to second environment configuration file
Corresponding environment configurations operation is executed, to simplify environment configurations process, effectively improves environment configurations efficiency.
It should be understood that although each step in the flow chart of Fig. 2-4 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, these steps can execute in other order.Moreover, at least one in Fig. 2-4
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, the execution sequence in these sub-steps or stage is also not necessarily successively
It carries out, but can be at least part of the sub-step or stage of other steps or other steps in turn or alternately
It executes.
In one embodiment, as shown in figure 5, providing a kind of environment profile generating means, comprising: file reception
Module 510, configuration information obtain module 520, data obtaining module to be modified 530 and file generating module 540, in which:
File reception module 510, for receiving the first environment configuration file and environmental form to be configured that terminal is sent.
Configuration information obtains module 520, for obtaining and environmental form to be configured from the information configuration table pre-established
Corresponding configuration information.
Data obtaining module 530 to be modified, it is corresponding with configuration information to be repaired in first environment configuration file for determining
Convert to breath.
File generating module 540 is modified for treating modification information based on configuration information, generates second environment configuration
File.
In one embodiment, data obtaining module to be modified is also used to extract target string from configuration information;
Obtain first identifier symbol corresponding with target string and second identifier symbol;Determine in first environment configuration file with first identifier
Accord with corresponding position to be modified;Information to be modified is identified as by matched character string is accorded with second identifier in position to be modified.
In one embodiment, the target string that file generating module is also used to extract in configuration information is as mould
Plate information;Establish the incidence relation of Template Information with information to be modified corresponding in first environment configuration file;It is closed according to association
Information to be modified corresponding in first environment configuration file is replaced with Template Information, generates second environment configuration file by system.
In one embodiment, file generating module is also used to search information to be modified in first environment configuration file
Claim information;The claim information found is replaced with into target claim information;Wherein, target string carries target statement letter
Breath.
In one embodiment, environment profile generating means further include information storage module, are used for file reception mould
Before block receives the first environment configuration file that terminal is sent and environmental form to be configured, the environment for obtaining varying environment type is matched
Set file;Target string is extracted from each environment profile respectively, and to target string addition corresponding first
Identifier and second identifier symbol;From the target string of extraction, respectively by the target string for belonging to same environmental form with
And corresponding identifier is packaged, and configuration information corresponding with environmental form is generated;By configuration information according to environmental form point
Class is stored into the information configuration table pre-established.
In one embodiment, environment profile generating means further include file verification module, for obtaining and second
The corresponding data verification file of environment profile;Second environment configuration file is verified according to data verification file;If
Confirm second environment configuration file authentication error, regenerates second environment configuration file;If confirming second environment configuration file
Verifying is correct, and second environment configuration file is stored.
In one embodiment, environment profile generating means further include request sending module, are used for file verification mould
After block is stored second environment configuration file, second environment configuration file is sent to corresponding terminal;Receive terminal
The configuring request of transmission, configuring request are asking for address generation of the terminal according to second environment configuration file and to deployment services device
It asks;According to configuring request, it is corresponding to deployment services device, second environment configuration text that second environment configuration file is sent to address
Part executes corresponding environment configurations operation according to second environment configuration file to deployment services device for triggering.
Above-mentioned each embodiment, environment profile generating means by from the information configuration table pre-established obtain with
The corresponding configuration information of environmental form to be configured identifies corresponding in first environment configuration file to be repaired convert to according to configuration information
Breath, modifies, to automatically generate second environment configuration file, no just for the information to be modified in first environment configuration file
Again by manually repeating to write entire environment profile, to simplify the product process of environment profile, realize certainly
The dynamic purpose for generating environment profile corresponding with environmental form to be configured, improves the formation efficiency of environment profile,
Human cost is saved;Meanwhile information to be modified corresponding in first environment configuration file is carried out automatically according to configuration information
Modification avoids the defect write environment profile manually and be easy to appear fault, to improve the environment configurations of generation
The accuracy of file.
Specific restriction about environment profile generating means may refer to generate above for environment profile
The restriction of method, details are not described herein.Modules in above-mentioned environment profile generating means can be fully or partially through
Software, hardware and combinations thereof are realized.Above-mentioned each module can be embedded in the form of hardware or independently of the place in computer equipment
It manages in device, can also be stored in a software form in the memory in computer equipment, in order to which processor calls execution or more
The corresponding operation of modules.
In one embodiment, a kind of computer equipment is provided, which can be server, internal junction
Composition can be as shown in Figure 6.The computer equipment include by system bus connect processor, memory, network interface and
Database.Wherein, the processor of the computer equipment is for providing calculating and control ability.The memory packet of the computer equipment
Include non-volatile memory medium, built-in storage.The non-volatile memory medium is stored with operating system, computer program and data
Library.The built-in storage provides environment for the operation of operating system and computer program in non-volatile memory medium.The calculating
The database of machine equipment is used for storage environment configuration file.The network interface of the computer equipment is used to pass through with external terminal
Network connection communication.To realize a kind of environment profile generation method when the computer program is executed by processor.
It will be understood by those skilled in the art that structure shown in Fig. 6, only part relevant to application scheme is tied
The block diagram of structure does not constitute the restriction for the computer equipment being applied thereon to application scheme, specific computer equipment
It may include perhaps combining certain components or with different component layouts than more or fewer components as shown in the figure.
In one embodiment, a kind of computer equipment, including memory and processor are provided, which is stored with
Computer program, the processor perform the steps of when executing computer program
Receive the first environment configuration file and environmental form to be configured that terminal is sent;
Configuration information corresponding with environmental form to be configured is obtained from the information configuration table pre-established;
Determine information to be modified corresponding with configuration information in first environment configuration file;
Modification information is treated based on configuration information to modify, and generates second environment configuration file.
In one embodiment, it also performs the steps of when processor executes computer program and is extracted from configuration information
Target string out;Obtain first identifier symbol corresponding with target string and second identifier symbol;Determine first environment configuration text
Position to be modified corresponding with first identifier symbol in part;It is identified as matched character string is accorded with second identifier in position to be modified
Information to be modified.
In one embodiment, it also performs the steps of and will be extracted in configuration information when processor executes computer program
Target string out is as Template Information;Establish Template Information and information to be modified corresponding in first environment configuration file
Incidence relation;According to incidence relation, information to be modified corresponding in first environment configuration file is replaced with into Template Information, is generated
Second environment configuration file.
In one embodiment, it is also performed the steps of when processor executes computer program and first environment is configured into text
After corresponding information to be modified replaces with Template Information in part, sound of the information to be modified in first environment configuration file is searched
Bright information;The claim information found is replaced with into target claim information;Wherein, target string carries target claim information.
In one embodiment, it is also performed the steps of when processor executes computer program and receives terminal is sent the
Before one environment profile and environmental form to be configured, the environment profile of varying environment type is obtained;Respectively from each
Target string is extracted in environment profile, and corresponding first identifier symbol and second identifier are added to target string
Symbol;From the target string of extraction, respectively by belong to same environmental form target string and corresponding identifier into
Row is packaged, and generates configuration information corresponding with environmental form;By configuration information according to environmental form classification storage to pre-establishing
Information configuration table in.
In one embodiment, acquisition is also performed the steps of when processor executes computer program to match with second environment
Set the corresponding data verification file of file;Second environment configuration file is verified according to data verification file;If confirmation the
Two environment profile authentication errors, regenerate second environment configuration file;If confirming the verifying of second environment configuration file just
Really, second environment configuration file is stored.
In one embodiment, it is also performed the steps of when processor executes computer program and second environment is configured into text
After part is stored, second environment configuration file is sent to corresponding terminal;The configuring request that terminal is sent is received, configuration
Request is the request that address of the terminal according to second environment configuration file and to deployment services device generates;It, will according to configuring request
Second environment configuration file is sent to that address is corresponding to deployment services device, and second environment configuration file is for triggering wait dispose clothes
Device be engaged according to the corresponding environment configurations operation of second environment configuration file execution.
Above-mentioned each embodiment, computer equipment are realized and are automatically generated by the computer program run on processor
The purpose of environment profile corresponding with environmental form to be configured, without manually writing entire environment profile, letter
The product process for having changed environment profile improves the formation efficiency of environment profile, has saved human cost;Meanwhile
The defect write entire environment profile manually and be easy to appear fault is avoided, the environment profile of generation is improved
Accuracy.
In one embodiment, a kind of computer readable storage medium is provided, computer program is stored thereon with, is calculated
Machine program performs the steps of when being executed by processor
Receive the first environment configuration file and environmental form to be configured that terminal is sent;
Configuration information corresponding with environmental form to be configured is obtained from the information configuration table pre-established;
Determine information to be modified corresponding with configuration information in first environment configuration file;
Modification information is treated based on configuration information to modify, and generates second environment configuration file.
In one embodiment, it also performs the steps of when computer program is executed by processor and is mentioned from configuration information
Take out target string;Obtain first identifier symbol corresponding with target string and second identifier symbol;Determine that first environment configures
Position to be modified corresponding with first identifier symbol in file;It is identified matched character string is accorded with second identifier in position to be modified
For information to be modified.
In one embodiment, also performing the steps of when computer program is executed by processor will mention in configuration information
The target string of taking-up is as Template Information;Establish Template Information and information to be modified corresponding in first environment configuration file
Incidence relation;According to incidence relation, information to be modified corresponding in first environment configuration file is replaced with into Template Information, it is raw
At second environment configuration file.
In one embodiment, it is also performed the steps of when computer program is executed by processor and configures first environment
After corresponding information to be modified replaces with Template Information in file, information to be modified is searched in first environment configuration file
Claim information;The claim information found is replaced with into target claim information;Wherein, target string carries target statement letter
Breath.
In one embodiment, it is also performed the steps of when computer program is executed by processor and receives what terminal was sent
Before first environment configuration file and environmental form to be configured, the environment profile of varying environment type is obtained;Respectively from each
Target string is extracted in a environment profile, and corresponding first identifier symbol and second identifier are added to target string
Symbol;From the target string of extraction, respectively by belong to same environmental form target string and corresponding identifier into
Row is packaged, and generates configuration information corresponding with environmental form;By configuration information according to environmental form classification storage to pre-establishing
Information configuration table in.
In one embodiment, acquisition and second environment are also performed the steps of when computer program is executed by processor
The corresponding data verification file of configuration file;Second environment configuration file is verified according to data verification file;If confirmation
Second environment configuration file authentication error, regenerates second environment configuration file;If confirming the verifying of second environment configuration file
Correctly, second environment configuration file is stored.
In one embodiment, it is also performed the steps of when computer program is executed by processor and configures second environment
After file is stored, second environment configuration file is sent to corresponding terminal;The configuring request that terminal is sent is received, is matched
Setting request is the request that address of the terminal according to second environment configuration file and to deployment services device generates;According to configuring request,
Second environment configuration file is sent to address is corresponding to deployment services device, and second environment configuration file is for triggering wait dispose
Server executes corresponding environment configurations according to second environment configuration file and operates.
Above-mentioned each embodiment, the computer program that computer readable storage medium is stored by it, realizes automatic life
At the purpose of environment profile corresponding with environmental form to be configured, without manually writing entire environment profile,
The product process for simplifying environment profile improves the formation efficiency of environment profile, has saved human cost;Together
When, the defect write entire environment profile manually and be easy to appear fault is avoided, the environment configurations text of generation is improved
The accuracy of part.
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, the computer program can be stored in a non-volatile computer
In read/write memory medium, the computer program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Wherein,
To any reference of memory, storage, database or other media used in each embodiment provided herein,
Including non-volatile and/or volatile memory.Nonvolatile memory may include read-only memory (ROM), programming ROM
(PROM), electrically programmable ROM (EPROM), electrically erasable ROM (EEPROM) or flash memory.Volatile memory may include
Random access memory (RAM) or external cache.By way of illustration and not limitation, RAM is available in many forms,
Such as static state RAM (SRAM), dynamic ram (DRAM), synchronous dram (SDRAM), double data rate sdram (DDRSDRAM), enhancing
Type SDRAM (ESDRAM), synchronization link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM
(RDRAM), direct memory bus dynamic ram (DRDRAM) and memory bus dynamic ram (RDRAM) etc..
Each technical characteristic of above embodiments can be combined arbitrarily, for simplicity of description, not to above-described embodiment
In each technical characteristic it is all possible combination be all described, as long as however, the combination of these technical characteristics be not present lance
Shield all should be considered as described in this specification.
The several embodiments of the application above described embodiment only expresses, the description thereof is more specific and detailed, but simultaneously
It cannot therefore be construed as limiting the scope of the patent.It should be pointed out that coming for those of ordinary skill in the art
It says, without departing from the concept of this application, various modifications and improvements can be made, these belong to the protection of the application
Range.Therefore, the scope of protection shall be subject to the appended claims for the application patent.
Claims (10)
1. a kind of environment profile generation method, which comprises
Receive the first environment configuration file and environmental form to be configured that terminal is sent;
Configuration information corresponding with the environmental form to be configured is obtained from the information configuration table pre-established;
Determine information to be modified corresponding with the configuration information in first configuration file;
It is modified based on the configuration information to the information to be modified, generates second environment configuration file.
2. the method according to claim 1, wherein in the determination first environment configuration file with it is described
The corresponding information to be modified of configuration information, comprising:
Target string is extracted from the configuration information;
Obtain first identifier symbol corresponding with the target string and second identifier symbol;
Determine position to be modified corresponding with first identifier symbol in the first environment configuration file;
Information to be modified is identified as by matched character string is accorded with the second identifier in the position to be modified.
3. according to the method described in claim 2, it is characterized in that, described be based on the configuration information to the information to be modified
It modifies, generates second environment configuration file, comprising:
Using the target string extracted in the configuration information as Template Information;
Establish the incidence relation of the Template Information with corresponding information to be modified in the first environment configuration file;
According to the incidence relation, information to be modified corresponding in the first environment configuration file is replaced with into the template and is believed
Breath generates second environment configuration file.
4. according to the method described in claim 3, it is characterized in that, the target string carries target claim information;
After information to be modified corresponding in the first environment configuration file to be replaced with to the Template Information, further includes:
Search claim information of the information to be modified in the first environment configuration file;
The claim information found is replaced with into the target claim information.
5. the method according to claim 1, wherein receive terminal send first environment configuration file and to
Before configuration surroundings type, further includes:
Obtain the environment profile of varying environment type;
Target string is extracted from each environment profile respectively, and the target string is added corresponding
First identifier symbol and second identifier symbol;
From the target string of extraction, respectively by belong to same environmental form target string and corresponding identifier into
Row is packaged, and generates configuration information corresponding with the environmental form;
By the configuration information according to environmental form classification storage into the information configuration table pre-established.
6. method according to any one of claims 1 to 5, which is characterized in that the method also includes:
Obtain data verification file corresponding with the second environment configuration file;
The second environment configuration file is verified according to the data verification file;
If confirming the second environment configuration file authentication error, second environment configuration file is regenerated;
If confirming, the second environment configuration file verifying is correct, and the second environment configuration file is stored.
7. according to the method described in claim 6, it is characterized in that, carrying out storing it by the second environment configuration file
Afterwards, further includes:
The second environment configuration file is sent to corresponding terminal;
The configuring request that the terminal is sent is received, the configuring request is the terminal according to the second environment configuration file
With the request of the address generation to deployment services device;
According to the configuring request, it is corresponding to deployment services device that the second environment configuration file is sent to the address,
The second environment configuration file executes correspondence according to the second environment configuration file to deployment services device for triggering described
Environment configurations operation.
8. a kind of environment profile generating means, which is characterized in that described device includes:
File reception module, for receiving the first environment configuration file and environmental form to be configured that terminal is sent;
Configuration information obtains module, corresponding with the environmental form to be configured for obtaining from the information configuration table pre-established
Configuration information;
Data obtaining module to be modified, it is corresponding with the configuration information to be repaired in the first environment configuration file for determining
Convert to breath;
File generating module is generated second environment and matched for being modified based on the configuration information to the information to be modified
Set file.
9. a kind of computer equipment, including memory and processor, the memory are stored with computer program, feature exists
In the step of processor realizes any one of claims 1 to 7 the method when executing the computer program.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer program
The step of method described in any one of claims 1 to 7 is realized when being executed by processor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811560866.2A CN109766121A (en) | 2018-12-20 | 2018-12-20 | Environment profile generation method, device, computer equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811560866.2A CN109766121A (en) | 2018-12-20 | 2018-12-20 | Environment profile generation method, device, computer equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109766121A true CN109766121A (en) | 2019-05-17 |
Family
ID=66451527
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811560866.2A Pending CN109766121A (en) | 2018-12-20 | 2018-12-20 | Environment profile generation method, device, computer equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109766121A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110795140A (en) * | 2019-09-26 | 2020-02-14 | 连连银通电子支付有限公司 | Configuration file generation method and device |
CN111538542A (en) * | 2020-03-24 | 2020-08-14 | 中国平安人寿保险股份有限公司 | System configuration method and related device |
CN112711437A (en) * | 2020-12-31 | 2021-04-27 | 中国工商银行股份有限公司 | Configuration file processing method and device |
CN112817652A (en) * | 2021-01-22 | 2021-05-18 | 平安普惠企业管理有限公司 | Configuration method and device of computer environment, computer equipment and storage medium |
CN113721973A (en) * | 2021-09-07 | 2021-11-30 | 北京锐安科技有限公司 | Configuration file generation method, device, equipment and medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7499933B1 (en) * | 2005-11-12 | 2009-03-03 | Jpmorgan Chase Bank, N.A. | System and method for managing enterprise application configuration |
US20100235813A1 (en) * | 2009-03-13 | 2010-09-16 | Sun Microsystems, Inc. | Method and system for configuring software modules to execute in an execution environment |
CN104217029A (en) * | 2014-09-26 | 2014-12-17 | 北京国双科技有限公司 | Configuration file modification method and configuration file modification device |
CN107085516A (en) * | 2017-03-31 | 2017-08-22 | 北京奇艺世纪科技有限公司 | A kind of method and device for changing configuration |
CN107491390A (en) * | 2017-08-15 | 2017-12-19 | 深圳市慧择时代科技有限公司 | The method and device of replacement test environment configuration information |
-
2018
- 2018-12-20 CN CN201811560866.2A patent/CN109766121A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7499933B1 (en) * | 2005-11-12 | 2009-03-03 | Jpmorgan Chase Bank, N.A. | System and method for managing enterprise application configuration |
US20100235813A1 (en) * | 2009-03-13 | 2010-09-16 | Sun Microsystems, Inc. | Method and system for configuring software modules to execute in an execution environment |
CN104217029A (en) * | 2014-09-26 | 2014-12-17 | 北京国双科技有限公司 | Configuration file modification method and configuration file modification device |
CN107085516A (en) * | 2017-03-31 | 2017-08-22 | 北京奇艺世纪科技有限公司 | A kind of method and device for changing configuration |
CN107491390A (en) * | 2017-08-15 | 2017-12-19 | 深圳市慧择时代科技有限公司 | The method and device of replacement test environment configuration information |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110795140A (en) * | 2019-09-26 | 2020-02-14 | 连连银通电子支付有限公司 | Configuration file generation method and device |
CN111538542A (en) * | 2020-03-24 | 2020-08-14 | 中国平安人寿保险股份有限公司 | System configuration method and related device |
CN111538542B (en) * | 2020-03-24 | 2023-10-24 | 中国平安人寿保险股份有限公司 | System configuration method and related device |
CN112711437A (en) * | 2020-12-31 | 2021-04-27 | 中国工商银行股份有限公司 | Configuration file processing method and device |
CN112817652A (en) * | 2021-01-22 | 2021-05-18 | 平安普惠企业管理有限公司 | Configuration method and device of computer environment, computer equipment and storage medium |
CN113721973A (en) * | 2021-09-07 | 2021-11-30 | 北京锐安科技有限公司 | Configuration file generation method, device, equipment and medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109766121A (en) | Environment profile generation method, device, computer equipment and storage medium | |
CN109032611B (en) | Script deployment method and device, computer equipment and storage medium | |
CN110209652A (en) | Tables of data moving method, device, computer equipment and storage medium | |
CN109788032A (en) | Acquisition methods, device, computer equipment and the storage medium of image file | |
CN109766387A (en) | Data processing document generating method, device, computer equipment and storage medium | |
CN110109897A (en) | Database script generation method, device, computer equipment and storage medium | |
CN110008266A (en) | Data interchange file analysis method and device | |
CN110399294A (en) | Method for generating test case, device, computer equipment and storage medium | |
CN109726134B (en) | Interface test method and system | |
CN110209388A (en) | The generation method of applet file | |
CN109542767A (en) | Automated testing method, device, computer equipment and storage medium based on block chain | |
CN110096306B (en) | Application version switching method and device, electronic equipment and storage medium | |
CN109816563A (en) | Electronic contract template circulation method, apparatus, computer equipment and storage medium | |
CN110109712A (en) | Service Component loading method, device, computer equipment and storage medium | |
CN109408370A (en) | Interface testing document generating method, device, computer equipment and storage medium | |
CN108415722A (en) | Update method, device, computer equipment and the storage medium of channel application | |
CN110134404A (en) | Code translation method, apparatus, computer equipment and storage medium | |
CN109361628A (en) | Message assemble method, device, computer equipment and storage medium | |
CN108874661A (en) | Test mapping relations library generating method, device, computer equipment and storage medium | |
CN109597618A (en) | Program developing method, device, computer equipment and storage medium | |
CN110069404A (en) | Code debugging method, apparatus, equipment and medium | |
CN109766483A (en) | Regular expression generation method, device, computer equipment and storage medium | |
CN111813630A (en) | Method and device for collecting log information and computer equipment | |
CN110502362A (en) | Error code based on micro services framework defines method, apparatus and computer equipment | |
CN109766122A (en) | Document data transfer generation method, device, computer equipment and storage 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 | ||
WD01 | Invention patent application deemed withdrawn after publication | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20190517 |