CN110263305A - Configuration file control methods, device, equipment and storage medium - Google Patents
Configuration file control methods, device, equipment and storage medium Download PDFInfo
- Publication number
- CN110263305A CN110263305A CN201910438043.0A CN201910438043A CN110263305A CN 110263305 A CN110263305 A CN 110263305A CN 201910438043 A CN201910438043 A CN 201910438043A CN 110263305 A CN110263305 A CN 110263305A
- Authority
- CN
- China
- Prior art keywords
- configuration file
- target
- environment information
- key
- 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.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/10—Text processing
- G06F40/194—Calculation of difference between files
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
- G06F8/71—Version control; Configuration management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Security & Cryptography (AREA)
- Health & Medical Sciences (AREA)
- Artificial Intelligence (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Computational Linguistics (AREA)
- General Health & Medical Sciences (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a kind of configuration file control methods, device, equipment and storage mediums, this method comprises: receiving the configuration file that user sends compares request, the configuration file comparison request includes reduced time point, filename, first environment information and second environment information;If current time reaches the reduced time point, then first object configuration file and second target configuration file in the second environment information under, first configuration file and second configuration file of the load under the first environment information are corresponding with the filename respectively;First configuration parameter of the first object configuration file and the second configuration parameter of second target configuration file are compared, and list comparing result.The present invention is compared according to configuration file and is requested, and target configuration file is compared to and listed comparing result, improves configuration file compares under varying environment efficiency and success rate.
Description
Technical field
The present invention relates to field of computer technology more particularly to a kind of configuration file control methods, device, equipment and storages
Medium.
Background technique
When operating system is during deployment, upgrading, operation or maintenance, if the content of configuration file sends change,
Then developer and/or guardian need to check a large amount of differences of the relevant configuration file before and after variation, to find the problem and solve
Certainly.
But current configuration file comparison tool can only compare that user uploads immediately to comparative arrangement file, and
Can only be compared according to the content of configuration file, thus compare it is inefficient, and if for can be by if comparative arrangement file
It is different in the key assignments of configuration file and comparison is caused to fail.
Summary of the invention
The present invention provides a kind of configuration file control methods, device, equipment and storage medium, it is intended to be promoted under varying environment
The efficiency and success rate of configuration file comparison.
To achieve the above object, the present invention provides a kind of configuration file control methods, which comprises
It receives the configuration file that user sends and compares request, the configuration file comparison request includes reduced time point, text
Part name, first environment information and second environment information;
If current time reaches the reduced time point, load is in first under the first environment information respectively
Target configuration file and the second target configuration file under the second environment information, first configuration file and described
Second configuration file is corresponding with the filename;
By the second configuration of the first configuration parameter of the first object configuration file and second target configuration file
Parameter compares, and lists comparing result.
Preferably, the first object configuration file and be in described that the load respectively is under the first environment information
The step of the second target configuration file under second environment information includes:
The first active attribute is set according to the first environment information, based on described in the first active attribute load
First object configuration file;With
The 2nd active attribute is set according to the second environment information, based on described in the 2nd active attribute load
Second target configuration file.
Preferably, first configuration parameter includes the first key and the first key assignments, and second configuration parameter includes second
Key and the second key assignments, first configuration parameter by the first object configuration file and second target configuration file
Second configuration parameter compares, and the step of listing comparing result includes:
The first key in the first object configuration file is extracted line by line;
The second key identical with first key is searched from second target configuration file;
The first key assignments in first key is compared with the second key assignments in second key;
The comparing result of first key assignments and second key assignments is listed in table form.
Preferably, first configuration parameter by the first object configuration file and second target configuration file
The second configuration parameter compare, and after the step of listing comparing result further include:
When recording the first of first key assignments first object configuration file different from second key assignments and submitting
Between point and second target configuration file the second time of delivery point;
Using git or svn tool, corresponding first history is obtained based on first time of delivery point and submits record, and
Corresponding second history, which is obtained, based on second time of delivery point submits record;
The first submitter of record search is submitted according to first history, record search pair is submitted according to second history
The second submitter answered;
Prompt letter is sent to first submitter and/or second submitter by pre-set prompt approach
Breath.
Preferably, first configuration parameter by the first object configuration file and second target configuration file
The second configuration parameter compare, and after the step of listing comparing result further include:
Whether online detect the user;
If the user is online, the comparing result is shown into display circle in user terminal corresponding with the user
Face;
If the user is not online, the comparing result is sent to pre-set reception address.
Preferably, the first object configuration file and be in described that the load respectively is under the first environment information
Before the step of the second target configuration file under second environment information further include:
Request, which is compared, according to the configuration file searches the corresponding first object configuration file and second target
Configuration file;
Judge whether the first object configuration file or second target configuration file can be used;
If the first object configuration file or second target configuration file are all available, then follow the steps: respectively plus
Carry the first object configuration file under the first environment information and the second target under the second environment information
Configuration file;
It is defeated if there is one or more unavailable in the first object configuration file or second target configuration file
The not available prompt information of current configuration file out, and judge the first object configuration file or institute again after preset duration
State whether the second target configuration file can be used.
Preferably, described to judge the first object configuration file or the whether available step of second target configuration file
Suddenly include:
Check whether the first object configuration file or second target configuration file are accessed by application program;
If the first object configuration file or second target configuration file are not all accessed by the application program,
Determine that the first object configuration file or second target configuration file are all available;
If the one or more in the first object configuration file or second target configuration file is by the application
Routine access then determines that the first object configuration file or second target configuration file are unavailable.
To achieve the above object, the present invention also proposes that a kind of configuration file comparison device, the configuration file compare device
Include:
Receiving module, for receiving the configuration file comparison request of user's transmission, the configuration file comparison request includes
Reduced time point, filename, first environment information and second environment information;
Loading module, if reach the reduced time point for current time, load is in first ring respectively
First object configuration file under the information of border and the second target configuration file under the second environment information, described first
Configuration file and second configuration file are corresponding with the filename;
Contrast module, for the first configuration parameter of the first object configuration file and second target to be configured text
Second configuration parameter of part compares, and lists comparing result.
To achieve the above object, the present invention also provides a kind of configuration file comparative apparatus, the configuration file comparative apparatus
Including processor, the configuration file of memory and storage in the memory compares program, and the configuration file compares journey
When sequence is run by the processor, the step of realizing configuration file control methods as described above.
To achieve the above object, it the present invention also provides a kind of computer storage medium, is deposited in the computer storage medium
Configuration file comparison program is contained, the configuration file comparison program realizes configuration file pair as described above when being run by processor
The step of ratio method.
Compared with prior art, the present invention provides a kind of configuration file control methods, device, equipment and storage medium, the party
Method includes: the configuration file comparison request for receiving user and sending, and the configuration file comparison request includes reduced time point, file
Name, first environment information and second environment information;If current time reaches the reduced time point, load is in respectively
First object configuration file under the first environment information and the second target under the second environment information configure text
Part, first configuration file and second configuration file are corresponding with the filename;The first object is configured into text
First configuration parameter of part and the second configuration parameter of second target configuration file compare, and list comparing result.
The present invention is compared according to configuration file and is requested, and target configuration file is compared to and listed comparing result, improves different rings
The efficiency and success rate that configuration file compares under border.
Detailed description of the invention
Fig. 1 is the hardware structural diagram for the configuration file comparative apparatus that various embodiments of the present invention are related to;
Fig. 2 is the flow diagram of configuration file control methods first embodiment of the present invention;
Fig. 3 is the flow diagram of configuration file control methods second embodiment of the present invention;
Fig. 4 is the functional block diagram of configuration file comparison device first embodiment of the present invention.
The embodiments will be further described with reference to the accompanying drawings for the realization, the function and the advantages of the object of the present invention.
Specific embodiment
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
The configuration file comparative apparatus that the embodiment of the present invention relates generally to refers to the network connection that can be realized network connection
Equipment, the configuration file comparative apparatus can be server, cloud platform etc..
Referring to Fig.1, Fig. 1 is the hardware structural diagram for the configuration file comparative apparatus that various embodiments of the present invention are related to.This
In inventive embodiments, configuration file comparative apparatus may include (such as the central processing unit Central of processor 1001
Processing Unit, CPU), communication bus 1002, input port 1003, output port 1004, memory 1005.Wherein,
Communication bus 1002 is for realizing the connection communication between these components;Input port 1003 is inputted for data;Output port
1004 export for data, and memory 1005 can be high speed RAM memory, be also possible to stable memory (non-
Volatile memory), such as magnetic disk storage, memory 1005 optionally can also be independently of aforementioned processor 1001
Storage device.It will be understood by those skilled in the art that hardware configuration shown in Fig. 1 and do not constitute a limitation of the invention,
It may include perhaps combining certain components or different component layouts than illustrating more or fewer components.
With continued reference to Fig. 1, the memory 1005 in Fig. 1 as a kind of readable storage medium storing program for executing may include operating system, net
Network communication module, application program module and configuration file compare program.In Fig. 1, network communication module is mainly used for connecting
Server carries out data communication with server;And processor 1001 can call the configuration file pair stored in memory 1005
Than program, and execute configuration file control methods provided in an embodiment of the present invention.
The embodiment of the invention provides a kind of configuration file control methods.
Referring to Fig. 2, Fig. 2 is the flow diagram of configuration file control methods first embodiment of the present invention.
In the present embodiment, the configuration file control methods is applied to configuration file comparative apparatus, which comprises
Step S101 receives the configuration file that user sends and compares request, and the configuration file comparison request includes comparison
Time point, filename, first environment information and second environment information;
In computer software exploitation and practical application, it is often necessary to the information preservation of system into configuration file.One
As, the configuration file is text-only file;The form of the configuration file row indicates that the format of every a line is equal are as follows: key
=value or key:value etc.;The key assignments that do not go together is different.With system update or application scale increase,
The configuration parameter of the variation of running environment, configuration file may change, such as increase, and reduce or modify the configuration
Parameter.
In this implementation, user is received by clicking the configuration file of preset control triggering in configuration interface and compares request.And
And obtain reduced time point, filename, first environment information and that user is arranged in configuration file comparison request
Two environmental informations.It is to be appreciated that the reduced time point can be current point in time, it is also possible to some time in future
Point, and reduced time point can be one or more.The filename refers to two files to comparative arrangement file
Name, since the present embodiment is the configuration file of comparison same file under various circumstances, therefore to comparative arrangement file described in two
Filename it is generally identical.The first environment information includes one developed in environment, test environment and production environment, institute
Stating second environment information includes one developed in environment, test environment and production environment, and the first environment information
Different with the second environment information, if such as the first environment information be test environment, by second ring
Border information is arranged to build environment.
Further, after getting the first environment information and the second environment information, first ring
Whether border information and the second environment information are identical;If the first environment information is identical as the second environment information,
Determine that environmental information setting is unreasonable, and unreasonable prompt is arranged in output environment information;If the first environment information and institute
It is not identical to state second environment information, then determines that environmental information setting is reasonable.
Step S102, if current time reaches the reduced time point, load is believed in the first environment respectively
First object configuration file under breath and the second target configuration file under the second environment information, first configuration
File and second configuration file are corresponding with the filename;
In the present embodiment, after receiving the configuration file comparison request, start default clock, if current time reaches
When the reduced time point, then the first object configuration file for needing to compare and the second target configuration file are loaded.
Specifically, the first object configuration file and be in described that the load respectively is under the first environment information
The step of the second target configuration file under second environment information includes: that the first active is arranged according to the first environment information
Attribute loads the first object configuration file based on the first active attribute;With set according to the second environment information
The 2nd active attribute is set, second target configuration file is loaded based on the 2nd active attribute.Different environment are all
There is corresponding unique default active attribute, in general, the active attribute of the exploitation environment is dev, the test environment
Active attribute be test, the active attribute of the production environment is prod.In the present embodiment,
It is arranged in application.properties file by spring.profiles.active attribute, described first
Active attribute is corresponding with the first environment information, and the 2nd active attribute is corresponding with the second environment information.If
After having set the first environment information and/or the second environment information, then configuration file comparative apparatus can be according to described first
Active attribute and/or the 2nd active attribute load corresponding configuration file automatically, if such as the first active
Attribute is test, then the configuration file of the configuration file comparative apparatus load test environment.
Further, since the filename of same configuration file under various circumstances is generally identical, therefore the first object
The filename of configuration file is generally identical as the filename of second target configuration file.Such as filename is all
application01。
Step S103, by the first configuration parameter of the first object configuration file and second target configuration file
Second configuration parameter compares, and lists comparing result.
Generally, configuration parameter includes key and key assignments, and the key assignments includes the reality used when system and application program execute
Border configuration information and data, and the key assignments includes numerous types of data to adapt to the use demand of varying environment, it is described to match
It sets file and manages various information according to the key and the key assignments.In the present embodiment, first configuration parameter includes first
Key and the first key assignments, second configuration parameter include the second key and the second key assignments.
The second of first configuration parameter by the first object configuration file and second target configuration file
Configuration parameter compares, and the step of listing comparing result includes: extracted in the first object configuration file line by line
One key;The second key identical with first key is searched from second target configuration file;By in first key
One key assignments is compared with the second key assignments in second key;By the comparing result of first key assignments and second key assignments
It lists in table form.After the second key-value pair ratio in the first key assignments and second key in first key, i.e.,
It can get comparing result.
Generally, if there is the second key corresponding with first key in second target configuration file, and described the
Two key assignments are identical as first key assignments, then illustrate exist in second target configuration file and first object configuration text
The identical configuration parameter of part;If there is the second key corresponding with first key in second target configuration file, but described
Second key assignments and first key assignments be not identical, then explanation has modified the key assignments;If in second target configuration file not
In the presence of the second key corresponding with first key, then explanation deletes the corresponding configuration parameter of first key.
Further, first configuration parameter by the first object configuration file and second target configuration text
Second configuration parameter of part compares, and after the step of listing comparing result further include: whether online detects the user;
If the user is online, the comparing result is shown into the display interface in user terminal corresponding with the user;If institute
It is not online to state user, then the comparing result is sent to pre-set reception address.In this way, if user is in the configuration text
One or more time points in future are provided in part comparison request, then it is one or many right to need to carry out according to the time point
Than, and obtain corresponding one or many comparing results.But it may be just after the comparison request of configuration file described in user setting
It is not online, after obtaining the comparing result, the comparing result is sent to the pre-set reception address of user, with
It is checked in time for user, the reception address includes cloud platform, email address etc..
Further, the first object configuration file and be in institute that the load respectively is under the first environment information
Before the step of stating the second target configuration file under second environment information further include:
Step a: request is compared according to the configuration file and searches the corresponding first object configuration file and described the
Two target configuration files;
Generally, the first object configuration file and/or second target configuration file are stored in database profession.It is first
First according to the corresponding file of filename lookup of the configuration file, described first then is determined according to the first environment information
Target configuration file, and second target configuration file is determined according to the second environment information.
In the present embodiment, need to be sentenced according to the filename, the first environment information and/or the second environment information
The first object configuration file or second target configuration file of breaking whether there is in database;If in the database
The filename, the first environment information and/or the second environment information corresponding described first are configured in the presence of with described
Target configuration file and second target configuration file then determine that the first object configuration file and second target are matched
File is set all to be present in database.
Step b: judge whether the first object configuration file or second target configuration file can be used;
Specifically, check whether the first object configuration file or second target configuration file are visited by application program
It asks;If the first object configuration file or second target configuration file are not all accessed by the application program, determine
The first object configuration file or second target configuration file are all available;If the first object configuration file or described
In second target configuration file one or more accessed by the application program, then determine the first object configuration file or
Second target configuration file is unavailable.Further, if the first object configuration file or second target configuration
One or more in file is accessed by the application program, then further judges whether the application program is that can disconnect
Default application program, if the application program is the default application program, disconnect the first object configuration file and/
Or the connection of second target configuration file and the default application program, and by the first object configuration file and/or
Second target configuration file is labeled as available.
If the first object configuration file or second target configuration file are all available, then follow the steps: respectively plus
Carry the first object configuration file under the first environment information and the second target under the second environment information
Configuration file;If there is one or more unavailable in the first object configuration file or second target configuration file,
Export the not available prompt information of current configuration file, and judge again after preset duration the first object configuration file or
Whether second target configuration file can be used.
The present embodiment compares request, the configuration file through the above technical solutions, receiving the configuration file that user sends
Comparison request includes reduced time point, filename, first environment information and second environment information;Described in if current time reaches
When reduced time point, then the first object configuration file being under the first environment information is loaded respectively and in described second
The second target configuration file under environmental information, first configuration file and second configuration file with the filename
It is corresponding;By the second configuration parameter of the first configuration parameter of the first object configuration file and second target configuration file
It compares, and lists comparing result.It is compared and is requested according to configuration file as a result, target configuration file is compared side by side
Comparing result out improves configuration file compares under varying environment efficiency and success rate.
As shown in figure 3, second embodiment of the invention proposes a kind of configuration file control methods, based on above-mentioned shown in Fig. 2
First embodiment, the of first configuration parameter by the first object configuration file and second target configuration file
Two configuration parameters compare, and after the step of listing comparing result further include:
Step S201: the of first key assignments first object configuration file different from second key assignments is recorded
Second time of delivery point of 1 time of delivery point and second target configuration file;
In this implementation, when first key assignments and when the second key assignments difference, then illustrate first key assignments and described
Corresponding first key of second key assignments and the second key are changed, and in system operation, generally require to know the variation
The reason of, if it is described variation be it is abnormal, need to find corresponding submitter, to be corrected in time.Therefore described in the discovery
When the first key assignments and the second key assignments difference, then first time of delivery of the corresponding first object configuration file is recorded
Second time of delivery point of point and second target configuration file
Step S202: utilizing git or svn tool, obtains corresponding first history based on first time of delivery point and mentions
Record is handed over, and corresponding second history is obtained based on second time of delivery point and submits record;
Git or svn is version control tool, for managing the data changed over time.These data are placed on one
In a center repository, the file store will record the variation of file each time.Git the or svn work can be passed through as a result,
Tool is restored to archives old version, or the variation history of browsing file.
In the present embodiment, using git the or svn tool, corresponding first is obtained based on first time of delivery point
History submits record, and obtains corresponding second history based on second time of delivery point and submit record.For example, contrast test
A.properties configuration file in environment and production environment, November 5 newly-increased configuration item my name=hello World,
It compares and requests in triggering configuration file on November 7, by comparison, it was found that first object pair of the my name in the test environment
It is more different from the second key assignments in the second targeted contrast file in the production environment than the first key assignments in file, by the note
It records in comparing result, and the November 5 time point for increasing the configuration item newly is also recorded in the comparing result.
Step S203: the first submitter of record search is submitted according to first history, is submitted according to second history
Corresponding second submitter of record search;
Specifically, based on first historical record and second historical record got, corresponding first is searched
Submitter or the second submitter.
Step S204: human hair is submitted to first submitter and/or described second by pre-set prompt approach
Send prompt information.
In the present embodiment, the prompt approach includes mail, short message etc..To first submitter and/or described second
Submitter sends prompt information, so that first submitter and/or second submitter confirm or correct in time.
Further, the prompt can also be arranged according to the relationship between first key assignments and second key assignments to believe
The priority of breath.For example, if the relationship between first key assignments and second key assignments is newly-increased or deletes, it will be described excellent
First grade is set as level-one, if the relationship between first key assignments and second key assignments is modification, the priority is set as
Second level.And corresponding prompt is sent to first submitter and/or second submitter sequence according to the priority and is believed
Breath.
The present embodiment through the above scheme, records first key assignments first object different from second key assignments
First time of delivery point of configuration file and the second time of delivery point of second target configuration file;Utilize git or svn work
Tool obtains corresponding first history based on first time of delivery point and submits record, and is based on second time of delivery point
It obtains corresponding second history and submits record;The first submitter of record search is submitted according to first history, according to described the
Two history submit corresponding second submitter of record search;By pre-set prompt approach to first submitter and/
Or second submitter sends prompt information.The corresponding submitter of record search is submitted by obtaining history as a result, for institute
It states submitter to solve a problem promptly, further improves the efficiency and success rate that configuration file compares under varying environment.
In addition, the present embodiment also provides a kind of configuration file comparison device.It is configuration file pair of the present invention referring to Fig. 4, Fig. 4
Than the functional block diagram of device first embodiment.
People counting device provided by the invention is a kind of virtual bench, is stored in configuration file comparison shown in FIG. 1 and sets
In standby memory 1005, with realize configuration file comparison program institute it is functional: for receive user send configuration file
Comparison request, the configuration file comparison request include reduced time point, filename, first environment information and second environment letter
Breath;If reach the reduced time point for current time, load is in first under the first environment information respectively
Target configuration file and the second target configuration file under the second environment information, first configuration file and described
Second configuration file is corresponding with the filename;
For by the second of the first configuration parameter of the first object configuration file and second target configuration file
Configuration parameter compares, and lists comparing result.
Specifically, the comparison of configuration file described in the present embodiment device includes:
Receiving module 10, for receiving the configuration file comparison request of user's transmission, the configuration file compares request packet
Include reduced time point, filename, first environment information and second environment information;
Loading module 20, if reach the reduced time point for current time, load is in described first respectively
First object configuration file under environmental information and the second target configuration file under the second environment information, described
One configuration file and second configuration file are corresponding with the filename;
Contrast module 30, for configuring the first configuration parameter of the first object configuration file and second target
Second configuration parameter of file compares, and lists comparing result.
Further, the loading module is also used to:
The first active attribute is set according to the first environment information, based on described in the first active attribute load
First object configuration file;With
The 2nd active attribute is set according to the second environment information, based on described in the 2nd active attribute load
Second target configuration file.
Further, the contrast module is also used to:
The first key in the first object configuration file is extracted line by line;
The second key identical with first key is searched from second target configuration file;
The first key assignments in first key is compared with the second key assignments in second key;
The comparing result of first key assignments and second key assignments is listed in table form.
Further, the contrast module is also used to:
When recording the first of first key assignments first object configuration file different from second key assignments and submitting
Between point and second target configuration file the second time of delivery point;
Using git or svn tool, corresponding first history is obtained based on first time of delivery point and submits record, and
Corresponding second history, which is obtained, based on second time of delivery point submits record;
The first submitter of record search is submitted according to first history, record search pair is submitted according to second history
The second submitter answered;
Prompt letter is sent to first submitter and/or second submitter by pre-set prompt approach
Breath.
Further, the contrast module is also used to:
Whether online detect the user;
If the user is online, the comparing result is shown into display circle in user terminal corresponding with the user
Face;
If the user is not online, the comparing result is sent to pre-set reception address.
Further, the loading module is also used to:
Request, which is compared, according to the configuration file searches the corresponding first object configuration file and second target
Configuration file;
Judge whether the first object configuration file or second target configuration file can be used;
If the first object configuration file or second target configuration file are all available, then follow the steps: respectively plus
Carry the first object configuration file under the first environment information and the second target under the second environment information
Configuration file;
It is defeated if there is one or more unavailable in the first object configuration file or second target configuration file
The not available prompt information of current configuration file out, and judge the first object configuration file or institute again after preset duration
State whether the second target configuration file can be used.
Further, the loading module is also used to:
Check whether the first object configuration file or second target configuration file are accessed by application program;
If the first object configuration file or second target configuration file are not all accessed by the application program,
Determine that the first object configuration file or second target configuration file are all available;
If the one or more in the first object configuration file or second target configuration file is by the application
Routine access then determines that the first object configuration file or second target configuration file are unavailable.
A kind of computer storage medium is provided in addition, originally returning, is stored with configuration file in the computer storage medium
Program is compared, the configuration file comparison program realizes the step of configuration file control methods as described above when being run by processor
Suddenly, details are not described herein again.
Compared with prior art, a kind of configuration file control methods, device, equipment and storage medium proposed by the present invention, should
Method includes: the configuration file comparison request for receiving user and sending, and the configuration file comparison request includes reduced time point, text
Part name, first environment information and second environment information;If current time reaches the reduced time point, respectively at load
First object configuration file under the first environment information and the second target configuration under the second environment information
File, first configuration file and second configuration file are corresponding with the filename;The first object is configured
First configuration parameter of file and the second configuration parameter of second target configuration file compare, and list comparison knot
Fruit.The present invention is compared according to configuration file and is requested, and target configuration file is compared to and listed comparing result, improves difference
The efficiency and success rate that configuration file compares under environment.
It should be noted that, in this document, the terms "include", "comprise" or its any other variant are intended to non-row
His property includes, so that the process, method, article or the system that include a series of elements not only include those elements, and
And further include other elements that are not explicitly listed, or further include for this process, method, article or system institute it is intrinsic
Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including being somebody's turn to do
There is also other identical elements in the process, method of element, article or system.
The serial number of the above embodiments of the invention is only for description, does not represent the advantages or disadvantages of the embodiments.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side
Method can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but in many cases
The former is more preferably embodiment.Based on this understanding, technical solution of the present invention substantially in other words does the prior art
The part contributed out can be embodied in the form of software products, which is stored in one as described above
In storage medium (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that a terminal device executes the present invention respectively
Method described in a embodiment.
The above description is only a preferred embodiment of the present invention, is not intended to limit the scope of the invention, all utilizations
Equivalent structure made by description of the invention and accompanying drawing content or process transformation, are applied directly or indirectly in other relevant skills
Art field, is included within the scope of the present invention.
Claims (10)
1. a kind of configuration file control methods, which is characterized in that the described method includes:
Receive the configuration file that user sends and compare request, configuration file comparison request include reduced time point, filename,
First environment information and second environment information;
If current time reaches the reduced time point, load is in the first object under the first environment information respectively
Configuration file and the second target configuration file under the second environment information, first configuration file and described second
Configuration file is corresponding with the filename;
By the second configuration parameter of the first configuration parameter of the first object configuration file and second target configuration file
It compares, and lists comparing result.
2. the method according to claim 1, wherein the load respectively is under the first environment information
The step of first object configuration file and the second target configuration file under the second environment information includes:
The first active attribute is set according to the first environment information, based on the first active attribute load described first
Target configuration file;With
The 2nd active attribute is set according to the second environment information, based on the 2nd active attribute load described second
Target configuration file.
3. the method according to claim 1, wherein first configuration parameter includes the first key and the first key
Value, second configuration parameter include the second key and the second key assignments, first configuration by the first object configuration file
Second configuration parameter of parameter and second target configuration file compares, and the step of listing comparing result includes:
The first key in the first object configuration file is extracted line by line;
The second key identical with first key is searched from second target configuration file;
The first key assignments in first key is compared with the second key assignments in second key;
The comparing result of first key assignments and second key assignments is listed in table form.
4. method according to any one of claim 1-3, which is characterized in that described by the first object configuration file
The second configuration parameter of the first configuration parameter and second target configuration file compare, and list the step of comparing result
After rapid further include:
Record the first time of delivery point of first key assignments first object configuration file different from second key assignments
With the second time of delivery point of second target configuration file;
Using git or svn tool, corresponding first history is obtained based on first time of delivery point and submits record, and is based on
Second time of delivery point obtains corresponding second history and submits record;
The first submitter of record search is submitted according to first history, submits record search corresponding according to second history
Second submitter;
Prompt information is sent to first submitter and/or second submitter by pre-set prompt approach.
5. the method according to claim 1, wherein first configuration by the first object configuration file
Second configuration parameter of parameter and second target configuration file compares, and also wraps after the step of listing comparing result
It includes:
Whether online detect the user;
If the user is online, the comparing result is shown into the display interface in user terminal corresponding with the user;
If the user is not online, the comparing result is sent to pre-set reception address.
6. the method according to claim 1, wherein the load respectively is under the first environment information
Before the step of first object configuration file and the second target configuration file under the second environment information further include:
Request, which is compared, according to the configuration file searches the corresponding first object configuration file and second target configuration
File;
Judge whether the first object configuration file or second target configuration file can be used;
If the first object configuration file or second target configuration file are all available, then follow the steps: respectively at load
First object configuration file under the first environment information and the second target configuration under the second environment information
File;
If there is one or more unavailable in the first object configuration file or second target configuration file, output is worked as
The preceding not available prompt information of configuration file, and judge the first object configuration file or described again after preset duration
Whether two target configuration files can be used.
7. according to the method described in claim 6, it is characterized in that, the judgement first object configuration file or described the
Two target configuration files whether can with the step of include:
Check whether the first object configuration file or second target configuration file are accessed by application program;
If the first object configuration file or second target configuration file are not all accessed by the application program, determine
The first object configuration file or second target configuration file are all available;
If the one or more in the first object configuration file or second target configuration file is by the application program
Access, then determine that the first object configuration file or second target configuration file are unavailable.
8. a kind of configuration file compares device, which is characterized in that the configuration file compares device and includes:
Receiving module, for receiving the configuration file comparison request of user's transmission, the configuration file comparison request includes comparison
Time point, filename, first environment information and second environment information;
Loading module, if reach the reduced time point for current time, load is believed in the first environment respectively
First object configuration file under breath and the second target configuration file under the second environment information, first configuration
File and second configuration file are corresponding with the filename;
Contrast module, for by the first configuration parameter of the first object configuration file and second target configuration file
Second configuration parameter compares, and lists comparing result.
9. a kind of configuration file comparative apparatus, which is characterized in that the configuration file comparative apparatus includes processor, memory with
And the configuration file of storage in the memory compares program, the configuration file comparison program is run by the processor
When, it realizes such as the step of configuration file control methods of any of claims 1-7.
10. a kind of computer storage medium, which is characterized in that be stored with configuration file comparison journey in the computer storage medium
Sequence, the configuration file comparison program realize the configuration file pair as described in any one of claim 1-7 when being run by processor
The step of ratio method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910438043.0A CN110263305B (en) | 2019-05-22 | 2019-05-22 | Configuration file comparison method, device, equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910438043.0A CN110263305B (en) | 2019-05-22 | 2019-05-22 | Configuration file comparison method, device, equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110263305A true CN110263305A (en) | 2019-09-20 |
CN110263305B CN110263305B (en) | 2023-09-19 |
Family
ID=67915343
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910438043.0A Active CN110263305B (en) | 2019-05-22 | 2019-05-22 | Configuration file comparison method, device, equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110263305B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111538542A (en) * | 2020-03-24 | 2020-08-14 | 中国平安人寿保险股份有限公司 | System configuration method and related device |
CN112579205A (en) * | 2020-12-24 | 2021-03-30 | 平安普惠企业管理有限公司 | Configuration file checking method and device, computer equipment and storage medium |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2005250744A (en) * | 2004-03-03 | 2005-09-15 | Kddi Corp | Personal environment profile server |
US7606889B1 (en) * | 2006-06-30 | 2009-10-20 | Emc Corporation | Methods and systems for comparing storage area network configurations |
US20140245292A1 (en) * | 2013-02-25 | 2014-08-28 | International Business Machines Corporation | Automated Application Reconfiguration |
CN104699508A (en) * | 2015-03-25 | 2015-06-10 | 南京大学 | System and method for quickly arranging and updating virtual environment in cloud computing platform |
CN105824792A (en) * | 2016-03-18 | 2016-08-03 | 中国银联股份有限公司 | Text comparison method and equipment |
CN107992409A (en) * | 2017-11-21 | 2018-05-04 | 平安养老保险股份有限公司 | Method for generating test case, device, computer equipment and storage medium |
-
2019
- 2019-05-22 CN CN201910438043.0A patent/CN110263305B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2005250744A (en) * | 2004-03-03 | 2005-09-15 | Kddi Corp | Personal environment profile server |
US7606889B1 (en) * | 2006-06-30 | 2009-10-20 | Emc Corporation | Methods and systems for comparing storage area network configurations |
US20140245292A1 (en) * | 2013-02-25 | 2014-08-28 | International Business Machines Corporation | Automated Application Reconfiguration |
CN104699508A (en) * | 2015-03-25 | 2015-06-10 | 南京大学 | System and method for quickly arranging and updating virtual environment in cloud computing platform |
CN105824792A (en) * | 2016-03-18 | 2016-08-03 | 中国银联股份有限公司 | Text comparison method and equipment |
CN107992409A (en) * | 2017-11-21 | 2018-05-04 | 平安养老保险股份有限公司 | Method for generating test case, device, computer equipment and storage medium |
Non-Patent Citations (1)
Title |
---|
张宏波 等: "配置文件在无操作系统保护装置中的应用", 水电自动化与大坝监测, no. 06, pages 32 - 35 * |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
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 |
CN112579205A (en) * | 2020-12-24 | 2021-03-30 | 平安普惠企业管理有限公司 | Configuration file checking method and device, computer equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN110263305B (en) | 2023-09-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7702669B2 (en) | Synchronization in unified messaging systems | |
US8589911B1 (en) | Intent fulfillment | |
CN101207580B (en) | System and method for adding and deleting linkman synchronously by instant communication platform and business platform | |
US10666758B2 (en) | Browser resource pre-pulling method, terminal and storage medium | |
CN107464151B (en) | Order data processing method and device for high-concurrency service | |
CN106534281A (en) | Data request responding method, apparatus and system | |
CN110263305A (en) | Configuration file control methods, device, equipment and storage medium | |
CN115185946A (en) | Multi-tenant system, multi-tenant management method, computer device, and storage medium | |
US10187462B2 (en) | Methods, system, and server for constructing microblog management circle | |
CN103891244B (en) | A kind of method and device carrying out data storage and search | |
CN110263551A (en) | A kind of test method and device | |
CN116414628A (en) | Transaction request processing method and device in new and old system switching process | |
CN113868531A (en) | Information acquisition method and device, electronic device and medium | |
CN115186164A (en) | Search request control method and device, equipment, medium and product thereof | |
CN103856535A (en) | Method and device for obtaining user data | |
CN114706774A (en) | Interface test method, device, equipment and storage medium | |
US20080163238A1 (en) | Dynamic load balancing architecture | |
CN103491113B (en) | A kind of synchronous method, the apparatus and system of information fusion file | |
CN113360689A (en) | Image retrieval system, method, related device and computer program product | |
US20210103577A1 (en) | Reliable detection of deleted assets in data stores | |
US20160182649A1 (en) | Url issuing device, url issuing method, and url issuing program | |
CN111209292B (en) | Bin data management method, device and system | |
CN110874238A (en) | Online service updating method and device | |
US20230135794A1 (en) | Synchronizing item recommendations across applications using machine learning | |
CN114625568A (en) | Block chain backup processing method, device and equipment and readable 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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |