CN110209389A - A kind of data generating tool development system based on XML - Google Patents

A kind of data generating tool development system based on XML Download PDF

Info

Publication number
CN110209389A
CN110209389A CN201910485783.XA CN201910485783A CN110209389A CN 110209389 A CN110209389 A CN 110209389A CN 201910485783 A CN201910485783 A CN 201910485783A CN 110209389 A CN110209389 A CN 110209389A
Authority
CN
China
Prior art keywords
data
module
xml
script
input
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
Application number
CN201910485783.XA
Other languages
Chinese (zh)
Other versions
CN110209389B (en
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.)
Casco Signal Cherngdu Ltd
Original Assignee
Casco Signal Cherngdu 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 Casco Signal Cherngdu Ltd filed Critical Casco Signal Cherngdu Ltd
Priority to CN201910485783.XA priority Critical patent/CN110209389B/en
Publication of CN110209389A publication Critical patent/CN110209389A/en
Application granted granted Critical
Publication of CN110209389B publication Critical patent/CN110209389B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/37Compiler construction; Parser generation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/42Syntactic analysis
    • G06F8/427Parsing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/44Encoding

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Devices For Executing Special Programs (AREA)

Abstract

The data generating tool development approach based on XML that the invention discloses a kind of, the invention belongs to configuration data initialization technique fields, including may be programmed XML configuration script, input adapter module, data structure block, general utility tool module, data resolution module, IOC attribute automatic assembling module, script parsing module, file output module, class mapping block, grammer intelligent prompt module, script debugging module and running log output module, by constructing a unified data configuration tool development platform, platform externally provides programming interface in the form of XML script, in XML script, define a set of programmable script grammer, developer is helped quickly accurately to develop safe data configuration.

Description

