CN104102480B - The method and apparatus for generating configuration file - Google Patents
The method and apparatus for generating configuration file Download PDFInfo
- Publication number
- CN104102480B CN104102480B CN201310124555.2A CN201310124555A CN104102480B CN 104102480 B CN104102480 B CN 104102480B CN 201310124555 A CN201310124555 A CN 201310124555A CN 104102480 B CN104102480 B CN 104102480B
- Authority
- CN
- China
- Prior art keywords
- rank
- template sentence
- configuration file
- user template
- sentence
- 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.)
- Active
Links
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Stored Programmes (AREA)
Abstract
The invention discloses a kind of method and apparatus generating configuration file, belong to field of computer technology.The method includes:Keyword in default application is monitored;When monitoring the relevant operation with the keyword, calls user template sentence and obtain the rank of the user template sentence;According to the rank of the user template sentence, the configuration file that the default application is generated in corresponding fills to the user template sentence is selected.The present invention controls the generation of configuration file by templates statement, so that the generation of configuration file has been reached certain flexibility, and using other templates statement is classified, reached the diversification of configuration file content.
Description
Technical field
The present invention relates to field of computer technology, more particularly to a kind of method and apparatus generating configuration file.
Background technology
Raw data management system is the system of a hardware and software platform, and main purpose is easily can to issue and run multiple productions
The characteristics of product, and the means for wherein issuing and runing multiple product characteristics are realized by way of configuration file.Due to
This system needs to support multiple APP(Application, third party application), so the generation for configuration file just has
There is certain challenge, needs the personalized generation demand for coping with each APP.
The existing common practices for generating configuration file is to write code extremely in logic, and code includes the class of configuration file
Type, filename etc., to obtain corresponding configuration file, when there is new APP to need new generation demand, just in material management
Increase a kind of logic in system, corresponding code is write in the logic newly increased, obtains new configuration file.
In the implementation of the present invention, the inventor finds that the existing technology has at least the following problems:Code is write and is extremely existed
In logic, cause the flexibility that configuration file generates relatively low, and content is relatively simple.
Invention content
In order to improve the flexibility of configuration file generation, an embodiment of the present invention provides a kind of methods generating configuration file
And device.The technical solution is as follows:
On the one hand, a kind of method generating configuration file is provided, the method includes:
Keyword in default application is monitored;
When monitoring the relevant operation with the keyword, calls user template sentence and obtain the user template
The rank of sentence;
According to the rank of the user template sentence, select to generate in corresponding fills to the user template sentence
The configuration file of the default application.
On the other hand, a kind of device generating configuration file is provided, described device includes:
Monitoring module, for being monitored to the keyword in default application;
Acquisition module, for when monitoring the relevant operation with the keyword, calling user template sentence and obtaining
Take the rank of the user template sentence;
First generation module selects corresponding fills described in for the rank according to the user template sentence
The configuration file of the default application is generated in user template sentence.
The advantageous effect that technical solution provided in an embodiment of the present invention is brought is:Keyword in default application is supervised
Control;When monitoring the relevant operation with the keyword, calls user template sentence and obtain the user template sentence
Rank;According to the rank of the user template sentence, select to generate in corresponding fills to the user template sentence
The configuration file of the default application.The generation that configuration file is controlled by templates statement makes the generation of configuration file reach
Certain flexibility, and using other templates statement is classified, reached the diversification of configuration file content.
Description of the drawings
To describe the technical solutions in the embodiments of the present invention more clearly, make required in being described below to embodiment
Attached drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the invention, for
For those of ordinary skill in the art, without creative efforts, other are can also be obtained according to these attached drawings
Attached drawing.
Fig. 1 is a kind of method flow diagram of the generation configuration file provided in the embodiment of the present invention one;
Fig. 2 is a kind of method flow diagram of the generation configuration file provided in the embodiment of the present invention two;
Fig. 3 is a kind of apparatus structure schematic diagram of the generation configuration file provided in the embodiment of the present invention three;
Fig. 4 is a kind of apparatus structure schematic diagram of the generation configuration file provided in the embodiment of the present invention three.
Specific implementation mode
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with attached drawing to embodiment party of the present invention
Formula is described in further detail.
Embodiment one
Referring to Fig. 1, a kind of method generating configuration file is provided in the present embodiment, including:
101, the keyword in default application is monitored;
102, it when monitoring the relevant operation with the keyword, calls user template sentence and obtains the user
The rank of templates statement;
103, it according to the rank of the user template sentence, selects in corresponding fills to the user template sentence
Generate the configuration file of the default application.
In another embodiment, the relevant operation with the keyword, including:With the keyword is relevant adds
Add operation or delete operation.
In another embodiment, the rank according to the user template sentence, selects corresponding fills to institute
It states and generates configuration file in user template sentence, including:
According to the rank of the user template sentence, content corresponding with the rank of user template sentence is selected;
According to the content corresponding with the rank of user template sentence, to each of the user template sentence
Rank is rendered into Mobile state, generates the configuration file of the default application.
In another embodiment, the rank of the user template sentence includes below one or more:Resource type, institute
State the ID of default application, the output format of resource subtypes name and configuration file.
In another embodiment, the method further includes:
When there is no the user template sentence in the default application, generates system template sentence and obtain the system
The rank of templates statement;
According to the rank of the system template sentence, select to generate in corresponding fills to the system template sentence
The configuration file of the default application.
The advantageous effect of the present embodiment includes:Keyword in default application is monitored;When monitoring and the pass
When the relevant operation of key word, calls user template sentence and obtain the rank of the user template sentence;According to the user
The rank of templates statement selects the configuration text that the default application is generated in corresponding fills to the user template sentence
Part.The generation that configuration file is controlled by templates statement makes the generation of configuration file reach certain flexibility, and uses
It is classified other templates statement, has reached the diversification of configuration file content.
Embodiment two
A kind of method generating configuration file is provided in the embodiment of the present invention, it can be in default application according to user's
Definition, pre-sets user template sentence, can also generate templates statement by system, specific to not done in this present embodiment
It limits.Configuration file is dynamically generated according to templates statement in the present embodiment, to make the generation of configuration file reach certain
Flexibility.Wherein, it refers to any application that raw data management system is supported to preset application, to not doing specific limit in this present embodiment
It is fixed.
Referring to Fig. 2, method flow includes:
201, the keyword in default application is monitored.
In the present embodiment, keyword includes but not limited to:The type of configuration file, default ID, filename and the behaviour applied
Make name etc., to being not specifically limited in this present embodiment.
202, whether when monitoring the relevant operation with the keyword, searching in the default application has user template
Sentence, if so, 203 are thened follow the steps, it is no to then follow the steps 204.
In the present embodiment, the acquisition modes of two kinds of templates statements are provided, when monitoring the relevant operation with keyword,
It first searches whether there are user template sentence, when there are User-defined template sentence, user template sentence is called, when not depositing
In User-defined template sentence, system template sentence is generated, then executes the generation of configuration file again.
Wherein, include but not limited to the relevant operation of the keyword:It is operated with the relevant addition of the keyword
Or delete operation etc..For example, being monitored to the photograph album in lovers space, number of days or microblogging quantity are used when lovers space
When reaching certain threshold value, upgrade for the lovers space, adds new photograph album, the title of the photograph album is exactly keyword, works as prison
When controlling the operation to adding photograph album, then templates statement is called, the configuration file of photograph album is generated according to templates statement.
203, it calls user template sentence and obtains the rank of the user template sentence, according to the user template sentence
Rank, select the configuration file that the default application is generated in corresponding fills to the user template sentence.
In this step, multi-stage separation carried out to templates statement, the rank of user template sentence include it is below a kind of or
A variety of ranks:The ranks such as resource type, the output format of the ID of the default application, resource subtypes name and configuration file.Match
When setting file generated, according to the title of every level-one, the configuration file for generating and needing is rendered into Mobile state.Wherein, resource type packet
The resource type as unit of type and the resource type as unit of file are included, the resource type as unit of type includes production
Product numerical value etc., the resource type as unit of file include the foreground resource etc. of default application, are had to not done in this present embodiment
Body limits.Resource subtypes name refers to the typonym of the specific child resource below resource type, for example, resource type is
Farm, resource subtypes name can be the seed in farm, the stage properties such as dog.The output format of configuration file refers to configuration file
Output is XML(Extensible Markup Language, extensible markup language)Format or URL(Uniform
Resource Locator, uniform resource locator)Address etc. is not specifically limited this present embodiment.
Specifically, after the rank for obtaining user template sentence, according to the rank of the user template sentence, selection is corresponding
Fills to the user template sentence in generate configuration file, including:According to the rank of the user template sentence, choosing
Select content corresponding with the rank of user template sentence;According to described corresponding with the rank of user template sentence interior
Hold, each rank of the user template sentence is rendered into Mobile state, generates the configuration file of the default application.
In the present embodiment, pre-set some ranks about configuration file in the specified page in default application
Information, including:The output format etc. of resource type, the ID of the default application, resource subtypes name and configuration file, is obtaining
After the rank of user template sentence, wherein corresponding content is selected according to the rank of templates statement, these content classifications are other
It is filled into templates statement, to generate configuration file.
204, it generates system template sentence and obtains the rank of the system template sentence, according to the system template sentence
Rank, select the configuration file that the default application is generated in corresponding fills to the system template sentence.
In this step, when user template sentence is not present in default application, system is generated according to the rank of templates statement
Templates statement, wherein the rank of system template sentence is similar with the rank of user template sentence, including below one or more
Rank:The ranks such as resource type, the output format of the ID of the default application, resource subtypes name and configuration file.
Specifically, according to the rank of the system template sentence, select corresponding fills to the system template language
The configuration file of the default application is generated in sentence, the rank with according to the user template sentence selects corresponding content to fill out
The step of being charged to the configuration file that the default application is generated in the user template sentence is similar, in this present embodiment no longer
It repeats.
The advantageous effect of the present embodiment includes:Keyword in default application is monitored;When monitoring and the pass
When the relevant operation of key word, calls user template sentence and obtain the rank of the user template sentence;According to the user
The rank of templates statement selects the configuration text that the default application is generated in corresponding fills to the user template sentence
Part.The generation that configuration file is controlled by templates statement makes the generation of configuration file reach certain flexibility, and uses
It is classified other templates statement, has reached the diversification of configuration file content.On the other hand, in the undefined user template sentence of user
When, system template sentence is generated, to further improve the flexibility for generating configuration file.
Embodiment three
Referring to Fig. 3, an embodiment of the present invention provides a kind of device generating configuration file, which includes:Monitoring module
301, acquisition module 302 and the first generation module 303.
Monitoring module 301, for being monitored to the keyword in default application;
Acquisition module 302, for when monitoring the relevant operation with the keyword, calling user template sentence simultaneously
Obtain the rank of the user template sentence;
First generation module 303 selects corresponding fills to institute for the rank according to the user template sentence
State the configuration file that the default application is generated in user template sentence.
In another embodiment, the relevant operation with the keyword, including:With the keyword is relevant adds
Add operation or delete operation.
In another embodiment, referring to Fig. 4, first generation module 303, including:
Selecting unit 303a, for the rank according to the user template sentence, selection and the user template sentence
The corresponding content of rank;
Generation unit 303b, for the content corresponding with the rank of user template sentence according to, to the use
Each rank of family templates statement is rendered into Mobile state, generates the configuration file of the default application.
In another embodiment, the rank of the user template sentence includes below one or more:Resource type, institute
State the ID of default application, the output format of resource subtypes name and configuration file.
In another embodiment, referring to Fig. 4, described device further includes:
System template sentence generation module 304, for when not having the user template sentence in the default application, giving birth to
At system template sentence and obtain the rank of the system template sentence;
Second generation module 305 selects corresponding fills to institute for the rank according to the system template sentence
State the configuration file that the default application is generated in system template sentence.
The advantageous effect of the present embodiment includes:Keyword in default application is monitored;When monitoring and the pass
When the relevant operation of key word, calls user template sentence and obtain the rank of the user template sentence;According to the user
The rank of templates statement selects the configuration text that the default application is generated in corresponding fills to the user template sentence
Part.The generation that configuration file is controlled by templates statement makes the generation of configuration file reach certain flexibility, and uses
It is classified other templates statement, has reached the diversification of configuration file content.
It should be noted that:The device of the generation configuration file provided in above-described embodiment, only with above-mentioned each function module
Division progress for example, in practical application, can be complete by different function modules by above-mentioned function distribution as needed
At the internal structure of device being divided into different function modules, to complete all or part of the functions described above.
In addition, the device of the generation configuration file provided in above-described embodiment and the embodiment of the method category for generating configuration file
In same design, specific implementation process refers to embodiment of the method, and which is not described herein again.
The embodiments of the present invention are for illustration only, can not represent the quality of embodiment.
One of ordinary skill in the art will appreciate that realizing that all or part of step of above-described embodiment can pass through hardware
It completes, relevant hardware can also be instructed to complete by program, the program can be stored in a kind of computer-readable
In storage medium, storage medium mentioned above can be read-only memory, disk or CD etc..
The foregoing is merely presently preferred embodiments of the present invention, is not intended to limit the invention, it is all the present invention spirit and
Within principle, any modification, equivalent replacement, improvement and so on should all be included in the protection scope of the present invention.
Claims (9)
1. a kind of method generating configuration file, which is characterized in that the method includes:
Keyword in default application is monitored;
When monitoring the relevant operation with the keyword, calls user template sentence and obtain the user template sentence
Rank, the rank of the user template sentence includes below one or more:Resource type, the default application ID,
The output format of resource subtypes name and configuration file;
According to the rank of the user template sentence, select in corresponding fills to the user template sentence described in generation
The configuration file of default application.
2. according to the method described in claim 1, it is characterized in that, described with the keyword relevant operation, including:With
The relevant addition of keyword operates or delete operation.
3. according to the method described in claim 1, it is characterized in that, the rank according to the user template sentence, selection
Configuration file is generated in corresponding fills to the user template sentence, including:
According to the rank of the user template sentence, content corresponding with the rank of user template sentence is selected;
According to the content corresponding with the rank of user template sentence, to each rank of the user template sentence
It is rendered into Mobile state, generates the configuration file of the default application.
4. according to the method described in claim 1, it is characterized in that, the method further includes:
When there is no the user template sentence in the default application, generates system template sentence and obtain the system template
The rank of sentence;
According to the rank of the system template sentence, select in corresponding fills to the system template sentence described in generation
The configuration file of default application.
5. a kind of device generating configuration file, which is characterized in that described device includes:
Monitoring module, for being monitored to the keyword in default application;
Acquisition module, for when monitoring the relevant operation with the keyword, calling user template sentence and obtaining institute
The rank of user template sentence is stated, the rank of the user template sentence includes below one or more:It is resource type, described
The ID of default application, the output format of resource subtypes name and configuration file;
First generation module selects corresponding fills to the user for the rank according to the user template sentence
The configuration file of the default application is generated in templates statement.
6. device according to claim 5, which is characterized in that the relevant operation with the keyword, including:With
The relevant addition of keyword operates or delete operation.
7. device according to claim 5, which is characterized in that first generation module, including:
Selecting unit selects corresponding to the rank of user template sentence for the rank according to the user template sentence
Content;
Generation unit, for the content corresponding with the rank of user template sentence according to, to the user template language
Each rank of sentence is rendered into Mobile state, generates the configuration file of the default application.
8. device according to claim 5, which is characterized in that described device further includes:
System template sentence generation module, for when not having the user template sentence in the default application, generating system
Templates statement and the rank for obtaining the system template sentence;
Second generation module selects corresponding fills to the system for the rank according to the system template sentence
The configuration file of the default application is generated in templates statement.
9. a kind of computer readable storage medium, which is characterized in that the computer readable storage medium includes at least one finger
It enables or at least one section of program, described instruction or program is performed realization as described in any claim in claim 1-4
The method for generating configuration file.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310124555.2A CN104102480B (en) | 2013-04-11 | 2013-04-11 | The method and apparatus for generating configuration file |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310124555.2A CN104102480B (en) | 2013-04-11 | 2013-04-11 | The method and apparatus for generating configuration file |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104102480A CN104102480A (en) | 2014-10-15 |
CN104102480B true CN104102480B (en) | 2018-09-04 |
Family
ID=51670660
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310124555.2A Active CN104102480B (en) | 2013-04-11 | 2013-04-11 | The method and apparatus for generating configuration file |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104102480B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107566212B (en) * | 2017-08-25 | 2021-07-02 | 郑州云海信息技术有限公司 | Resource monitoring management method and device |
CN109522218A (en) * | 2018-10-19 | 2019-03-26 | 平安科技(深圳)有限公司 | Interface test method, device, computer equipment and storage medium |
CN109787957B (en) * | 2018-12-13 | 2023-02-10 | 平安普惠企业管理有限公司 | Configuration method of configuration file and related device |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101425062A (en) * | 2007-10-31 | 2009-05-06 | 国际商业机器公司 | Method and device for generating document content and showing configuration file |
CN101714082A (en) * | 2009-12-16 | 2010-05-26 | 金蝶软件(中国)有限公司 | Method, device for configuring main interface in ERP system and ERP system |
CN102541996A (en) * | 2011-11-22 | 2012-07-04 | 大唐软件技术股份有限公司 | JDBC (java database connectivity) based data access layer building method and device utilizing same |
CN102647452A (en) * | 2012-03-20 | 2012-08-22 | 广东电子工业研究院有限公司 | Self-adaptation resource monitoring system and method based on large-scale cloud computing platform |
CN103336691A (en) * | 2013-06-29 | 2013-10-02 | 安科智慧城市技术(中国)有限公司 | Dynamic layout method and system based on Android |
CN103490941A (en) * | 2013-03-07 | 2014-01-01 | 中标软件有限公司 | Real-time monitoring on-line configuration method in cloud computing environment |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2005092542A (en) * | 2003-09-18 | 2005-04-07 | Hitachi Ltd | Device and method for creating jobnet configuration file |
-
2013
- 2013-04-11 CN CN201310124555.2A patent/CN104102480B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101425062A (en) * | 2007-10-31 | 2009-05-06 | 国际商业机器公司 | Method and device for generating document content and showing configuration file |
CN101714082A (en) * | 2009-12-16 | 2010-05-26 | 金蝶软件(中国)有限公司 | Method, device for configuring main interface in ERP system and ERP system |
CN102541996A (en) * | 2011-11-22 | 2012-07-04 | 大唐软件技术股份有限公司 | JDBC (java database connectivity) based data access layer building method and device utilizing same |
CN102647452A (en) * | 2012-03-20 | 2012-08-22 | 广东电子工业研究院有限公司 | Self-adaptation resource monitoring system and method based on large-scale cloud computing platform |
CN103490941A (en) * | 2013-03-07 | 2014-01-01 | 中标软件有限公司 | Real-time monitoring on-line configuration method in cloud computing environment |
CN103336691A (en) * | 2013-06-29 | 2013-10-02 | 安科智慧城市技术(中国)有限公司 | Dynamic layout method and system based on Android |
Also Published As
Publication number | Publication date |
---|---|
CN104102480A (en) | 2014-10-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6818693B2 (en) | Application page quick access | |
CN109597661B (en) | Service function configuration method and device | |
WO2018095261A1 (en) | Page rendering method, device, and data storage medium | |
US9760608B2 (en) | Real-time search tuning | |
US20150040098A1 (en) | Systems and methods for developing and delivering platform adaptive web and native application content | |
WO2017107826A1 (en) | Service information pushing method and device | |
CN104731589A (en) | Automatic generation method and device of user interface (UI) | |
JP2011040059A5 (en) | ||
CN104133772A (en) | Automatic test data generation method | |
CN108334585A (en) | A kind of spiders method, apparatus and electronic equipment | |
CN102968306A (en) | Method and system for automatically generating code based on data model drive | |
CN108874924A (en) | Creation method, device and the computer readable storage medium of search service | |
EP4152224A1 (en) | Machine learning application method, device, electronic apparatus, and storage medium | |
CN108415698B (en) | The method of control is added in the technical ability of voice dialogue platform | |
CN102902531A (en) | Customization and generation method and device of Android application program | |
CN103051652B (en) | A kind of mobile terminal cloud computing distribution platform | |
EP3667493B1 (en) | A method for a software development system | |
CN104063495A (en) | Form extension method and form extension device | |
CN107656729A (en) | Updating device, method and the computer-readable recording medium of List View | |
US20190005228A1 (en) | Trusted and untrusted code execution in a workflow | |
CN104102480B (en) | The method and apparatus for generating configuration file | |
CN110175029A (en) | The forming method of front-end and back-end automatically dispose tool based on data analysis | |
CN106293669A (en) | A kind of generation method and apparatus of web pages component | |
CN106844369A (en) | Objectification SQL statement building method and device | |
WO2013167006A1 (en) | Method for configuring browser bookmarks, device and terminal thereof |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |