CN101122853A - Configurable data gathering method - Google Patents

Configurable data gathering method Download PDF

Info

Publication number
CN101122853A
CN101122853A CNA200710009511XA CN200710009511A CN101122853A CN 101122853 A CN101122853 A CN 101122853A CN A200710009511X A CNA200710009511X A CN A200710009511XA CN 200710009511 A CN200710009511 A CN 200710009511A CN 101122853 A CN101122853 A CN 101122853A
Authority
CN
China
Prior art keywords
data
user
database
node
name
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CNA200710009511XA
Other languages
Chinese (zh)
Inventor
黄斌毅
邱琰琛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Mobile Group Fujian Co Ltd
Original Assignee
China Mobile Group Fujian Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by China Mobile Group Fujian Co Ltd filed Critical China Mobile Group Fujian Co Ltd
Priority to CNA200710009511XA priority Critical patent/CN101122853A/en
Publication of CN101122853A publication Critical patent/CN101122853A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The present invention relates to a configurable data collecting method. The configuration language for collecting data is XML, which can be corrected easily by a user. The method can collect data flexibly. The invention has the following advantages: due to the mapping relation between the data and the database, when the database changes, users can amend and recode a collection program to correct the table name or field name of the database; regarding the database consisting of a plurality of data operations, the collection program does not need to beamended colecting procedure or be encoded; working burden of staffs is lessened.

Description

