Data query method and device based on visual rendering, equipment and medium
By building a data model tree on the application server and performing consistency verification, the problem of not being able to visually present field relationships in existing technologies is solved, enabling a secure and flexible data query process, reducing development complexity and improving the controllability of data access.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-03-03
- Publication Date
- 2026-04-03
AI Technical Summary
Existing technologies cannot achieve visual representation of field relationships, drag-and-drop dynamic combination, and structural consistency verification without relying on developers to write code. This results in query logic being fixed at the code level, making it difficult to adapt to business analysis needs and posing data security risks.
Establish the mapping relationship between entity classes and database tables on the application server, parse attribute definitions and inter-class reference relationships, build a data model tree and generate transmission data, perform visualization rendering through the front-end interactive interface, generate field path information in response to drag and drop operations, and perform consistency verification and assemble query statements on the server.
It enables data model-based visual queries, improves query security, reduces development complexity, enhances the controllability of data access, and adapts to frequently changing business analysis needs.
Smart Images

Figure CN121786084A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data query technology, and in particular to a data query method, apparatus, device and medium based on visualization rendering. Background Technology
[0002] In financial information systems, business data is typically stored in relational databases and mapped to entity class structures in the application server using an object-relational mapping (ORM) framework. The attribute definitions and inter-class references of entity classes actually describe the complex relationships between data tables, but this structural information mainly exists in program code and configuration, lacking an intuitive way of presentation. Business personnel struggle to understand the hierarchical relationships and field origins of the underlying data model, making it impossible to directly perform independent data combination and querying based on the data model.
[0003] In real-world business scenarios, such as customer profiling, risk control, operational statistics, and compliance auditing, queries often require flexible combinations of fields from multiple related data tables. Existing systems largely rely on pre-defined reports, fixed interfaces, or custom query statements written by developers to meet these needs. The query logic is fixed at the code level, and the business side lacks autonomy in field combinations, leading to long response times, high development and maintenance costs, and difficulty in adapting to frequently changing business analysis requirements. Furthermore, existing generic query pages typically only provide a list of fields to choose from, failing to reflect the true relationships between fields and easily resulting in incorrect combinations.
[0004] Furthermore, some dynamic query solutions, during implementation, directly pass field names and query conditions to the backend for concatenation, lacking path validation and field validity verification mechanisms based on the data model structure. This poses potential risks of SQL injection and unauthorized data access. In the financial sector, the requirements for data security and compliance are extremely high, and existing technologies still have significant shortcomings in data model visualization, dynamic field combination capabilities, and query security. Summary of the Invention
[0005] The main objective of this invention is to provide a data query method, apparatus, device, and storage medium based on visualization rendering, aiming to solve the technical problem that existing technologies cannot achieve the visualization of field relationships, drag-and-drop dynamic combination, and secure query with structural consistency verification based on a real data model structure without relying on developers to write code.
[0006] To achieve the above objectives, the present invention provides a data query method based on visualization rendering, comprising: Establish the mapping relationship between entity classes on the application server and database tables, and parse the attribute definitions and inter-class reference relationships in the entity classes; Based on the mapping relationship, the attribute definition and the inter-class reference relationship, the queryable fields and the associated hierarchical structure are extracted, a data model tree is constructed and transmission data is generated based on the data model tree; The transmitted data is sent to the front-end interactive interface for visualization rendering. Based on the transmitted data, the queryable fields and the associated hierarchical structure are mapped into graphical nodes and connection relationships. In response to the drag-and-drop selection operation and condition configuration command for the graphic node in the front-end interactive interface, the hierarchical path of the selected graphic node is determined as the field path information based on the connection relationship, and node selection data containing the field path information and query condition information is generated. The application server receives the node selection data and accesses the data model tree, and performs a consistency check by comparing the path defined by the field path information with the structure of the data model tree; After the consistency check passes, the query interception mechanism of the application server is triggered. Based on the mapping relationship and the inter-class reference relationship, the node selection data is parsed and the query statement is assembled. The query statement is then executed to return the data query results.
[0007] Furthermore, to achieve the above objectives, the present invention provides a data query device based on visualization rendering, comprising: The model parsing module is used to establish the mapping relationship between entity classes on the application server and database tables, and to parse the attribute definitions and inter-class reference relationships in the entity classes; The model building module is used to extract queryable fields and associated hierarchical structures based on the mapping relationship, the attribute definition and the inter-class reference relationship, build a data model tree and generate transmission data based on the data model tree; The visualization rendering module is used to send the transmitted data to the front-end interactive interface for visualization rendering, and to map the queryable fields and the associated hierarchical structure into graphical nodes and connection relationships based on the transmitted data. The interactive parsing module is used to respond to the drag-and-drop selection operation and condition configuration instructions for the graphic node in the front-end interactive interface, determine the hierarchical path of the selected graphic node as the field path information based on the connection relationship, and generate node selection data containing the field path information and query condition information. The consistency verification module is used by the application server to receive the node selection data and access the data model tree, and to perform consistency verification by comparing the path defined by the field path information with the structure of the data model tree; The query generation module is used to trigger the query interception mechanism of the application server after the consistency check passes, parse the node selection data according to the mapping relationship and the inter-class reference relationship, assemble the query statement, execute the query statement to return the data query result.
[0008] Furthermore, to achieve the above objectives, the present invention also provides a computer device, the computer device including a memory, a processor, and a data query program based on visualization rendering stored in the memory and executable on the processor, wherein when the data query program based on visualization rendering is executed by the processor, it implements the steps of the data query method based on visualization rendering as described above.
[0009] Furthermore, to achieve the above objectives, the present invention also provides a computer-readable storage medium storing a data query program based on visualization rendering, wherein the data query program based on visualization rendering, when executed by a processor, implements the steps of the data query method based on visualization rendering as described above.
[0010] Beneficial Effects: This invention relates to the field of data query technology, and discloses a data query method, apparatus, device, and medium based on visual rendering. The method includes: establishing a mapping relationship between entity classes on the application server and database tables, and parsing attribute definitions and inter-class reference relationships; constructing a data model tree based on the mapping relationship, attribute definitions, and inter-class reference relationships, and generating transmission data; sending the transmission data to a front-end interactive interface for visual rendering, mapping queryable fields and associated hierarchical structures to graphical nodes and connection relationships; generating field path information and query condition information in response to drag-and-drop selection operations and condition configuration commands of graphical nodes; performing consistency verification between the field path information and the data model tree on the application server; and assembling query statements based on the mapping relationship and inter-class reference relationships after successful verification and returning the data query results. This invention can be applied to business scenarios such as fintech. By converting the data model structure into a visual interactive object and performing structural consistency verification and dynamic assembly of query statements on the server side, the query process relies on the data model rather than manually written code, thereby improving query security, reducing development complexity, and enhancing the controllability of data access. Attached Figure Description
[0011] The present invention will be further described below with reference to the accompanying drawings and embodiments. In the accompanying drawings: Figure 1 This is a schematic diagram of an application environment for a data query method based on visualization rendering according to an embodiment of the present invention; Figure 2 This is a flowchart illustrating an embodiment of the data query method based on visualization rendering according to the present invention; Figure 3This is a schematic diagram of the functional modules of a preferred embodiment of the data query device based on visualization rendering of the present invention; Figure 4 This is a schematic diagram of the structure of a computer device according to an embodiment of the present invention; Figure 5 This is another structural schematic diagram of a computer device according to one embodiment of the present invention. Detailed Implementation
[0012] It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of the invention.
[0013] The data query method based on visualization rendering provided in this invention can be applied to, for example... Figure 1 In this application environment, the client communicates with the server via a network. The server can establish a mapping relationship between entity classes and database tables on the application server side through the client, and parse attribute definitions and inter-class reference relationships; based on the mapping relationship, attribute definitions, and inter-class reference relationships, it constructs a data model tree and generates transmission data; the transmission data is sent to the front-end interactive interface for visualization rendering, mapping queryable fields and related hierarchical structures to graphical nodes and connection relationships; it responds to drag-and-drop selection operations of graphical nodes and condition configuration commands to generate field path information and query condition information; the application server performs consistency verification on the field path information and data model tree; after successful verification, it assembles query statements based on mapping relationships and inter-class reference relationships and returns the data query results. This invention can be applied to business scenarios such as fintech. By converting the data model structure into a visual interactive object and performing structural consistency verification and dynamic assembly of query statements on the server side, the query process relies on the data model rather than manually written code, thereby improving query security, reducing development complexity, and enhancing the controllability of data access. The client can be, but is not limited to, various personal computers, laptops, smartphones, tablets, and portable wearable devices. The server can be implemented using a standalone server or a server cluster consisting of multiple servers. The invention will be described in detail below through specific embodiments.
[0014] Please see Figure 2 , Figure 2 This is a flowchart illustrating an embodiment of the data query method based on visualization rendering provided by the present invention. It should be noted that although the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than that shown here.
[0015] like Figure 2 As shown, the data query method based on visualization rendering proposed in this invention includes the following steps: S10, Establish the mapping relationship between entity classes on the application server and database tables, and parse the attribute definitions and inter-class reference relationships in the entity classes; In this embodiment, entity classes in the application server are used to represent business data objects, and database tables are used to store corresponding data records. Mapping relationships are used to establish a definite correspondence between entity classes and database tables, enabling object structures to be accurately mapped to data structures. This mapping is achieved by reading configuration metadata at the class and field levels, mapping entity class names to table names, member variables to column names, and forming a queryable set of correspondences. Attribute definitions originate from the set of member variables in the entity class. Through reflection, the type, name, and persistent configuration information of member variables are read to form a correspondence between fields and columns in terms of type and name. Inter-class reference relationships originate from object type member variables within the entity class. By reading association configuration information, the reference target entity class and foreign key fields are identified, enabling object reference relationships to be transformed into table association relationships. The above mapping relationships, attribute definitions, and inter-class reference relationships form a unified structural description in memory, used to express the correspondence between object structures and data structures, and the associations between objects.
[0016] This embodiment establishes a correspondence between entity classes, attribute definitions, and inter-class references in the data structure, enabling the object model and data storage structure to form a computable set of correspondences, thus providing a foundation for accurately identifying field sources and object associations.
[0017] S20, based on the mapping relationship, the attribute definition and the inter-class reference relationship, extract the queryable fields and the associated hierarchical structure, construct the data model tree and generate transmission data based on the data model tree; In this embodiment, the mapping relationship is used to provide the correspondence information between entity classes and database tables, enabling field extraction to pinpoint the source of specific tables and columns. Attribute definitions describe the correspondence information between basic data type attributes in entity classes and database columns, allowing field extraction to be limited to a set of attributes that can be directly used as query conditions or query columns. Inter-class reference relationships describe the reference direction and association constraints between entity classes, enabling the hierarchical structure to express the reachability relationship from one entity class to another. Queryable fields are selected from the attribute definitions. During selection, a field list is generated based on constraints such as the range of basic data types, the existence of persistent column names, and whether they are marked as searchable. For each queryable field, information such as field identifier, the entity class identifier, the corresponding column identifier, and the data type is retained. The association hierarchy is extracted from the inter-class reference relationships. During extraction, the entity class initiating the reference is the parent hierarchy node, and the target entity class is the child hierarchy node. The referenced fields, foreign key columns, and reference direction are recorded to form a set of parent-child relationships that can be traversed. The data model tree organizes queryable fields and hierarchical relationships into a hierarchical data structure. During construction, a root node is created and bound to the starting entity class identifier. Branch nodes are attached under the root node to express the direction of expansion of inter-class reference relationships. Leaf nodes are attached under each entity class node to represent queryable fields. Nodes maintain connections through parent-child pointers or edge sets, allowing the tree structure to simultaneously carry the set of queryable fields and the hierarchical relationship structure. The data transmission layer converts the data model tree into transmittable structured content. During generation, the data model tree is traversed, and fields such as node identifier, parent node identifier, field identifier, column identifier, data type, and hierarchical order are output according to node type. This data is then encapsulated in a structured data string format, enabling the front-end to unambiguously reconstruct the hierarchical relationships and field lists.
[0018] This embodiment forms queryable fields and associated hierarchical structures based on mapping relationships, attribute definitions, and inter-class reference relationships, and then organizes them into a data model tree to generate transmission data. This ensures that the source of fields, hierarchical positions, and reachability relationships are clearly expressed in the transmission content, reducing ambiguity when the front-end reconstructs the structure.
[0019] S30, the transmitted data is sent to the front-end interactive interface for visualization rendering, and the queryable fields and the associated hierarchical structure are mapped into graphical nodes and connection relationships based on the transmitted data; In this embodiment, the transmitted data carries the hierarchical information and node content of the data model tree, enabling the front end to restore the entity class hierarchy and field distribution based on a unified data structure. The front-end interactive interface provides a graphical display area, allowing the hierarchical relationships and field sets to be presented visually. Visual rendering transforms structured content into interface elements with spatial location and graphical form. Queryable fields exist as nodes in the transmitted data, containing field identifiers, their respective entity class identifiers, and data type information, enabling fields to be independently identified and used for creating graphical elements. The hierarchical structure exists in the transmitted data as parent-child or reference relationships, allowing the hierarchical relationships between nodes to be resolved into connection relationships. Graphical nodes are used to represent graphical elements of queryable fields. During creation, they generate graphical units with interactive attributes based on the field identifier and bind relevant field information. Connection relationships are used to express the hierarchical associations between entity classes or between fields and entity classes. During generation, they draw lines between corresponding graphical nodes based on parent-child identifiers, making the hierarchical relationships concretely presented in the interface. Spatial coordinates are used to determine the display position of graphical nodes in the interface. During calculation, coordinate values are assigned based on hierarchy depth, the number of parent-child relationships, and layout rules, ensuring that the node arrangement has hierarchical distinctions and readability. The object tree structure is obtained by parsing the transmitted data, and then graphical nodes are created and their connections are drawn based on this structure, ensuring that the interface content remains consistent with the data model tree.
[0020] This embodiment parses the transmitted data into graphical nodes and connections, enabling a clear hierarchical display of queryable fields and associated hierarchical structures on the interface, thus reducing the complexity of understanding the data model.
[0021] S40, responding to the drag-and-drop selection operation and condition configuration instruction for the graphic node in the front-end interactive interface, determining the hierarchical path of the selected graphic node as field path information based on the connection relationship, and generating node selection data containing the field path information and query condition information; In this embodiment, the front-end interactive interface provides an interactive area, enabling graphical nodes to be selected and configured. Drag-and-drop selection captures user selection behavior on graphical nodes, recording the dragged node identifier through an event listener mechanism. Conditional configuration instructions receive user-input logical operators and filter parameter values, creating a combination relationship between the selection behavior and the conditional expression. Connection relationships describe the parent-child relationships between graphical nodes, allowing each graphical node to trace back to the root node through existing connections. Hierarchical paths record the sequence of node identifiers traversed from the root node to the selected graphical node, traversing back level by level according to connection relationships and arranging node identifiers in sequence during generation. Field path information converts the hierarchical path into a structured expression recognizable by the application server, ensuring field location depends on the hierarchical structure itself rather than the interface state. Query condition information stores the combined results of logical operators and filter parameter values, forming a complete query description with the field path and filtering rules. Node selection data encapsulates field path information and query condition information, combining these two types of information into a unified data object for transmission during generation.
[0022] This embodiment combines drag-and-drop selection with conditional configuration and backtracking of connection relationships to generate field path information, making the query description based on hierarchical structure rather than interface location, thereby improving the accuracy and consistency of query expression.
[0023] S50, the application server receives the node selection data and accesses the data model tree, and performs a consistency check by comparing the path defined by the field path information with the structure of the data model tree; In this embodiment, the application server carries the data processing logic and has object parsing and memory access capabilities. Node selection data, as structured input from the front-end interface, includes field path information and query conditions. The receiving process uses a deserialization mechanism to restore the text-based node selection data into a memory object, allowing the field path information and query conditions to be directly accessed by the program. The data model tree, a pre-built and stored hierarchical structure in memory, originates from the mapping relationship between entity classes and database tables, attribute definitions, and inter-class reference relationships, representing a recognizable and legal field hierarchy. Accessing the data model tree is used to retrieve the complete set of nodes and connections within the hierarchical structure in memory.
[0024] Field path information describes an ordered sequence of node identifiers from the root node to the target field node. Path resolution decomposes the field path information to obtain a hierarchical identifier sequence. The comparison process starts from the root node of the data model tree and searches for corresponding nodes level by level according to the hierarchical identifier sequence. This level-by-level search verifies that each level of node has a matching node in the data model tree, and that the connection relationships between nodes are consistent with the hierarchical order. The parameter values in the query condition information are used to determine data type compatibility after node matching is completed. This is done by reading the data type definition of the corresponding node in the data model tree and comparing it with the data type of the parameter value. Only when nodes match level by level and the data types are compatible is a consistency check result obtained.
[0025] This implementation compares the field path information with the data model tree at each level and combines this with data type compatibility checks, which strictly restricts the query descriptions from the front end at the logical level, thereby improving access security and structural consistency.
[0026] S60, after the consistency check passes, the query interception mechanism of the application server is triggered. Based on the mapping relationship and the inter-class reference relationship, the node selection data is parsed and the query statement is assembled. The query statement is then executed to return the data query result.
[0027] In this embodiment, consistency verification is achieved by ensuring that the field path information fully matches the hierarchical structure of the data model tree, and that the parameter values in the query conditions are compatible with the data type definitions of the corresponding nodes. The application server triggers a query interception mechanism after this determination result is generated. This mechanism takes over request control before the database access request reaches the persistence layer, allowing subsequent query statements to be dynamically generated based on node selection data, rather than relying on fixed code. The mapping relationship originates from the binding information between entity classes and database tables, providing the correspondence between fields and database column names. Inter-class reference relationships originate from the definition of reference objects between entity classes, providing the association method between database tables.
[0028] When parsing nodes to select data, the process reads field path information and, based on the mapping relationship, locates the database column name corresponding to the target query field pointed to by the field path information, forming a query column clause. Based on inter-class reference relationships, it deduces the join conditions between the corresponding tables of entity classes, forming a table join clause. It reads the logical operators and parameter values from the query condition information, converting them into parameterized filter expressions, forming condition clauses. Parameterization avoids directly concatenating parameter values. The query column clause, table join clause, and condition clause are combined according to database syntax rules to form a query statement. The query statement is executed to obtain a result set, which is then encapsulated into an object and returned as the data query result.
[0029] This implementation, through the synergistic effect of query interception mechanism and mapping relationship, inter-class reference relationship, makes the generation of query statement completely dependent on data structure definition, realizes dynamic assembly and improves query security and flexibility.
[0030] In one embodiment, step S10 above includes: S101, Scan the preset program package path of the application server, identify the target class file containing configuration annotations, and mark the target class file as the entity class to be parsed; S102, Based on the class-level annotation configuration of the entity class, obtain the target table name bound to the entity class, and establish a mapping relationship between the entity class and the database table based on the target table name; S103, use reflection to traverse the member variables declared in the entity class, filter out the member variables of basic data types, read the database column names corresponding to the filtered member variables, and generate attribute definitions based on the database column names; S104, filter out the member variables of the reference object type declared in the entity class, read the target entity class type information and foreign key association information pointed to by the member variables of the reference object type, and generate inter-class reference relationships based on the target entity class type information and foreign key association information.
[0031] In this embodiment, scanning the preset package path of the application server is used to limit the parsing scope and form a repeatable discovery entry point. The preset package path comes from the deployment configuration or runtime parameters of the application server and points to the code namespace or loading directory where entity classes are stored. The scanning action includes enumerating class resources under the package path, reading class meta information, and filtering judgment. Identifying target class files containing configuration annotations is used to establish the basis for determining entity classes. The configuration annotations come from the persistence layer mapping framework or custom metadata specifications and carry the declaration information of whether the class participates in the establishment of the mapping relationship between entity classes and database tables. Target class files are marked as entity classes to be parsed to form a set of subsequent parsed objects. The marking form can be a memory collection element, a cache entry, or a class description object with a state field. The marking result is directly referenced in subsequent annotation reading and member variable traversal to avoid repeated processing of non-target classes.
[0032] The class-level annotation configuration based on entity classes retrieves the target table name bound to the entity class, serving as a unique locator for the database table. The class-level annotation configuration originates from the metadata area of the target class file, containing information such as the target table name, naming strategy, table partitioning identifier, or table alias. The retrieval process includes annotation parsing, field extraction, and validity validation. Validity validation excludes empty table names, illegal characters, or missing binding information. A mapping relationship is established between the entity class and the database table based on the target table name, forming a deterministic association from entity class to database table. The mapping relationship can be stored as a key-value mapping table, a registry, or a searchable index structure, where the key contains the entity class identifier, and the value contains the target table name and its additional attributes. The mapping relationship is designed as an accessible object, supporting subsequent locating the target table name by entity class or vice versa.
[0033] Reflection is used to iterate through member variables declared in entity classes to enumerate attribute carriers and extract field-level metadata. The reflection mechanism originates from the runtime type system, and the iteration process includes obtaining a list of member variables, filtering access modifiers, and reading the type and annotation information of member variables. Filtering member variables of basic data types determines the set of attributes that can be directly mapped to database columns. The determination of basic data types comes from a preset type set or type classification rules, including numeric, character, boolean, time, or serializable simple types. Reading the database column names corresponding to member variables of basic data types establishes the binding between attributes and columns. Database column names are derived from field-level annotations or naming mapping rules on member variables. Naming mapping rules can be obtained based on member variable names, camelCase and underscore conversion rules, prefix and suffix rules, or field mapping tables. Attribute definitions are generated based on database column names to form attribute-level specification descriptions. Attribute definitions include member variable identifiers, database column names, data types, nullability, length and precision constraints, or default values. Attribute definitions can be saved as a collection of attribute definitions grouped by entity class, allowing subsequent location of database column names and type constraints within the same entity class based on member variables.
[0034] The filtering of member variables in entity classes that refer to other entity classes is used to determine the entry point for associations between entity classes. The type of the referenced object comes from the type information of the member variable, and its type points to another entity class or a collection of entity classes. Filtering rules can be based on conditions such as whether the type is an entity class type, whether a relation annotation exists, and whether it conforms to a generic collection structure. Reading the target entity class type information pointed to by the member variable of the referenced object type is used to determine the identifier of the associated peer entity class. The target entity class type information comes from the type signature of the member variable and the generic parameter resolution result. Reading foreign key association information is used to determine the association constraints between entity classes and database tables. Foreign key association information comes from relation annotation parameters, join column annotation parameters, or preset association rules on member variables. Foreign key association information includes the local column name, the peer column name, the association direction, the association cardinality, and the join strategy. Based on the target entity class type information and foreign key association information, inter-class reference relationships are generated to form a searchable association description. The representation of inter-class reference relationships includes the local entity class identifier, the target entity class identifier, the foreign key association information, and an optional association name or path fragment.
[0035] This embodiment achieves automatic discovery and scope constraint of entity classes to be parsed by scanning the preset program package path of the application server and identifying target class files containing configuration annotations. It obtains the target table name through class-level annotation configuration and establishes a mapping relationship between entity classes and database tables, realizing deterministic location of entity classes to database tables. It traverses member variables through reflection mechanism and generates attribute definitions based on database column names, realizing searchable descriptions of attributes to columns. It generates inter-class reference relationships by reading the target entity class type information and foreign key association information, realizing a structured expression of inter-class association constraints. This provides a consistent data foundation for subsequent field extraction and association structure construction based on mapping relationships, attribute definitions, and inter-class reference relationships.
[0036] In one embodiment, step S20 above includes: S201, From the entity classes associated with the mapping relationship, select an entity class as the starting entity class of the data model tree, take the selected starting entity class as the target entity class, and create a model node object corresponding to the target entity class as the root node of the data model tree. S202, traverse the attribute definitions, identify the basic data type attributes in the target entity class as queryable fields, create a leaf node for each queryable field, and attach the leaf node to the root node; S203, traverse the inter-class reference relationships, create branch nodes for the associated entity classes pointed to by the inter-class reference relationships, connect the branch nodes to the root node, and record the reference paths of the inter-class reference relationships to form an association hierarchy structure; S204. Based on the root node, the leaf nodes attached to the root node, the branch nodes connected to the root node, and the connection relationships between the root node, the leaf nodes, and the branch nodes, a data model tree is constructed, and the hierarchical relationship of the data model tree is defined by the associated hierarchical structure. S205, the serialization component is invoked to perform object graph traversal on the constructed data model tree, converting the hierarchical topology and node content of the data model tree into structured data strings to generate transmission data.
[0037] In this embodiment, an entity class is selected from the entity classes associated with the mapping relationship as the starting entity class of the data model tree to determine the starting context of the construction scope. The selection can be based on configuration items, request parameters, a default entry entity class, or determined according to the priority rules of entity classes in the mapping relationship. The selected entity class is marked as the target entity class. The target entity class serves as the anchor point for subsequent attribute definition filtering and the expansion of inter-class reference relationships, avoiding the problem of multiple structures existing simultaneously or non-unique root nodes when the starting point is not specified. A model node object corresponding to the target entity class is created as the root node of the data model tree to convert the target entity class into a storable, traversable, and serializable node carrier. The fields of the model node object include an entity class identifier, a target table name reference, a node type identifier, and a child node collection container. The entity class identifier comes from the entity class key or type description information in the mapping relationship, the target table name reference comes from the table name record associated with the target entity class in the mapping relationship, and the child node collection container is used to accept the subsequently generated leaf nodes and branch nodes.
[0038] The attribute definition traversal is used to extract a set of queryable fields from the descriptions of object-oriented member variables. Attribute definitions are typically stored in groups by entity class. The traversal process includes filtering attribute definition entries by target entity class and determining the type information of the entries. Identifying basic data type attributes in the target entity class as queryable fields limits the range of fields that can directly participate in conditional expressions and result projections. The determination of basic data type attributes is based on data type identifiers or type classification information in the attribute definition. The identified basic data type attributes are abstracted into queryable fields. The content of a queryable field includes a field identifier, data type, database column name, optional display name, and optional permission identifier. Leaf nodes are created for each queryable field to embed the field abstraction results into a tree structure. The node content of the leaf node includes the correspondence between the field identifier and the database column name, a reference to the data type definition, and the leaf node type identifier. The leaf node type identifier is used to distinguish field nodes from entity nodes. Mounting leaf nodes to the root node organizes the basic data type attribute set of the target entity class into a set of direct child nodes of the root node. The mounting action includes writing leaf node references to the child node set container of the root node and recording parent-child relationship metadata. The parent-child relationship metadata can include the parent node identifier, child node sequence index or child node unique key, which facilitates maintaining a stable order or traceability during subsequent serialization.
[0039] Traversing inter-class reference relationships is used to extract representable hierarchical associations from the reference constraints between entity classes. Inter-class reference relationships include the identifier of the local entity class, the identifier of the associated entity class, and foreign key association information. The traversal action includes filtering inter-class reference relationship entries by target entity class and determining the direction of each reference relationship. Creating branch nodes for the associated entity classes pointed to by inter-class reference relationships is used to abstract the associated entity classes into expandable structural nodes. The node content of a branch node includes the identifier of the associated entity class, the target table name reference corresponding to the associated entity class, the relationship type identifier, and a collection container of child nodes. The target table name reference corresponding to the associated entity class can be retrieved from the mapping relationship by the associated entity class identifier. Connecting the branch node to the root node is used to place the reference constraints from the target entity class to the associated entity class into the tree topological representation. The connection action includes writing the branch node into the root node's child node collection container and recording the connection relationship metadata. The connection relationship metadata is used to express the reference constraint mapping between the branch node and the root node. The connection relationship metadata may include foreign key association information, connection direction, connection key pairs, and relationship name. The foreign key association information comes from the foreign key association information field in the inter-class reference relationship. The reference paths recording inter-class reference relationships form an association hierarchy structure to create path expressions that can be used for subsequent rendering and backtracking. The reference path consists of a sequence of entity class identifiers or a sequence of node identifiers. The sequence elements originate from the local entity class identifier and the associated entity class identifier in the inter-class reference relationship. Member variable names or relationship names may also be included to eliminate ambiguity in multiple references. The association hierarchy structure describes the reachability relationships and parent-child relationship determination rules of nodes at the hierarchy level. Its data structure can be a path set, an adjacency list, or a parent pointer set. The path set format facilitates serialization, the adjacency list format facilitates traversal and retrieval, and the parent pointer set format facilitates backtracking and generating hierarchical paths.
[0040] The data model tree, constructed from the root node, leaf nodes attached to the root node, branch nodes connected to the root node, and the connections between the root node, leaf nodes, and branch nodes, is used to complete structural closure. The node set of the data model tree consists of the root node, leaf nodes, and branch nodes; the edge set consists of attachment relationships and connection relationships. Attachment relationships express the inclusion relationship between an entity class and a queryable field, while connection relationships express the reference relationship between an entity class and a related entity class. The hierarchical relationship of the data model tree is defined by the association hierarchy structure to map abstract path rules into tree hierarchical constraints. Hierarchical constraints include parent-child hierarchy determination, same-level node merging rules, and node unique location rules. Parent-child hierarchy determination is determined by adjacent elements in the reference path. Same-level node merging rules handle cases where multiple class references point to the same related entity class. Node unique location rules handle disambiguation when nodes have the same name or duplicate references. Disambiguation can be based on a combination of entity class identifier and relationship name key, or a relationship key generated using foreign key association information.
[0041] The serialization component performs object graph traversal on the constructed data model tree to convert the in-memory set of node objects and edge relationships into a transmittable representation. The serialization component comes from the application server's serialization library or a self-developed serialization module. The object graph traversal covers all leaf and branch nodes reachable from the root node, outputting the node type, node identifier, node content, and child node reference list for each node. The hierarchical topology and node content of the data model tree are converted into structured data strings to obtain a parsable transmission payload for the front end. The hierarchical topology conversion includes node list generation, parent-child reference generation, and sequence information generation. The node content conversion includes encoding field identifiers, entity class identifiers, database column name references, and foreign key association information. The structured data string format can be a key-value structure string, an array structure string, or a nested object structure string. The encoding process includes character escaping, type identifier fixing, and null value handling to ensure parsing consistency across different transmission channels. Transmission data is generated to output the structured data string as the transmission carrier. The transmission data contains a complete expression of the hierarchical topology and node content of the data model tree, facilitating object tree reconstruction and visualization mapping in the front-end interactive interface.
[0042] This embodiment determines the target entity class based on the mapping relationship and generates a model node object as the root node. By traversing the attribute definition, the basic data type attributes in the target entity class are extracted into queryable fields and leaf nodes are generated and attached to the root node. By traversing the reference relationship between classes, branch nodes are generated for the associated entity classes and connected to the root node. The reference path is recorded to form an associated hierarchical structure. The hierarchical relationship of the data model tree is defined by the associated hierarchical structure. The serialization component performs object graph traversal on the data model tree to generate a structured data string as the transmission data. This makes the reference constraints between queryable fields and entity classes solidified into a transmittable representation with a unified hierarchical topology expression, thereby reducing front-end parsing ambiguity and improving the consistency of subsequent hierarchical positioning and node references.
[0043] In one embodiment, step S30 above includes: S301, The front-end interactive interface receives the transmitted data and calls the parser to parse the transmitted data to obtain the object tree; S302, Initialize the visualization rendering engine to establish a drawing canvas, and use tree layout processing to determine the spatial coordinates of each element in the object tree on the drawing canvas; S303, Based on the association hierarchy defined by the node relationships in the object tree and the spatial coordinates, draw a connection path between parent and child nodes to generate a connection relationship; S304, extract the leaf node attribute information corresponding to the queryable field in the object tree, create a visual primitive containing the field identifier as a graphic node based on the leaf node attribute information, and render the graphic node to the corresponding spatial coordinates of the drawing canvas.
[0044] In this embodiment, the transmitted data serves as the input carrier for the front-end interactive interface. Its content includes the node content and hierarchical topology information required for object tree reconstruction, and carries field identifiers for queryable fields and parent-child relationship constraints of the associated hierarchical structure. Sending the transmitted data to the front-end interactive interface completes the migration from the server-side structured representation to the front-end rendered semantics. The sending action can be triggered through the interface response body, message push, or local cache reading. After being received by the front-end interactive interface, the transmitted data enters the parser. The parser is used to restore the structured data string into a traversable data structure. The parsing action includes format recognition, field extraction, node object instantiation, and parent-child relationship reconstruction. The object tree serves as the in-memory representation of the parsing result. The node types of the object tree cover both entity class nodes and field nodes. Entity class nodes are used to carry the branch hierarchy of the associated hierarchical structure, while field nodes are used to carry the leaf node attribute information of queryable fields. The node relationships in the object tree express the inclusion or reference relationships between parent and child nodes. These node relationships originate from the hierarchical topology fields in the transmitted data and are converted into parent pointers, child node sets, or adjacency lists during parsing, facilitating subsequent spatial coordinate determination and connection path drawing.
[0045] The visualization rendering engine is used to establish a drawable and interactive rendering context in the front-end interactive interface. Its initialization actions include rendering context creation, coordinate system setting, scaling setting, and event hit area parameter setting. The drawing canvas serves as the carrying plane for graphic nodes and connections. The drawing canvas can be a bitmap canvas, vector canvas, or componentized canvas container. The range parameters of the drawing canvas are determined by the visualization rendering engine based on the object tree size, node density threshold, and viewport size to avoid non-interactive areas caused by coordinate overflow or node overlap. The tree layout processing is used to convert the hierarchical topology of the object tree into a set of spatial coordinates. The input of the tree layout processing is the set of nodes and node relationships in the object tree, and the output is spatial coordinates. Spatial coordinates are used to describe the two-dimensional or multi-dimensional position vectors of each element in the object tree on the drawing canvas. The generation process of spatial coordinates includes calculating the hierarchy depth, determining the same-level sorting rules, determining the node spacing parameters, and coordinate normalization. The layer depth calculation is derived from the node relationship of the object tree. The sorting rules of the same layer can be determined based on the lexicographical order of the field identifier, the order of node creation, or the node weight information. The node spacing parameter can be derived from the canvas width and height, node size, and number of layers. Coordinate normalization is used to map the calculation results to the coordinate system range of the drawing canvas to ensure that the spatial coordinates can be directly used by the rendering engine.
[0046] In the object tree, the hierarchical structure is represented as a set of node relationships, with the parent-child direction of the node relationships corresponding to the hierarchical direction of the hierarchical structure. Drawing connection paths between parent and child nodes based on the hierarchical structure and spatial coordinates defined by the node relationships in the object tree explicitly transforms the abstract hierarchical relationships into visual connections. The inputs for drawing connection paths include the spatial coordinates of the parent node, the spatial coordinates of the child node, and connection style parameters. These parameters include line width, polyline rules, curve rules, endpoint offset, and hit area width. The endpoint offset aligns the endpoints of the connection with the boundaries of the graphic nodes, and the hit area width supports mouse hover or click detection. The connection relationship serves as a structured record of the connection path drawing results. It includes the parent node identifier, child node identifier, connection path geometry data, and the rendering level index of the connection in the drawing canvas. The rendering level index controls the occlusion relationship between the connection and the graphic nodes, ensuring that the graphic nodes are prioritized for occlusion. The connection relationship can be used to trace the hierarchical path and locate parent and child references in subsequent interaction processing. Therefore, when generating the connection relationship, it is necessary to keep the node identifier consistent with the object tree node identifier to avoid the rendering identifier from becoming disconnected from the data identifier.
[0047] The leaf node attribute information corresponding to the queryable field in the object tree is used to carry the information required for field-level rendering and interaction. Its content must at least include a field identifier and may include field display text, field type hints, and optional icon resource references. Extracting leaf node attribute information is used to read the field identifier corresponding to the queryable field from the object tree node content. The extraction action includes node type determination and field identifier reading. Node type determination is completed based on the node type identifier of the object tree node, ensuring that field-level primitive creation is performed only on leaf nodes. Visual primitives containing field identifiers are created based on the leaf node attribute information as graphic nodes to convert field semantics into renderable objects. The type of visual primitive can be a rectangle, rounded rectangle, text component, or composite primitive. The field identifier is written into the data attribute or binding attribute of the visual primitive, serving as the unique association key during drag-and-drop selection operations. Graphic nodes, as rendering entities, need to include position attributes, size attributes, interactive attributes, and bound data attributes. Position attributes are derived from spatial coordinates, size attributes from font measurements, fixed node sizes, or adaptive layout rules, interactive attributes are used to enable event responses for drag-and-drop selection operations, and bound data attributes are used to return the field identifier in interactive events and support node selection data generation. Rendering graphic nodes to their corresponding spatial coordinates on the drawing canvas is used to complete the alignment of the landing point for visualization rendering. The rendering action includes drawing calls, adding primitives to the rendering tree, updating the hit test index, and triggering a partial refresh. The hit test index is used to improve the response accuracy of drag-and-drop selection operations and reduce the overhead of repeated traversal. The partial refresh is used to avoid the interaction delay caused by redrawing the entire canvas.
[0048] This embodiment receives transmitted data in the front-end interactive interface and parses it using a parser to obtain an object tree. It then initializes a visualization rendering engine to establish a drawing canvas and uses tree layout processing to determine the spatial coordinates of each element in the object tree. By drawing connection paths between parent and child nodes based on the node relationships and spatial coordinates in the object tree, it generates connection relationships. By extracting the attribute information of the leaf nodes corresponding to the queryable fields in the object tree, it creates visual primitives containing field identifiers as graphic nodes and renders them to the corresponding spatial coordinates on the drawing canvas. This allows the queryable fields and associated hierarchical structures to form a rendering result in the front-end interactive interface that simultaneously has field identifier binding and hierarchical visualization, thereby improving the consistency of field positioning and enhancing the traceability of connection relationships and graphic nodes in subsequent interactions.
[0049] In one embodiment, step S40 above includes: S401, Configure an interaction listener to capture drag-and-drop selection operations on the target graphic node in the front-end interactive interface, and record the target graphic node; S402, based on the connection relationship, backtrack from the target graphic node to the root node, extract the node identifier sequence on the traversal path to determine the hierarchical path, and serialize the hierarchical path into field path information; S403, in response to the condition configuration instruction for the target graphical node, receive the logical operator and the filter parameter value, and assemble the logical operator and the filter parameter value into query condition information; S404, Instantiate a query request object, encapsulate the field path information and query condition information corresponding to the target graphical node into the query request object, and generate node selection data.
[0050] In this embodiment, the front-end interactive interface is used to carry out the interactive presentation of graphical nodes and their connection relationships, and provides input channels for drag-and-drop selection operations and conditional configuration commands. Responding to drag-and-drop selection operations and conditional configuration commands for graphical nodes in the front-end interactive interface means converting pointer events and interface command events into data expressions that can be subsequently serialized and encapsulated, so that field path information and query condition information form a reusable association structure in the same node selection data. Graphical nodes, as interactive objects, need to have a hitable region and event identifier information. The hitable region is used to determine where the starting point of the drag-and-drop selection operation falls, and the event identifier information is used to locate the target graphical node in the event callback and maintain consistency with the field identifier. The drag-and-drop selection operation can be composed of a combination of mouse press events, move events, and release events, or a combination of touch press events and drag events. The capture behavior needs to cover the bubbling phase or capture phase of the event to ensure stable recognition within the canvas component.
[0051] Interaction listeners are used to establish event subscription entry points in the front-end interactive interface. The configuration actions of interaction listeners include event type binding, callback function registration, hit determination strategy settings, and drag-and-drop state machine initialization. Event type binding limits the listener to only handling events related to drag-and-drop selection operations and conditional configuration commands. Callback function registration associates event triggering with data processing logic. The hit determination strategy determines the manipulated graphic node through coordinate hits or primitive picking. The drag-and-drop state machine maintains state variables during the drag-and-drop process and avoids repeated triggering of recording actions. The target graphic node is the graphic node instance hit by the drag-and-drop selection operation. Recording the target graphic node means binding the node identifier, field identifier, and current interaction session identifier of the target graphic node and writing them to a temporary storage structure. The temporary storage structure can be a memory variable, a session context object, or a front-end state container, used to locate the same target graphic node even when conditional configuration commands arrive. The recording action can simultaneously write the spatial coordinates and parent node identifier of the target graphic node to reduce lookup overhead and minimize repeated traversal of rendering layer objects during backtracking.
[0052] Connection relationships are used to express the parent-child associations and hierarchical directions between graphical nodes. These connections originate from the connection paths and their structured records generated during the visualization rendering stage. Backtracking from the target graphical node to the root node, based on these connections, restores the visualized parent-child relationships to a hierarchical path of node sequences. This backtracking can be achieved through parent pointer iteration, adjacency list reverse indexing, or edge set matching. The root node represents the top-level node in the hierarchical relationship. It is determined by nodes with an in-degree of zero in the connection relationship or by a preset starting node identifier. Traversing towards the root node involves obtaining the parent node of the current node and updating the current node reference in each iteration until the root node determination condition is met. The node identifier sequence stores the node identifiers traversed during the traversal. Node identifiers can be field identifiers, entity class identifiers, or composite identifiers. They originate from the data attributes bound to the graphical nodes or the identifier fields of object tree nodes. The node identifier sequence needs to maintain order consistency to reflect the hierarchical arrangement from the root node to the target graphical node. Therefore, during traversal, node identifiers can be accumulated using head insertion, or the sequence can be reversed after traversal to obtain a forward order. A hierarchical path is a path-based representation of a sequence of node identifiers. Its construction involves node identifier normalization, separator selection, and concatenation rule setting. Normalization removes differences between displayed text and internal identifiers while preserving stable identifiers. Separators distinguish hierarchical boundaries and maintain parsability. Serializing a hierarchical path into field path information means converting it into a transmittable and persistent representation. Field path information can be in string, array, or structured object form. During serialization, the original semantics of the node identifiers are preserved, ensuring that server-side consistency checks can directly compare the path defined by the field path information with the structure of the data model tree.
[0053] Conditional configuration instructions are used to trigger query condition input behavior in the front-end interactive interface. These instructions can be triggered by button clicks, menu selections, or keyboard shortcuts. Their triggering timing depends on the target graphical node being recorded to ensure clear condition attribution. Responding to a conditional configuration instruction for a target graphical node means opening the conditional input control based on the currently recorded target graphical node and establishing a binding relationship between the input result and the target graphical node. Logical operators are used to express the comparison relationship of filtering rules. Logical operators can include enumerated values such as equal to, not equal to, greater than, less than, contain, prefix matching, or range matching. The source of logical operators is the selection control or preset template in the front-end interactive interface. Filter parameter values are used to express the operation object of the logical operators. Their source is the input box, dropdown selection, or date selection control. Filter parameter values need to maintain compatibility with the field identifier corresponding to the target graphical node. Therefore, the process of receiving logical operators and filter parameter values can include formatting, null value judgment, and range constraint checks. Formatting is used to unify string representation, numerical representation, or time representation; null value judgment is used to distinguish between no input and explicit null values; and range constraint checks are used to limit length and character set to reduce subsequent parsing risks. Assembling logical operators and filter parameter values into query condition information means combining scattered input items into a structured expression. The query condition information must at least contain logical operators and filter parameter values, and may also contain parameter value type markers, negation markers, and multi-value set markers. The structured expression facilitates the generation of parameterized filter expressions in the subsequent query statement assembly stage.
[0054] The query request object serves as the carrier of node selection data. Instantiating the query request object means creating an object structure with field path information and query condition information, and establishing the association mapping between fields. Encapsulating the field path information and query condition information corresponding to the target graphical node into the query request object requires writing both the field path information and query condition information, and writing the node identifier or field identifier of the target graphical node as the association key. The association key is used to distinguish different records during multiple interactions or multi-field selection expansions. The encapsulation action can use key-value pair writing, object attribute assignment, or serialization into a structured data string. Key-value pair writing is suitable for dynamic field expansion, while object attribute assignment is suitable for fixed structure implementations. Generating node selection data means transforming the query request object into transmittable structured data. Node selection data can be the query request object itself or its serialized result. The node selection data needs to maintain the integrity of the field path information and query condition information so that the application server can receive the node selection data and access the data model tree to perform consistency checks.
[0055] This embodiment captures and records drag-and-drop selection operations on target graphical nodes in the front-end interactive interface by configuring an interaction listener. It extracts node identifier sequences by backtracking from the target graphical node to the root node based on the connection relationship to determine the hierarchical path and serializes the hierarchical path into field path information. It receives logical operators and filter parameter values by responding to conditional configuration instructions for the target graphical node and assembles them into query condition information. It instantiates a query request object and encapsulates the field path information and query condition information corresponding to the target graphical node to generate node selection data. This achieves a traceable conversion of interactive operations into structured data, reduces ambiguity in data expression of field selection and conditional configuration, and improves the consistency of node selection data in subsequent processing.
[0056] In one embodiment, step S50 above includes: S501, the application server uses a deserialization component to convert the received node selection data into an object structure that the application server can recognize, and retrieves a pre-built data model tree from the memory of the application server. S502, parse the field path information in the node selection data, decompose the field path information into an ordered hierarchical identifier sequence, and use the hierarchical identifier sequence to perform a step-by-step traversal retrieval in the data model tree, starting from the root node of the data model tree. S503, based on the hierarchical identifier sequence, verify whether each node pointed to by the hierarchical identifier sequence has a matching defined node structure in the corresponding level of the data model tree; S504, extract the query condition information from the node selection data, and verify whether the data type of the parameter value in the query condition information is compatible with the data type definition of the corresponding node in the data model tree; S505, when each node pointed to by the hierarchical identifier sequence has a matching node structure in the corresponding level of the data model tree, and the data type of the parameter value in the query condition information is compatible with the data type definition of the corresponding node in the data model tree, the consistency check is determined to be passed.
[0057] In this embodiment, the application server's processing objective for receiving node selection data is to restore externally submitted data into an accessible and verifiable internal structure, and to complete the reading and consistency verification of the data model tree within the same execution context. Node selection data can carry field path information and query condition information as structured data strings, or it can carry fields with the same name as object serialization results. The deserialization component is used to convert node selection data into an object structure recognizable by the application server. The deserialization component can be implemented based on field name mapping rules to assign object attributes and intercept missing fields, extra fields, and field type mismatches during the parsing phase. The object structure provides a stable data access entry point for field path information and query condition information, ensuring that subsequent parsing actions do not depend on string concatenation or are unaffected by field order. The application server's memory is used to store the pre-built data model tree. Retrieving the pre-built data model tree can be achieved through cache key retrieval, singleton reference reading, or thread-safe read-write locks to protect access. The data model tree returned by the retrieval action must maintain an immutable structure or be version traceable to avoid structural drift during consistency verification, which could lead to unstable verification results.
[0058] The field path information is used to express the location of the selected object in the data model tree. The content of the field path information can be a path string concatenated with delimiters or an array of node identifiers. Parsing the field path information requires decomposing it into an ordered sequence of hierarchical identifiers. The order of the hierarchical identifier sequence indicates the hierarchical direction from the root node to the target node, ensuring that traversal retrieval and verification actions can be repeatedly performed in the same direction. The decomposition action can obtain the hierarchical identifier sequence by splitting with delimiters or by directly parsing a structured array. After splitting, normalization processing such as removing empty items, removing illegal characters, and unifying case or escaping needs to be performed to ensure that the hierarchical identifier sequence is consistent with the naming rules of node identifiers in the data model tree. The root node is used to determine the starting point of traversal. The root node can be the initial model node object when constructing the data model tree, or a node object marked as the top level in the data model tree. The location method of the root node can be determined by a fixed reference, node type label, or a rule with an in-degree of zero. The implementation of hierarchical traversal retrieval in the data model tree using hierarchical identifier sequences can be achieved by drilling down level by level using the current node pointer. During the drill-down process, the set of child nodes of the current node is read at each level and matched against the current identifier according to the hierarchical identifier sequence. Matching methods can be hash index matching or linear scan matching. Hash index matching requires building a child node index table for each node during the data model tree construction phase to improve retrieval stability and performance. Linear scan matching requires defining unique matching rules to avoid ambiguity caused by duplicate identifiers at the same level. The intermediate results of the hierarchical traversal retrieval need to retain references to the node objects matched at each level. These node object references are used for subsequent extraction of data type definitions and to support data type compatibility checks for parameter values.
[0059] The action of verifying the node structure based on the hierarchical identifier sequence is used to compare the path with the data model tree structure. The verification objective is that each node pointed to by the hierarchical identifier sequence has a matching node structure in the corresponding level of the data model tree. The meaning of node structure includes three types of constraints: whether the node exists, whether the node type matches, and whether the parent-child relationship matches. The existence of a node is determined by the hit rate of the hierarchical traversal search. Whether the node type matches is determined by the node category field of the node object. The node category field can distinguish between branch nodes and leaf nodes or between entity nodes and field nodes. Whether the parent-child relationship matches is determined by the parent node reference and the relationship between the child node set during hierarchical drill-down. The meaning of matching definition is that the node identifier, node category and its hierarchical position are fixed during the data model tree construction phase. During the verification phase, no node structure is deduced or completed, only existence and consistency verification is performed. If no node object is hit at any level or the node category of the hit node object is inconsistent with the expected level, the node structure verification fails, and the input condition for the consistency verification failure conclusion is formed.
[0060] Query condition information is used to express the filtering constraints of the target field. The core fields of query condition information include logical operators and filter parameter values, and may also include parameter value data types or parameter value format markers. The action of extracting query condition information is used to read the query condition information fields from the object structure and prepare for validation. The validation action focuses on the compatibility between the parameter value data type and the data type definition. The parameter value data type is used to characterize the type view of the filter parameter value on the application server. The parameter value data type can be inferred by the deserialization component based on the field type, or it can be explicitly carried by the query condition information. The inference method needs to combine the literal characteristics of the filter parameter value and the expected type priority, such as numeric strings, date strings, boolean strings, etc. The data type definition comes from the data type definition field of the corresponding node in the data model tree. The determination of the corresponding node depends on the final node object reference located by the field path information. The final node object is usually a leaf node, and the leaf node has already bound the data type information in the attribute definition during the data model tree construction phase. Compatibility determination requires establishing a type compatibility matrix or a set of conversion rules. The type compatibility matrix clarifies acceptable combinations between the parameter value's data type and its definition. The set of conversion rules ensures safe conversions while maintaining compatibility, such as string-to-numeric and string-to-date conversions. Conversion actions must include format and range constraints to prevent abnormal input from triggering uncontrolled errors during the conversion process. If the parameter value's data type does not satisfy the compatibility matrix or conversion rule set, the query condition verification fails, resulting in a consistency check failure conclusion.
[0061] The consistency check pass criteria consist of two parts: each node pointed to by the hierarchical identifier sequence must have a matching node structure defined in the corresponding level of the data model tree; and the data type of the parameter values in the query condition information must be compatible with the data type definition of the corresponding node in the data model tree. This criterion requires that the structure verification result and the type compatibility result be satisfied simultaneously within the same request context. The judgment action can be performed by constructing a boolean result on the application server and writing it into the request context, or by constructing a verification result object containing a failure reason code and a failure location identifier. The failure location identifier can record the index of the hierarchical identifier sequence or the node identifier, facilitating subsequent rejection processing and audit logging.
[0062] This embodiment uses a deserialization component to convert node selection data into an object structure recognizable by the application server and retrieves a pre-built data model tree. By parsing field path information, a hierarchical identifier sequence is generated, and the data model tree is traversed level by level starting from the root node. The existence of matching definitions in the node structure is verified based on the hierarchical identifier sequence. By extracting query condition information and verifying the compatibility between parameter value data types and data type definitions, consistency verification of field path information and data model tree structure, as well as constraint verification of query condition information type input, are achieved. This reduces the probability of node selection data being tampered with or having abnormal type inputs entering the subsequent parsing and execution stages, and improves the controllability and stability of query request data by the application server.
[0063] In one embodiment, step S60 above includes: S601 After the consistency check passes, the persistent layer interceptor deployed on the application server is activated to trigger the query interception mechanism and intercept the current database access request. S602, traverse the field path information in the node selection data, find the database column name corresponding to the target queryable field pointed to by the field path information according to the mapping relationship to generate the query column clause, and deduce the table join condition according to the inter-class reference relationship to generate the table join clause; S603, parse the query condition information in the node selection data, convert the query condition information into a parameterized filter expression, and obtain the condition clause; S604, combine the query column clause, the table join clause, and the condition clause according to the database syntax strategy to obtain the query statement; S605, execute the query statement to obtain the result set, and encapsulate the result set into a data query result.
[0064] In this embodiment, the processing after the consistency check passes requires converting the node selection data into an executable query statement, and completing the interception, rewriting, execution, and result encapsulation of the database access request on the application server side. The query interception mechanism is used to insert a rewrite point before the database access request enters the persistent layer execution channel. The persistent layer interceptor is used to carry the triggering and callback logic of the query interception mechanism. The object of the interception action is the current database access request, which can be represented as a pre-compiled object to be executed, an SQL template object, or a query call context object. The implementation of activating the persistent layer interceptor can be achieved through interceptor registry enabling, interceptor priority matching, or thread context flag triggering, so that the interceptor takes over the SQL generation stage of the database access request within the scope of the current request and blocks the execution path of the original SQL being directly issued.
[0065] Field path information is used to determine the basis for generating query column clauses and table join clauses. Processing the traversal of field path information involves reading the path string or path array from the node selection data and decomposing it into a hierarchically arranged sequence of node identifiers. This sequence of node identifiers is used for verifiable location and deduction within mapping relationships and inter-class reference relationships. Mapping relationships map entity classes or entity class attributes to database table names and database column names. The source of these mapping relationships can be entity class annotation configurations, external mapping files, or the runtime metadata registry. Finding the database column name corresponding to the target queryable field based on the mapping relationship requires locating the target queryable field pointed to by the field path information to the entity class attribute dimension and reading the database column name bound to that attribute from the mapping relationship. The database column name must conform to database identifier specifications and undergo necessary escaping processing. Escaping rules can be determined based on the database dialect to avoid column name conflicts with keywords or the inclusion of special characters that could lead to parsing ambiguity. The query clause can be generated by concatenating a list of column names or by outputting column name aliases. Aliases are used to maintain consistency between the returned fields and the front-end field identifiers. Aliases can come from the last-level identifier of the field path information or the field identifier in the mapping relationship.
[0066] Inter-class references are used to derive table join conditions. The semantics of inter-class references are the association direction and constraints expressed by the member variables of the referenced object types between entity classes. Deriving table join conditions based on inter-class references requires locating adjacent entity class pairs level by level along the hierarchical identifier sequence of field path information and reading the corresponding association information from the inter-class references. Association information can include the parent table name, the child table name, the associated column names, and the association direction. Generating table join conditions requires mapping adjacent entity class pairs to database table pairs and constructing join predicates in the form of equi-joins or range joins. The left and right operands of the join predicate are the database column name expressions of the two tables, which can include table aliases to avoid conflicts with columns of the same name. Forming table join clauses requires combining multiple table join conditions in hierarchical order into a JOIN structure or a WHERE join. The join type of the JOIN structure can be selected as inner join or outer join based on the nullability or cardinality of the inter-class references. The selection rules can be controlled by system configuration items to adapt to different data completeness requirements.
[0067] Query condition information is used to generate conditional clauses. This information includes logical operators and filter parameter values. Logical operators determine the comparison type, and filter parameter values determine comparison constants. Converting query condition information into parameterized filter expressions requires assigning placeholders to filter parameter values and generating a parameter binding table. Placeholders can be question marks or named placeholders. The parameter binding table stores the correspondence between placeholders and filter parameter values, as well as the data type information of the filter parameter values. Parameterization avoids directly concatenating filter parameter values into the SQL text. The data type information of the filter parameter values can be carried by the query condition information or inferred from the data type of the target queryable field in the mapping relationship. The inferred type drives the persistence layer parameter binding API to select the appropriate binding entry point. Generating conditional clauses requires combining database column name expressions, logical operators, and placeholders according to database dialect rules. When the logical operator is an inclusion or prefix match, a LIKE structure needs to be generated and pattern characters in the filter parameter values need to be escaped. When the logical operator is a set match, an IN structure needs to be generated and the number of placeholders needs to be expanded. The expanded parameter binding table must maintain a consistent order to avoid binding misalignment.
[0068] Constructing a query statement requires combining query clauses, table join clauses, and conditional clauses according to database syntax strategies. These strategies restrict the order and delimiters of SELECT, FROM, JOIN, WHERE clauses, and define dialectal differences in identifier citation, escaping, and pagination. The combination process prunes empty clauses while maintaining syntactic integrity; for example, it avoids generating isolated WHERE keywords when conditional clauses are empty, and maintains a single-table FROM structure when table join clauses are empty. The output of the query statement can be a combination of the final SQL text and parameter-bound tables, or an executable query object. The persistence layer interceptor, after taking over the database access request, injects this combination into the execution context, rewriting the original database access request.
[0069] Executing a query to retrieve the result set requires binding and executing placeholders through a database connection and a pre-compiled execution interface. The result set carries the returned row set and column metadata. Encapsulating the result set into data query results requires establishing field mapping relationships based on column names or aliases in the query column clauses, and converting each row of the result set into a structured record. This structured record can be a collection of key-value pairs or a two-dimensional array structure. Key names can be the last-level identifier of the field path information or aliases from the query column clauses for front-end recognition. The data query results can include pagination information, total count information, or execution time information. The generation of additional fields can be provided by the database syntax strategy and execution context, without changing the interpretability of the data query results for the front-end.
[0070] For example, in a financial risk control analysis scenario, the backend uses Spring Boot scaffolding to build the application server, integrating MyBatis and JPA to maintain the mapping relationship between entity classes and database tables. During startup, it parses the attribute definitions and inter-class reference relationships in the entity classes. Entity classes can cover business objects such as customers, accounts, transactions, policies, and claims. Database tables carry corresponding structured data records. The mapping relationship establishes a searchable correspondence between entity class identifiers and table names, and between attribute identifiers and column names. Attribute definitions solidify the field identifiers, data types, and column name information of basic data type attributes. Inter-class reference relationships solidify the reference direction and associated field information between entity classes, enabling subsequent processing to locate the field source and relationships without relying on hard-coded field names. To transform the backend object model structure into a structured representation that the frontend can display, the application server uses java.util.jar in the Java JDK package to parse the model resources in the deployment package, extract mapping relationships, attribute definitions, and inter-class reference relationships, and based on this, extract queryable fields and related hierarchical structures to form a data model tree. Based on the data model tree, transmission data is generated and output in JSON format, containing information such as node identifiers, parent-child relationships, field identifiers, and data types, ensuring that the frontend can restore the correspondence between the hierarchical topology and the field set.
[0071] The front-end uses the React framework and D3 components to render the data model tree. After receiving the transmitted data, the front-end interactive interface calls the parser to parse the JSON into an object tree, initializes the visualization rendering engine to create a drawing canvas, and uses tree layout to determine the spatial coordinates of each element in the object tree. The node relationships in the object tree are mapped to connection relationships in the interface, and the field identifiers carried in the leaf nodes are mapped to graphical nodes. Graphical nodes and connection relationships together constitute an interactive hierarchical view, allowing business users to intuitively see the relationship structure between customers and accounts, accounts and transactions, policies and claims, and the selectable fields under each level in the graphical interface. In risk screening tasks, business personnel need to dynamically expose fields and combine conditions, such as filtering fields like transaction amount, transaction time, customer level, and claim amount, and setting filter conditions. The front-end interface responds to drag-and-drop selection operations and condition configuration commands for graphical nodes. The interaction listener captures drag-and-drop selection operations for target graphical nodes and records the target graphical node identifier. Based on the connection relationship, it backtracks from the target graphical node to the root node, extracts the node identifier sequence on the traversal path to determine the hierarchical path, and serializes the hierarchical path into field path information. After the condition configuration command is triggered, the front-end receives logical operators and filter parameter values and assembles them into query condition information. For example, the logical operator is selected as greater than, and the filter parameter value is a certain amount threshold. The field path information and query condition information are encapsulated in the query request object to generate node selection data. The node selection data is submitted to the application server in JSON format as selected model tree nodes, enabling the back-end to simultaneously obtain field location information and filter constraint information in the same structure object.
[0072] After receiving the node selection data, the application server uses jackson-databind to convert it into an object structure recognizable by the application server. It then retrieves a pre-built data model tree from the application server's memory to perform consistency checks. Field path information is parsed and decomposed into an ordered sequence of hierarchical identifiers. The root node of the data model tree serves as the traversal starting point, and the hierarchical identifier sequence is used to traverse and locate corresponding nodes level by level in the data model tree. The verification process confirms that each node pointed to by the hierarchical identifier sequence has a matching defined node structure in the corresponding level of the data model tree, preventing the front-end from tampering with field path information to point to undefined fields or jumping across levels. Subsequently, query condition information is extracted, and the data type of the parameter values in the query condition information is verified to be compatible with the data type definition of the corresponding node in the data model tree. For example, if the data type of the transaction amount field is defined as numeric, the filter parameter value must be recognized as numeric to meet the compatibility condition. Consistency checks pass only when both the node structure and data type are matched. This process, before dynamic assembly, completes the comparison and constraint between the original data model and the selected data nodes to reduce the risk of SQL injection and illegal field access in dynamic SQL scenarios.
[0073] After the consistency check passes, the application server's query interception mechanism is triggered. The application server activates the deployed MyBatis persistence layer interceptor, DynamicFieldInterceptor, to intercept the current database access request. The interceptor reads the field path information in the node selection data and iterates through the field path information. Based on the mapping relationship, it finds the database column name corresponding to the target queryable field pointed to by the field path information to generate the query column clause. At the same time, it derives the table join condition based on the inter-class reference relationship to generate the table join clause. For example, it derives the join condition and determines the join direction based on the inter-class reference relationship between customer and account, and account and transaction. The interceptor parses the query condition information in the node selection data and converts the query condition information into parameterized filter expressions to obtain condition clauses. The parameterized form is used to separate the filter parameter values from the query statement and bind the parameters during the execution phase, reducing the impact of the filter parameter values on the query statement structure. The query statement is obtained by combining the query column clause, table join clause, and condition clause according to the database syntax strategy. After the query statement is executed, the result set is obtained. The result set is encapsulated into data query results according to the correspondence between field identifiers and column names and returned to the front-end interactive interface. The front-end displays the filtered transaction records, customer lists, or claims records, etc., on the same page, and keeps the field names consistent with the graphical nodes selected by the user through drag and drop. This completes the entire process from model mapping, model tree output, front-end drag and drop selection, server-side consistency verification, interception and assembly of query statements to return data query results.
[0074] This embodiment intercepts database access requests by triggering a query interception mechanism through a persistence layer interceptor. It uses mapping relationships to stably convert the target queryable fields pointed to by the field path information into database column names to generate query column clauses. It derives table join conditions through inter-class reference relationships to generate table join clauses, and generates parameterized filter expressions to form condition clauses based on query condition information. Finally, it combines the query column clauses, table join clauses, and condition clauses using database syntax strategies to obtain the query statement, execute it, retrieve the result set, and encapsulate it into data query results. This ensures that the query statement generation process is uniformly controlled by the application server and remains consistent with mapping relationships and inter-class reference relationships, reducing the probability of ambiguity or mismatches in field selection and table association at the SQL text level. Simultaneously, parameterization reduces the impact of filter parameter values on the SQL structure, thereby improving the controllability of query execution and the consistency of result encapsulation.
[0075] In one embodiment, a data query device based on visualization rendering is provided, which corresponds one-to-one with the data query method based on visualization rendering described in the above embodiments. (Refer to...) Figure 3 , Figure 3This is a schematic diagram of the functional modules of a preferred embodiment of the data query device based on visualization rendering of the present invention. The modules include a model parsing module 10, a model construction module 20, a visualization rendering module 30, an interaction parsing module 40, a consistency verification module 50, and a query generation module 60. Detailed descriptions of each functional module are as follows: The model parsing module 10 is used to establish the mapping relationship between entity classes on the application server and database tables, and to parse the attribute definitions and inter-class reference relationships in the entity classes; Model building module 20 is used to extract queryable fields and associated hierarchical structures based on the mapping relationship, the attribute definition and the inter-class reference relationship, build a data model tree and generate transmission data based on the data model tree; The visualization rendering module 30 is used to send the transmitted data to the front-end interactive interface for visualization rendering, and to map the queryable fields and the associated hierarchical structure into graphical nodes and connection relationships based on the transmitted data. The interactive parsing module 40 is used to respond to the drag-and-drop selection operation and condition configuration instructions for the graphic node in the front-end interactive interface, determine the hierarchical path of the selected graphic node as field path information based on the connection relationship, and generate node selection data containing the field path information and query condition information. The consistency verification module 50 is used to receive the node selection data from the application server and access the data model tree, and perform consistency verification by comparing the path defined by the field path information with the structure of the data model tree; The query generation module 60 is used to trigger the query interception mechanism of the application server after the consistency check passes, parse the node selection data according to the mapping relationship and the inter-class reference relationship, assemble the query statement, execute the query statement to return the data query result.
[0076] For specific limitations regarding the data query device based on visualization rendering, please refer to the aforementioned limitations on the data query method based on visualization rendering, which will not be repeated here. Each module in the aforementioned data query device based on visualization rendering can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0077] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 4As shown, the computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides determination and control capabilities. The memory includes non-volatile and / or volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The network interface is used to communicate with external clients via a network connection. When the computer program is executed by the processor, it implements the functions or steps of a data query method based on visualization rendering on the server side.
[0078] In one embodiment, a computer device is provided, which may be a client, and its internal structure diagram may be as follows: Figure 5 As shown, the computer device includes a processor, memory, network interface, display screen, and input devices connected via a system bus. The processor provides determination and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The network interface is used to communicate with an external server via a network connection. When executed by the processor, the computer program implements client-side functions or steps of a data query method based on visualization rendering.
[0079] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform the following steps: Establish the mapping relationship between entity classes on the application server and database tables, and parse the attribute definitions and inter-class reference relationships in the entity classes; Based on the mapping relationship, the attribute definition and the inter-class reference relationship, the queryable fields and the associated hierarchical structure are extracted, a data model tree is constructed and transmission data is generated based on the data model tree; The transmitted data is sent to the front-end interactive interface for visualization rendering. Based on the transmitted data, the queryable fields and the associated hierarchical structure are mapped into graphical nodes and connection relationships. In response to the drag-and-drop selection operation and condition configuration command for the graphic node in the front-end interactive interface, the hierarchical path of the selected graphic node is determined as the field path information based on the connection relationship, and node selection data containing the field path information and query condition information is generated. The application server receives the node selection data and accesses the data model tree, and performs a consistency check by comparing the path defined by the field path information with the structure of the data model tree; After the consistency check passes, the query interception mechanism of the application server is triggered. Based on the mapping relationship and the inter-class reference relationship, the node selection data is parsed and the query statement is assembled. The query statement is then executed to return the data query results.
[0080] In one embodiment, a computer-readable storage medium is provided, which may be non-volatile or volatile, and a computer program is stored thereon, which, when executed by a processor, performs the following steps: Establish the mapping relationship between entity classes on the application server and database tables, and parse the attribute definitions and inter-class reference relationships in the entity classes; Based on the mapping relationship, the attribute definition and the inter-class reference relationship, the queryable fields and the associated hierarchical structure are extracted, a data model tree is constructed and transmission data is generated based on the data model tree; The transmitted data is sent to the front-end interactive interface for visualization rendering. Based on the transmitted data, the queryable fields and the associated hierarchical structure are mapped into graphical nodes and connection relationships. In response to the drag-and-drop selection operation and condition configuration command for the graphic node in the front-end interactive interface, the hierarchical path of the selected graphic node is determined as the field path information based on the connection relationship, and node selection data containing the field path information and query condition information is generated. The application server receives the node selection data and accesses the data model tree, and performs a consistency check by comparing the path defined by the field path information with the structure of the data model tree; After the consistency check passes, the query interception mechanism of the application server is triggered. Based on the mapping relationship and the inter-class reference relationship, the node selection data is parsed and the query statement is assembled. The query statement is then executed to return the data query results.
[0081] It should be noted that the functions or steps that can be implemented by the computer-readable storage medium or computer device described above can be referred to the relevant descriptions on the server side and client side in the foregoing method embodiments. To avoid repetition, they will not be described one by one here.
[0082] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0083] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0084] It should be noted that if any software tools or components not belonging to our company appear in the embodiments of this application, they are merely for illustrative purposes and do not represent actual use.
[0085] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.
Claims
1. A data query method based on visualization rendering, characterized in that, Includes the following steps: Establish the mapping relationship between entity classes on the application server and database tables, and parse the attribute definitions and inter-class reference relationships in the entity classes; Based on the mapping relationship, the attribute definition and the inter-class reference relationship, the queryable fields and the associated hierarchical structure are extracted, a data model tree is constructed and transmission data is generated based on the data model tree; The transmitted data is sent to the front-end interactive interface for visualization rendering. Based on the transmitted data, the queryable fields and the associated hierarchical structure are mapped into graphical nodes and connection relationships. In response to the drag-and-drop selection operation and condition configuration command for the graphic node in the front-end interactive interface, the hierarchical path of the selected graphic node is determined as the field path information based on the connection relationship, and node selection data containing the field path information and query condition information is generated. The application server receives the node selection data and accesses the data model tree, and performs a consistency check by comparing the path defined by the field path information with the structure of the data model tree; After the consistency check passes, the query interception mechanism of the application server is triggered. Based on the mapping relationship and the inter-class reference relationship, the node selection data is parsed and the query statement is assembled. The query statement is then executed to return the data query results.
2. The data query method based on visualization rendering as described in claim 1, characterized in that, Establish the mapping relationship between entity classes on the application server and database tables, and parse the attribute definitions and inter-class references in the entity classes, including: Scan the default program package path of the application server, identify target class files containing configuration annotations, and mark the target class files as entity classes to be parsed; Based on the class-level annotation configuration of the entity class, obtain the target table name bound to the entity class, and establish a mapping relationship between the entity class and the database table based on the target table name; The member variables declared in the entity class are traversed using reflection, the member variables of basic data types are filtered out, and the database column names corresponding to the filtered member variables are read. The attribute definitions are generated based on the database column names. Filter out member variables of the reference object type declared in the entity class, read the target entity class type information and foreign key association information pointed to by the member variables of the reference object type, and generate inter-class reference relationships based on the target entity class type information and foreign key association information.
3. The data query method based on visualization rendering as described in claim 1, characterized in that, Based on the mapping relationship, the attribute definition, and the inter-class reference relationship, queryable fields and associated hierarchical structures are extracted, a data model tree is constructed, and transmission data is generated based on the data model tree, including: From the entity classes associated with the mapping relationship, select an entity class as the starting entity class of the data model tree, take the selected starting entity class as the target entity class, and create a model node object corresponding to the target entity class as the root node of the data model tree. Traverse the attribute definitions, identify the basic data type attributes in the target entity class as queryable fields, create a leaf node for each queryable field, and attach the leaf node to the root node; Traverse the inter-class reference relationships, create branch nodes for the associated entity classes pointed to by the inter-class reference relationships, connect the branch nodes to the root node, and record the reference paths of the inter-class reference relationships to form an association hierarchy structure; A data model tree is constructed based on the root node, the leaf nodes attached to the root node, the branch nodes connected to the root node, and the connection relationships between the root node, the leaf nodes, and the branch nodes. The hierarchical relationship of the data model tree is defined by the associated hierarchical structure. The serialization component is invoked to perform object graph traversal on the constructed data model tree, converting the hierarchical topology and node content of the data model tree into structured data strings to generate transmission data.
4. The data query method based on visualization rendering as described in claim 1, characterized in that, The transmitted data is sent to the front-end interactive interface for visualization rendering. Based on the transmitted data, the queryable fields and the associated hierarchical structure are mapped into graphical nodes and connection relationships, including: The front-end interactive interface receives the transmitted data and calls the parser to parse the transmitted data to obtain the object tree; The visualization rendering engine is initialized to create a drawing canvas, and the spatial coordinates of each element in the object tree on the drawing canvas are determined using tree layout processing. Based on the hierarchical structure defined by the node relationships in the object tree and the spatial coordinates, draw connecting paths between parent and child nodes to generate connection relationships; Extract the attribute information of the leaf nodes corresponding to the queryable field in the object tree, create a visual primitive containing the field identifier as a graphic node based on the attribute information of the leaf nodes, and render the graphic node to the corresponding spatial coordinates of the drawing canvas.
5. The data query method based on visualization rendering as described in claim 1, characterized in that, In response to the drag-and-drop selection operation and condition configuration command for the graphical node in the front-end interactive interface, the hierarchical path of the selected graphical node is determined as the field path information based on the connection relationship, and node selection data containing the field path information and query condition information is generated, including: Configure an interaction listener to capture drag-and-drop selection operations on the target graphic node in the front-end interactive interface, and record the target graphic node; Based on the connection relationship, a backtracking traversal is performed from the target graphic node to the root node, the node identifier sequence on the traversal path is extracted to determine the hierarchical path, and the hierarchical path is serialized into field path information; In response to the condition configuration instruction for the target graphical node, the system receives logical operators and filter parameter values, and assembles the logical operators and filter parameter values into query condition information. Instantiate a query request object, encapsulate the field path information and query condition information corresponding to the target graphical node into the query request object, and generate node selection data.
6. The data query method based on visualization rendering as described in claim 1, characterized in that, The application server receives the node selection data and accesses the data model tree. It then performs a consistency check by comparing the path defined by the field path information with the structure of the data model tree, including: The application server uses a deserialization component to convert the received node selection data into an object structure that the application server can recognize, and retrieves a pre-built data model tree from the application server's memory. The field path information in the node selection data is parsed, the field path information is decomposed into an ordered hierarchical identifier sequence, and the hierarchical identifier sequence is used to perform a step-by-step traversal search in the data model tree, starting from the root node of the data model tree. Based on the hierarchical identifier sequence, verify whether each node pointed to by the hierarchical identifier sequence has a matching defined node structure in the corresponding level of the data model tree; Extract the query condition information from the node selection data, and verify whether the data type of the parameter value in the query condition information is compatible with the data type definition of the corresponding node in the data model tree; When each node pointed to by the hierarchical identifier sequence has a matching node structure in the corresponding level of the data model tree, and the data type of the parameter value in the query condition information is compatible with the data type definition of the corresponding node in the data model tree, the consistency check is deemed to have passed.
7. The data query method based on visualization rendering as described in claim 1, characterized in that, After the consistency check passes, the query interception mechanism on the application server is triggered. Based on the mapping relationship and the inter-class reference relationship, the node selection data is parsed and a query statement is assembled. The query statement is then executed to return the data query results, including: After the consistency check passes, the persistent layer interceptor deployed on the application server is activated to trigger the query interception mechanism and intercept the current database access request; The process involves traversing the field path information in the selected data of the nodes, finding the database column name corresponding to the target queryable field pointed to by the field path information based on the mapping relationship to generate a query column clause, and deriving the table join condition based on the inter-class reference relationship to generate a table join clause. The query condition information in the node selection data is parsed and converted into parameterized filtering expressions to obtain condition clauses; The query column clause, the table join clause, and the condition clause are combined according to database syntax strategies to obtain a query statement; Execute the query statement to obtain the result set, and encapsulate the result set into a data query result.
8. A data query device based on visualization rendering, characterized in that, The data query device based on visualization rendering includes: The model parsing module is used to establish the mapping relationship between entity classes on the application server and database tables, and to parse the attribute definitions and inter-class reference relationships in the entity classes; The model building module is used to extract queryable fields and associated hierarchical structures based on the mapping relationship, the attribute definition and the inter-class reference relationship, build a data model tree and generate transmission data based on the data model tree; The visualization rendering module is used to send the transmitted data to the front-end interactive interface for visualization rendering, and to map the queryable fields and the associated hierarchical structure into graphical nodes and connection relationships based on the transmitted data. The interactive parsing module is used to respond to the drag-and-drop selection operation and condition configuration instructions for the graphic node in the front-end interactive interface, determine the hierarchical path of the selected graphic node as the field path information based on the connection relationship, and generate node selection data containing the field path information and query condition information. The consistency verification module is used by the application server to receive the node selection data and access the data model tree, and to perform consistency verification by comparing the path defined by the field path information with the structure of the data model tree; The query generation module is used to trigger the query interception mechanism of the application server after the consistency check passes, parse the node selection data according to the mapping relationship and the inter-class reference relationship, assemble the query statement, execute the query statement to return the data query result.
9. A computer device, characterized in that, The computer device includes a memory, a processor, and a data query program based on visualization rendering stored in the memory and executable on the processor. When executed by the processor, the data query program based on visualization rendering implements the steps of the data query method based on visualization rendering as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The storage medium stores a data query program based on visualization rendering, which, when executed by a processor, implements the steps of the data query method based on visualization rendering as described in any one of claims 1-7.
Citation Information
Cited By
An interactive system and method for visualizing the thinking analysis process of an artificial intelligence large model search engine
CN122285741A