The machinist Cheng data that is based on XML expresses memory and the research that retrieve a method

  • Time:
  • Click:76
  • source:AYOR CNC Machining
Summary: Develop a tendency to get used to mechanical design and production network, the issue that expresses method of commonly used memory to be able to safeguard place of field of interchangeability of gender, data to exist in data in the light of machinist Cheng data, offerred technology of a kind of use XML the mode of tectonic data storage, new method that is a foundation to undertake data retrieval with XPath method language. 1 foreword to get used to the development trend of global economic integration and increasingly intense competition environment, the company is changing more and more business to the application that is based on Web, design of ground of the different since work up and different ground also begin to make a system between the enterprise. When be built in compose and applying these systems to undertake the mechanical design of particular product and craft are designed, need retrieval is normally many special and complex and each not same machinist Cheng data expresses constituent structure. Accordingly, how be designed and compose builds reasonable and effective data storage mode to fall in order to get used to network environment data is shared between heterogeneous platform and the demand that data exchanges, become the problem that solves urgently. Build the machinist Cheng data of based XML to express, can realize the data switch between heterogeneous platform not only, and can solve in face complex structure mechanic the issue that Cheng data table uses memory method place to exist constantly. 2 data express method of commonly used memory 2.

1 store according to the data that defines oneself from definition data file format general data with text file or binary form memory is among independent data file. When using this kind of method to be exchanged in the data between implementation application process, must build the base in specific filestore format over, without unified process designing interface. 2.

Database of relation of database of 2 use relations builds the base in relation algebra over, the form that expresses with 2 dimension data comes description and memory data. Relation database suits structuralization to store and retrieve of data very much, however the structure that machinist Cheng data expresses is compared normally complex, although can pass fractionation to occupy the kind of the watch into many 2 dimension,will store, but can manage to data and data retrieval brings a lot of inconvenience. The 3 data that are based on XML store mode XML has made the standard that the data below Internet environment exchanges gradually, the core that data exchanges is the standardization that information describes, the XML that regards W3C as the standard has natural advantage. The flexibility of XML, OK the powerful technology system that all sorts of means have the ability of put sb in a very important position and compose are built on XML foundation to data, the wide application that is XML laid solid foundation. 3.

The 1 data table that is based on XML stores mode designs the data that is based on XML to express memory mode build should follow following basic principles: The compositive element that expresses through defining mark to describe data oneself, the constituent structure that will describe data to express through labelling the nest between concerns. Tentative data is expressed by N elemental composition, write down for (element 1, element 2, ... , elemental N) . In the basis in data table among them N-1 the element decides a certain element, if data expresses retrieve measure to be certainly: Element 1 → element 2 → ... → element N, corresponding mark nest relation should be < element 1>< element 2>... < element N></ element N>... </ element 2>Two kinds of 2 methods that introduce data embed the dynamometer that when </ element 1> expresses steel of turning of lathe tool of 1 hard alloy to expect, uses up cotton padding mark adds rate of attribute < cutting>< value>X </ value>< cutting power>< value>Y </ value></ cutting power > </ cutting speed > < cutting speed is worth = " X " > < cutting power is worth = " Y " /></ cutting speed > below come through an example specific specification. In the computational course that chooses turning dosage, according to 1000MPa of foregone workpiece data strength, back penetration of a cutting tool is measured 2.

0mm, feed 0.

25mm/r and cutting speed 106m/min, need to note according to watch 1(: Watch 1 in back penetration of a cutting tool is measured already instead cutting deepness) affirmatory cutting power. If express,retrieve a process actually 1 in arrowhead and place of ⑤ of ~ of measure grade ① are shown. The watch shows data table 1 times to be comprised by 5 woof. Retrieve measure according to expressing 1 to show, the hierarchy that can determine 5 number is = of < data strength " " hardness = " ">< bears amount of penetration of a cutting tool>< feed>< cutting speed>< cutting power></ cutting power></ cutting speed></ feed></ bears amount of penetration of a cutting tool></ material>In above measure, although can pass data strength or material hardness,two different conditions undertake the first pace retrieves, but as a result of later the element of each measure place basises and data are identical, to avoid data redundant, it is data strength and material hardness design two of same element different attribute now. 3.

2 after introducing data to express the design that data was completing data to express memory mode, can introduce data through embedding cotton padding mark or the method that add attribute (if express,2 show) . Express medium interval value to data, can fractionation is many nest child label or many add attribute. Express 1 medium data strength / material hardness value is interval value, because each interval is successive, can use interval left end points to regard the dividing line of each interval as the dot. If will introduce data through adding attribute, so the memory pattern that the watch shows data 1 times to express is shown as follows: < ? Xml Version = " 1.