A kind of data generating tool development system based on XML
Technical field
The present invention relates to configuration data initialization technique fields, specifically relate to a kind of data generation work based on XML Has development system.
Background technique
At home and abroad railway and field of urban rail, the normal fortune of most of real-time online controls and/monitoring system Row, requires the initial work for being previously-completed configuration data, system complexity is higher, and the amount of configuration data is bigger, is It realizes the initial configuration to system prefab data, before system operation, there is a large amount of configuration data to generate need of work offline It completes.
To guarantee that data are accurate, safe, the generation work of configuration data is usually completed by data configuration tool.In recent years, Field of track traffic is fast-developing, it is desirable that data configuration tool can quick exploitation, accurately generate safe and reliable number According to, and existing data configuration tool mostly uses coder that programming language absolute coding is selected to complete, configuration tool it Between there are a large amount of repeated encodings, be not able to satisfy the requirement that tool is quickly developed, development efficiency is low.
In the prior art, such as Publication No. CN102799709B, the time of disclosure is on April 1st, 2015, entitled " base In XML Simulation Test environment construction and configuration system and method " Chinese invention patent document, disclose one kind and be based on The Simulation Test environment construction and configuration system and method for XML, system includes l-G simulation test configurator, performance parameter editor Device, member monitor service, data access service, test configurations library, test resources bank and equipment performance library.In method, developmental tube Reason personnel carry out seat configuration using l-G simulation test configurator in master control platform, simulator running parameter configures, interactive relation configures, Command relation's configuration etc.;Master control platform broadcast transmission initialization command;Member on each seat monitors that service receives initialization command, It is downloaded from database and starts corresponding simulator program;When simulator starts, by data access service, from equipment performance number XML format is downloaded from test configurations library by data access service according to performance parameter required for self-operating is read in library Configuration file and read itself operating parameter;System starting finishes, and completes initial work, waits opening for l-G simulation test Begin.
Functionally, data configuration tool is exactly the logic fortune by the input data of specific format Jing Guo specified rule Calculation obtains the output data of specified format, and the format of handled and generation data is various, stand-alone development data configuration work The development scheme of tool cannot be unified adaptation different-format input file and output file, too development personnel difference may The difference of tool quality is brought, field of track traffic production is not able to satisfy and the safety of data configuration tool data generated is wanted It asks.
Summary of the invention
It is an object of the invention to be directed to problem of the prior art, a kind of data configuration work based on XML configuration is proposed Has Development Framework, the frame is by one unified data configuration tool development platform of building, and platform is in the form of XML script pair Outer offer programming interface defines a set of programmable script grammer in XML script, and developer is helped quickly accurately to open Issue the data collocation system of safety.
The purpose of the present invention is what is be achieved through the following technical solutions:
A kind of data generating tool development system based on XML, it is characterised in that: suitable including the input for receiving input data Orchestration module, the script parsing module for resolution programmable XML configuration script grammer, the data for logical operation parse mould Block, for will be to the solution of the intermediate data and the data resolution module generated in programmable XML configuration script resolving Analyse file output module, the language for being prompted when XML configuration script is keyed in that result is output in specified format file Method intelligent prompt module and when for extending in system by above-mentioned intermediate data automatic mapping be C# data class class mapping block And the script debugging module for debugging XML script;
It is additionally provided between the input adapter module and file output module for being stored with unified data structure by institute State input adapter module loading input data and the intermediate data data structure block and extending in system when The corresponding data node of the intermediate data is automatically injected in the attribute of the C# data class in the task processor expanded The IOC attribute automatic assembling in corresponding intermediate data node is injected by the data generated after the completion of task processor operation Module.
The input adapter module is for being identified and being read in input file of the document inlet to different-format And be loaded into data structure block, the input format of the input file includes one in xml, par, ini, execl, csv Kind is a variety of.
The input file envelope for the different-format that the data structure block is used to that input adapter module to be identified and be read Unified data structure format is dressed up, and provides unified operation for the upward operation layer of input file of different-format and connects Mouthful.
The data of the input file are divided into metadata and operation data, the metadata by the data structure block Base data type in C# data class is packaged, so that can be legal between different types of metadata mutual turn Change, and weak type language feature is presented in programmable XML configuration script;Metadata is also by input adapter module loading Input data is encapsulated into imported data structure, facilitates system to the unified operation of input data;The operation data be The carrier of intermediate data is generated when to the parsing of programmable XML configuration script, operation data stores intermediate data using tree structure.
The programmable XML configuration script is write-in, for writing specific data generating tool with customized grammer Service logic, which, which defines, is loaded into the input data of data structure block and specifically handles and obtain intermediate data Process, and intermediate data is output to the way of output of output file;When the logic of data generating tool is difficult to configure foot in XML When realizing in this, the mode that this development system provides task processor supports system to extend, which is transferred to backstage and is inherited It is realized from the C# code of system expansion interface CommonTask, XML script provides proprietary mount hook subtab and appoints backstage Business processor C# code links up overall operation.
The script parsing module is used for the grammer of resolution programmable XML configuration script, and Run Script, perform script language Method operation calls the data parser module of next layer operation to carry out the input data for being loaded into data structure block specific Data protocol operation, conversion process generate intermediate data.
The attribute of the C# data class includes the generic attribute of Member, Alias and InitValue modification;The IOC belongs to Property automatic assembling module to injection task processor in characteristic Member, Alias and InitValue modification generic attribute into Specified intermediate data value, is then automatically assembled on such attribute, and the extension task in such by row instantiation After the completion of processing, the generic attribute value modified by injection properties Refill is automated assembly to refer to by IOC attribute automatic assembling module again On fixed intermediate data node.
File output module intermediate data way of output according to defined in the programmable XML configuration script, will By the script parsing module generate intermediate data be output in the file of specified format, the specified format include two into One or more of system, TXT text, ini, par and xml.
The class mapping block is used for programmable XML according to data mapping mode defined in above-mentioned XML script grammer When the intermediate data node specified in configuration script is automatically converted to corresponding C# data class for system extension before system operation The task processor of generation uses.
The grammer intelligent prompt module is used to edit the XML language for defining system when keying in programmable XML configuration script Method carries out keyword intelligent prompt, user's inputting, tracing and data parser modules built-in function signature intelligent prompt.
The debugging module is used in system operation by the intermediate data node path of tracking direction, application access The value of the back end and the value of the back end is shown to come in the input front end of programmable XML configuration script to can in depositing Programming XML configuration script is debugged.
It further include general utility tool module, the general utility tool module includes the starting calling interface of system, general data behaviour Make method model, universal input output stream operation class model and system exception tracer tools class model.
It further include the running log output module for exporting running log.
The corresponding system, the development approach of the invention also discloses it data generating tool development system based on XML, The following steps are included:
Programmable XML configuration script typing, defines the grammer in programmable XML configuration script by way of structuring;
Input file data are read into internal system by the I/O adapter specified in input adapter module and determined by data input In imported data structure in the data structure block of justice, I/O adapter carries out the legitimacy for reading data in reading process Verification;Imported data structure is the top layer parent taken out in data structure block to input data, for different Input format data, imported data structure provide upper layer unified operation interface;For example, for par input file, xml Input file, the interface that fetching determines node data is all Child function;
Data processing, script parsing module carry out syntax parsing to programmable XML configuration script and generate intermediate data;Data knot Structure module converts the intermediate data that the file data inputted in the data entry process and script parsing module generate to Unified data structure storage;System is extended and generates task processor, task processor in data parser module Call script parsing module parsing result included in function logics to data structure block conversion after intermediate data and File data carries out logical operation process;IOC attribute automatic assembling module is automatic by the corresponding data node of the intermediate data It is injected into the attribute of the C# data class in task processor, and the data generated after the completion of task processor operation is injected into In corresponding intermediate data node;
File output, file output module will be to the intermediate data and institute generated in programmable XML configuration script resolving The parsing result for stating data resolution module is output in specified format file.
File output module is configured according to the way of output of output file in programmable XML configuration script by above-mentioned generation Intermediate data is output in the text of specified format.Same file output module is according to defeated in XML configuration script according to may be programmed The way of output configuration of file creates corresponding output agent out, will configure to the way of output in agent creation process and carry out grammer Verification, verification do not prompt error configurations reason by that will report an error, then transfer to output agent to parse intermediate data.With two For system text output, output agent is according to the top-down lookup intermediate data node of tree structure of intermediate data, and root According to back end style attribute configuration in XML configuration script by Node style specified data type, match according to XML It sets the byte length that value attribute is specified in script and exports the intermediate node data.
Grammer in the programmable XML configuration script, be will by label in stzwctlrred definition XML configuration script, Attribute, value attribute value are come the exploitation grammer that defines.
The label include member, variable, oper, source, param, result, qualification, Some column labels such as func, task, log;Described member, variable and oper are generated for intermediate data and intermediate data Modification;The func is used for the input of the custom function in programmable XML configuration script.
The attribute includes name, value, alias, default, tostyle, tocs, refill, style etc.;It is described Name, alias are used to specify the variable name of the intermediate data;The default is used to be arranged the default value of intermediate data;Institute State the value of variable of the value for generating name instruction.
The value attribute value for define assignment operation, function call, function pointer reference, parsing agency reference, in Between data value reference etc. types.
The programmable XML configuration script typing is as unit of XML tag, with tree structure typing.
Described pair of programmable XML configuration script carries out syntax parsing, including parsing agent creation process: being with XML tag Unit generates one and acts on behalf of with the consistent parsing of the tree structure of XML typing, that is to say, that and parsing agency is also tree structure, The corresponding programmable XML configuration script of hierarchical relationship is identical, and parsing will be according to tree structure recursion resolution when acting on behalf of.Creation Syntactic verification will be carried out to programmable XML configuration script in the process, and verify its XML script grammer for whether meeting Platform Designing, It reports an error if being unsatisfactory for, prompts programmable XML configuration script grammer Error Location.
The Data processing, further include the process of context running environment creation: context running environment is for storing The integrality at a certain moment when system is run, the state include current time input adapter module loading into the defeated of system Enter type data, the intermediate data that programmable XML configuration script resolving generates, parse mould by the data that reflection mechanism loads The task processor that the method function class of operation data and system expand in block.Context environmental is parsed by script when operation The factory method of module is responsible for creation, will pass through reflection mechanism after the completion of creation for the method for operation data in data resolution module The context environmental when task processor that function class and system expand is loaded into operation.
The data processing, system run when context environmental, parsing agency and input adapter module loading it is defeated Enter type data and constitutes whole elements of data processing, it, first will be described defeated when the script parsing module operation parsing data Enter type data to be loaded into the context running environment created when operation, is then acted on behalf of by parsing and be responsible for the parsing context fortune Row environment, parsing agency is carrier and the executor for the XML grammer that system defines, and when parsing, parsing agency is according to above-mentioned grammer Label, attribute, value attribute value, junior's subtab sequence successively resolution programmable XML configuration script.
If being related to the debugging of programmable XML configuration script in operation parsing agent process, script debugging module can be tracked User's mouse position, when mouse position has been directed toward the intermediate data node name in XML configuration script, script debugging module is by institute The intermediate data node path identified is packaged into context environmental when request is sent to operation, and context environmental receives when operation To after request, the intermediate data node path of request is parsed, and from intermediate data nodal value is inquired, which is packaged into back Multiple message is sent to script debugging module, shows the real value of query node in XML configuration script by script debugging module.
The data processing, when the label of XML configuration script is member variable, parsing agency will transported The intermediate data node of entitled name attribute value is generated when row in context environmental, nodal value is according to as defined in value attribute value Mode generates, and when value attribute Value Types are assignment operation, nodal value is value attribute value;When value attribute value class Type be intermediate data value reference type when, parsing agent object by according to the path indicated in value attribute value from operation when on The variable under the path is hereafter searched in environment, and the variate-value is assigned to the node;When value attribute Value Types are letter When number call type, parsing agent object will find out the method indicated in value attribute value from context environmental when operation Function object, context environmental passes to method function pair when the subtab of current parsing agent object is acted on behalf of and run As entering ginseng as the function of method function object by the recursive variate-value for parsing subtab agency of method function object, so Method function object calculates method function return value according to the design logic that the function parsed enters ginseng parsing and function afterwards, will Return value returns to current parsing agent object, generates the intermediate data section that entitled name value is return value by parsing agent object Point, the intermediate data node that member tag resolution generates will save in context environmental at runtime as global variable, And the intermediate data that variable tag resolution generates will save in context environmental at runtime as local variable, current Father's proxy resolution of parsing agent object is deleted when completing.When label is oper, the parsing of value attribute value with member and Variable, only return value will be dropped, when not being stored in operation in context environmental.When label is task, parsing agency Object will find out the specified task processor of value attribute value from context environmental when operation, and the task is called to handle The intermediate data node that device completes certain logic generates.
The task processor realizes data processing, can be based on system number by programmable writing for XML configuration script Data processing is completed according to nation method function in parser modules, it, can be by extending task when service logic is excessively complicated Processor generates intermediate data node:
Firstly, being configured in programmable XML configuration script during task processor will use using tocs, tostyle, refill Between back end;
Then the intermediate data node being configured is automatically generated by corresponding C# data class by class mapping block, what is extended The C# data class of generation is quoted in task processor, and the InitValue characteristic provided by system indicates to draw this when operation With the path of injection intermediate data node, in task operation, IOC attribute automatic assembling module will be automatically by specified centre Data section point value is injected into the reference, rewrites the Run method of task processor, completes specific logical data processing logic;
Finally, context environmental when the injection of Run method processing result data is backhauled row by the Refill characteristic provided by system In the intermediate data node specified, in task operation, IOC attribute automatic assembling module will be automatic after the execution of Run method The field modified in scan task processor by Refill, the centre specified in context environmental when row is backhauled in field value injection Back end.
Compared with prior art, the invention has the following advantages that
Exploitation quickly, in this scenario, passes through the programmable configuration script grammer calling platform of unified development platform offer Internal data manipulation class libraries abundant, can reduce the repetition of absolute coding bring code, and developer can quickly construct oneself Application, for the service logic that XML script is difficult to realize, platform also provides flexible and convenient C# extension task processor and expands Exhibition mode is handled, while the processing mode masked the processing to MetaFly bottom data structure, and developer is without The cost for practising bottom data structure, reduces the difficulty of exploitation.
Data are accurately handled: in this scenario, since we provide the Data Manipulation Library classes tested for developer's tune With, meanwhile, unified data structure encapsulation and the output data operation formatted have masked absolute coding in stand-alone development Bring data calculate error.
Safety output: in this scenario, using the development scheme of hardware and software platform, efficiently avoiding in absolute coding, coding The quality differences bring coding quality problem of personnel;The data way of output of configurationization, also avoids absolute coding bring Risk improves the quality safety of too development.
Detailed description of the invention
It is of the invention aforementioned and be detailed description below and become more apparent upon when reading in conjunction with the following drawings, in which:
Fig. 1 is a kind of structural schematic diagram of preferred embodiment of development system of the present invention;
Fig. 2 is a kind of corresponding exploitation logical schematic of preferred embodiment of algorithm of development system of the present invention.
Specific embodiment
It is further illustrated below by several specific embodiments and realizes the object of the invention technical solution, need to illustrate It is that claimed technical solution includes but is not limited to following embodiment.
Embodiment 1
As a kind of most basic embodiment of the invention, present embodiment discloses a kind of data generating tools based on XML to open Hair system, such as Fig. 1, including for receiving input data input adapter module, be used for resolution programmable XML configuration script language The script parsing module of method, for the data resolution module of logical operation, for will be to programmable XML configuration script resolving The parsing result of the intermediate data of middle generation and the data resolution module is output to the output of the file in specified format file Module, for the grammer intelligent prompt module that is prompted when XML configuration script is keyed in and for extending in system when by State the class mapping block that intermediate data automatic mapping is C# data class and the script debugging module for debugging XML script;Institute It states and is additionally provided between input adapter module and file output module for being stored with unified data structure by the input It will be described when the data structure block and extending in system of the input data and the intermediate data that adaptor module loads The attribute that the corresponding data node of intermediate data is automatically injected the C# data class in the task processor expanded, which will neutralize, to appoint The data generated after the completion of business processor operation are injected into the IOC attribute automatic assembling module in corresponding intermediate data node.
The grammer in programmable XML configuration script is defined by way of structuring;Pass through input adapter module middle finger Input file data are read into the imported data structure in the data structure block that internal system defines by fixed I/O adapter In, I/O adapter verifies the legitimacy for reading data in reading process;Imported data structure is data structure block In a top layer parent that input data is taken out, for different input format data, imported data structure is to upper layer Unified operation interface is provided;For example, for par input file, xml input file, the interface that fetching determines node data is all Child function;Script parsing module carries out syntax parsing to programmable XML configuration script and generates intermediate data;Data structure The intermediate data that the file data inputted in the data entry process and script parsing module generate is converted system by module One data structure storage;System is extended and generates task processor, task processor tune in data parser module Function logics included in parsing result with script parsing module are to the intermediate data and text after data structure block conversion Number of packages is according to progress logical operation process;IOC attribute automatic assembling module infuses the corresponding data node of the intermediate data automatically In the attribute for entering the C# data class into task processor, and the data generated after the completion of task processor operation are injected into phase In the intermediate data node answered;File output module will be to the intermediate data generated in programmable XML configuration script resolving And the parsing result of the data resolution module is output in specified format file.
Embodiment 2
It is preferably carried out scheme as one kind of the present invention, the data generating tool exploitation based on XML that present embodiment discloses a kind of System, such as Fig. 1, including programmable XML configuration script, input adapter module, data structure block, general utility tool module, number According to parsing module, IOC attribute automatic assembling module, script parsing module, file output module, class mapping block, grammer intelligence Cue module, script debugging module and running log output module.
Programmable XML configuration script is defined as the open calling interface to developer of platform, specific for configuration tool Service logic.The syntactic definition defines the recursion resolution mode of script using the tree structure of XML, meanwhile, using pair The definition of XML difference label and attribute simulates local variable, global variable, data referencing, custom function and variable effect The concepts such as domain, platform are responsible for the concept analysis label and attribute simulated according to it.
Input adapter module is mainly responsible for the input file I O read of different-format, and input adapter module is adapted at present The primary formats input datas such as xml, par, ini, execl, csv.
Data structure block is used for unified data format, and the input file of different-format is packaged into unified data lattice Formula, and unified operation interface is provided to upper layer for the input data of different-format.
General utility tool module, i.e. tool-class etc., be responsible for the unified tracking abnormal to layer resume module each under layer architecture with And some general tool-class etc..
Data resolution module, i.e. data manipulation class libraries are responsible for the specific service logic operation of processing.
When IOC attribute automatic assembling module is responsible for extending task processor, attribute is automatically injected and task processor category Property is backfilling into XML data node automatically.
Script parsing module is responsible for parsing the explanation for the service logic script that XML grammer is write.
The intermediate data that file output module is responsible for parsing in XML script generation is output in the file of specified format, mesh Preceding Export has been adapted to the main output format such as binary system, text, ini, par and xml.
Running log output module is for exporting running log.
Class mapping block is responsible for for XML data node being automatically mapped on C# data class;Grammer intelligent prompt module is responsible for Auto-complete and grammer prompt when XML writes;Script debugging module is responsible for the debugging of XML script.
Programmable XML script grammer is defined as the open calling interface to developer of platform, specific for configuration tool Service logic.The syntactic definition defines the recursion resolution mode of script using the tree structure of XML, meanwhile, using pair The definition of XML difference label and attribute simulates local variable, global variable, data referencing, custom function and variable effect The concepts such as domain, platform are responsible for the concept analysis label and attribute simulated according to it.
The input data of different-format is unified to be adapted to.Platform will be in field of track traffic using input data adaptor module The main input file format that data configuration is used is loaded into unified data structure, for the input data pair of different-format Last action layer provides unified operation interface.
Task processor extended method.Platform provides plug-in unit class mapping block and front end intermediate data node is translated into equivalence C# data class, then by platform automatic assembling module realize to task expander attribute run when be automatically injected, develop Person can easily index front end data node data by the C# data class, and the process is without developer manually in system It sets data structure and carries out unpacking, reduce development difficulty.For the data that task processor processing is completed, system can pass through The mode that [Refill] is explained, automatic Loading is into front end XML data node.The note that system provides has [InitValue (path)], [Member (path)], [Alias (path)] are used to realize the attribute injection to task processor, their difference An XML script node template must be had by being InitValue, and the attribute injected is by unpacking, and Member and Alias can be with There is no template, the data structure that the attribute of injection supports system primary is handled without unpacking.For instance, it is preferred that system provides one A [ExportFunc (funcname)] is explained, and the task processor of User Exploitation is easily integrated into platform, in XML script Front end, by<task value=" funcname "/>label calling
The data of programmable configuration are unified to be exported.Adaptation module is exported in system, and mainstream output data in field of track traffic is provided The adaptation of format configures output par, c logic, that is, the back end format exported, and the adapter that output is used by XML, The accurate output to data can be completed.
The debud mode of XML script.XML script itself is the carrier of tool operation service logic, and IDE compiler does not mention For the debugging function to custom script.System provides the breakpoint function of debugging and VS debugs plug-in unit, and plug-in unit is realized fixed to mouse The identification and path recombination of position node, and request of data is sent to current context, the state of context is controlled by breakpoint function, Context returns to application node data value, then transfers to plug-in unit, and plug-in unit is responsible for front end real-time display.
Development system realizes exploitation in the following way:
1. input file is read into the input number that platform interior defines by the specified I/O adapter in input adapter module According in structure, input data structure is the top layer parent that input data takes out, defeated for different input format data Enter data structure and unified operation interface is provided upper layer.For example, for par input file, xml input file, fetching saves surely The interface of point data is all Child function.
2. creating platform context running environment example, which passes through reflection mechanism for the number in data parser module It is loaded into according to the task manager that C# in handling function library class and current tool project extends with postponing to instantiate loading technique Into context environmental, for run time call.The library class object that delay instantiation loads only is called at runtime to corresponding place Library class object is just created when managing library class.
3. parsing agency is one to label node in XML script according to the example that XML script creates node parsing agency One mapping.The process carries out syntactic verification to XML script first, after only syntactic verification passes through, will just reflect to script node It is mapped on parsing agency tree, otherwise reports an error, prompt developer, the type of syntax error and the node content of error.
4. parsing XML Scripting Agent.The whole that input data, context environmental and rule broker constitute rule parsing is wanted Element.When operation parsing, input data is pressed into context environmental first, then based on context environmental information is entrusted to and works as former generation The specific example parsing for the explanation parameter definition information (corresponding XML tag grade) held in reason, explains that parameter definition information again will The parameter information entity resolution that the value attribute mapping that context environmental entrusts to it to hold generates.Parameter information entity Can be divided according to the difference of style are as follows: parameter reference, function processing, function commission, XML script reference, value parsing and The specifically parsing behavior such as Lambda expression formula.Such as by taking function is handled as an example: when value attribute value is func style, currently Parameter information entity can find out the specified library class function entity of func from the context first, and by current proxy object and Context environmental entrusts to function entity to handle.It, can be whole although different functions defines different data processing methods Body is abstract to be thought, function is the concrete operation treatment process to the parameter of incoming function, and function parameter is current agent The return value for acting on behalf of child node recursion resolution result, by such recursion resolution, current agent calls function parsing Return value can decide whether for return value to be pressed into context environmental according to corresponding XML tag type is acted on behalf of again, or with the overall situation The form of variable, or be pressed into return value in the form of local variable.Label where current value then will if member Value return value is pressed into the lasting area in context data pond;Return value is then pressed into context number if variable by place label According to the instantaneous area in pond;If oper, then return value is abandoned.Data are designed using weak type in XML script, at the specific function of calling When managing data, the unified high-precision data type that is converted into of the parameter parsed is just participated in into concrete operation.
5. platform provides the extended mode of task processor to cope with extremely complex business scenario, easily support to make Intricately service logic is write with C#.The class generator plug-in unit of system can be to define and the back end generated is in XML script Template automatically generates corresponding C# data class, and the leaf node attribute of the data class is and can to pass through index by unpacking Combination with attribute conveniently indexes.If being related to the processing for the task processor that C# writes in resolving, system will be according to As under type parses: firstly, path in system [InitValue (path)] is specified the specified injection of data by automatic assembling module In the attribute node of unpacking specified to InitValue, the Run method rewritten in current task processor is then run, is calculated Service logic.Finally, [Refill (path)] in processor attribute value modified is backfilling into path in context data pond again On specified node.
6. if the mouse identified can be directed toward by script debugging module be related to the debugging of XML script in resolving XML node path be packaged into request and be sent to system, after system receives request, unpack, and looked into from context data pond Inquiry egress value is sent to plug-in unit and is shown in XML configuration script.
7. parsing the configuration of XML script output par, c.System is mapped to file for XML configuration script label node is exported one by one On the object instance of output module, during this, which can be verified, only when verifying successfully, File output module example can be just generated, is otherwise reported an error, developer's configuration error position is prompted.File output module example is The agency of output par, c, it is responsible for translating intermediate data in the output file of specified format.Rule section is parsed and is given birth to At intermediate data node, data structured fast and accurately can be output to specified format by way of configuring by system Output file in.XML output par, c configures and intermediate data structure is there are the correspondence mappings relationship of tree construction and the front end XML is The design of weak type syntax, therefore, developer need to indicate the node name of current output node, the output style of present node, with And byte length of present node etc. accurately can convert specified data type, lattice for intermediate data by output adaptation module Formula occupies byte length Formatting Output, and the output format (style) of system is divided into compound and simple type, compound for letter The combination of monotype, simple type are not subdivisible atomic types.When resolution file output module example, according to current agent Name takes out specified back end from the context and then converts the specified number of types of output format (style) for the data According to if output format (style) is compound type, recursion resolution next stage node, the simple class until being resolved to the bottom Type;If output format (style) is simple type, such as binary system exports long type, then by node data unpacking at long class Type, and be output in binary file with the byte length that value is specified.

