Model tree generation method and device, equipment and storage medium

CN122964075APending Publication Date: 2026-10-23BEIJING PACTERA JINXIN TECH LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611424364.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-14
Publication Date
2026-10-23

AI Technical Summary

Technical Problem

[0003]本申请的主要目的在于提供一种模型树生成方法、装置、设备及存储介质,旨在解决在数据建模过程中,模型树无法适配不同建模上下文动态生成,维护复杂度高且场景适配灵活性不足的技术问题

Benefits of technology

在本申请中,公开了响应于用户会话信息,基于用户会话信息确定建模上下文信息和模型结构信息,对建模上下文信息进行层级解析,获得模型组件的位置信息,并基于位置信息构建模型目录树,基于模型结构信息和建模上下文信息,对模型组件进行层级组装,获得模型结构树,根据模型目录树和模型结构树生成模型树,模型树用于数据资产平台的层级化组织管理和结构化检索导航;由于本申请通过用户会话信息确定建模上下文和模型结构信息,分别构建外层目录树和内层结构树并组合生成解耦式动态模型树,实现目录层级独立调整和组件灵活配置,降低维护复杂度,提升不同建模场景的适配灵活性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122964075A_ABST
    Figure CN122964075A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of computer data processing, and discloses a model tree generation method, device and equipment and a storage medium. The method comprises the following steps: in response to user session information, determining modeling context information and model structure information based on the user session information, performing hierarchical analysis on the modeling context information, obtaining position information of a model component, constructing a model directory tree based on the position information, performing hierarchical assembly on the model component based on the model structure information and the modeling context information, obtaining a model structure tree, and generating a model tree according to the model directory tree and the model structure tree. Since the modeling context and the model structure information are determined based on the user session information, an outer directory tree and an inner structure tree are respectively constructed and combined to generate a decoupled dynamic model tree, the directory level is independently adjusted, the component is flexibly configured, the maintenance complexity is reduced, and the adaptive flexibility of different modeling scenes is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer data processing, and in particular to a method, apparatus, device and storage medium for generating model trees. Background Technology

[0002] In the data modeling process, traditional model trees adopt a rigid architecture that integrates directory hierarchy with internal components. Adjustments to the directory will directly affect the internal component structure of the model. The same architecture cannot adapt to different modeling contexts and dynamically generate, resulting in high maintenance complexity and insufficient flexibility in scene adaptation. Summary of the Invention

[0003] The main purpose of this application is to provide a model tree generation method, apparatus, device and storage medium, which aims to solve the technical problems that model trees cannot be dynamically generated to adapt to different modeling contexts during the data modeling process, resulting in high maintenance complexity and insufficient flexibility in scene adaptation.

[0004] To achieve the above objectives, this application provides a model tree generation method, the model tree generation method comprising: In response to user session information, modeling context information and model structure information are determined based on the user session information; The modeling context information is parsed hierarchically to obtain the location information of the model components, and a model directory tree is constructed based on the location information; Based on the model structure information and the modeling context information, the model components are hierarchically assembled to obtain the model structure tree; A model tree is generated based on the model directory tree and the model structure tree. The model tree is used for hierarchical organization and management and structured retrieval navigation of the data asset platform.

[0005] Optionally, the step of hierarchically assembling the model components based on the model structure information and the modeling context information to obtain a model structure tree includes: The model structure information is analyzed to obtain the hierarchical arrangement basis of the model components; Data matching is performed on the model components based on the modeling context information to obtain model component data; The model component data is recursively assembled according to the hierarchical arrangement criteria to obtain the model structure tree.

[0006] Optionally, the recursive assembly of the model component data according to the hierarchical arrangement to obtain the model structure tree includes: The model structure information is traversed, and the traversed level information is taken as the current level; The configuration information of the current level is determined based on the hierarchical arrangement criteria; The model component data is filtered according to conditions to obtain the data at the current level; Based on the hierarchical arrangement criteria and the configuration information of the current level, the data of the current level is configured as the content of the child nodes of the current level; After traversal is complete, a model structure tree is generated based on the content of the child nodes at each level.