Configurable collecting method
Technical field:
The present invention relates to a kind of configurable collecting method.
Background technology:
In the middle of company's network operation is safeguarded, various network elements in the network all can regularly send the textual form information of its duty of expression in network with the Telnet agreement, because the difference between network element, the organizational form of these information and content are also not quite identical, when using traditional data acquisition modes, the corresponding a kind of data acquisition program of a kind of network element may appear, in today of communication technology develop rapidly, the update of network element is also in continuous acceleration, work state information that the network element that brings thus sends in network and organizational form and content are also in constantly changing, make software developer's workload not strengthen, the much repeated work amount occurred.
Prior art: use ini file or XML file carrier as configuration file, can realize the data of specifying the pass to build word are gathered, but can't adapt to these variations when computing formula or database structure change and cause capture program can't normally move or collect wrong data when relating to, revise these problems need the software developer to revise capture program and recompilate after could operate as normal.
The shortcoming of prior art: the mapping relations between simple data and database table, when changing, database table name/field need revise capture program and recompility, and the user has no idea to revise voluntarily; For the data of being made up of a plurality of data operation, the user has no idea to specify voluntarily and participates in operational data and operational method, can only revise capture program and recompility; Acquisition tasks is single, when needs increase acquisition tasks newly, needs to revise capture program and recompility, thereby has increased the weight of staff's work load.
Summary of the invention:
The object of the present invention is to provide a kind of configurable collecting method, this method can realize data acquisition flexibly.
To achieve these goals, the present invention adopts:
1. use the configuration language of XML language, be easy to the user and revise voluntarily as data acquisition.
2. work as the user and can revise the data of collection and the structure of the database table that data are preserved voluntarily, fully satisfy user's different demands.
3. the user can handle the data that collect voluntarily, as gets operations such as substring, numeral system conversion, satisfies changeable data acquisition demand.
The user can self-defined computing formula, the data that collect calculated avoided preserving too much redundant data in the database, reduced the operand of later stage when generating form.
Advantage of the present invention: by the mapping relations between data and database table, when database table name/field changes, need revise capture program and recompility, can revise voluntarily; For the data of forming by a plurality of data operation, need not revise capture program and compiling; Alleviated staff's work load.
Embodiment:
The present invention selects the form of XML as configuration file for use, and XML full name EXtensible Markup Language is translated as extensible markup language, and extend markup language or extensible indicating language are a kind of markup languages.Put mark and refer to computing machine information symbol to understand,, can handle the article that comprises various information etc. between the computing machine by this kind mark.
The present invention also selects for use Microsoft.NET Framework as the operation platform of configuration file parsing with capture program
1. configuration language definition:
A) word is built in the pass
i.DataConfig
Root node has defined the beginning of a configuration
1.Task
The Task node definition acquisition tasks
Figure A20071000951100041
Variable
The Variable node definition data that collect need be saved in which variable
Figure A20071000951100042
Var
The Var node definition corresponding relation of variable name with the data that collect.
2.Functions
The Functions node definition User-Defined Functions tabulation
Figure A20071000951100043
FunFile
The FunFile node definition file of the User-Defined Functions path of preserving
3.Table
The Table node definition corresponding relation between the variable that defines in field in the title of database table, the operation that will carry out and the database table and the Variable node.
Command
The Command node definition SQL statement that need operate database.
Figure A20071000951100052
Field
The Field node definition corresponding relation between the variable that defines in field and the Variable node, can use arithmetic here
Expression formula and self-defining function are handled data.
B) root node is the acquisition tasks node down, and it is defined as<Task name=" Task Name " desc=" describe " ...</Task 〉, the name attribute is the acquisition tasks name, the desc attribute is the task note, case sensitive.
C) in the Task node, need two-part definition:
I.<Variable〉...</Variable〉node definition variable and variable and the needing data of gathering or the mapping relations of system variable:<Var name=" CRTS " value=" INSTALLED CIRCUIT NUM " default=" 0 " desc=" way circuit number "/this node set up variable " CRTS " and the data that collect " INSTALLEDCIRCUIT NUM " between corresponding relation, the default attribute definition at the default value that fails and got when obtaining corresponding with it data, the desc attribute is the variable note, case sensitive.
Ii.<and Table name=" Table Name " desc=" describe " ...</Table〉node definition the data that collect to be saved in the corresponding relation of field of which table, data and table in the database and the SQL statement that need use; The name attribute has been specified the title of the table in the database, and the desc attribute is the note of table.
1. in the Table node, need to define the Command node, be used to define SQL statement, as:<Commandname=" Insert " value=" and Insert into { Table} (nMSC; nYear, nMonth, nDay; nHour, NCGR, CGR; CRTS; AVECRo, CALLSo, ACCEPo; ANSWo, ERLANGo)
VALUES ({ nMSC}, { nYear}, { nMonth}, nDay}, { nHour}, ' NCGR} ', { CGR}, { CRTS}, { AVECRo}, { CALLSo}, { ACCEPo}, { ANSWo}, ERLANGo}) " desc=" interpolation, if failure would carry out next bar Command "/this node definition one to table Table} insert nMSC}, nYear}, nMonth}; and nDay}; { nHour}, ' NCGR} ', { CGR}; { CRTS}; { AVECRo}, { CALLSo}, { ACCEPo}; { ANSWo}, the SQL statement of ERLANGo} data, and Table} correspondence<Table name=" Table Name " ... attribute name in the node, definition subsequently that remaining data division is then corresponding respectively<Field ... / name attribute in the node, in the Table node, can have a plurality of Command child nodes, it is just high more to define forward more priority, and program will preferentially be carried out the SQL statement of high priority, has only the SQL statement of just carrying out when current SQL statement is carried out failure following closely.
2.Field node, this node definition field in the database table and the mapping relations between the data that collect, can use the number expression formula that data are calculated here, as<Field name=" lac " value=" string.format (' 0x%s '; string.sub (LAC; string.len (LAC)-3))+0 " desc=" LAC code "/field in this node definition database table " lac " and the expression formula value=of value " string.format (' 0x%s '; string.sub (LAC; string.len (LAC-3))+0 ", LAC is a variable that defines in the Variable node here:<Var name=" LAC " value=" 0bject0 " default=" 0000 " desc=" LAC code "/so the value of expression formula is exactly the decimal system performance of last four sexadecimal numbers of data 0bject0.In the Field node, the syntax gauge of the expression formula of value is the expression syntax standard of LUA.
2. the expression formula in the configuration file
1) arithmetic operator
Adding operator :+
Subtraction operator :-
Multiplication operator: *
The division arithmetic symbol :/
Modulo operation symbol: %
Power operation symbol: ^
Can use bracket to change the priority of computing.
Can use the standard mathematical function storehouse math of lua to carry out more senior mathematical operation.Handle character string in a little outer string character string processing storehouses of standard of also can using
2) example
<Field name=" Num " value=" (Var1+Var2) ^2-Var3*Var4 "/<Field name=" lac " value=" string.format (' 0x%s '; string.sub (LAC, string.len (LAC)-3))+0 " desc=" LAC code "/
3. the User-Defined Functions in the configuration file
Function definition is by function funName (param1, parma2,) funBody end definition, wherein function is the key word of function definition, funName is a function name, param1 is the formal parameter name, and funBody is write by the user that to use function body, end be the key word that function definition finishes.The backspace value of function is by the return backspace.
Function definition need be kept in the file, the path of being decided file by the FunFile node.
Function definition is deferred to the function definition standard of lua language, can use the canonical function storehouse of all l ua.

Claims (4)

