Automated Data Model Generation from Protocol Buffer Java Classes
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
The process of generating a data model from protocol buffer compiler-generated Java classes is laborious and time-consuming due to the complexity of protobuf schemas and the non-standard form of Java classes produced, which conventional tools cannot effectively handle.
Innovation Solution
A method and system that automatically generate a data model by obtaining protocol buffers schemas, generating Java classes, determining attributes and their types, extracting model information, and comparing it with expected content to ensure consistency across schemas, with the ability to adjust the model information and format it in protocols buffers, XML, or UML formats.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Extent of automation
If conventional tools are used to extract data model from Java classes, then the process can be automated, but the tools are unable to handle the non-standard and proprietary form of protobuf-generated Java classes
Solution Approach 1:
The patent changes the approach parameters by switching from standard Java class reflection to protobuf-specific metadata extraction. The system uses protobuf compiler annotations and schema definitions as the basis for data model generation, adapting to the non-standard structure by utilizing the proprietary metadata format that protobuf generates in the Java classes.
Solution Approach 2:
The patent introduces an intermediary layer that translates between protobuf schema definitions and data model representations. This intermediary component parses the protobuf .proto files and uses the schema information to generate the data model, bridging the gap between conventional tools and protobuf's non-standard class structure.
2Manufacturing precision
If a developer manually traverses the protobuf schema tree to build the data model, then accuracy can be ensured, but the process becomes extremely laborious and time-consuming
Solution Approach 1:
The patent implements self-service by enabling the system to automatically extract data model information from protobuf schemas without human intervention. The tool autonomously parses the schema files, identifies data structures, and generates the data model representation, eliminating the need for manual traversal while maintaining accuracy through systematic automated analysis.
Solution Approach 2:
The patent applies preliminary action by pre-processing the protobuf schema files to extract and structure the data model information before the actual data model generation occurs. The system performs preliminary parsing and validation of the schema definitions, organizing the data in a format ready for automated data model construction, thereby ensuring accuracy while reducing the time required for the main generation process.
3Stability of the object's composition
If the protobuf schemas are used in their complicated, multi-hierarchy form, then the schemas maintain their design integrity, but the process of generating the data model becomes extremely laborious
Solution Approach 1:
The patent applies segmentation by dividing the complicated multi-hierarchy protobuf schema into manageable components. The system recursively processes each message type and nested structure separately, breaking down the complex schema tree into individual data model elements that can be systematically generated and assembled, thereby maintaining structural integrity while simplifying the generation process.
Solution Approach 2:
The patent implements dynamics by creating a flexible, adaptive processing approach that dynamically adjusts to the varying complexity and hierarchy depth of different protobuf schemas. The system uses recursive traversal and dynamic type detection to handle multi-level nested structures, allowing the data model generation process to adapt to any schema complexity level while maintaining ease of manufacture through automated handling.
Data Source
AI summary
Systems and methods for generating a data model from protocol buffer compiler generated Java classes are provided. The methods include obtaining a protocol buffers schema; using the obtained protocol buffers schema to generate a plurality of Java classes; determining, from the plurality of Java classes, a plurality of attributes; determining, for each respective attribute, a corresponding attribute type; and using each respective attribute and each corresponding attribute type to extract model information to be included in the data model. The extracted model information may be adjusted based on whether the information matches with an expectation regarding the model information.