[0007] Optionally, the step of hierarchically parsing the modeling context information to obtain the location information of the model components, and constructing a model directory tree based on the location information, includes: The modeling context information is parsed based on the preset directory structure configuration information to obtain the hierarchical component types; Determine the location information of the model components based on the hierarchical component type; Template matching is performed based on the location information of the model components to obtain the construction order of the model components; A model directory tree is constructed based on the construction order of the model components.

[0008] Optionally, before parsing the modeling context information based on the configuration information of the preset directory structure to obtain the hierarchical component type, the method further includes: Based on the modeling context information, the organization resource hierarchy is matched to obtain the matching result. If the matching result matches the directory structure configuration of the corresponding level, then the directory structure configuration of the corresponding level is parsed to obtain candidate directory structure information; The candidate directory structure information is structured and regularized to obtain the preset directory structure configuration information.

[0009] Optionally, if the matching result matches a directory structure configuration at the corresponding level, then after parsing the directory structure configuration at the corresponding level to obtain candidate directory structure information, the method further includes: If the matching result does not match the directory structure configuration of the corresponding level, the default directory structure information will be used as the candidate directory structure information.

[0010] Optionally, the step of generating a model tree based on the model directory tree and the model structure tree, wherein the model tree is used for hierarchical organization and management and structured retrieval navigation of the data asset platform, includes: The model directory tree and the model structure tree are combined to obtain the initial model tree; In response to a node configuration instruction, the target node type is determined based on the node configuration instruction; Based on the target node type, field constraints are configured to obtain the child node data of the target node; The initial model tree is updated based on the child node data to obtain the model tree.

[0011] Furthermore, to achieve the above objectives, this application also proposes a model tree generation apparatus, which includes: The session parsing module is used to determine modeling context information and model structure information based on user session information in response to the user session information. The directory building module is used to perform hierarchical parsing of the modeling context information, obtain the location information of the model components, and build a model directory tree based on the location information; The component assembly module is used to hierarchically assemble the model components based on the model structure information and the modeling context information to obtain the model structure tree. The model generation module is used to generate a model tree based on the model directory tree and the model structure tree. The model tree is used for hierarchical organization and management and structured retrieval navigation of the data asset platform.

[0012] In addition, to achieve the above objectives, this application also proposes a model tree generation device, which includes a memory, a processor, and a model tree generation program stored in the memory and executable on the processor. The model tree generation program is configured to implement the model tree generation method described above.

[0013] In addition, to achieve the above objectives, this application also proposes a storage medium storing a model tree generation program, which, when executed by a processor, implements the model tree generation method as described above.

[0014] One or more technical solutions proposed in this application have at least the following technical effects: This application discloses a method that responds to user session information, determines modeling context information and model structure information based on the user session information, performs hierarchical parsing of the modeling context information to obtain the location information of model components, constructs a model directory tree based on the location information, and assembles the model components hierarchically based on the model structure information and modeling context information to obtain a model structure tree. A model tree is then generated based on the model directory tree and the model structure tree. This model tree is used for hierarchical organization and structured retrieval navigation of a data asset platform. Because this application determines the modeling context and model structure information through user session information, constructs an outer directory tree and an inner structure tree respectively, and combines them to generate a decoupled dynamic model tree, it enables independent adjustment of the directory hierarchy and flexible configuration of components, reducing maintenance complexity and improving adaptability to different modeling scenarios. Attached Figure Description

[0015] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0016] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0017] Figure 1 This is a flowchart illustrating the first embodiment of the model tree generation method of this application; Figure 2 This is a flowchart illustrating the second embodiment of the model tree generation method of this application; Figure 3 This is a flowchart illustrating the third embodiment of the model tree generation method of this application; Figure 4 This is a flowchart illustrating the fourth embodiment of the model tree generation method of this application; Figure 5 This is a schematic diagram of the module structure of the model tree generation device according to an embodiment of this application; Figure 6 This is a schematic diagram of the device structure of the hardware operating environment involved in the model tree generation method in this application embodiment.

[0018] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0019] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.

[0020] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.

[0021] This application provides a method for generating a model tree, referring to... Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the model tree generation method of this application.

[0022] In the first embodiment, the model tree generation method includes: Step S10: In response to user session information, determine modeling context information and model structure information based on the user session information.

[0023] It should be noted that the execution subject of this embodiment can be a model tree generation device with data processing, network communication and program running functions, such as a server, computer, or other electronic devices that can achieve the same or similar functions. This embodiment does not limit this.

