Method and apparatus for querying at least one value of at least one parameter of a module, and method and module for providing at least one value of at least one parameter
The invention relates to a method and an apparatus for querying at least one value of at least one parameter of a module and to a method and a module for providing at least one value of at least one parameter.
Devices which can and must be adapted to local conditions are being used more and more in automation and energy distribution. For this purpose, configuration information is generated and is used to configure the devices.
This configuration information can thus be represented in a flexible and expandable manner with the aid of XML (XML—Extensible Markup Language). The text below illustrates a structured document in XML [5, 6, 7] which provides different parameters for a sensor:
In this case, the device comprises a node at which sensors and actuators are registered. The device has a plurality of sensors, inter alia a temperature sensor. This sensor has a configuration parameter—parameter for short—“measuring rate” which indicates how often a measured value is intended to be determined per second. Furthermore, the sensor may provide further parameters, for example “accuracy”, this parameter indicating the accuracy of the sensor. In the above example, two measured values are determined per second with an accuracy of 0.1 degrees.
In addition to configuring the device, it is also necessary to read parameters of the device, for example the measured value of the temperature sensor. For this purpose, use is made of a query language XPATH [1], for example, which queries the device based on the above structure by means of path expressions. In order to access the measuring rate in the above example, the following XPATH expression could be used:
The disadvantage of the use of XPATH is that the device must support both a first method for configuring the parameters and a second method for retrieving the parameters. Use of XPATH is virtually excluded, in particular, for small devices with very limited storage space and very low computing power, such as microcontrollers with a 2 Kbyte memory, 5 Kbyte program code and a computing power of 1 MIPS (MIPS—Million Instructions Per Second).
A further known language for querying data structures is Query-by-Example, see document [4].
Therefore, the object is to provide methods, apparatuses and modules, which make it possible to query configuration parameters in a simple and efficient manner, for devices which are configured with the aid of structured documents, for example XML.
This object is achieved by means of the independent claims. Developments of the invention can be gathered from the dependent claims.
The invention relates to a method for querying at least one value of at least one parameter of a module, wherein the at least one parameter can be described as an element using a basic scheme, and at least one of the parameters can be configured using a value form of the element, having the following steps of:
The method exhibits the advantage that the query and the configuration of the module can be effected as a structured document on the basis of only one scheme since the parameters to be configured and to be queried can be configured and queried by means of the scheme. As a result, there is no need to implement a further parser, such as XPATH, on the module in addition to a parser for structured documents. This saves resources, such as storage space or computing power for the further parser, on the module.
A structured document should be understood as meaning a document in textual or binary form which is produced on the basis of the scheme. Both the textual form and the binary form may be based on an XML description language (XML—Extensible Markup Language) [5, 6, 7]. The binary form preferably follows the BIM [2] or EXI [3] standard.
In a first extension, the query function is provided using a special value form of the value form of the element. This makes it possible to easily signal the query function. Specific numbers and characters can be used as a special value form. Furthermore, the special value form can be implemented by signaling only the element but omitting the value form.
Furthermore, if a content of the special value form is specifically selected for each element, there is no need to consider existing ranges of values of the value forms of other elements used in the first structured document. This enables particularly efficient coding. If, alternatively, a content of the special value form is selected consistently for all elements, the parser for the structured first document can be easily implemented since the parser must react only to a single content in all elements to be queried with respect to the query function.
Furthermore, a third attribute may be assigned to the element in such a manner that the third attribute explicitly indicates the special value form. This makes it possible to dynamically adapt the special value form.
In a second extension, the query function is provided using a first attribute of the element. This makes it possible to easily implement the query function. In addition, the second extension can be used if the range of values of the value form of the element does not allow a special value form or it is possible to code the special value form only with a large amount of effort.
The element of the scheme is preferably supplemented with at least one second attribute in order to specify an embodiment of the query function. This makes it possible to control the embodiment of the query of the parameter using the first document. In particular, the at least one second attribute is used to signal a number of levels in the tree spanned by the elements of the first structured document, for which the value forms are intended to be returned as the value of the parameters. This makes it possible to specifically control the provision of the at least one value in order to keep storage space needed to provide the at least one value low, for example.
A response to the query of the at least one value is advantageously made using a second structured document which is produced on the basis of the scheme and has at least the value form corresponding to the at least one value together with the associated element. This will further simplify a query of the at least one value since the response to the query and the query are achieved with the aid of a structured document on the basis of the scheme.
At least one of the structured documents is preferably produced in textual form, thus providing good legibility by means of the parser.
As an alternative, at least one of the structured documents may be produced either (i) in binary form or (ii) first of all in textual form and then in binary form by means of coding using a text-to-binary coder, wherein the binary form is implemented, in particular, according to either of the BIM and EXI standards. As a result, the query of the at least one value is coded in a very compact manner with the aid of the binary form and can be implemented and executed on the module in a resource-saving manner, that is to say with reduced storage space and reduced computing power. Binary coding according to EXI [3] or BIM [2] makes it possible for a parser of the structured document in binary form to operate directly on the binary data, that is to say without decoding from the binary form to the textual form.
In a preferable extension, at least one of the structured documents and/or the scheme is/are produced according to an XML description language [5, 6, 7]. Use of a standardized description language enables cost-effective implementation since it is possible to resort to existing modules during implementation.
The invention also relates to a method for establishing a scheme for querying at least one value of at least one parameter of a module, wherein the at least one parameter can be described as an element using a basic scheme, and at least one of the parameters can be configured using a value form of the element, wherein the scheme is produced by supplementing the basic scheme with a query function in such a manner that the element of the at least one parameter, the at least one value of which is intended to be queried, can be marked using the query function. As a result, at least one value of the at least one parameter of the module is configured and queried on the basis of a single scheme, which can be implemented with the aid of a single parser for structured documents without having to implement an additional parser, such as XPATH. This enables implementation with a low storage requirement. In addition, the establishing method can be extended according to one of the extensions of the querying method. The advantages are similar to those of the querying method.
Furthermore, the invention relates to an apparatus for querying at least one value of at least one parameter of a module, wherein the at least one parameter can be described as an element using a basic scheme, and at least one of the parameters can be configured using a value form of the element, having the following means:
This apparatus may also be extended using at least one fourth means which is configured in such a manner that said means can be used to carry out at least one of the method steps according to the above statements with respect to the querying method.
The apparatus and its extensions have the same advantages as the respective corresponding steps of the querying method.
The invention moreover relates to a method for providing at least one value of at least one parameter by means of a module, wherein the at least one parameter can be described as an element using a basic scheme, and at least one of the parameters can be configured using a value form of the element, having the following steps of:
The providing method can be extended in a similar manner to the querying method. The providing method and the respective extensions have the same advantages as the respective steps of the querying method.
Finally, the invention relates to a module for providing at least one value of at least one parameter, wherein the at least one parameter can be described as an element using a basic scheme, and at least one of the parameters can be configured using a value form of the element, having the following units:
This module may also be extended using at least one third unit which is configured in such a manner that it can be used to carry out at least one of the method steps according to the above statements with respect to the providing method.
The module and its extensions have the same advantages as the respective corresponding steps of the providing method.
The invention and its developments are explained in more detail below using drawings, in which in detail:
FIG. 5A/B shows a first example of a query using a first structured document and provision using a second structured document
FIG. 7A/B shows a third example of a query of values of a plurality of parameters and provision of the values
FIG. 8A/B shows a fourth example for querying and providing values of a plurality of parameters
FIG. 9A/B shows a fifth example for querying and providing values of a plurality of parameters using a second attribute for specifying an embodiment of the query
Elements with the same function and method of operation are provided with the same reference symbols in the figures.
This basic scheme according to XML (Extended Markup Language) [5, 6, 7] has value forms of the elements which represent a value for the parameter corresponding to the element. In this respect, XML defines standard data types such as string or integer. In addition, it is also possible to produce separate new data types, for example typeACC which allows the value forms 1, 0.1 and 0.01 for the element ACC. The element ACC defines how many decimal places are in the value of the measured value parameter, that is to say 0, 1 or two decimal places.
In addition, the measured value may be implicitly queried using the special value form “#” of the element VAL. This special value form will not occur during a measurement, with the result that, in addition to the explicit indication, like in the above data types, it is also possible to implicitly define the special value form in such a manner that the special value form assumes a value which is not reached by the parameter of the device. In addition, the element and/or the data type may be supplemented with a third attribute which defines the special value form. An example of this is shown by a data type typeACC2 which supplements the existing data type typeACC with the third attribute. This third attribute specifies the value form “X” as the query function.
Instead of different special value forms, a number or character may also represent the special value form, for example “?”. In the case of the special value forms, the quotation marks do not belong to the value form. They are indicated only for better legibility of the description.
In addition, in
The subsequent
In order to query the current measuring rate in the device, the query function AF is activated in the element MSR using the special value form “?”. A first structured document DOC1 based on the scheme SC can be seen in
The measured value can be queried in a similar manner to the query of the measuring rate, see
In addition to querying individual values of the parameters, it is also possible to query a plurality of values at once. The measured value and the accuracy are queried together in the query document according to
Finally, an extension of the above exemplary embodiments involves not specifying the sensor identification, that is to say the element SID, in the query document. As a result, the query will concern all nodes instantiated in the device (not illustrated by a drawing).
In addition, the apparatus DEV has at least one fourth means M4 which is configured in such a manner that said means can be used to carry out at least one of the extensions of the method.
The module MOD may also have at least one third unit E3 which is configured in such a manner that it can be used to implement at least extensions during provision.
The means M1, M2, M3, M4 of the apparatus and the units E1, E2 and E3 of the module may be designed using hardware, software or a combination of hardware and software. For example, a processor carries out the steps of the method which are stored as program code in a memory affiliated with the processor. The processor also has an input and output interface for interchanging the first and second structured documents, possibly after their text-to-binary coding, for configuring the module, querying parameter values of the module and receiving queried parameter values from the module. In addition, intermediate results of the individual processing steps may be additionally stored in the memory. Furthermore, the means M1, M2, M3, M4 and the units E1, E2, E3 of the module may also be implemented by means of hard wiring of electronic components to a memory module.
The invention and its development were explained using a plurality of examples. However, the invention is not only restricted to the examples. In addition, the exemplary embodiments may also be combined.
[1] XML Path Language (XPath), Version 1.0, W3C Recommendation, Nov. 16, 1999, http://www.w3.org/TR/xpath/; W3C
[2] Information technology—MPEG systems technologies—Part 1: Binary MPEG format for XML, ISO/IEC FDIS 23001-1:2005 (E), ISO/IEC JTC 1/SC 29/WG 11, w7597, Nov. 4, 2005
[3] J. Schneider and T. Kamiya. Efficient XML Interchange (EXI) Format 1.0. W3C Working Draft, Sep. 19, 2008
[4] Query-By-Example, http://en.wikipedia.org/wiki/Query_by_Example, as at: Jul. 6, 2011
[5] David C. Fallside (IBM); XML Schema Part 0: Primer;
http://www.w3.org/TR/2001/REC-xmlschema-0-20010502/; www.w3.org; W3C
[6] Henry S. Thompson et al.; XML Schema Part 1: Structures;
http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/; www.w3.org; W3C
[7] Paul V. Biron; XML Schema Part 2: Datatypes; http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/; www.w3.org; W3C
Number | Date | Country | Kind |
---|---|---|---|
11173078.4 | Jul 2011 | EP | regional |
Filing Document | Filing Date | Country | Kind | 371c Date |
---|---|---|---|---|
PCT/EP12/62837 | 7/2/2012 | WO | 00 | 1/7/2014 |