CN107168726A - A kind of method and apparatus of dynamic configuration application program - Google Patents
A kind of method and apparatus of dynamic configuration application program Download PDFInfo
- Publication number
- CN107168726A CN107168726A CN201710203799.8A CN201710203799A CN107168726A CN 107168726 A CN107168726 A CN 107168726A CN 201710203799 A CN201710203799 A CN 201710203799A CN 107168726 A CN107168726 A CN 107168726A
- Authority
- CN
- China
- Prior art keywords
- application program
- configuration file
- file
- environment
- electronic equipment
- 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 OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44505—Configuring for program initiating, e.g. using registry, configuration files
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The embodiments of the invention provide a kind of method and apparatus of dynamic configuration application program, correspondence configuration file, and then dynamic configuration application program are obtained according to actual motion environment for realizing.Methods described includes:When needing configuration application program, the current environment mark of electronic equipment where obtaining the application program, the current environment mark represents the current operating environment of the electronic equipment;Identified, obtained and the corresponding target configuration file of current environment mark according to the current environment;The application program is configured based on the target configuration file.
Description
Technical field
The present invention relates to field of computer technology, more particularly to a kind of method and apparatus of dynamic configuration application program.
Background technology
Configuration file is vital for application program.Common configuration file is included in program file, peace
Configuration file when dress or operation application program in reading program file is configured to application program.Because configuration file is usual
It is set in advance in program file, and will not changes, therefore such collocation method belongs to static configuration method.
During implementing, the running environment of application program is varied, including but not limited to development environment, production
Environment and use environment etc..Also, the installation equipment of application program, its running environment have been mounted with it can also happen that changing,
Production environment is for example changed into from development environment.But the mistake of present inventor's inventive technique scheme in the embodiment of the present application is realized
Cheng Zhong, it is found that above-mentioned technology at least has following technical problem:
First, to enable application program to run on different running environment, the application program of the commonly provided miscellaneous editions, each
Version includes a kind of configuration file of running environment.If user could not accurately download right version, it can not run and apply journey
Sequence.Second, if installing equipment operating environment change, original configuration file is no longer desirable for new running environment, will cause application
Program can not be continued to run with.
The content of the invention
The embodiments of the invention provide a kind of method and apparatus of dynamic configuration application program, for realizing according to actual fortune
Row environment obtains correspondence configuration file, and then dynamic configuration application program.
In a first aspect, the invention provides a kind of method of dynamic configuration application program, including:
When needing configuration application program, the current environment mark of electronic equipment where obtaining the application program is described
Current environment mark represents the current operating environment of the electronic equipment;
Identified, obtained and the corresponding target configuration file of current environment mark according to the current environment;
The application program is configured based on the target configuration file.
Optionally, the current environment mark of electronic equipment where obtaining the application program, including:
The current operating environment of the electronic equipment is detected, joined with the environment for obtaining the electronic equipment
Number;
Based on the ambient parameter, the current environment mark is determined.
Optionally, the current environment mark of electronic equipment where obtaining the application program, including:
One program message is sent to the corresponding server of the application program by the application program;The server point
The ambient parameter of the current operating environment for the electronic equipment that described program message is carried is analysed, based on the ambient parameter
Determine the current environment mark;
Receive the current environment mark that the server is sent.
Optionally, the running environment that the electronic equipment is supported includes N kinds, one environment of every kind of running environment correspondence
Mark, N is positive integer, is identified according to the current environment, obtains target configuration text corresponding with current environment mark
Before part, methods described also includes:
Storage and the one-to-one N number of alternative configurations file of running environment described in N kinds, each alternative configurations file pair
Answer the environmental labelses;Or
The program file of the application program is obtained, described program file includes corresponding with running environment described in N kinds
N number of alternative configurations file, one environmental labels of each alternative configurations file correspondence.
Optionally, acquisition and the corresponding target configuration file of current environment mark, including:
The target configuration file will be defined as corresponding to the alternative configurations file that the current environment is identified.
Optionally, the application program is configured based on the target configuration file, including:
The original configuration file in the configuration file of the application program is covered with the target configuration file, it is described original
Configuration file is the target configuration file of last time or the default configuration file of the application program;
Run the configuration file of the application program.
Optionally, the original configuration file in the configuration file of the application program is covered with the target configuration file,
Including:
The Part I of the original configuration file is covered with the Part I of the target configuration file, the target is matched somebody with somebody
The Part I for putting file is different from the Part I of the original configuration file.
Second aspect, the invention provides a kind of device of dynamic configuration application program, including:
Identifier acquisition module, for when needing configuration application program, obtaining application program place electronic equipment
Current environment is identified, and the current environment mark represents the current operating environment of the electronic equipment;
File obtains module, for being identified according to the current environment, obtains and the corresponding mesh of current environment mark
Mark configuration file;
Configuration module, for being configured based on the target configuration file to the application program.
Optionally, the identifier acquisition module is used to detect the current operating environment of the electronic equipment,
To obtain the ambient parameter of the electronic equipment;Based on the ambient parameter, the current environment mark is determined.
Optionally, the mark obtains module and is used for by the application program to the corresponding server of the application program
Send a program message;The current operating environment for the electronic equipment that the server analysis described program message is carried
Ambient parameter, current environment mark is determined based on the ambient parameter;Receive the described current of the server transmission
Environmental labelses.
Optionally, the running environment that the electronic equipment is supported includes N kinds, one environment of every kind of running environment correspondence
Mark, N is positive integer, and described device also includes:
Memory module, for being identified according to the current environment, is obtained and the corresponding target of current environment mark
Before configuration file, storage and the one-to-one N number of alternative configurations file of running environment described in N kinds, each alternative configurations
File one environmental labels of correspondence;Or
Program file obtains module, and the program file for obtaining the application program, described program file includes and N kinds
The one-to-one N number of alternative configurations file of the running environment, one ring of each alternative configurations file correspondence
Border is identified.
Optionally, the file obtains the alternative configurations file that module is used to identify corresponding to the current environment
It is defined as the target configuration file.
Optionally, the configuration module is used for in the configuration file of the target configuration file covering application program
Original configuration file, the original configuration file is silent for the last target configuration file or the application program
Recognize configuration file;Run the configuration file of the application program.
Optionally, the configuration module is used to cover the original configuration text with the Part I of the target configuration file
The Part I of part, the Part I of the target configuration file is different from the Part I of the original configuration file.
Said one or multiple technical schemes in the embodiment of the present application, are at least imitated with following one or more technologies
Really:
In the technical scheme of the embodiment of the present invention, when needing configuration application program, the application program is obtained first
The current environment mark of place electronic equipment, the current environment mark represents the current operating environment of the electronic equipment, so
Acquisition and the corresponding target configuration file of current environment mark, and then based on the target configuration file to the application afterwards
Program is configured.It can be seen that, by above-mentioned Dynamic Configuration Process, due to obtaining target configuration corresponding with current operating environment
File, so avoiding due to without configuration file of the download right version without correct correspondence running environment, Jin Erwu
The problem of method runs application program.Further, even if the running environment change of electronic equipment, according to the environmental labelses of new environment just
The configuration file suitable for new running environment can be dynamically obtained, so that application program can continue in new running environment
Middle operation.So, the embodiment of the present invention realizes the technique effect according to actual motion environment dynamic configuration application program.
Brief description of the drawings
Fig. 1 is the method flow diagram of dynamic configuration application program of the embodiment of the present invention;
Fig. 2 is the schematic device of dynamic configuration application program of the embodiment of the present invention.
Embodiment
The embodiments of the invention provide a kind of method and apparatus of dynamic configuration application program, for realizing according to actual fortune
Row environment obtains correspondence configuration file, and then dynamic configuration application program.
In order to solve the above-mentioned technical problem, the technical scheme general thought that the present invention is provided is as follows:
In the technical scheme of the embodiment of the present invention, when needing configuration application program, the application program is obtained first
The current environment mark of place electronic equipment, the current environment mark represents the current operating environment of the electronic equipment, so
Acquisition and the corresponding target configuration file of current environment mark, and then based on the target configuration file to the application afterwards
Program is configured.It can be seen that, by above-mentioned Dynamic Configuration Process, due to obtaining target configuration corresponding with current operating environment
File, so avoiding due to without configuration file of the download right version without correct correspondence running environment, Jin Erwu
The problem of method runs application program.Further, even if the running environment change of electronic equipment, according to the environmental labelses of new environment just
The configuration file suitable for new running environment can be dynamically obtained, so that application program can continue in new running environment
Middle operation.So, the embodiment of the present invention realizes the technique effect according to actual motion environment dynamic configuration application program.
Technical solution of the present invention is described in detail below by accompanying drawing and specific embodiment, it should be understood that the application
Specific features in embodiment and embodiment are the detailed description to technical scheme, rather than to present techniques
The restriction of scheme, in the case where not conflicting, the technical characteristic in the embodiment of the present application and embodiment can be mutually combined.
The terms "and/or", only a kind of incidence relation for describing affiliated partner, represents there may be three kinds of passes
System, for example, A and/or B, can be represented:Individualism A, while there is A and B, these three situations of individualism B.In addition, herein
Middle character "/", it is a kind of relation of "or" to typically represent forward-backward correlation object.
First aspect present invention provides a kind of method of dynamic configuration application program, refer to Fig. 1, is implementation of the present invention
The method flow diagram of example dynamic configuration application program.This method includes:
S101:When needing configuration application program, the current environment mark of electronic equipment where obtaining the application program,
The current environment mark represents the current operating environment of the electronic equipment;
S102:Identified, obtained and the corresponding target configuration file of current environment mark according to the current environment;
S103:The application program is configured based on the target configuration file.
Specifically, in embodiments of the present invention, it is necessary to when configuring application program, including but not limited to install and apply journey
When sequence with operation application program etc., the present invention is not particularly limited.When configuration application program is needed,
In S101, the current environment mark of electronic equipment where obtaining application program.
Specifically, application program is installed and operated in an electronic equipment in the embodiment of the present invention, and electronic equipment is for example
For mobile phone, tablet personal computer or desktop computer etc., also, electronic equipment in the embodiment of the present invention can be specially client device,
Can also be server, the present invention is not particularly limited.The running environment that electronic equipment is supported has N number of, N number of positive integer.So,
Electronic equipment may operate in any one running environment of N number of running environment.Environmental labelses represent running environment, different fortune
The corresponding different environmental labelses of row environment.Current environment mark then represents the current operating environment of electronic equipment.
Obtain after current environment mark, next, in S102, being identified according to current environment, obtain and current environment mark
Know corresponding target configuration file.Finally, application program is configured based on target configuration file in S103.Due to current
Environmental labelses illustrate the current operating environment of electronic equipment, so be exactly with the corresponding target configuration file of current environment mark
It is adapted to the configuration file of current operating environment, then application program is configured based on target configuration file, can to apply journey
Sequence is adapted to current operation, and then can be run under current operating environment.
Seen from the above description, due to obtaining target configuration file corresponding with current operating environment, so avoiding
Due to corresponding to the configuration file of running environment without correct without download right version, and then application program can not be run
Problem.Further, even if the running environment change of electronic equipment, it is obtained with being applied to newly according to the environmental labelses of new environment
The configuration file of running environment, so that application program can continue to run in new running environment.So, the present invention is implemented
Example realizes the technique effect according to actual motion environment dynamic configuration application program.
The current environment that electronic equipment how is obtained in S101 is identified below and described in detail.In the embodiment of the present invention
In, obtaining the embodiment of current environment mark has two kinds.
In the first embodiment, the current environment mark for obtaining electronic equipment is realized especially by following process:
The current operating environment of the electronic equipment is detected, joined with the environment for obtaining the electronic equipment
Number;
Based on the ambient parameter, the current environment mark is determined.
Specifically, ambient parameter is with including but is not limited to electronic equipment IP (Internet protocol, Internet Protocol)
Location, place network, operating system and user name etc..When needing to configure application program, to the current fortune of electronic equipment
Row environment is detected, for example, read electronic equipment IP address and place network, and detection operating system and acquisition are set in electronics
User name of standby upper login etc., the present invention is to ambient parameter and detects that the method for ambient parameter is not particularly limited.
Then, determine that current environment is identified based on ambient parameter.Specifically, electronic equipment prestore ambient parameter with
The corresponding relation of environmental labelses, or can also be corresponding with environmental labelses including ambient parameter in the program file of application program
Relation, and then, after the ambient parameter for detecting electronic equipment current operating environment, control ambient parameter is corresponding with environmental labelses
Relation, it is possible to determine that current environment is identified.
For convenience of explanation, with ambient parameter it is specially below IP address, place network and operating system, running environment is
Development environment, production environment and use environment, and corresponding environmental labelses are to be introduced exemplified by 1,2 and 3 respectively.It refer to
Table 1, is an ambient parameter and the corresponding relation schematic table of environmental labelses.
Table 1
The above-mentioned row of table 1 second represents that, if IP address is in 11.0.0.0~11.255.255.255 scopes, place network is
DOUYU1 or DOUYU2, and operating system is DOS systems, then the running environment of electronic equipment where application program is exploitation ring
Border, correspondence environmental labelses 1;The third line of table 1 is represented, if IP address is in 12.0.0.0~12.255.255.255, place network is
DOUYU1 or DOUYU2, and operating system is DOS systems, then the running environment of electronic equipment where application program is exploitation ring
Border, correspondence environmental labelses 1;The row of table 1 the 6th is represented, if IP address is in 192.168.0.0-192.168.255.255, place network
For other networks beyond DOUYU1 or DOUYU2, and operating system is Android Android, apple mobile device operation system
Ios, win XP, win 7 or the systems of win 10, then the running environment of electronic equipment where application program is use environment, correspondence
Environmental labelses 3.The fourth line of table 1 is similar with the implication that fifth line is represented, is not just described in detail one by one here.
Assuming that when needing to configure application program, the ambient parameter detected is specially IP address 11.1.1.1,
Place network DOUYU1, operating system DOS.The corresponding relation of ambient parameter and environmental labelses according to table 1, due to
11.1.1.1 in 11.0.0.0~11.255.255.255 scopes, and place network is DOUYU1, and operating system is DOS, because
The current operating environment of this determination electronic equipment is development environment, and current environment is designated 1.
In second of embodiment, the current environment mark for obtaining electronic equipment is realized especially by following process:
One program message is sent to the corresponding server of the application program by the application program;The server point
The ambient parameter of the current operating environment for the electronic equipment that described program message is carried is analysed, based on the ambient parameter
Determine the current environment mark;
Receive the current environment mark that the server is sent.
Specifically, program message is any message that application program is sent to the corresponding server of application program, for example
Request message, return message, connection message or notification message etc., the present invention is not particularly limited.Application program is arranged on electronics
In equipment, application program will be sent out to server transmission program message by the transmitter of electronic equipment, interface and place network etc.
Send, therefore, according to general protocol, the parameter of electronic equipment can be included in program message, and these parameters can reflect electronics
The current operating environment of equipment.In other words, program message will carry the ambient parameter of electronic equipment.
So, by application program to server transmission program message, server can just parse program message carrying
Ambient parameter, thus analyze the current operating environment of electronic equipment, and then determine current environment mark.
Can also in advance can be with storage environment parameter and environmental labelses similar to the first above-mentioned embodiment, in server
Corresponding relation, and then the corresponding relation based on ambient parameter and environmental labelses and the ambient parameter that parses determine that electronics is set
Standby current environment mark.How it had been discussed in detail in the first embodiment based on ambient parameter and environmental labelses
Corresponding relation determines that current environment is identified, and just it is no longer repeated here.
Or, server receives program message and simultaneously parsed after ambient parameter, can also be on the administrative staff of server
Ambient parameter is reported, administrative staff is carried out more comprehensive and accurate analysis to ambient parameter, so that it is determined that current environment
Mark.
Next, the current environment mark that electronic equipment the reception server is determined and sent, is derived from current environment mark
Know.
Below, it is introduced to how to be obtained in S102 with the corresponding target configuration file of current environment mark.
The configuration file in the embodiment of the present invention is introduced first.
In embodiments of the present invention, the running environment that electronic equipment is supported includes N kinds, and N kind running environment is differed,
In other words, electronic equipment may operate in a variety of running environment of N.N is positive integer.In one embodiment, exist
Before S102, in addition to:
Storage and the one-to-one N number of alternative configurations file of running environment described in N kinds, each alternative configurations file pair
Answer the environmental labelses.
Specifically, alternative configurations file be application program in configuration file used in each running environment, with operation
Environment is corresponded, and is had N number of.In embodiments of the present invention, alternative configurations file can be specially complete configuration file, i.e.,
Include all configuration items in each alternative configurations file.Or, alternative configurations file can also only include different piece.
Specifically, although application program needs different configurations, difference operation ring in different running environment
The configuration in border may also include identical part, such as rendering same background color and display identical application name,
Therefore, in order to reduce the data volume of alternative configurations file, alternative configurations file can only include different piece.
For example, operating in the application program of development environment needs the first database of connection and first port, operates in
The application program of production environment needs the second database of connection and second port, and operating in the application program of use environment needs company
The 3rd database and the 3rd port are connect, and for the configuration all same in development environment, production environment and use environment, then,
The address of the first database and first port can only be included corresponding to the standby configuration file of development environment, corresponding to production ring
The standby configuration file in border can only include the address of the second database and second port, corresponding to the standby configuration of use environment
File can only include the address of the 3rd database and the 3rd port.
In addition, each alternative configurations file is corresponding with an environmental labelses, and specific corresponding environmental labelses are its correspondence
Running environment environmental labelses.During implementing, the corresponding environmental labelses of alternative configurations file can be arranged on
Property parameters or filename etc., the present invention is not particularly limited.
In another embodiment, before S102, in addition to:
The program file of the application program is obtained, described program file includes corresponding with running environment described in N kinds
N number of alternative configurations file, one environmental labels of each alternative configurations file correspondence.
Specifically, it is no longer repeated for the something in common of this kind of embodiment and aforementioned embodiments.Different from above-mentioned
Embodiment stores standby configuration file in the electronic device, and in this kind of embodiment, N number of standby configuration file is arranged on
In program file, so obtaining the program file of application program, N number of standby configuration file is just obtained.Implementing
Cheng Zhong, those skilled in the art can be according to the above-mentioned any embodiment of actual selection, and the present invention is not done
Concrete restriction.
Next, being introduced to how to be obtained in S102 with the corresponding target configuration file of current environment mark.With reference to
Target configuration file is obtained especially by following mistake in the embodiment of any one above-mentioned storage standby configuration file, S102
Journey:
The target configuration file will be defined as corresponding to the alternative configurations file that the current environment is identified.
Specifically, because each standby configuration file is corresponding with an environmental labelses, therefore, identified with current environment
Corresponding standby configuration file, is just the configuration file for being adapted to current operating environment, so identified according to current environment, will be right
The alternative configurations file that should be identified in current environment is defined as target configuration file.
It is introduced below to how to carry out configuration based on target configuration file in S103.In embodiments of the present invention,
S103 can be realized by following process:
The original configuration file in the configuration file of the application program is covered with the target configuration file, it is described original
Configuration file is the target configuration file of last time or the default configuration file of the application program;
Run the configuration file of the application program.
Specifically, electronic equipment needs to read application program according to specified path when being configured for application program
Content in configuration file, before S103 is configured based on target configuration file to application program, the configuration text of application program
Content in part is the content of original configuration file.Specifically, if being specifically when the application is installed to application program
Configured, then original configuration file is specially just the default configuration file of application program, default configuration file can be to appoint
The integrated configuration file of one standby configuration file or acquiescence, the present invention is not particularly limited.And should in operation if being specifically
Application program is configured during with program, then original configuration file be specially just it is last according to embodiments of the present invention in skill
The target configuration file that art scheme is determined.
When the target configuration file based on this determination configures application program, with the target configuration file of this determination
Content covers the content of the original configuration file in the configuration file of application program, and then electronic equipment runs matching somebody with somebody for application program
File is put, is achieved that and application program is configured according to the target configuration file of this determination.
Whether a kind of embodiment wherein, can contrast target configuration file that this determines and original configuration file
It is identical.If this target configuration file determined is identical with original configuration file, in order to save device resource, it can be not required to
Again original configuration file is covered, the configuration file of application program is run.
In another embodiment, target configuration file and original configuration file that this is determined can not also be contrasted
It is whether identical, original configuration file is directly covered with the target configuration file of this determination.
In addition, being described above, alternative configurations file can be specially complete configuration file, can also only include
Different piece.Therefore, just specifically there are two kinds of embodiments when covering original configuration file with target configuration file.A kind of real
Apply in mode, standby configuration file is complete configuration file, then when covering original configuration file, text will be configured with whole target
Part covers whole original configuration file.
In another embodiment, standby configuration file can be complete configuration file, can also only include difference
Part, in this kind of embodiment, is covered in the following way:
The Part I of the original configuration file is covered with the Part I of the target configuration file, the target is matched somebody with somebody
The Part I for putting file is different from the Part I of the original configuration file.
Specifically, the Part I of target configuration file and the Part I of original configuration file are different, i.e., first
It is divided to the different piece for referring to two configuration files.In order to reduce overlay capacity, less configuration used time, with the of target configuration file
The Part I of part covering original configuration file, and then cause the original configuration file after covering to change into target configuration
File.
Example above is continued to use, the application program for operating in development environment, production environment and use environment is only to connect
The database connect is different with port, and other configurations are identical.It is therefore assumed that target configuration file is the standby of correspondence production environment
Database address in original configuration file, then be covered as the address of the first database by configuration file, and port address is covered as
First port address, other configurations then need not be covered or changed.
Based on the inventive concept same with the method for dynamic configuration application program in previous embodiment, second aspect of the present invention
A kind of device of dynamic configuration application program is also provided, as shown in Fig. 2 including:
Identifier acquisition module 101, for when needing configuration application program, obtaining electronic equipment where the application program
Current environment mark, current environment mark represents the current operating environment of the electronic equipment;
File obtains module 102, for being identified according to the current environment, obtains corresponding with current environment mark
Target configuration file;
Configuration module 103, for being configured based on the target configuration file to the application program.
Optionally, identifier acquisition module 101 is used to detect the current operating environment of the electronic equipment, with
Obtain the ambient parameter of the electronic equipment;Based on the ambient parameter, the current environment mark is determined.
Optionally, mark obtains module 101 and is used for by the application program to the corresponding server of the application program
Send a program message;The current operating environment for the electronic equipment that the server analysis described program message is carried
Ambient parameter, current environment mark is determined based on the ambient parameter;Receive the described current of the server transmission
Environmental labelses.
Optionally, the running environment that the electronic equipment is supported includes N kinds, one environment of every kind of running environment correspondence
Mark, N is positive integer, and described device also includes:
Memory module, for being identified according to the current environment, is obtained and the corresponding target of current environment mark
Before configuration file, storage and the one-to-one N number of alternative configurations file of running environment described in N kinds, each alternative configurations
File one environmental labels of correspondence;Or
Program file obtains module, and the program file for obtaining the application program, described program file includes and N kinds
The one-to-one N number of alternative configurations file of the running environment, one ring of each alternative configurations file correspondence
Border is identified.
Optionally, file obtains the alternative configurations file that module 102 is used to identify corresponding to the current environment
It is defined as the target configuration file.
Optionally, configuration module 103 is used for in the configuration file of the target configuration file covering application program
Original configuration file, the original configuration file is silent for the last target configuration file or the application program
Recognize configuration file;Run the configuration file of the application program.
Optionally, configuration module 103 is used to cover the original configuration text with the Part I of the target configuration file
The Part I of part, the Part I of the target configuration file is different from the Part I of the original configuration file.
The various change mode and instantiation of the method for dynamic configuration application program in the embodiment of earlier figures 1 are equally fitted
For the device of the dynamic configuration application program of the present embodiment, pass through retouching in detail for the foregoing method to dynamic configuration application program
State, those skilled in the art are clear that the implementation of the device of dynamic configuration application program in the present embodiment, institute
With succinct for specification, it will not be described in detail herein.
Said one or multiple technical schemes in the embodiment of the present application, are at least imitated with following one or more technologies
Really:
In the technical scheme of the embodiment of the present invention, when needing configuration application program, the application program is obtained first
The current environment mark of place electronic equipment, the current environment mark represents the current operating environment of the electronic equipment, so
Acquisition and the corresponding target configuration file of current environment mark, and then based on the target configuration file to the application afterwards
Program is configured.It can be seen that, by above-mentioned Dynamic Configuration Process, due to obtaining target configuration corresponding with current operating environment
File, so avoiding due to without configuration file of the download right version without correct correspondence running environment, Jin Erwu
The problem of method runs application program.Further, even if the running environment change of electronic equipment, according to the environmental labelses of new environment just
The configuration file suitable for new running environment can be dynamically obtained, so that application program can continue in new running environment
Middle operation.So, the embodiment of the present invention realizes the technique effect according to actual motion environment dynamic configuration application program.
It should be understood by those skilled in the art that, embodiments of the invention can be provided as method, system or computer program
Product.Therefore, the present invention can be using the reality in terms of complete hardware embodiment, complete software embodiment or combination software and hardware
Apply the form of example.Moreover, the present invention can be used in one or more computers for wherein including computer usable program code
The computer program production that usable storage medium is implemented on (including but is not limited to magnetic disk storage, CD-ROM, optical memory etc.)
The form of product.
The present invention is the flow with reference to method according to embodiments of the present invention, equipment (system) and computer program product
Figure and/or block diagram are described.It should be understood that can be by every first-class in computer program instructions implementation process figure and/or block diagram
Journey and/or the flow in square frame and flow chart and/or block diagram and/or the combination of square frame.These computer programs can be provided
The processor of all-purpose computer, special-purpose computer, Embedded Processor or other programmable data processing devices is instructed to produce
A raw machine so that produced by the instruction of computer or the computing device of other programmable data processing devices for real
The device for the function of being specified in present one flow of flow chart or one square frame of multiple flows and/or block diagram or multiple square frames.
These computer program instructions, which may be alternatively stored in, can guide computer or other programmable data processing devices with spy
Determine in the computer-readable memory that mode works so that the instruction being stored in the computer-readable memory, which is produced, to be included referring to
Make the manufacture of device, the command device realize in one flow of flow chart or multiple flows and/or one square frame of block diagram or
The function of being specified in multiple square frames.
These computer program instructions can be also loaded into computer or other programmable data processing devices so that in meter
Series of operation steps is performed on calculation machine or other programmable devices to produce computer implemented processing, thus in computer or
The instruction performed on other programmable devices is provided for realizing in one flow of flow chart or multiple flows and/or block diagram one
The step of function of being specified in individual square frame or multiple square frames.
Obviously, those skilled in the art can carry out the essence of various changes and modification without departing from the present invention to the present invention
God and scope.So, if these modifications and variations of the present invention belong to the scope of the claims in the present invention and its equivalent technologies
Within, then the present invention is also intended to comprising including these changes and modification.
Claims (10)
1. a kind of method of dynamic configuration application program, it is characterised in that including:
When needing configuration application program, the current environment mark of electronic equipment where obtaining the application program is described current
Environmental labelses represent the current operating environment of the electronic equipment;
Identified, obtained and the corresponding target configuration file of current environment mark according to the current environment;
The application program is configured based on the target configuration file.
2. the method as described in claim 1, it is characterised in that the current environment of electronic equipment where obtaining the application program
Mark, including:
The current operating environment of the electronic equipment is detected, to obtain the ambient parameter of the electronic equipment;
Based on the ambient parameter, the current environment mark is determined.
3. the method as described in claim 1, it is characterised in that the current environment of electronic equipment where obtaining the application program
Mark, including:
One program message is sent to the corresponding server of the application program by the application program;The server analysis institute
The ambient parameter of the current operating environment of the electronic equipment of program message carrying is stated, is determined based on the ambient parameter
The current environment mark;
Receive the current environment mark that the server is sent.
4. method as claimed in claim 2 or claim 3, it is characterised in that the running environment that the electronic equipment is supported includes N kinds,
One environmental labels of every kind of running environment correspondence, N is positive integer, is identified according to the current environment, obtain with it is described
Current environment is identified before corresponding target configuration file, and methods described also includes:
Storage and the one-to-one N number of alternative configurations file of running environment described in N kinds, each alternative configurations file correspondence one
The individual environmental labelses;Or
The program file of the application program is obtained, described program file includes N number of correspondingly with running environment described in N kinds
The alternative configurations file, one environmental labels of each alternative configurations file correspondence.
5. method as claimed in claim 4, it is characterised in that obtain target configuration text corresponding with current environment mark
Part, including:
The target configuration file will be defined as corresponding to the alternative configurations file that the current environment is identified.
6. method as claimed in claim 5, it is characterised in that carried out based on the target configuration file to the application program
Configuration, including:
The original configuration file in the configuration file of the application program, the original configuration are covered with the target configuration file
File is the target configuration file of last time or the default configuration file of the application program;
Run the configuration file of the application program.
7. method as claimed in claim 6, it is characterised in that matching somebody with somebody for the application program is covered with the target configuration file
The original configuration file in file is put, including:
The Part I of the original configuration file, the target configuration text are covered with the Part I of the target configuration file
The Part I of part is different from the Part I of the original configuration file.
8. a kind of device of dynamic configuration application program, it is characterised in that including:
Identifier acquisition module, for when needing configuration application program, electronic equipment to be current where obtaining the application program
Environmental labelses, the current environment mark represents the current operating environment of the electronic equipment;
File obtains module, and for being identified according to the current environment, acquisition is matched somebody with somebody with the corresponding target of current environment mark
Put file;
Configuration module, for being configured based on the target configuration file to the application program.
9. device as claimed in claim 8, it is characterised in that the identifier acquisition module is used for the institute to the electronic equipment
State current operating environment to be detected, to obtain the ambient parameter of the electronic equipment;Based on the ambient parameter, it is determined that described
Current environment is identified.
10. device as claimed in claim 8, it is characterised in that the mark, which obtains module, to be used to pass through the application program
A program message is sent to the corresponding server of the application program;It is described that the server analysis described program message is carried
The ambient parameter of the current operating environment of electronic equipment, the current environment mark is determined based on the ambient parameter;Connect
Receive the current environment mark that the server is sent.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710203799.8A CN107168726B (en) | 2017-03-30 | 2017-03-30 | Method and device for dynamically configuring application program |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710203799.8A CN107168726B (en) | 2017-03-30 | 2017-03-30 | Method and device for dynamically configuring application program |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN107168726A true CN107168726A (en) | 2017-09-15 |
| CN107168726B CN107168726B (en) | 2021-04-27 |
Family
ID=59849633
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201710203799.8A Active CN107168726B (en) | 2017-03-30 | 2017-03-30 | Method and device for dynamically configuring application program |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN107168726B (en) |
Cited By (17)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN108536489A (en) * | 2018-04-23 | 2018-09-14 | 腾讯科技(深圳)有限公司 | Match the method, apparatus and computer readable storage medium of resource environment |
| CN108664270A (en) * | 2018-05-09 | 2018-10-16 | 平安普惠企业管理有限公司 | Environment dynamic switching method, device, computer equipment and storage medium |
| CN108804618A (en) * | 2018-05-31 | 2018-11-13 | 康键信息技术(深圳)有限公司 | Configuration method for database, device, computer equipment and storage medium |
| CN109684201A (en) * | 2018-11-26 | 2019-04-26 | 平安科技(深圳)有限公司 | It is switched fast the method, apparatus, computer equipment and storage medium of running environment |
| CN109828779A (en) * | 2018-12-26 | 2019-05-31 | 中国平安人寿保险股份有限公司 | Environment changing method, apparatus, terminal installation and storage medium |
| CN110147241A (en) * | 2019-04-16 | 2019-08-20 | 平安普惠企业管理有限公司 | Program configures update method, electronic device, computer equipment and storage medium |
| CN110377330A (en) * | 2019-07-22 | 2019-10-25 | 国美视界(北京)科技有限公司 | The operating system configuration method and equipment of electronic equipment |
| CN110858142A (en) * | 2018-08-07 | 2020-03-03 | 北京优酷科技有限公司 | Application starting method and device |
| WO2020103606A1 (en) * | 2018-11-19 | 2020-05-28 | Oppo广东移动通信有限公司 | Model processing method and device, terminal, and storage medium |
| CN111221593A (en) * | 2019-12-31 | 2020-06-02 | 五八有限公司 | A kind of dynamic loading method and device |
| CN111949513A (en) * | 2020-07-09 | 2020-11-17 | 中国建设银行股份有限公司 | A configuration file loading method, device, electronic device and readable storage device |
| CN112463256A (en) * | 2020-12-11 | 2021-03-09 | 微医云(杭州)控股有限公司 | Method, system, electronic device and storage medium for determining configuration file |
| CN112905274A (en) * | 2021-05-06 | 2021-06-04 | 鹏城实验室 | Data analysis method and device, terminal equipment and computer readable storage medium |
| CN113204376A (en) * | 2021-04-27 | 2021-08-03 | 网银在线(北京)科技有限公司 | File analysis method and device, computer equipment and storage medium |
| CN113239346A (en) * | 2021-05-20 | 2021-08-10 | 南京瑞师信息科技有限公司 | Method and system for operation maintenance based on information security |
| CN113392400A (en) * | 2020-03-12 | 2021-09-14 | 北京沃东天骏信息技术有限公司 | Method, device and system for detecting operating environment |
| CN117492872A (en) * | 2023-12-29 | 2024-02-02 | 深圳海智创科技有限公司 | Environment configuration method, device, system and storage medium |
Citations (13)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20060230387A1 (en) * | 2005-04-06 | 2006-10-12 | Microsoft Corporation | Memory management configuration |
| CN101751264A (en) * | 2008-11-28 | 2010-06-23 | 英业达集团(天津)电子技术有限公司 | Method for simplifying application program for installing window operating system |
| CN102013994A (en) * | 2010-11-02 | 2011-04-13 | 中兴通讯股份有限公司 | Method, terminal and system for implementing network element version compatibility in network management |
| CN102571392A (en) * | 2010-12-13 | 2012-07-11 | 中国移动通信集团广东有限公司 | Method and device for configuring data of data communication device |
| CN103338233A (en) * | 2013-06-05 | 2013-10-02 | 新浪网技术(中国)有限公司 | Load balancing device, Web server, request information processing method and system |
| CN104539458A (en) * | 2014-12-30 | 2015-04-22 | 深圳市兰丁科技有限公司 | Operating environment self-adapting method and device |
| CN105159704A (en) * | 2015-08-05 | 2015-12-16 | 浪潮(北京)电子信息产业有限公司 | Method and apparatus for batch deployment of operation systems |
| CN105204917A (en) * | 2015-11-05 | 2015-12-30 | 北京奇虎科技有限公司 | Method and device for loading configuration files at starting moment of application program |
| CN105446753A (en) * | 2014-07-02 | 2016-03-30 | 北大方正集团有限公司 | Configuration file processing method and device |
| CN105760176A (en) * | 2016-03-15 | 2016-07-13 | 青岛海信移动通信技术股份有限公司 | Packaging method, starting method and corresponding devices for web application |
| CN106034247A (en) * | 2015-03-12 | 2016-10-19 | Tcl集团股份有限公司 | Configuration method and apparatus for smart television application |
| CN106484460A (en) * | 2016-09-13 | 2017-03-08 | 郑州云海信息技术有限公司 | The installation method of large-scale storage cluster system in a kind of |
| CN106549789A (en) * | 2015-09-21 | 2017-03-29 | 中兴通讯股份有限公司 | A kind of method and system for realizing that server is installed |
-
2017
- 2017-03-30 CN CN201710203799.8A patent/CN107168726B/en active Active
Patent Citations (13)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20060230387A1 (en) * | 2005-04-06 | 2006-10-12 | Microsoft Corporation | Memory management configuration |
| CN101751264A (en) * | 2008-11-28 | 2010-06-23 | 英业达集团(天津)电子技术有限公司 | Method for simplifying application program for installing window operating system |
| CN102013994A (en) * | 2010-11-02 | 2011-04-13 | 中兴通讯股份有限公司 | Method, terminal and system for implementing network element version compatibility in network management |
| CN102571392A (en) * | 2010-12-13 | 2012-07-11 | 中国移动通信集团广东有限公司 | Method and device for configuring data of data communication device |
| CN103338233A (en) * | 2013-06-05 | 2013-10-02 | 新浪网技术(中国)有限公司 | Load balancing device, Web server, request information processing method and system |
| CN105446753A (en) * | 2014-07-02 | 2016-03-30 | 北大方正集团有限公司 | Configuration file processing method and device |
| CN104539458A (en) * | 2014-12-30 | 2015-04-22 | 深圳市兰丁科技有限公司 | Operating environment self-adapting method and device |
| CN106034247A (en) * | 2015-03-12 | 2016-10-19 | Tcl集团股份有限公司 | Configuration method and apparatus for smart television application |
| CN105159704A (en) * | 2015-08-05 | 2015-12-16 | 浪潮(北京)电子信息产业有限公司 | Method and apparatus for batch deployment of operation systems |
| CN106549789A (en) * | 2015-09-21 | 2017-03-29 | 中兴通讯股份有限公司 | A kind of method and system for realizing that server is installed |
| CN105204917A (en) * | 2015-11-05 | 2015-12-30 | 北京奇虎科技有限公司 | Method and device for loading configuration files at starting moment of application program |
| CN105760176A (en) * | 2016-03-15 | 2016-07-13 | 青岛海信移动通信技术股份有限公司 | Packaging method, starting method and corresponding devices for web application |
| CN106484460A (en) * | 2016-09-13 | 2017-03-08 | 郑州云海信息技术有限公司 | The installation method of large-scale storage cluster system in a kind of |
Cited By (20)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN108536489A (en) * | 2018-04-23 | 2018-09-14 | 腾讯科技(深圳)有限公司 | Match the method, apparatus and computer readable storage medium of resource environment |
| CN108664270A (en) * | 2018-05-09 | 2018-10-16 | 平安普惠企业管理有限公司 | Environment dynamic switching method, device, computer equipment and storage medium |
| CN108804618A (en) * | 2018-05-31 | 2018-11-13 | 康键信息技术(深圳)有限公司 | Configuration method for database, device, computer equipment and storage medium |
| CN110858142A (en) * | 2018-08-07 | 2020-03-03 | 北京优酷科技有限公司 | Application starting method and device |
| CN110858142B (en) * | 2018-08-07 | 2024-05-24 | 阿里巴巴(中国)有限公司 | Application starting method and device |
| WO2020103606A1 (en) * | 2018-11-19 | 2020-05-28 | Oppo广东移动通信有限公司 | Model processing method and device, terminal, and storage medium |
| CN109684201A (en) * | 2018-11-26 | 2019-04-26 | 平安科技(深圳)有限公司 | It is switched fast the method, apparatus, computer equipment and storage medium of running environment |
| CN109828779A (en) * | 2018-12-26 | 2019-05-31 | 中国平安人寿保险股份有限公司 | Environment changing method, apparatus, terminal installation and storage medium |
| CN110147241A (en) * | 2019-04-16 | 2019-08-20 | 平安普惠企业管理有限公司 | Program configures update method, electronic device, computer equipment and storage medium |
| CN110377330A (en) * | 2019-07-22 | 2019-10-25 | 国美视界(北京)科技有限公司 | The operating system configuration method and equipment of electronic equipment |
| CN111221593A (en) * | 2019-12-31 | 2020-06-02 | 五八有限公司 | A kind of dynamic loading method and device |
| CN113392400A (en) * | 2020-03-12 | 2021-09-14 | 北京沃东天骏信息技术有限公司 | Method, device and system for detecting operating environment |
| CN111949513A (en) * | 2020-07-09 | 2020-11-17 | 中国建设银行股份有限公司 | A configuration file loading method, device, electronic device and readable storage device |
| CN112463256A (en) * | 2020-12-11 | 2021-03-09 | 微医云(杭州)控股有限公司 | Method, system, electronic device and storage medium for determining configuration file |
| CN113204376A (en) * | 2021-04-27 | 2021-08-03 | 网银在线(北京)科技有限公司 | File analysis method and device, computer equipment and storage medium |
| CN113204376B (en) * | 2021-04-27 | 2024-12-13 | 网银在线(北京)科技有限公司 | File parsing method, device, computer equipment and storage medium |
| CN112905274A (en) * | 2021-05-06 | 2021-06-04 | 鹏城实验室 | Data analysis method and device, terminal equipment and computer readable storage medium |
| CN113239346A (en) * | 2021-05-20 | 2021-08-10 | 南京瑞师信息科技有限公司 | Method and system for operation maintenance based on information security |
| CN117492872A (en) * | 2023-12-29 | 2024-02-02 | 深圳海智创科技有限公司 | Environment configuration method, device, system and storage medium |
| CN117492872B (en) * | 2023-12-29 | 2024-05-24 | 深圳海智创科技有限公司 | Environment configuration method, device, system and storage medium |
Also Published As
| Publication number | Publication date |
|---|---|
| CN107168726B (en) | 2021-04-27 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN107168726A (en) | A kind of method and apparatus of dynamic configuration application program | |
| CN104516783B (en) | Authority control method and device | |
| US10127057B2 (en) | Method and apparatus for dynamically implementing application function | |
| CN108255993A (en) | Extract method, apparatus, electronic equipment and the storage medium of service fields | |
| US11163552B2 (en) | Federated framework for container management | |
| EP3625721B1 (en) | Impersonating target account via account redirection | |
| JP2015505627A (en) | Cloud content recognition | |
| CN111752843B (en) | Method, apparatus, electronic device and readable storage medium for determining influence surface | |
| CN102542056B (en) | For the web application based on cloud of expanded function | |
| CN102385482B (en) | Methods and apparatuses for enhancing wallpaper display | |
| CN105787077A (en) | Data synchronizing method and device | |
| US9939997B2 (en) | Transitioning browser tabs from one environment context to another | |
| CN109684008A (en) | Card rendering method, device, terminal and computer readable storage medium | |
| CN106020889A (en) | Installation package generating method and device, server | |
| AU2017245437B2 (en) | Thin client for mapping system | |
| CN111181771B (en) | Security-changing abnormal positioning method and device based on fortress machine and electronic equipment | |
| US20150007145A1 (en) | Computing system with instrumentation mechanism and capture mechanism and method of operation thereof | |
| CN108563668A (en) | The method, apparatus and terminal device of the Hybrid page jump H5 pages | |
| CN104021000B (en) | The method that spring data sources are configured using the property file under dynamic route | |
| CN115934110A (en) | A model deployment method, device and electronic equipment | |
| CN107203389A (en) | Control shows method and device | |
| CN112580596B (en) | Data processing method and device | |
| CN113726612A (en) | Method and device for acquiring test data, electronic equipment and storage medium | |
| CN112527678A (en) | Method, apparatus, device and storage medium for testing protocol | |
| CN113703860A (en) | System and method for dynamically configuring APP |
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 | ||
| TR01 | Transfer of patent right |
Effective date of registration: 20231110 Address after: Room 606-609, Compound Office Complex Building, No. 757, Dongfeng East Road, Yuexiu District, Guangzhou, Guangdong Province, 510699 Patentee after: China Southern Power Grid Internet Service Co.,Ltd. Address before: 430000 East Lake Development Zone, Wuhan City, Hubei Province, No. 1 Software Park East Road 4.1 Phase B1 Building 11 Building Patentee before: WUHAN DOUYU NETWORK TECHNOLOGY Co.,Ltd. |
|
| TR01 | Transfer of patent right |