[0024] It should be understood that user session information can be interaction data generated by the user during the current operation (e.g., current user identifier, platform identifier, tenant identifier, project identifier, model identifier of the current operation, model type, model branch, model version, etc.). Modeling context information can be a set of modeling environment parameters. Model structure information can be configuration information on how the internal components of the model are organized.

[0025] In specific implementations, for example, a session token is extracted from the user session information, the session token is parsed to obtain the user identifier, tenant identifier, project identifier, model identifier, model type, model branch, and model version, and this data is combined into modeling context information. At the same time, the pre-set model structure configuration table is queried based on the model identifier and model version to read the corresponding model structure information.

[0026] Step S20: Perform hierarchical parsing of the modeling context information to obtain the location information of the model components, and construct a model directory tree based on the location information.

[0027] It should be understood that the location information of a model component can be its hierarchical position and parent-child relationship within the model directory tree. The model directory tree can be a tree structure that reflects the hierarchical organization of the outer directory.

[0028] In the specific implementation, for example, the current effective directory structure configuration is traversed, the node definition of each level in the directory structure configuration is parsed to obtain the corresponding directory type and query conditions, the node data of that level is filtered from the modeling context information and model component set according to the query conditions, the parent node identifier and sort value of each node are recorded, and after all levels of filtering are completed, the model directory tree is constructed at once according to the parent node identifier and sort value of each node.

[0029] Step S30: Based on the model structure information and the modeling context information, perform hierarchical assembly of the model components to obtain the model structure tree.

[0030] It should be understood that model components can be the basic units that constitute the internal logic of the model (e.g., entities, attributes, relationships, metrics, or calculation rules). The model structure tree can be a tree-like structure that expresses the hierarchical arrangement and relationships of the internal components of the model (e.g., an inner architecture composed of entity nodes, attribute nodes, and relationship nodes in a recursive nesting manner).

[0031] In practical implementation, for example, based on the component type order defined in the model structure information, the corresponding component data is queried one by one to obtain multiple component sets. The component data in each component set is grouped according to the grouping dimension specified in the model structure information to obtain the grouping results. Tree nodes at each level are generated based on the grouping results, and the tree nodes at each level are connected according to the component type order to form the model structure tree.

[0032] Step S40: Generate a model tree based on the model directory tree and the model structure tree. The model tree is used for hierarchical organization and management and structured retrieval navigation of the data asset platform.

[0033] It should be understood that a model tree can be a complete tree-like data structure composed of an outer directory structure and an inner component structure.

[0034] In a specific implementation, for example, when building the model directory tree, a subtree mounting position is reserved for each model node or branch node. When it is detected that the user expands the model node or branch node, the model structure tree corresponding to the model is dynamically obtained, and the model structure tree is filled into the reserved subtree mounting position to generate a complete model tree.

[0035] This embodiment determines the modeling context and model structure information through user session information, constructs an outer directory tree and an inner structure tree respectively, and combines them to generate a decoupled dynamic model tree. This enables independent adjustment of the directory hierarchy and flexible configuration of components, reduces maintenance complexity, and improves the adaptability and flexibility of different modeling scenarios.

[0036] Reference Figure 2 , Figure 2 This is a flowchart illustrating the second embodiment of the model tree generation method of this application, based on the above. Figure 1 The first embodiment shown is followed by a second embodiment of the model tree generation method of this application.

[0037] In the second embodiment, step S30 includes: Step S301: Perform structural analysis on the model structure information to obtain the hierarchical arrangement basis of the model components.

[0038] It should be understood that the hierarchical arrangement can be based on a set of rules that describe the hierarchical relationship and order of model components (e.g., component type level, parent-child hierarchy number, or dependency chain between components).

[0039] In specific implementations, for example, the obtained model structure information (e.g., JSON, XML files or database metadata) is parsed syntactically and semantically to extract the tag nesting relationship, foreign key reference fields or specific hierarchical identification attributes, and then transformed into a hierarchical arrangement basis (e.g., adjacency list or node mapping dictionary) to guide the subsequent tree construction.

[0040] Step S302: Perform data matching on the model components according to the modeling context information to obtain model component data.