1. a configurable collecting method is characterized in that: use the configuration language of XML language as data acquisition, be easy to the user and revise voluntarily.
2. configurable collecting method according to claim 1 is characterized in that: the user can revise the data of collection and the structure of the database table that data are preserved voluntarily, fully satisfies user's different demands.
3. configurable collecting method according to claim 1 and 2 is characterized in that: the user can handle the data that collect voluntarily, as gets operations such as substring, numeral system conversion, satisfies changeable data acquisition demand.
4. configurable collecting method according to claim 3, it is characterized in that: the user can self-defined computing formula, the data that collect are calculated avoided preserving too much redundant data in the database, has reduced the operand of later stage when generating form.
CNA200710009511XA 2007-09-12 2007-09-12 Configurable data gathering method Pending CN101122853A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNA200710009511XA CN101122853A (en) 2007-09-12 2007-09-12 Configurable data gathering method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNA200710009511XA CN101122853A (en) 2007-09-12 2007-09-12 Configurable data gathering method

Publications (1)

Publication Number Publication Date
CN101122853A true CN101122853A (en) 2008-02-13

Family

ID=39085198

Family Applications (1)

Application Number Title Priority Date Filing Date
CNA200710009511XA Pending CN101122853A (en) 2007-09-12 2007-09-12 Configurable data gathering method

Country Status (1)

Country Link
CN (1) CN101122853A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101286895B (en) * 2008-05-22 2010-08-18 上海交通大学 Dynamic configurable data monitoring system and method for distributed network
CN101645010B (en) * 2009-08-20 2012-08-22 珍爱信息技术(深圳)有限公司 System and method for automatically generating code
CN103631775A (en) * 2012-08-21 2014-03-12 镇江雅迅软件有限责任公司 Configurable data collecting method
CN107818501A (en) * 2017-03-03 2018-03-20 平安医疗健康管理股份有限公司 Calculating method and device
CN109510745A (en) * 2017-09-14 2019-03-22 株洲中车时代电气股份有限公司 A kind of configuration method and system of I/O data acquisition

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101286895B (en) * 2008-05-22 2010-08-18 上海交通大学 Dynamic configurable data monitoring system and method for distributed network
CN101645010B (en) * 2009-08-20 2012-08-22 珍爱信息技术(深圳)有限公司 System and method for automatically generating code
CN103631775A (en) * 2012-08-21 2014-03-12 镇江雅迅软件有限责任公司 Configurable data collecting method
CN107818501A (en) * 2017-03-03 2018-03-20 平安医疗健康管理股份有限公司 Calculating method and device
CN107818501B (en) * 2017-03-03 2021-01-08 平安医疗健康管理股份有限公司 Actuarial method and device
CN109510745A (en) * 2017-09-14 2019-03-22 株洲中车时代电气股份有限公司 A kind of configuration method and system of I/O data acquisition

Similar Documents

Publication Publication Date Title
CN101122853A (en) Configurable data gathering method
US20090030921A1 (en) Incremental parsing of hierarchical files
CN108762764A (en) Code automatic generation method, device, computer equipment and storage medium
CA2917824C (en) Parser generation
CN101079737B (en) An automatic structuring and parsing method and system of command line interface command
CN103383691B (en) A kind of online editing method and apparatus of webpage
Duchier et al. The metagrammar compiler: An nlp application with a multi-paradigm architecture
CN109242253A (en) Bill of materials extracting method, device and storage medium
CN110308907A (en) Data transfer device, device, storage medium and electronic equipment
CN103810292A (en) Method and device for configuring graphical interface
CN108446371A (en) Data return guiding method, device, computer equipment and storage medium
Cooper et al. The essence of form abstraction
US7487227B2 (en) Scripting engine having a sequencer table and a plurality of secondary tables for network communication software
CN109408577B (en) ORACLE database JSON analysis method, system, device and storable medium
CN103399746B (en) Information management system convenient to develop secondarily and development method
CN105793842B (en) Conversion method and device between serialized message
KR102087272B1 (en) Method for transforming data for low volume transmission of meta model base protocol, and data transmitting system for low volume transmission of meta model base protocol
CN103631775A (en) Configurable data collecting method
KR20070083139A (en) Network management system using xml and method thereof
CN112764637B (en) Intelligent agriculture Internet of things equipment description file generation method
CN117055949B (en) Method and system for automatically generating vite configuration
CN114879882A (en) Software menu system based on JSON configuration
CN107451167A (en) The click data acquisition methods and system of position are clicked in standing
JP2002182915A (en) Source program storage method, its system, source program restoring method and system, and compiling method and device
CN112199335A (en) Generation method and generation system of operation log

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C12 Rejection of a patent application after its publication
RJ01 Rejection of invention patent application after publication