Encoder Compiler for Embedded EXI Stream Generation
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing EXI encoders require extensive code and resource-heavy processing to map bit strings to XML elements, making them unsuitable for embedded devices with limited resources, such as smart meters, which need to generate EXI streams efficiently without relying on XML documents or schemas.
Innovation Solution
An encoder compiler that generates a dedicated EXI encoder by reading schema-structure mapping information, a training XML document, and an EXI grammar tree, allowing the creation of an EXI stream based on values within the device, using a code composer to process events and generate EXI event codes, thereby reducing the computational load on devices with limited resources.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If a general-purpose EXI encoder is used to convert XML documents to binary format, then XML documents can be efficiently encoded, but the device requires extensive code and resources to map bit strings to XML elements
Solution Approach 1:
The patent extracts and removes the XML document and schema from the encoding process by pre-generating a dedicated encoder program. The general-purpose EXI encoder is specialized through code generation that embeds all necessary mapping information directly into the encoder, eliminating the need for external XML documents and schemas during runtime.
Solution Approach 2:
The patent performs preliminary code generation to create a dedicated EXI encoder program before runtime. This pre-processing step analyzes the XML schema and generates optimized encoding code that contains all necessary mapping information, so that during actual operation, the device only needs to execute the pre-generated code without requiring XML documents or schemas.
2Reliability
If all items in the original XML document are prepared for encoding in advance, then correct mapping of bit strings to XML elements is achieved, but the code amount increases significantly
Solution Approach 1:
The patent creates a specialized copy of the EXI encoder tailored to specific XML schemas. Instead of using a general-purpose encoder with all possible mappings, a dedicated encoder program is generated that contains only the specific mapping information needed for particular XML schemas, reducing code size while maintaining accuracy.
Solution Approach 2:
The patent applies local quality by making the encoder specialized for specific XML schemas rather than universally applicable. The generated encoder code contains mapping information localized to particular schema requirements, eliminating unnecessary generic mapping code and reducing overall code amount while ensuring correct mapping for the intended use case.
3Adaptability or versatility
If a general-purpose EXI encoder is used on embedded devices, then XML to binary conversion is possible, but the processing load exceeds the capabilities of devices with limited resources
Solution Approach 1:
The patent extracts the heavy processing requirements of XML parsing and schema validation from the embedded device by performing these operations during code generation on a more powerful system. The resulting dedicated encoder contains pre-computed mapping information, allowing the embedded device to execute simple, optimized encoding operations with minimal processing load.
Solution Approach 2:
The patent changes the operational parameters of the encoder by generating code with pre-determined mapping relationships. Instead of performing complex schema validation and element matching at runtime on the embedded device, the encoder uses pre-computed parameters and direct mapping tables, dramatically reducing processing requirements while maintaining encoding capability.
Data Source
AI summary
The reading unit reads mapping information that maps a particular point in a document structure defined by XML schema to the name of a variable and a training XML document that includes a substitute character string positioned at a particular point and tags. A parser converts the training XML document into a sequence of events each specifying one of substitute character string and the tag names. The reading unit reads in an EXI grammar form. A code composer processes the sequence of events and generates an EXI event code based on the EXI grammar form, generates a function to retrieve the value of a variable mapped to the particular point at which the substitute character string is positioned when the event is an event specifying substitute character string, and produces an EXI encoder including output instruction codes to output EXI event codes and the retrieved value of the function.