[0041] It should be understood that model component data can be specific instantiation information of the components in the current modeling scenario (e.g., the component's unique identifier, business name, field attributes, data type, unit of measurement, and validation rules, etc.).

[0042] In specific implementations, for example, the business scenario identifier, data version number, or permission control scope contained in the modeling context information can be extracted as filtering conditions. The model components that match the current scenario can be extracted and assigned corresponding business attribute values, thereby generating a complete model component data object.

[0043] Step S303: Recursively assemble the model component data according to the hierarchical arrangement criteria to obtain the model structure tree.

[0044] In the specific implementation, for example, the root node data at the top level is located from all model component data based on the hierarchical arrangement, and a pre-defined recursive assembly function is called from the root node as the entry point. During each level of recursion, all child nodes corresponding to the current node are searched according to the hierarchical arrangement, converted into tree nodes, and attached to the current node's child node list. For each newly generated child node, the search and attachment operations continue downwards until a leaf component without child nodes is reached. The components are then assembled layer by layer from top to bottom to generate a model structure tree with complete parent-child nesting relationships.

[0045] Furthermore, to ensure the orderly and controllable assembly process of components, accurately complete the node mounting of each layer, improve the accuracy of model structure tree generation, and guarantee the accuracy and clarity of the hierarchical relationships of multi-level components, step S303 includes: traversing the model structure information and taking the traversed layer information as the current layer; determining the configuration information of the current layer based on the layer arrangement criteria; filtering the model component data according to conditions to obtain the current layer data; configuring the current layer data as the child node content of the current layer based on the layer arrangement criteria and the current layer configuration information; and generating a model structure tree based on the child node content of each layer after traversal.

[0046] It should be understood that hierarchical information can be metadata tags (e.g., hierarchy number, type label, or nesting depth value) used in model structure information to identify the abstraction level or logical grouping of a component. The current hierarchy can be the specific abstraction level or logical grouping being processed during traversal (e.g., the entity layer or metric currently being processed). Configuration information can be pre-defined assembly rules and constraint parameters for the current hierarchy (e.g., the types of child nodes allowed to be attached to the current hierarchy, sorting rules, required field validation conditions, or display name templates). Current hierarchy data can be a collection of specific component instances belonging to the current hierarchy, filtered from the model component data (e.g., a list of all component objects of type dimensional). Child node content can be structured data units formatted according to configuration information and ready to be attached to the current hierarchy node (e.g., an array of child node objects or a nested tree fragment after field mapping and sorting).

[0047] In the specific implementation, for example, the model structure information is traversed in an ordered manner according to a predefined hierarchical order (e.g., from top to bottom). Upon entering each level, the corresponding level information is extracted as the current level. Then, the configuration items matching the current level are queried in the hierarchical arrangement criteria to obtain the level's specific configuration information. Next, using the type identifier or belonging path of the current level as a filtering condition, component instances belonging to the current level are selected from the full model component data to obtain the current level data. Then, based on the parent-child association rules in the hierarchical arrangement criteria and the current level's configuration information (e.g., sorting fields, naming conventions), the current level data is converted into child node content that conforms to the parent node interface requirements and temporarily stored in the current level's node container. After all levels have been traversed, the child node content in each level container is linked level by level according to the hierarchical relationships, generating a complete and clearly hierarchical model structure tree.

[0048] This embodiment analyzes the model structure information to clarify the hierarchical arrangement of model components. It then selects the corresponding valid model component data by matching the modeling context and recursively assembles the components according to the hierarchical arrangement. This allows the inner model structure to accurately adapt to the current usage scenario, improves the accuracy of structure assembly, avoids redundant components, and ensures the hierarchical rationality and scenario adaptability of the model structure tree.

[0049] Reference Figure 3 , Figure 3 This is a flowchart illustrating the third embodiment of the model tree generation method of this application. Based on the above embodiments, a third embodiment of the model tree generation method of this application is proposed.

[0050] In the third embodiment, step S20 includes: Step S201: Parse the modeling context information according to the preset directory structure configuration information to obtain the hierarchical component type.

[0051] It should be understood that the preset directory structure configuration information can be pre-set configuration data for the outer directory hierarchy of the model. The hierarchical component type can be the component category identifier corresponding to a certain level in the directory structure (e.g., custom directory, system, model name, model branch, etc.).

[0052] In specific implementations, for example, the hierarchical rule template defined in the preset directory structure configuration information is read, and parameters such as business scenario identifier and organizational unit code in the modeling context information are substituted into the template for matching and parsing. The applicable directory hierarchy and corresponding component type enumeration values ​​in the current scenario are identified, and an ordered list of hierarchical component types is obtained.

[0053] Step S202: Determine the position information of the model components based on the hierarchical component type.

[0054] In the specific implementation, for example, the obtained list of hierarchical component types is traversed. For each type, the component instance identifier and its belonging path are extracted from the modeling context information or the associated metadata source. Then, according to the hierarchical nesting rules defined in the preset directory structure configuration information, each component instance is mapped to a specific directory level node, generating a set of location information containing the component identifier, its level number, and parent reference relationship.

[0055] Step S203: Perform template matching based on the position information of the model components to obtain the construction order of the model components.

[0056] It should be understood that the build order can be the order in which model components should be processed during the creation of the directory tree.

[0057] In the specific implementation, for example, the hierarchical number and parent reference relationship in the location information are compared with a pre-defined directory building template, which defines the standard processing flow under different hierarchical combinations. By matching the successful location pattern, the corresponding build instruction sequence is extracted. The instruction sequence clarifies the creation time, dependency preconditions, and sibling sorting keys of each component, thus obtaining a strictly ordered build sequence.

[0058] Step S204: Construct a model directory tree based on the construction order of the model components.

[0059] In the specific implementation, for example, the location information of the model components to be processed is retrieved sequentially according to the construction order. First, it is checked whether the parent node already exists in the current directory tree. If it does not exist, the missing ancestor node is created by backtracking. After confirming that the parent node is ready, a new directory node is created based on the hierarchical identifier and component attributes in the location information, and it is attached as a child node under the corresponding parent node. At the same time, the relative positions of sibling nodes are adjusted according to the sorting rules specified in the construction order. The above process is repeated until all components are processed, generating a complete and hierarchically compliant model directory tree.

[0060] Furthermore, to make the directory structure configuration more suitable for the current usage scenario and improve the accuracy and practical applicability of configuration matching, before S201, the method further includes: performing configuration level matching based on the organization resource hierarchy of the modeling context information to obtain matching results; if the matching result matches the directory structure configuration of the corresponding level, then performing data parsing on the directory structure configuration of the corresponding level to obtain candidate directory structure information; and performing structured regularization on the candidate directory structure information to obtain preset directory structure configuration information.

[0061] It should be understood that organizational resource hierarchy can be identifier data indicating the position of a user's organizational structure or business unit within the overall resource system (e.g., a three-level code for company-department-team, a business line-product line-project group path, or a tenant-space-project nested structure). Matching results can be the output of a judgment obtained by comparing the organizational resource hierarchy with pre-stored directory structure configurations (e.g., status indicators such as matching a second-level configuration, no matching, or partial matching requiring downgrade processing). Directory structure configuration can be predefined directory system specification data for a specific organizational resource hierarchy (e.g., configuration records for directory depth, node type whitelists, naming rules, and inheritance strategies). Candidate directory structure information can be the original directory configuration data determined by the matching or rollback mechanism and awaiting further processing.

[0062] In the specific implementation, for example, the organization resource level field (e.g., "dept_level=3") is extracted from the modeling context information. The directory structure configuration entries stored hierarchically in the configuration library are traversed, and exact or fuzzy matching algorithms are executed. If a completely matching configuration entry is found, it is marked as a successful match, and the complete configuration content is read as candidate directory structure information. Then, the candidate directory structure information undergoes structured regularization operations such as field validation, format standardization, and missing value completion to generate the preset directory structure configuration information.

[0063] Furthermore, to avoid directory tree construction failure due to missing configurations, ensure the stability of the directory structure configuration acquisition process, and improve the fault tolerance and multi-scenario adaptability of the method, if the matching result matches the directory structure configuration of the corresponding level, then after parsing the directory structure configuration of the corresponding level to obtain candidate directory structure information, the method further includes: if the matching result does not match the directory structure configuration of the corresponding level, then the default directory structure information is used as the candidate directory structure information.

[0064] It should be understood that the default directory structure information can be a generic directory template that is automatically enabled when no specific configuration at any level can be matched, or a minimum feasible directory framework that is applicable to all undefined scenarios.

[0065] In the specific implementation, for example, when executing the hierarchical matching logic, a conditional branch is set. If the matching result is that no directory structure configuration for the corresponding level is matched, predefined default directory structure information is loaded from the system's built-in default configuration storage area and assigned to the candidate directory structure information variable. The default information has been pre-validated to ensure field integrity and syntax compliance, and can enter the subsequent structured regularization process, thereby avoiding the interruption of the entire directory tree construction due to missing configurations and ensuring the stable operation of the method in unfamiliar organizational hierarchies or newly integrated scenarios.

[0066] This embodiment parses the modeling context based on the configuration information of the preset directory structure, clarifies the hierarchical component types and the belonging positions of model components, and then determines the construction order of components through template matching. This allows the construction of the outer directory tree to better fit the organizational structure, improves the standardization and construction efficiency of the directory structure, and ensures that the model is accurately and clearly positioned in the directory system.

[0067] Reference Figure 4 , Figure 4 This is a flowchart illustrating the fourth embodiment of the model tree generation method of this application. Based on the above embodiments, the fourth embodiment of the model tree generation method of this application is proposed.

[0068] In the fourth embodiment, step S40 includes: Step S401: Combine the model directory tree and the model structure tree to obtain the initial model tree.

[0069] It should be understood that the initial model tree can be a tree structure obtained by initially splicing together the outer model directory tree and the inner model structure tree.

[0070] In the specific implementation, using the nodes of the model directory tree as the skeleton, the leaf nodes or specified mounting points are traversed. Based on the preset association key (e.g., component ID or business identifier), the corresponding subtree fragment is retrieved in the model structure tree, and the subtree fragment is inserted as a content node into the corresponding position in the directory tree. If multiple matching items exist, they are mounted sequentially according to preset priority or sorting rules to generate an initial model tree that combines directory navigation and model details.

[0071] Step S402: In response to the node configuration instruction, determine the target node type based on the node configuration instruction.

[0072] It should be understood that node configuration instructions can be operation requests issued by users through interface interaction or API calls (e.g., adding a mobile phone number field to a customer entity node, setting a calculation formula for order amount indicators, etc.). The target node type can be the node category targeted by the instruction (e.g., directory node, model node, branch node, subject domain node, schema node, tablespace node, entity node, table node, or view node).

[0073] In specific implementations, for example, receiving node configuration instructions from the front end or external system, parsing the node path, operation type, and parameter payload contained therein, combining the metadata tags of the node in the initial model tree, identifying its semantic category, and then mapping it to a predefined target node type enumeration value.

[0074] Step S403: Configure field constraints based on the target node type to obtain the child node data of the target node.

[0075] It should be understood that child node data can be a collection of child nodes that are used to attach to the target node, which can be queried according to the field constraint configuration (e.g., the field list or index list of an entity node, or the partition list or field list of a table node).

[0076] In practical implementation, for example, the system queries the pre-set field constraint template library based on the target node type to obtain the standard field set and constraint rules supported by the type. Then, it combines the custom parameters in the node configuration instructions to add, delete, modify, or override the template fields to generate child node data that meets the current business requirements.

[0077] Step S404: Update the initial model tree according to the child node data to obtain the model tree.

[0078] In the specific implementation, for example, the target node corresponding to the node configuration instruction in the initial model tree is located, the original list of child nodes is replaced or merged into the newly obtained child node data, and the validity of the tree structure is triggered (e.g., checking field naming conflicts, constraint compatibility, etc.). If the verification passes, the update is submitted; otherwise, an error message is returned. After the update is completed, the modified tree object is serialized into a new model tree instance for subsequent rendering, exporting, or persistence, thereby realizing the evolution of the model tree from a general structure to a business-customized structure.

[0079] This embodiment combines the model directory tree and the model structure tree to obtain an initial model tree, and then dynamically adjusts the child node data of the target node in response to node configuration commands to complete the update of the model tree. This enables flexible and dynamic adjustment of the model tree, improves the interactivity and configurability of the model tree, and meets the model viewing and usage needs in different scenarios.

[0080] This application also provides a model tree generation device, please refer to... Figure 5 The model tree generation device includes: The session parsing module 10 is used to determine modeling context information and model structure information based on user session information in response to user session information; The directory construction module 20 is used to perform hierarchical parsing of the modeling context information, obtain the location information of the model components, and construct a model directory tree based on the location information; The component assembly module 30 is used to perform hierarchical assembly of the model components based on the model structure information and the modeling context information to obtain a model structure tree; The model generation module 40 is used to generate a model tree based on the model directory tree and the model structure tree. The model tree is used for hierarchical organization and management and structured retrieval navigation of the data asset platform.

[0081] The model tree generation apparatus provided in this application, employing the model tree generation method described in the above embodiments, can solve the technical problem that, during data modeling, the model tree cannot be dynamically generated to adapt to different modeling contexts, resulting in high maintenance complexity and insufficient flexibility in scene adaptation. Compared with the prior art, the beneficial effects of the model tree generation apparatus provided in this application are the same as those of the model tree generation method provided in the above embodiments, and other technical features in the model tree generation apparatus are the same as those disclosed in the methods of the above embodiments, and will not be elaborated here.

[0082] This application provides a model tree generation device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the model tree generation method in Embodiment 1 above.

[0083] The following is for reference. Figure 6 The diagram illustrates a structural schematic suitable for implementing the model tree generation device of the embodiments of this application. The model tree generation device in the embodiments of this application may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), tablets, PMPs (Portable Media Players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 6 The model tree generation device shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.

[0084] like Figure 6 As shown, the model tree generation device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in ROM (Read Only Memory) 1002 or a program loaded from storage device 1003 into RAM (Random Access Memory) 1004. RAM 1004 also stores various programs and data required for the operation of the model tree generation device. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via bus 1005. Input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to I / O interface 1006: input devices 1007 including, for example, touch screens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 1008 including, for example, LCDs (Liquid Crystal Displays), speakers, vibrators, etc.; storage devices 1003 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1009. The communication device 1009 allows the model tree generation device to communicate wirelessly or wiredly with other devices to exchange data. Although the figure shows model tree generation devices with various systems, it should be understood that implementation or possession of all the systems shown is not required. More or fewer systems may be implemented alternatively.

[0085] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.

[0086] The model tree generation device provided in this application, employing the model tree generation method described in the above embodiments, can solve the technical problem that, during data modeling, the model tree cannot be dynamically generated to adapt to different modeling contexts, resulting in high maintenance complexity and insufficient flexibility in scene adaptation. Compared with the prior art, the beneficial effects of the model tree generation device provided in this application are the same as those of the model tree generation method provided in the above embodiments, and other technical features of this model tree generation device are the same as those disclosed in the previous embodiment method, and will not be repeated here.

[0087] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.

[0088] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0089] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to execute the model tree generation method in the above embodiments.

