US2026079954A1PendingUtilityA1

Systems and Methods for Semantic Query Processing

Assignee: SALESFORCE INCPriority: Sep 15, 2024Filed: Jan 31, 2025Published: Mar 19, 2026
Est. expirySep 15, 2044(~18.1 yrs left)· nominal 20-yr term from priority
G06F 16/24553G06F 16/248
54
PatentIndex Score
0
Cited by
0
References
0
Claims

Abstract

A semantic query processing system enables data analytics through a metadata-driven architecture. The system processes analytical queries through a layered execution path that maintains consistent logic across system components. For incoming semantic queries, the system coordinates processing between semantic and storage layers instead of, or in addition to, requiring pre-materialized calculations. A gateway service receives semantic queries while a query preparer generates execution plans based on semantic model metadata defining relationships, measures, and dimensions. A query generator transforms these plans into optimized SQL operations, with complex calculations handled through post-processing. The system reduces analytical complexity by eliminating pre-calculation requirements, enables real-time metric computation through coordinated query processing, and maintains semantic consistency through metadata-driven execution. This architecture achieves improved response times for complex metrics while preserving consistent calculation logic across distributed components.

Claims

exact text as granted — not AI-modified
What is claimed is: 
     
         1 . A method for processing semantic queries, comprising:
 receiving, by a gateway service, a semantic query for analytical data processing;   retrieving, from a semantic data model, metadata defining relationships between data objects and calculation rules, wherein the semantic data model comprises semantic model objects storing definitions for table relationships, measures, and dimensions;   generating, by a semantic query preparer, a query execution plan by:
 mapping the semantic query to the retrieved metadata; 
 constructing a dependency graph of the semantic model objects needed to process the semantic query; and 
 identifying calculations requiring post-processing; 
   transforming, by a query generator, the query execution plan into SQL queries based on the dependency graph and the identified calculations;   executing the SQL queries to obtain query results;   performing post-processing operations on the query results according to the identified calculations that could not be executed in SQL; and   returning, by the gateway service, the processed query results.   
     
     
         2 . The method of  claim 1 , wherein generating the query execution plan comprises:
 analyzing the semantic query to identify required tables;   traversing the dependency graph to determine an optimal join order;   identifying measures requiring pre-aggregation; and   determining aggregation levels based on dimension hierarchies.   
     
     
         3 . The method of  claim 2 , wherein determining the optimal join sequence comprises:
 analyzing cardinality information from the retrieved metadata;   evaluating filter selectivity; and   generating a cost-based join path through the dependency graph.   
     
     
         4 . The method of  claim 1 , wherein transforming the query execution plan comprises:
 generating FROM clauses based on the dependency graph;   generating SELECT clauses incorporating measure calculations;   generating GROUP BY clauses based on dimension hierarchies; and   optimizing the SQL queries based on database capabilities.   
     
     
         5 . The method of  claim 4 , wherein transforming the query execution plan comprises:
 generating subqueries for identified complex measure calculations;   ordering the subqueries based on measure dependencies; and   incorporating the subquery results into final SQL generation.   
     
     
         6 . The method of  claim 1 , wherein performing post-processing operations comprises:
 executing complex analytical functions not supported by SQL;   performing multi-pass calculations requiring intermediate results;   applying hierarchical rollups across dimensions;   formatting results according to measure definitions.   
     
     
         7 . The method of  claim 1 , wherein retrieving metadata comprises:
 accessing a metadata store containing semantic model object definitions;   loading relationship definitions specifying join conditions between tables;   loading measure definitions specifying calculation formulas and aggregation rules; and   loading dimension definitions specifying hierarchical grouping structures.   
     
     
         8 . The method of  claim 7 , wherein the relationship definitions comprise:
 source and target table identifiers;   source and target column identifiers;   join type specifications;   cardinality information; and   referential integrity constraints.   
     
     
         9 . The method of  claim 7 , wherein the measure definitions comprise:
 base measures identifying source columns;   calculated measures specifying arithmetic formulas;   aggregation rules specifying summation methods; and   granularity specifications identifying valid dimension combinations.   
     
     
         10 . The method of  claim 7 , wherein the dimension definitions comprise:
 creating dimension hierarchies based on the retrieved metadata;   associating hierarchies with corresponding measures;   validating aggregation paths through the dependency graph; and   generating level-based aggregation instructions.   
     
     
         11 . The method of  claim 7 , wherein executing multi-pass calculations comprises:
 storing intermediate results from SQL query execution;   applying subsequent calculation passes based on measure definitions;   maintaining calculation context across processing steps; and   aggregating the results according to dimension hierarchies.   
     
     
         12 . The method of  claim 11 , wherein maintaining calculation context comprises:
 tracking measure aggregation states;   preserving dimension hierarchy positions; and   managing running calculations across result sets.   
     
     
         13 . The method of  claim 1 , further comprising:
 monitoring execution metrics during query processing;   storing metrics in an execution statistics repository; and   using stored metrics to optimize subsequent query execution plans.   
     
     
         14 . The method of  claim 13 , wherein optimizing subsequent query execution plans comprises:
 analyzing cached execution statistics;   modifying join sequences based on actual performance; and   adjusting calculation ordering based on observed costs.   
     
     
         15 . The method of  claim 1 , further comprising:
 validating security permissions before metadata retrieval;   applying security filters during query transformation; and   maintaining security context through post-processing.   
     
     
         16 . The method of  claim 1 , wherein the semantic model objects comprise:
 versioned metadata definitions stored in a data cloud;   cached transformation rules used by the query generator; and   runtime execution contexts maintained by the semantic engine.   
     
     
         17 . The method of  claim 16 , wherein the runtime execution contexts track:
 active calculation states;   intermediate result sets;   dimension hierarchy positions; and   aggregation progress through query execution plan.   
     
     
         18 . The method of  claim 1 , wherein the semantic query comprises:
 measure identifiers corresponding to measure definitions;   dimension paths specified according to dimension hierarchies;   filter conditions applicable to the data objects; and   output specifications for processed query results.   
     
     
         19 . A computer system for processing semantic queries, comprising:
 one or more processors; and   memory;   wherein the memory stores one or more programs configured for execution by the one or more processors, and the one or more programs comprising instructions for:   receiving, by a gateway service, a semantic query for analytical data processing;   retrieving, from a semantic data model, metadata defining relationships between data objects and calculation rules, wherein the semantic data model comprises semantic model objects storing definitions for table relationships, measures, and dimensions;   generating, by a semantic query preparer, a query execution plan by:
 mapping the semantic query to the retrieved metadata; 
 constructing a dependency graph of the semantic model objects needed to process the semantic query; and 
 identifying calculations requiring post-processing; 
   transforming, by a query generator, the query execution plan into SQL queries based on the dependency graph and the identified calculations;   executing the SQL queries to obtain query results;   performing post-processing operations on the query results according to the identified calculations that could not be executed in SQL; and   returning the processed query results.   
     
     
         20 . A non-transitory computer readable storage medium storing one or more programs configured for execution by a computer system having a display, one or more processors, and memory, the one or more programs comprising instructions for:
 receiving, by a gateway service, a semantic query for analytical data processing;   retrieving, from a semantic data model, metadata defining relationships between data objects and calculation rules, wherein the semantic data model comprises semantic model objects storing definitions for table relationships, measures, and dimensions;   generating, by a semantic query preparer, a query execution plan by:
 mapping the semantic query to the retrieved metadata; 
 constructing a dependency graph of the semantic model objects needed to process the semantic query; and 
 identifying calculations requiring post-processing; 
   transforming, by a query generator, the query execution plan into SQL queries based on the dependency graph and the identified calculations;   executing the SQL queries to obtain query results;   performing post-processing operations on the query results according to the identified calculations that could not be executed in SQL; and   returning the processed query results.

Join the waitlist — get patent alerts

Track US2026079954A1 — get alerts on status changes and closely related new filings.

We store only your email — no account needed. See our privacy policy.