Claims (10)

1. a kind of data generating tool development system based on XML, it is characterised in that: including the input for receiving input data Adaptor module, the script parsing module for resolution programmable XML configuration script grammer, the parsing of the data for logical operation Module, for will be to the intermediate data and the data resolution module generated in programmable XML configuration script resolving File output module that parsing result is output in specified format file, for what is prompted when XML configuration script is keyed in Grammer intelligent prompt module and the class that above-mentioned intermediate data automatic mapping is C# data class is mapped into mould when for extending in system Block and script debugging module for debugging XML script;
It is additionally provided between the input adapter module and file output module for being stored with unified data structure by institute State input adapter module loading input data and the intermediate data data structure block and extending in system when The corresponding data node of the intermediate data is automatically injected in the attribute of the C# data class in the task processor expanded The IOC attribute automatic assembling in corresponding intermediate data node is injected by the data generated after the completion of task processor operation Module.
2. a kind of data generating tool development system based on XML as described in claim 1, it is characterised in that: the input Adaptor module is for being identified and being read in input file of the document inlet to different-format and be loaded into data structure In module, the input format of the input file includes one of xml, par, ini, execl, csv or a variety of.
3. a kind of data generating tool development system based on XML as claimed in claim 1 or 2, it is characterised in that: the number According to construction module for the input file for the different-format that input adapter module is identified and read to be packaged into unified data Architecture, and unified operation interface is provided for the upward operation layer of input file of different-format.
4. a kind of data generating tool development system based on XML as described in claim 1, it is characterised in that: the script Parsing module is used for the grammer of resolution programmable XML configuration script, and Run Script, perform script grammatical operations, calls next The data parser module of layer operation carries out specific data protocol operation to the input data for being loaded into data structure block, turns It changes processing and generates intermediate data.
5. a kind of data generating tool development system based on XML as described in claim 1, it is characterised in that: the file Output module intermediate data way of output according to defined in the programmable XML configuration script will parse mould by the script The intermediate data that block generates is output in the file of specified format, and the specified format includes binary system, TXT text, ini, par And one or more of xml.
6. a kind of data generating tool development system based on XML as described in claim 1, it is characterised in that: the file Output module intermediate data way of output according to defined in the programmable XML configuration script will parse mould by the script The intermediate data that block generates is output in the file of specified format, and the specified format includes binary system, TXT text, ini, par And one or more of xml.
7. a kind of data generating tool development system based on XML as described in claim 1, it is characterised in that: the class is reflected Penetrate module for according to data mapping mode defined in above-mentioned XML script grammer by programmable XML configuration script specify Intermediate data node is automatically converted to the task processor generated when corresponding C# data class is extended for system before system operation It uses.
8. a kind of data generating tool development system based on XML as described in claim 1, it is characterised in that: the grammer Intelligent prompt module is used to edit when keying in programmable XML configuration script and carries out keyword intelligence to the XML grammer that system defines Prompt, user's inputting, tracing and data parser modules built-in function signature intelligent prompt.
9. a kind of data generating tool development system based on XML as described in claim 1, it is characterised in that: further include leading to With tool model, the general utility tool module includes the starting calling interface of system, popular data manipulation method model, general defeated Enter output stream operation class model and system exception tracer tools class model.
10. a kind of data generating tool development system based on XML as described in claim 1, it is characterised in that: further include using In the running log output module of output running log.
CN201910485783.XA 2019-06-05 2019-06-05 XML-based data generation tool development system Active CN110209389B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910485783.XA CN110209389B (en) 2019-06-05 2019-06-05 XML-based data generation tool development system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910485783.XA CN110209389B (en) 2019-06-05 2019-06-05 XML-based data generation tool development system