[0090] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, RAM (Random Access Memory), ROM (Read Only Memory), EPROM (Erasable Programmable Read Only Memory), or flash memory, optical fiber, CD-ROM (CD-Read Only Memory), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.

[0091] The aforementioned computer-readable storage medium may be included in the model tree generation device; or it may exist independently and not be assembled into the model tree generation device.

[0092] The aforementioned computer-readable storage medium carries one or more programs, which, when executed by the model tree generation device, cause the model tree generation device to perform the aforementioned model tree generation method.

[0093] Computer program code for performing the operations of this application can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including LAN (Local Area Network) or WAN (Wide Area Network)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0094] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0095] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.

[0096] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-described model tree generation method. This solves the technical problem that, during data modeling, the model tree cannot be dynamically generated to adapt to different modeling contexts, resulting in high maintenance complexity and insufficient flexibility in scene adaptation. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the model tree generation method provided in the above embodiments, and will not be elaborated upon here.

[0097] The above description is only a part of the embodiments of this application and does not limit the scope of this application. All equivalent structural transformations made under the technical concept of this application and using the content of this application specification and drawings, or direct / indirect applications in other related technical fields, are included within the protection scope of this application.

[0098] It should be noted that the data collection, tag management, rule setting, and push decision-making processes involved in this application are designed to work with other technical features to solve technical problems. They do not involve or support any illegal activities. Any data processing that may violate laws and regulations (such as unauthorized collection of privacy data, generation of discriminatory tags, setting unfair rules, or pushing illegal information) is not within the scope of protection of this application's technical solution. Of course, the user data in this application will be encrypted, anonymized, or de-identified before storage to ensure user data security.