0 " Encoding = " Gb2312 " ? >< data is expressed>= of < data strength " 0 " hardness = " 0 ">= of value of a quantity of < back penetration of a cutting tool " 2.

0 ">= of < feed value of a quantity " 0.

25 ">... speed of ① < cutting is worth = " 86 ">< cutting power is worth = " 1.

0 " /></ cutting speed>< cutting speed is worth = " 106 ">< cutting power is worth = " 1.

2 " /></ cutting speed>... ② </ feed>... ③ </ bears amount of penetration of a cutting tool>... ④ </ material>= of < data strength " 580 " hardness = " 165 ">... ⑤ </ material>= of < data strength " 970 " hardness = " 277 ">... ⑥ </ material></ data is expressed>The ① in above mode, ② expresses to become quantity of penetration of a cutting tool of data strength <580MPa or material hardness <165HBS, back is 2.

0mm, feed is 0.

The other of correspondence of the place when 25mm/r each cutting speed; ③ states when data strength <580MPa or material hardness <165HBS, back penetration of a cutting tool is measured for 2.

The other of correspondence of the place when 0mm each feed; ④ states the other when correspondence of the place when data strength <580MPa or material hardness <165HBS bears amount of penetration of a cutting tool individually; Each back penetration of a cutting tool of correspondence of the place when ⑤ states when material intensity is 970MPa of 580 ~ or material hardness is 165 ~ 277HBS are measured; ⑥ expresses to become data strength > 970MPa or material hardness > quantities of each back penetration of a cutting tool of correspondence of the place when 277HBS. The 4 data that are based on XPath retrieve methodological XML documentation to be able to express with tree shape structure, XML mark calls the node of the tree commonly. The process that searchs a certain specific node in the tree in XML documentation is called by figure ground " walk along a tree " . The method language of XML -- XPath builds the base in XML over, the data that basically is used at XML documentation retrieves and data filters. The grammar of XPath is quite concise, its are basic and syntactic the form is: AXis: Nodetest[predicate] . Axis pointed out retrieve direction. Assume current environment node is node 7, so the definition of Axis. If retrieve direction to be Child axis, criterion Axis can be not written elliptically. Nodetest and Predicate call-over to say and appoint a condition to undertake filtration according to the section respectively. The retrieval that the watch shows 1 times the XPath statement of process correspondence is / data is expressed / material [penetration of a cutting tool of back of @ intensity <=1000][last()]/ is measured [@ is worth =2.

0]/ feed [@ is worth =0.

25]/ cutting speed [power of cutting of @ value =106]/ the particular executive procedure of this statement. Below certain circumstance, bearing quantity of penetration of a cutting tool, feed and cutting rate is not a watch the 1 standard in is worth, perhaps can raise limit requirement from equality instead inequality according to actual condition at this moment. The XML that the 5 utility program designs that are based on C# mature at present is analytic implement have Microsoft XML4.

0Parser, Saxon, these XML are analytic implement can handle XPath. Reflected application table of data of program, XML and XML are analytic implement 3 person the relation between. Measure ① states XML data the watch loads applied process; Measure ② expresses to use a program to analytic implement send XPath retrieval statement, analytic implement return executive result. The implementation method in C# gives out below (other language is completely similar) : Using System; Using System.

Xml; Public Class XmlSearch{Public Static Void Main(){Xmldocument Doc=new Xmldocument() ; Doc.

Load(" Sheet.

Xml " ) ; / / load XML data to express XmlNode Power=doc.

SelectSingleNode(" / data is expressed / material [penetration of a cutting tool of back of @ intensity <=1000][last()]/ is measured [@ is worth =2.

0]/ feed [@ is worth =0.

25]/ cutting speed [power of cutting of @ value =106]/ / @ is worth " ) ; Console.

WriteLine(power.

Value) ; }} runs an environment: Windows2000, .

NET Framework 1.

0, Microsoft XML4.

0Parser. 6 conclusion the article applies according to the project actual, the flexibility that uses XML and compose are built in the powerful technology system over XML, form element and constituent structure in the light of what specific data expresses, design XML mark and corresponding memory pattern, the retrieval that comply with data expresses measure organizes XPath statement, use XML analytic implement executive XPath statement undertakes data retrieval, the data storage that expresses for machinist Cheng data and data retrieve open up a new thinking, provided new method. Through stating article place method and Ai Xing, xiao Shigang is written " cutting dosage is compendious manual (the 3rd edition) " , Xu Hao is written " mechanical design manual (the 2nd edition) " the extensive test and verify that medium specific data expresses photograph union to undertake, show this method has general applicability. CNC Milling