CN104102480A - Method and device for generating configuration file - Google Patents
Method and device for generating configuration file Download PDFInfo
- Publication number
- CN104102480A CN104102480A CN201310124555.2A CN201310124555A CN104102480A CN 104102480 A CN104102480 A CN 104102480A CN 201310124555 A CN201310124555 A CN 201310124555A CN 104102480 A CN104102480 A CN 104102480A
- Authority
- CN
- China
- Prior art keywords
- template statement
- rank
- configuration file
- user template
- statement
- 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
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Stored Programmes (AREA)
Abstract
The invention discloses a method and a device for generating a configuration file and belongs to the technical field of computers. The method comprises the following steps: monitoring keywords in a preset application; when operation relevant to the keywords is monitored, calling a user template sentence, and acquiring the grade of the user template sentence; selecting corresponding contents, and filling the contents into the user template sentence to generate the configuration file of the preset application according to the grade of the user template sentence. According to the method and the device, generation of the configuration file is controlled through the template sentence, so that the generation of the configuration file is flexible to a certain extent; the contents of the configuration file are diversified by using the graded template sentence.
Description
Technical field
The present invention relates to field of computer technology, particularly a kind of method and apparatus of generating configuration file.
Background technology
Raw data management system is the system of a hardware and software platform, and its fundamental purpose is to issue easily and to run the characteristic of a plurality of products, and the means of wherein issuing and runing a plurality of product performances are modes by configuration file, realizes.Because this system need to be supported a plurality of APP(Application, third party application), so just have certain challenge for the generation of configuration file, the personalization that need to tackle each APP generates demand.
The common practices of existing generating configuration file is that code is write extremely in logic, code comprises type, filename of configuration file etc., thereby obtain corresponding configuration file, when having new APP to need new generation demand, just in raw data management system, increase a kind of logic, in the logic newly increasing, write corresponding code, obtain new configuration file.
In realizing process of the present invention, inventor finds that prior art at least exists following problem: code is write extremely in logic, and the dirigibility that causes configuration file to generate is lower, and content is more single.
Summary of the invention
The dirigibility generating in order to improve configuration file, the embodiment of the present invention provides a kind of method and apparatus of generating configuration file.Described technical scheme is as follows:
On the one hand, provide a kind of method of generating configuration file, described method comprises:
Key word in default application is monitored;
When monitor to described key word relevant operation time, invoke user template statement also obtains the rank of described user template statement;
According to the rank of described user template statement, select corresponding content to be filled into the configuration file that generates described default application in described user template statement.
On the other hand, provide a kind of device of generating configuration file, described device comprises:
Monitoring module, for monitoring the key word of default application;
Acquisition module, during for relevant operation when monitoring to described key word, invoke user template statement also obtains the rank of described user template statement;
The first generation module, for according to the rank of described user template statement, selects corresponding content to be filled into the configuration file that generates described default application in described user template statement.
The beneficial effect that the technical scheme that the embodiment of the present invention provides is brought is: the key word in default application is monitored; When monitor to described key word relevant operation time, invoke user template statement also obtains the rank of described user template statement; According to the rank of described user template statement, select corresponding content to be filled into the configuration file that generates described default application in described user template statement.By template statement, control the generation of configuration file, make the generation of configuration file reach certain dirigibility, and use other template statement of classification, reached the diversification of configuration file content.
Accompanying drawing explanation
In order to be illustrated more clearly in the technical scheme in the embodiment of the present invention, below the accompanying drawing of required use during embodiment is described is briefly described, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skills, do not paying under the prerequisite of creative work, can also obtain according to these accompanying drawings other accompanying drawing.
Fig. 1 is the method flow diagram of a kind of generating configuration file of providing in the embodiment of the present invention one;
Fig. 2 is the method flow diagram of a kind of generating configuration file of providing in the embodiment of the present invention two;
Fig. 3 is the apparatus structure schematic diagram of a kind of generating configuration file of providing in the embodiment of the present invention three;
Fig. 4 is the apparatus structure schematic diagram of a kind of generating configuration file of providing in the embodiment of the present invention three.
Embodiment
For making the object, technical solutions and advantages of the present invention clearer, below in conjunction with accompanying drawing, embodiment of the present invention is described further in detail.
Embodiment mono-
Referring to Fig. 1, a kind of method of generating configuration file is provided in the present embodiment, comprising:
101, the key word in default application is monitored;
102, when monitor to described key word relevant operation time, invoke user template statement also obtains the rank of described user template statement;
103,, according to the rank of described user template statement, select corresponding content to be filled into the configuration file that generates described default application in described user template statement.
In another embodiment, the relevant operation of described and described key word, comprising: interpolation operation or the deletion action relevant to described key word.
In another embodiment, described according to the rank of described user template statement, select corresponding content to be filled into generating configuration file in described user template statement, comprising:
According to the rank of described user template statement, select the corresponding content of rank with described user template statement;
According to the corresponding content of the rank of described and described user template statement, each rank of described user template statement is dynamically played up, generate the configuration file of described default application.
In another embodiment, the rank of described user template statement comprises following one or more: the output format of the ID of resource type, described default application, resource subtype name and configuration file.
In another embodiment, described method also comprises:
While there is no described user template statement in described default application, generation system template statement also obtains the rank of described system template statement;
According to the rank of described system template statement, select corresponding content to be filled into the configuration file that generates described default application in described system template statement.
The beneficial effect of the present embodiment comprises: the key word in default application is monitored; When monitor to described key word relevant operation time, invoke user template statement also obtains the rank of described user template statement; According to the rank of described user template statement, select corresponding content to be filled into the configuration file that generates described default application in described user template statement.By template statement, control the generation of configuration file, make the generation of configuration file reach certain dirigibility, and use other template statement of classification, reached the diversification of configuration file content.
Embodiment bis-
A kind of method of generating configuration file is provided in the embodiment of the present invention, can have set in advance user template statement according to user's definition in default application, also can generate template statement by system, in this present embodiment and be not specifically limited.In the present embodiment, according to template statement, carry out dynamic generating configuration file, thereby make the generation of configuration file reach certain dirigibility.Wherein, default application refers to arbitrary application that raw data management system is supported, to being not specifically limited in this present embodiment.
Referring to Fig. 2, method flow comprises:
201, the key word in default application is monitored.
In the present embodiment, key word includes but not limited to: ID, filename and the operation name etc. of the type of configuration file, default application, and to being not specifically limited in this present embodiment.
202, when monitor to described key word relevant operation time, search in this default application whether have user template statement, if so, perform step 203, otherwise execution step 204.
In the present embodiment, the obtain manner of two kinds of template statements is provided, when the relevant operation monitoring to key word, first search and whether have user template statement, when there is User-defined template statement,, in invoke user template statement when not there is not User-defined template statement, generation system template statement, and then the generation of execution configuration file.
Wherein, include but not limited to the relevant operation of described key word: the interpolation operation relevant with described key word or deletion action etc.For example, photograph album in lovers space is monitored, when the use number of days in lovers space or microblogging quantity reach certain threshold value, for upgrading in this lovers space, add new photograph album, the title of this photograph album is exactly key word, when monitoring when adding the operation of photograph album, call template statement, according to template statement, generate the configuration file of photograph album.
203, invoke user template statement obtain the rank of described user template statement, according to the rank of described user template statement, selects corresponding content to be filled into the configuration file that generates described default application in described user template statement.
In this step, template statement has been carried out to stage trapping, the rank of user template statement comprises one or more following ranks: the ranks such as output format of the ID of resource type, described default application, resource subtype name and configuration file.When configuration file generates, according to the title of every one-level, dynamically play up the configuration file that generation needs.Wherein, resource type comprises take the resource type that the resource type that type is unit and the file of take be unit, the resource type that the type of take is unit comprises product numerical value etc., and the resource type that the file of take is unit comprises the foreground resource of default application etc., to being not specifically limited in this present embodiment.Resource subtype name, refers to the typonym of the child resource of mask body under resource type, and for example, resource type is farm, and resource subtype name can be, the seed in farm, the stage properties such as dog.That the output format of configuration file refers to configuration file output is XML(Extensible Markup Language, extend markup language) form or URL(Uniform Resource is Locator, URL(uniform resource locator)) address etc., is not specifically limited this present embodiment.
Concrete, after obtaining the rank of user template statement, according to the rank of described user template statement, select corresponding content to be filled into generating configuration file in described user template statement, comprise: according to the rank of described user template statement, select the corresponding content of rank with described user template statement; According to the corresponding content of the rank of described and described user template statement, each rank of described user template statement is dynamically played up, generate the configuration file of described default application.
In the present embodiment, pre-set some class information about configuration file in specified page in default application, comprise: the output format of the ID of resource type, described default application, resource subtype name and configuration file etc., after obtaining the rank of user template statement, according to the rank of template statement, select wherein corresponding content, by these content classifications, other is filled in template statement, with generating configuration file.
204, generation system template statement obtain the rank of described system template statement, according to the rank of described system template statement, selects corresponding content to be filled into the configuration file that generates described default application in described system template statement.
In this step, while there is not user template statement in default application, according to the rank generation system template statement of template statement, wherein, the rank of the rank of system template statement and user template statement is similar, comprises one or more following ranks: the ranks such as output format of the ID of resource type, described default application, resource subtype name and configuration file.
Concrete, according to the rank of described system template statement, select corresponding content to be filled into the configuration file that generates described default application in described system template statement, with according to the rank of described user template statement, select corresponding content to be filled into the step of the configuration file that generates described default application in described user template statement similar, to repeating no more in this present embodiment.
The beneficial effect of the present embodiment comprises: the key word in default application is monitored; When monitor to described key word relevant operation time, invoke user template statement also obtains the rank of described user template statement; According to the rank of described user template statement, select corresponding content to be filled into the configuration file that generates described default application in described user template statement.By template statement, control the generation of configuration file, make the generation of configuration file reach certain dirigibility, and use other template statement of classification, reached the diversification of configuration file content.On the other hand, when the undefined user template statement of user, generation system template statement, thereby the dirigibility that has further improved generating configuration file.
Embodiment tri-
Referring to Fig. 3, the embodiment of the present invention provides a kind of device of generating configuration file, and this device comprises: monitoring module 301, acquisition module 302 and the first generation module 303.
Monitoring module 301, for monitoring the key word of default application;
Acquisition module 302, during for relevant operation when monitoring to described key word, invoke user template statement also obtains the rank of described user template statement;
The first generation module 303, for according to the rank of described user template statement, selects corresponding content to be filled into the configuration file that generates described default application in described user template statement.
In another embodiment, the relevant operation of described and described key word, comprising: interpolation operation or the deletion action relevant to described key word.
In another embodiment, referring to Fig. 4, described the first generation module 303, comprising:
Selected cell 303a, for according to the rank of described user template statement, selects the corresponding content of rank with described user template statement;
Generation unit 303b, for according to the corresponding content of the rank of described and described user template statement, dynamically plays up each rank of described user template statement, generates the configuration file of described default application.
In another embodiment, the rank of described user template statement comprises following one or more: the output format of the ID of resource type, described default application, resource subtype name and configuration file.
In another embodiment, referring to Fig. 4, described device also comprises:
System template statement generation module 304, for when described default application does not have described user template statement, generation system template statement also obtains the rank of described system template statement;
The second generation module 305, for according to the rank of described system template statement, selects corresponding content to be filled into the configuration file that generates described default application in described system template statement.
The beneficial effect of the present embodiment comprises: the key word in default application is monitored; When monitor to described key word relevant operation time, invoke user template statement also obtains the rank of described user template statement; According to the rank of described user template statement, select corresponding content to be filled into the configuration file that generates described default application in described user template statement.By template statement, control the generation of configuration file, make the generation of configuration file reach certain dirigibility, and use other template statement of classification, reached the diversification of configuration file content.
It should be noted that: the device of the generating configuration file providing in above-described embodiment, only the division with above-mentioned each functional module is illustrated, in practical application, can above-mentioned functions be distributed and by different functional modules, completed as required, the inner structure that is about to device is divided into different functional modules, to complete all or part of function described above.
In addition, the device of the generating configuration file providing in above-described embodiment and the embodiment of the method for generating configuration file belong to same design, and its specific implementation process refers to embodiment of the method, repeats no more here.
The invention described above embodiment sequence number, just to describing, does not represent the quality of embodiment.
One of ordinary skill in the art will appreciate that all or part of step that realizes above-described embodiment can complete by hardware, also can come the hardware that instruction is relevant to complete by program, described program can be stored in a kind of computer-readable recording medium, the above-mentioned storage medium of mentioning can be ROM (read-only memory), disk or CD etc.
The foregoing is only preferred embodiment of the present invention, in order to limit the present invention, within the spirit and principles in the present invention not all, any modification of doing, be equal to replacement, improvement etc., within all should being included in protection scope of the present invention.
Claims (10)
1. a method for generating configuration file, is characterized in that, described method comprises:
Key word in default application is monitored;
When monitor to described key word relevant operation time, invoke user template statement also obtains the rank of described user template statement;
According to the rank of described user template statement, select corresponding content to be filled into the configuration file that generates described default application in described user template statement.
2. method according to claim 1, is characterized in that, the relevant operation of described and described key word, comprising: interpolation operation or the deletion action relevant to described key word.
3. method according to claim 1, is characterized in that, described according to the rank of described user template statement, selects corresponding content to be filled into generating configuration file in described user template statement, comprising:
According to the rank of described user template statement, select the corresponding content of rank with described user template statement;
According to the corresponding content of the rank of described and described user template statement, each rank of described user template statement is dynamically played up, generate the configuration file of described default application.
4. method according to claim 1, is characterized in that, the rank of described user template statement comprises following one or more: the output format of the ID of resource type, described default application, resource subtype name and configuration file.
5. method according to claim 1, is characterized in that, described method also comprises:
While there is no described user template statement in described default application, generation system template statement also obtains the rank of described system template statement;
According to the rank of described system template statement, select corresponding content to be filled into the configuration file that generates described default application in described system template statement.
6. a device for generating configuration file, is characterized in that, described device comprises:
Monitoring module, for monitoring the key word of default application;
Acquisition module, during for relevant operation when monitoring to described key word, invoke user template statement also obtains the rank of described user template statement;
The first generation module, for according to the rank of described user template statement, selects corresponding content to be filled into the configuration file that generates described default application in described user template statement.
7. device according to claim 6, is characterized in that, the relevant operation of described and described key word, comprising: interpolation operation or the deletion action relevant to described key word.
8. device according to claim 6, is characterized in that, described the first generation module, comprising:
Selected cell, for according to the rank of described user template statement, selects the corresponding content of rank with described user template statement;
Generation unit, for according to the corresponding content of the rank of described and described user template statement, dynamically plays up each rank of described user template statement, generates the configuration file of described default application.
9. device according to claim 6, is characterized in that, the rank of described user template statement comprises following one or more: the output format of the ID of resource type, described default application, resource subtype name and configuration file.
10. device according to claim 6, is characterized in that, described device also comprises:
System template statement generation module, for when described default application does not have described user template statement, generation system template statement also obtains the rank of described system template statement;
The second generation module, for according to the rank of described system template statement, selects corresponding content to be filled into the configuration file that generates described default application in described system template statement.
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 true CN104102480A (en) | 2014-10-15 |
CN104102480B 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) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107566212A (en) * | 2017-08-25 | 2018-01-09 | 郑州云海信息技术有限公司 | A kind of monitoring resource management method and device |
CN109522218A (en) * | 2018-10-19 | 2019-03-26 | 平安科技(深圳)有限公司 | Interface test method, device, computer equipment and storage medium |
CN109787957A (en) * | 2018-12-13 | 2019-05-21 | 平安普惠企业管理有限公司 | The configuration method and relevant apparatus of configuration file |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050065993A1 (en) * | 2003-09-18 | 2005-03-24 | Masanori Honda | Job network configuration file creating device and creating method |
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 |
-
2013
- 2013-04-11 CN CN201310124555.2A patent/CN104102480B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050065993A1 (en) * | 2003-09-18 | 2005-03-24 | Masanori Honda | Job network configuration file creating device and creating method |
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 |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107566212A (en) * | 2017-08-25 | 2018-01-09 | 郑州云海信息技术有限公司 | A kind of monitoring resource management method and device |
CN109522218A (en) * | 2018-10-19 | 2019-03-26 | 平安科技(深圳)有限公司 | Interface test method, device, computer equipment and storage medium |
CN109787957A (en) * | 2018-12-13 | 2019-05-21 | 平安普惠企业管理有限公司 | The configuration method and relevant apparatus of configuration file |
CN109787957B (en) * | 2018-12-13 | 2023-02-10 | 平安普惠企业管理有限公司 | Configuration method of configuration file and related device |
Also Published As
Publication number | Publication date |
---|---|
CN104102480B (en) | 2018-09-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8250523B2 (en) | Source code wrapper generation | |
CN104461484B (en) | The implementation method and device of front-end template | |
US9015657B2 (en) | Systems and methods for developing and delivering platform adaptive web and native application content | |
CN110058856A (en) | Page configuration method and device | |
CN109885291A (en) | A kind of code automatic generation method and code generator | |
CN102880708B (en) | Be used for the system and method for the visual design that realizes html page | |
CN104798036A (en) | User interface control framework for stamping out controls using a declarative template | |
CN106354483B (en) | Data processing method and device and electronic equipment | |
CN112612452B (en) | API platform realization method, device, equipment and storage medium | |
CN103051652B (en) | A kind of mobile terminal cloud computing distribution platform | |
CN110941427B (en) | Code generation method and code generator | |
CN107656729A (en) | Updating device, method and the computer-readable recording medium of List View | |
CN104063495A (en) | Form extension method and form extension device | |
CN110175029A (en) | The forming method of front-end and back-end automatically dispose tool based on data analysis | |
CN103425632A (en) | Serializing method, device and processor | |
CN108021400A (en) | Data processing method and device, computer-readable storage medium and equipment | |
Paredes‐Valverde et al. | A systematic review of tools, languages, and methodologies for mashup development | |
CN106648569A (en) | Target serialization achieving method and device | |
CN104102480A (en) | Method and device for generating configuration file | |
US8959191B2 (en) | Script modification suggestion | |
CN106484488A (en) | Integrated cloud compilation method and system | |
CN107423291A (en) | A kind of data translating method and client device | |
CN108804088B (en) | Protocol processing method and device | |
CN103176801A (en) | Method and device for generating table entry operation-interface function | |
CN105867984A (en) | Method, device and client for displaying task state in web page as well as mobile equipment |
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 |