Claims

1. A method for generating a model tree, characterized in that, The model tree generation method includes: In response to user session information, modeling context information and model structure information are determined based on the user session information; The modeling context information is parsed hierarchically to obtain the location information of the model components, and a model directory tree is constructed based on the location information; Based on the model structure information and the modeling context information, the model components are hierarchically assembled to obtain the model structure tree; A model tree is generated based on the model directory tree and the model structure tree. The model tree is used for hierarchical organization and management and structured retrieval navigation of the data asset platform.

2. The model tree generation method as described in claim 1, characterized in that, The step of hierarchically assembling the model components based on the model structure information and the modeling context information to obtain a model structure tree includes: The model structure information is analyzed to obtain the hierarchical arrangement basis of the model components; Data matching is performed on the model components based on the modeling context information to obtain model component data; The model component data is recursively assembled according to the hierarchical arrangement criteria to obtain the model structure tree.

3. The model tree generation method as described in claim 2, characterized in that, The recursive assembly of the model component data according to the hierarchical arrangement to obtain the model structure tree includes: The model structure information is traversed, and the traversed level information is taken as the current level; The configuration information of the current level is determined based on the hierarchical arrangement criteria; The model component data is filtered according to conditions to obtain the data at the current level; Based on the hierarchical arrangement criteria and the configuration information of the current level, the data of the current level is configured as the content of the child nodes of the current level; After traversal is complete, a model structure tree is generated based on the content of the child nodes at each level.