Publications (2)

Publication Number Publication Date
CN110209389A true CN110209389A (en) 2019-09-06
CN110209389B CN110209389B (en) 2023-03-14

Family

ID=67791020

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910485783.XA Active CN110209389B (en) 2019-06-05 2019-06-05 XML-based data generation tool development system

Country Status (1)

Country Link
CN (1) CN110209389B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111679867A (en) * 2020-05-29 2020-09-18 中国航空工业集团公司西安航空计算技术研究所 Embedded system configuration data generation method
CN114510298A (en) * 2022-04-20 2022-05-17 科大讯飞股份有限公司 Intelligent engine access and call method and related platform, device, equipment and medium
CN114691486A (en) * 2020-12-30 2022-07-01 腾讯科技(深圳)有限公司 Program debugging method and device and computer equipment
CN115034182A (en) * 2021-03-05 2022-09-09 北京金山云网络技术有限公司 Page rendering method and device, electronic equipment and storage medium
CN115291883A (en) * 2022-07-12 2022-11-04 湖南于一科技有限公司 Method for realizing development and operation of robot by self-defined script parser

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030097369A1 (en) * 2001-10-31 2003-05-22 International Business Machines Corporation Dynamic generic framework for distributed tooling
JP2003526843A (en) * 1999-12-08 2003-09-09 クゥアルコム・インコーポレイテッド E-mail software and method and system for distributing advertisements to client devices
JP2004355186A (en) * 2003-05-28 2004-12-16 Hitachi Ltd Method and device for supporting editing of input/output data of computing program
JP2005011082A (en) * 2003-06-19 2005-01-13 Dainippon Printing Co Ltd Xml structure conversion system, method, program and recording medium
US20080154939A1 (en) * 2006-12-22 2008-06-26 Unisys Corporation Information transfer from object-oriented repository to relational database
JP2008198103A (en) * 2007-02-15 2008-08-28 Nec Corp State transition diagram preparing device and state transition diagram preparing method
CN101282345A (en) * 2008-03-03 2008-10-08 北京航空航天大学 Method for converting XML based on formalization description and state ontroller system
CN102609255A (en) * 2012-01-19 2012-07-25 中国科学院计算机网络信息中心 Generation method for Spring IOC (Inversion of Control) configuration file
CN107133024A (en) * 2016-02-29 2017-09-05 北京广联达正源兴邦科技有限公司 Business management system based on OSGI frameworks
US20180084073A1 (en) * 2015-03-27 2018-03-22 Globallogic, Inc. Method and system for sensing information, imputing meaning to the information, and determining actions based on that meaning, in a distributed computing environment

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003526843A (en) * 1999-12-08 2003-09-09 クゥアルコム・インコーポレイテッド E-mail software and method and system for distributing advertisements to client devices
US20030097369A1 (en) * 2001-10-31 2003-05-22 International Business Machines Corporation Dynamic generic framework for distributed tooling
JP2004355186A (en) * 2003-05-28 2004-12-16 Hitachi Ltd Method and device for supporting editing of input/output data of computing program
JP2005011082A (en) * 2003-06-19 2005-01-13 Dainippon Printing Co Ltd Xml structure conversion system, method, program and recording medium
US20080154939A1 (en) * 2006-12-22 2008-06-26 Unisys Corporation Information transfer from object-oriented repository to relational database
JP2008198103A (en) * 2007-02-15 2008-08-28 Nec Corp State transition diagram preparing device and state transition diagram preparing method
CN101282345A (en) * 2008-03-03 2008-10-08 北京航空航天大学 Method for converting XML based on formalization description and state ontroller system
CN102609255A (en) * 2012-01-19 2012-07-25 中国科学院计算机网络信息中心 Generation method for Spring IOC (Inversion of Control) configuration file
US20180084073A1 (en) * 2015-03-27 2018-03-22 Globallogic, Inc. Method and system for sensing information, imputing meaning to the information, and determining actions based on that meaning, in a distributed computing environment
CN107133024A (en) * 2016-02-29 2017-09-05 北京广联达正源兴邦科技有限公司 Business management system based on OSGI frameworks

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
MARIANA GORANOVA: "《Automatic conversion of scientific data into canonical format》", 《2011 IEEE EUROCON - INTERNATIONAL CONFERENCE ON COMPUTER AS A TOOL》 *
欧阳宏基: "整合ESMSH框架的Java EE应用架构", 《计算机测量与控制》 *
莫秋晶: "基于Spring Boot的信息化服务管理系统的设计与实现", 《电子技术与软件工程》 *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111679867A (en) * 2020-05-29 2020-09-18 中国航空工业集团公司西安航空计算技术研究所 Embedded system configuration data generation method
CN111679867B (en) * 2020-05-29 2024-02-27 中国航空工业集团公司西安航空计算技术研究所 Method for generating configuration data of embedded system
CN114691486A (en) * 2020-12-30 2022-07-01 腾讯科技(深圳)有限公司 Program debugging method and device and computer equipment
CN115034182A (en) * 2021-03-05 2022-09-09 北京金山云网络技术有限公司 Page rendering method and device, electronic equipment and storage medium
CN114510298A (en) * 2022-04-20 2022-05-17 科大讯飞股份有限公司 Intelligent engine access and call method and related platform, device, equipment and medium
CN114510298B (en) * 2022-04-20 2022-08-02 科大讯飞股份有限公司 Intelligent engine access and call method and related platform, device, equipment and medium
CN115291883A (en) * 2022-07-12 2022-11-04 湖南于一科技有限公司 Method for realizing development and operation of robot by self-defined script parser