4. The model tree generation method according to any one of claims 1 to 3, characterized in that, The step of hierarchically parsing the modeling context information to obtain the location information of model components, and constructing a model directory tree based on the location information, includes: The modeling context information is parsed based on the preset directory structure configuration information to obtain the hierarchical component types; Determine the location information of the model components based on the hierarchical component type; Template matching is performed based on the location information of the model components to obtain the construction order of the model components; A model directory tree is constructed based on the construction order of the model components.

5. The model tree generation method as described in claim 4, characterized in that, Before parsing the modeling context information based on the configuration information of the preset directory structure to obtain the hierarchical component type, the method further includes: Based on the modeling context information, the organization resource hierarchy is matched to obtain the matching result. If the matching result matches the directory structure configuration of the corresponding level, then the directory structure configuration of the corresponding level is parsed to obtain candidate directory structure information; The candidate directory structure information is structured and regularized to obtain the preset directory structure configuration information.

6. The model tree generation method as described in claim 5, characterized in that, If the matching result matches a directory structure configuration at the corresponding level, then after parsing the directory structure configuration at the corresponding level to obtain candidate directory structure information, the process further includes: If the matching result does not match the directory structure configuration of the corresponding level, the default directory structure information will be used as the candidate directory structure information.

7. The model tree generation method according to any one of claims 1 to 3, characterized in that, The step of generating a model tree based on the model directory tree and the model structure tree, wherein the model tree is used for hierarchical organization and management and structured retrieval navigation of the data asset platform, includes: The model directory tree and the model structure tree are combined to obtain the initial model tree; In response to a node configuration instruction, the target node type is determined based on the node configuration instruction; Based on the target node type, field constraints are configured to obtain the child node data of the target node; The initial model tree is updated based on the child node data to obtain the model tree.

8. A model tree generation device, characterized in that, The model tree generation device includes: The session parsing module is used to determine modeling context information and model structure information based on user session information in response to the user session information. The directory building module is used to perform hierarchical parsing of the modeling context information, obtain the location information of the model components, and build a model directory tree based on the location information; The component assembly module is used to hierarchically assemble the model components based on the model structure information and the modeling context information to obtain the model structure tree. The model generation module is used to generate a model tree based on the model directory tree and the model structure tree. The model tree is used for hierarchical organization and management and structured retrieval navigation of the data asset platform.

9. A model tree generation device, characterized in that, The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the model tree generation method as described in any one of claims 1 to 7.

10. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the model tree generation method as described in any one of claims 1 to 7.