Also Published As

Publication number Publication date
CN110209389B (en) 2023-03-14

Similar Documents

Publication Publication Date Title
CN110222318A (en) Data generating tool development approach based on XML
CN110209389A (en) A kind of data generating tool development system based on XML
CN107273117B (en) Programming-friendly agile code automatic generation system
US6385765B1 (en) Specification and verification for concurrent systems with graphical and textual editors
CN107291450B (en) Programming-friendly agile code automatic generation method
US5390320A (en) Automatically converting structured analysis tool database outputs into an integrated simulation model via transportable standardized metafile
US20040143819A1 (en) Generic software testing system and mechanism
CN106776343A (en) A kind of web application automated test tool and method
US20020100022A1 (en) Method and apparatus for automatic verification of properties of a concurrent software system
CN114625353A (en) Model framework code generation system and method
CN106648587A (en) Annotation-based Web application code generation method
Wood et al. A model-driven development approach to mapping UML state diagrams to synthesizable VHDL
CN108037913B (en) Method for converting xUML4MC model into MSVL (modeling, simulation and verification language) program and computer-readable storage medium
CN110262794A (en) A kind of AADL behaviour expanding method and tool based on specification with description language
CN116661756B (en) Object analysis method and device based on low-code DSL
US11593076B2 (en) Method for merging architecture data
Carvalho et al. Modelling timed reactive systems from natural-language requirements
Pereira et al. Development of self-diagnosis tests system using a DSL for creating new test suites for integration in a cyber-physical system
CN114647568A (en) Automatic testing method and device, electronic equipment and readable storage medium
Marsso et al. Asynchronous testing of synchronous components in GALS systems
Pomante et al. A model-driven approach for the development of an ide for spacecraft on-board software
Graf et al. Gaining insight into executable models during runtime: Architecture and mappings
Jilissen et al. Formally Modelling the Rijkswaterstaat Tunnel Control Systems in a Constrained Industrial Environment
Hu et al. Notice of Violation of IEEE Publication Principles: A New Parallel Gauss-Seidel Method by Iteration Space Alternate Tiling
Guo et al. Model-based test generation using extended symbolic grammars

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