A data model drilling method, system, terminal and medium
By constructing a forest data model, the power system data structure is proactively extracted from user behavior, solving the problem of passive data drilling in existing technologies and realizing automated and rapid data drilling and analysis.
Patent Information
- Application Number
- CN202410514412.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-26
- Publication Date
- 2026-11-24
- Estimated Expiration
- 2044-04-26
AI Technical Summary
Existing data drilling methods for power systems can only passively collect query nodes submitted by clients and cannot proactively generate the required data model based on user behavior.
By extracting the correlation between user behavior and behavior results, a multi-branch tree is constructed and grafted, deduplicated, and merged to form a forest data model. The forest structure algorithm is then used to generate a forest model of user behavior, enabling proactive data drilling and synchronization.
It enables the automatic generation of drill-down models based on user behavior, quickly generates report results, ensures the accuracy and flexibility of data mining, and reduces the workload of manual development.
Smart Images

Figure CN118503239B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to, and more specifically to, a data model drilling method, system, terminal, and medium. Background Technology
[0002] Currently, in power systems based on massive amounts of data, in order to improve the robustness of the system, it is usually necessary to perform data-level governance, that is, to achieve data mining, analysis and calculation by drilling down the parameters of the data.
[0003] Background technical document: CN112039989A discloses a data drill-down method, a proxy server, a service invocation system, and a medium. In the method, the proxy server receives a JSON string sent by the requesting client; obtains the name and keyword starting index of the input parameters corresponding to the JSON string, and saves the name and keyword starting index as metadata corresponding to the JSON string; serializes the JSON string to obtain a JSON-formatted data packet; when the data drill-down function is triggered, drills down the target data according to the metadata and the data packet.
[0004] The systems in the background technology can only passively receive query nodes submitted by clients and extract the data structures needed for drilling down from existing models in the metadata management system.
[0005] Therefore, there is an urgent need for a data model drilling method, system, terminal, and medium that proactively drills down to the user's data based on user behavior. Summary of the Invention
[0006] To address the shortcomings of existing technologies, this invention provides a data model drill-down method, system, terminal, and medium. The method extracts user behavior and intelligent reports from the power system, interprets and analyzes user behavior and data models to form a corresponding drill-down model, and synchronizes it with information from the metadata management system. Through a forest structure algorithm, a forest model of user behavior is generated, reflecting the data content of each step of the final data, calculation process, and raw data.
[0007] The present invention adopts the following technical solution.
[0008] The first aspect of this invention relates to a data model drill-down method, the method comprising the following steps: extracting the correlation between user behavior and behavior results; using the behavior results as the root node, parsing the user behavior, and constructing a multi-branch tree on the root node based on the parsing process; grafting, deduplicating, and merging multiple multi-branch trees to obtain a forest data model; and using the forest data model to realize database reorganization or rapid generation of behavior results.
[0009] Preferably, extracting the correlation between user behavior and behavior results further includes: user behavior includes one or more of the following: using data reports, multidimensional data analysis, drag-and-drop data analysis, and custom SQL models; behavior results are data reports finally generated based on the user behavior.
[0010] Preferably, the user behavior is parsed using the behavior result as the root node, and a multi-branch tree is constructed on the root node based on the parsing process. This further includes: extracting keywords, identifiers, function words, logical functions, and punctuation from the user behavior; obtaining multiple data execution behaviors in the user behavior and the logical relationships between the multiple data execution behaviors using the keywords, identifiers, function words, logical functions, and punctuation; and generating a multi-branch tree of the behavior result using the multiple data execution behaviors as nodes.
[0011] Preferably, the data execution behaviors include data statistics, data calculation, data filtering, data association, and data grouping; the node types are statistics nodes, calculation nodes, filtering nodes, association nodes, and grouping nodes.
[0012] Preferably, grafting, deduplicating, and merging multiple multi-branch trees to obtain a forest data model further includes: traversing downwards from the root of the multiple multi-branch trees and determining the node type; if the node is an update node or a deletion node, then stopping the analysis; if the node is a statistical node, a calculation node, a filtering node, a correlation node, or a grouping node, then sequentially filling the node into the forest data model; obtaining the node depth through a recursive process to deduplicatize, merge, and graft sibling nodes in the multi-branch trees.
[0013] Preferably, filling nodes into the forest data model further includes: adding new nodes to the forest data model and filling the current node's name, type, attributes, parent node number, metadata attributes, and node hash value into the forest data model.
[0014] Preferably, each bottom-most node is labeled based on the node depth; when calculating the node hash value for each bottom-most node, the parent node attribute is deleted from the attribute information of the bottom-most node.
[0015] Preferably, the process involves backtracking from the lowest-level node, sending the node hash value of the lowest-level node to the upper-level node, removing the parent node attribute from the upper-level node, and merging the node hash values of the upper-level node.
[0016] Preferably, the association between the node, node hash value, tree name, arrival path parameters, and node data is constructed, and a two-dimensional array is generated; the two-dimensional array is bubble sorted based on the node hash value; if there are identical node hash values, node deduplication is performed at different levels.
[0017] Preferably, merging sibling nodes in the multi-branch tree further includes: not merging the filtered nodes; performing an overlay merging on the first and second level nodes, and performing an intersection merging on the third level and lower level nodes.
[0018] Preferably, the data execution behavior of the lowest-level node is performed on the business metadata to associate the business metadata with the lowest-level node; the business metadata associated with the upper-level nodes is recursively processed from bottom to top; the data attributes of the business metadata are extracted and written into the metadata attributes.
[0019] Preferably, a URL string is generated for each node, and based on the user's current behavior, the URL string is executed and the business metadata associated with each node is output to the front-end display module.
[0020] A second aspect of the present invention relates to a data model drill-down system utilizing the method of the first aspect of the present invention; the system includes an extraction module, a parsing module, a construction module, and a generation module; wherein, the extraction module is used to extract the correlation between user behavior and behavior results; the parsing module is used to parse the user behavior with the behavior result as the root node, and construct a multi-branch tree on the root node based on the parsing process; the construction module is used to graft, deduplicate, and merge multiple multi-branch trees to obtain a forest data model; and the generation module is used to use the forest data model to realize database reorganization or rapid generation of behavior results.
[0021] A third aspect of the present invention relates to a terminal, including a processor and a storage medium; the storage medium is used to store instructions; the processor is used to operate according to the instructions to execute the steps of the method of the first aspect of the present invention.
[0022] A fourth aspect of the present invention relates to a computer-readable storage medium having a computer program stored thereon, characterized in that the program, when executed by a processor, implements the steps of the method of the first aspect of the present invention.
[0023] The beneficial effects of this invention are as follows: Compared with the prior art, the data model drill-down method, system, terminal, and medium of this invention extract user behavior and intelligent reports from the power system, interpret and analyze user behavior and data models, form a corresponding drill-down model, and synchronize with information in the metadata management system. Through a forest structure algorithm, a forest model of user behavior is generated, reflecting the data content of each step of the final data, calculation process, and raw data. This invention proactively and automatically extracts data structures and calculation structures from customer behavior and data models, and saves them in a dedicated forest model. Then, the front-end display module proactively extracts data from the database according to the forest model, enabling customers to quickly extract the structure and data from the forest model for flexible deep drill-down.
[0024] The beneficial effects of the present invention also include:
[0025] 1. This invention enables report drill-down based on user behavior and automatically generates the necessary drill-down model according to user behavior and the intelligent reporting system's data model. The method requires no manual development or customization and can automatically generate drill-down links from statistical results, intermediate statistical processes, to the lowest-level data based on user behavior.
[0026] 2. The method uses a hash algorithm to remove and merge nodes, and adds the hash value of the lower-level node to the hash value of the higher-level node to ensure the rationality of node merging and guarantee the accuracy of the forest data model.
[0027] 3. The method associates business metadata with various user data execution behaviors and stages, ensuring the most effective, reliable, simple and economical data mining, extraction and analysis, and ensures front-end visibility through URL association. Attached Figure Description
[0028] Figure 1 This is a schematic diagram of the data drilling process of a data model drilling method according to the present invention;
[0029] Figure 2 This is a schematic diagram illustrating the generation of a forest data model in a data model drilling method according to the present invention;
[0030] Figure 3 This is a schematic diagram illustrating node information recording during the forest data model generation process in the first embodiment of a data model drilling method of the present invention;
[0031] Figure 4 This is a schematic diagram illustrating node information recording during the forest data model generation process in a second embodiment of a data model drilling method of the present invention.
[0032] Figure 5 This is a schematic diagram of a forest data model in a data model drilling method of the present invention;
[0033] Figure 6 This is a schematic diagram illustrating the association of forest data model with business metadata in a data model drilling method according to the present invention. Detailed Implementation
[0034] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of this invention. The embodiments described in this invention are merely some embodiments of this invention, and not all embodiments. Based on the spirit of this invention, all other embodiments not described in this invention obtained by those skilled in the art based on the embodiments described in this invention without creative effort should fall within the protection scope of this invention.
[0035] Figure 1 This is a schematic diagram illustrating the data drilling process of a data model drilling method according to the present invention. Figure 1 As shown, in a first aspect, the present invention relates to a data model drill-down method, the method comprising steps 1 to 4.
[0036] Step 1: Extract the correlation between user behavior and behavior results.
[0037] The method records the user data extraction and calculation behaviors and results. Specifically, it extracts the correlation between user behaviors and behavior results, including: user behaviors include one or more of the following: using data reports, multidimensional data analysis, drag-and-drop data analysis, and custom SQL models; the behavior results are the data reports finally generated based on the user behaviors.
[0038] As mentioned earlier, user behavior includes various operations performed on application business metadata, but does not include adding, deleting, or modifying the metadata itself. Instead, it refers to actions such as data analysis, screening, and reporting based on data from various sources.
[0039] The method can perform analysis of various behaviors, such as the quantity and frequency of user behaviors, to facilitate subsequent database reorganization, or to build shortcuts for the process of repeatedly extracting data based on the execution method of the behavior, ensuring the rapid generation of behavior results.
[0040] Among them, data reports refer to report design based on metadata, multidimensional analysis is based on multidimensional analysis of data, drag-and-drop analysis is to achieve data analysis through drag-and-drop operations, and custom SQL is for users to write their own SQL statements to perform data analysis.
[0041] The method can interpret user behavior syntactically and record user actions in data extraction and calculation. The behavior name can be used as the name of the result report or the name of the process node.
[0042] When recording user behavior, the model can be imported into the forest data model, which allows for better analysis and processing of user behavior.
[0043] Step 2: Using the behavior result as the root node, parse the user behavior and build a multi-branch tree on the root node based on the parsing process.
[0044] Specifically, analyzing user behavior refers to understanding user needs and usage habits by analyzing user actions and operations within the system, thereby optimizing system functionality and user experience. In database systems, user behavior is typically manifested as SQL statement operations performed on the database.
[0045] Figure 2 This is a schematic diagram illustrating the generation of a forest data model in a data model drilling method according to the present invention. Figure 2 As shown, preferably, the user behavior is parsed using the behavior result as the root node, and a multi-branch tree is constructed on the root node based on the parsing process. The method also includes: extracting keywords, identification words, function words, and logical function attention punctuation from the user behavior; obtaining multiple data execution behaviors in the user behavior and the logical relationships between the multiple data execution behaviors using keywords, identification words, function words, and logical function attention punctuation; and generating a multi-branch tree of behavior results using the multiple data execution behaviors as nodes.
[0046] To parse SQL, you can use the `parse` component of the `sqlparse` library. This component can parse, break down, layer, and format SQL statements. By parsing SQL statements, you can understand their type, operands, constraints, and other information, thus gaining a better understanding of user behavior and needs.
[0047] For example, a SELECT statement can be parsed using the parse component of the sqlparse library into information such as the SELECT statement type, the table name being queried, the fields being queried, and the query conditions, thereby better understanding the user's query requirements.
[0048] First, the method determines whether the user input is correct. If no error is detected, the user input is considered correct and usable. Then, the method extracts the data from the Parsestream, focusing on fields we prioritize, such as keywords, identifiers, functions, and logical fields like AND, NOT, and OR, as well as punctuation such as parentheses.
[0049] For the parse component of the sqlparse library, the methods can define the operation type of some user behaviors. If it is an update, deletion, or other content that does not need to be considered in this invention, then the user behavior will not be recorded. However, for data execution behaviors in this invention, they will be treated as SELECT statement types.
[0050] For example, first check node 0. If it's a select, proceed with the subsequent operations; otherwise, abort the analysis and return a protocol-unsupported response. In subsequent operations, if the command is interpretable, iterate through the Parsestream object, adding nodes and populating information in the corresponding positions of the forest data model based on the node's type, value, child nodes, and other information, according to the node's type and the position of the parent node.
[0051] Preferably, the data execution behaviors include data statistics, data calculation, data filtering, data association, and data grouping; the node types are statistics nodes, calculation nodes, filtering nodes, association nodes, and grouping nodes.
[0052] Specifically, data statistics include various statistical operations, such as executing formulas like count, sum, max, min, and average. Data calculation includes basic addition, subtraction, multiplication, and division, as well as compound calculations such as parentheses, exponentiation, and modulo. Data filtering includes conditional filtering, such as less than, greater than, equal to, and not equal to conditions. Data joining includes join, left join, and right join operations, used to link data from multiple tables. Data grouping includes grouping operations, used to group data according to certain conditions for statistical analysis and other operations.
[0053] The data model does not include sorting options because sorting operations are performed based on front-end display requirements, not on the inherent properties of the data. Therefore, sorting requirements should not be included in the node information but should be implemented by the front-end display.
[0054] Furthermore, the data model does not support combinations of only retaining the first few characters of the limit, top, and sort functions. This is because limit / top operations can lead to data incompleteness, sorting is not handled by the backend, and the combination of sorting and limit should be handled by the frontend or reporting model, which is not supported by the data model.
[0055] As mentioned earlier, embedded update or delete operations are not supported in the data model because these operations require data modification, which is not supported by the data model. These operations should be performed on the front end or back end, rather than implemented in the data model.
[0056] Nodes come in different types to handle different data actions. In a multi-way tree, methods record various information about a node, such as its name, which identifies the node. Node types include those mentioned earlier. The parent node is the node that precedes the current node in the tree. Metadata attributes represent the node's metadata properties, such as data type and data format. The node hash value is used to ensure the data integrity of the node.
[0057] Using the parameters above, a hierarchical tree structure can be constructed to describe the data processing of user behavior. Each node can be linked together through the relationship between its parent and child nodes, forming a complete data processing flow.
[0058] Step 3: Graft, deduplicate, and merge multiple multi-branch trees to obtain a forest data model.
[0059] Preferably, the process of grafting, deduplicating, and merging multiple multi-branch trees to obtain a forest data model further includes: traversing downwards from the root of multiple multi-branch trees and determining the node type; stopping the analysis if the node is an update node or a deletion node; sequentially filling the nodes into the forest data model if the node is a statistical node, a calculation node, a filtering node, a correlation node, or a grouping node; and obtaining the node depth through a recursive process to deduplicatize, merge, and graft sibling nodes in the multi-branch trees.
[0060] In this invention, the Parsestream object is traversed, and information such as the type, value, and child nodes of each node is added to the corresponding position in the forest data model based on the node's type and the position of its parent node, and the information is then populated. For each node in the Parsestream, if it has child nodes, the function is recursively called to process the child nodes and populate them into the forest data model. During the recursive function process, different levels of indentation can be established in the forest data model according to the depth of the nodes, thereby achieving logical matching between the Parsestream structure and the forest data model.
[0061] Starting from the root, traverse each level of the Parsestream class, collect information from each child node, and populate the child nodes of the forest data model.
[0062] Figure 3 This is a schematic diagram of node information recording during the forest data model generation process in the first embodiment of the data model drilling method of the present invention. Figure 4 This is a schematic diagram illustrating node information recording during the forest data model generation process in a second embodiment of a data model drilling method of the present invention. Figure 3 , Figure 4As shown, preferably, filling nodes into the forest data model further includes: adding new nodes to the forest data model and filling the current node's name, type, attributes, parent node number, metadata attributes, and node hash value into the forest data model.
[0063] As described in the full text, multiple drill-down model multi-branch trees can be obtained based on the behavior names. These models are designed for different sub-domains or different data sources, and are used for more refined data analysis and mining. All original child nodes in these drill-down models need to be saved separately for later use. These original child nodes need to be grafted onto the main drill-down model to form a union drill-down structure. This union drill-down structure can comprehensively utilize the advantages of multiple drill-down models to analyze and mine data more thoroughly. At the same time, it allows for flexible selection of the required child nodes for analysis according to specific needs, avoiding redundant modeling work.
[0064] The forest data model uses all the final output data as the root and merges all child nodes into a tree. In the forest data model, each tree point is decomposed into a drill-down model by default, meaning that data can be drilled down and analyzed through different dimensions.
[0065] In a forest data model, the relationships between the child nodes of each tree and other trees generated by the same user behavior constitute different nodes in the forest. Different trees may have the same branches, meaning that some of their data content is the same.
[0066] When a child node in a tree has all its nodes, starting from a certain node, identical to all its nodes starting from a certain child node of another child node, business operations can be merged. Merging in a forest data model yields a simpler and more accurate data model, facilitating more in-depth data analysis and statistics.
[0067] Preferably, each bottom-level node is labeled based on the node depth; when calculating the node hash value for each bottom-level node, the parent node attribute is deleted from the attribute information of the bottom-level node.
[0068] Specifically, a depth-first traversal needs to be performed on all nodes in the drill-down structure, and each bottom-level branch needs to be labeled as such. The hash value of this bottom-level branch, excluding all parameters of its parent node attributes, is calculated using a 256-bit hash to prevent collisions.
[0069] Preferably, the process involves backtracking from the lowest-level node, sending the node hash value of the lowest-level node to the upper-level node, removing the parent node attribute from the upper-level node, and merging the node hash values of the upper-level node.
[0070] Specifically, the process needs to backtrack from the lowest-level branch to the upper-level branches, merging the parameters of the upper-level node with the branch hash strings of its child nodes. This merged data is then added to the upper-level branch, and the parent node attributes of the upper-level branch are removed before participating in the hash calculation. If any child branch under the parent branch has a hash value that has not been calculated, that node is skipped in this round and waits for the next round.
[0071] Repeat the above method until the hash of all root nodes in the drill-down structure has been calculated.
[0072] Preferably, the association between nodes, node hash values, the name of the tree to which they belong, the arrival path parameters, and node data is constructed, and a two-dimensional array is generated; the two-dimensional array is bubble sorted based on the node hash values; if there are nodes with the same hash value, node deduplication is performed at different levels.
[0073] The process involves traversing all nodes and creating a two-dimensional array containing the node's hash, its parent tree name, path parameters, and node data. The method first performs a bubble sort on the two-dimensional array based on the hash values. Then, the sorted array is checked for duplicates. If a node has the same hash value, it indicates that the node with that hash value has overlapping functionality with its subordinate nodes. Referring to forest models, the hash deduplication results of the two-dimensional array are compared and deduplicated to ensure the uniqueness of nodes.
[0074] Preferably, merging sibling nodes in a multi-branch tree further includes: not merging filtered nodes; performing an overlay merging on first-level and second-level nodes, and performing an intersection merging on third-level and lower-level nodes.
[0075] In this invention, as described above, the same-level deduplication method employs merging similar items. This means performing a deduplication operation on nodes within the same level, merging nodes of the same type into one node, and adding the merged attribute to the attribute flag of the merged node for subsequent processing. The merging operation uses a union-type merging, that is, merging the attributes of two nodes into the attributes of one node to retain all information. Simultaneously, nodes are sorted according to their frequency of occurrence as a weight for subsequent processing.
[0076] Cross-level deduplication uses different methods depending on the node type. This means performing deduplication operations on nodes at different levels and using different methods for processing. Specific methods include intersection merging, coverage merging, etc., and the choice is made based on the node type and specific circumstances.
[0077] Specifically, filtering nodes control the data range; they don't need to be displayed and cannot be displayed, so they don't need to be merged. These nodes are only used to filter or select data and do not require merging. Calculation and statistical nodes need to display the data from the next level for sorting based on the frequency of occurrence, thus increasing their weight in the tree hierarchy. These nodes need to display the data from the next level for calculation and statistics, and also need to be sorted based on the frequency of their occurrence.
[0078] First-level and second-level nodes are called high-level nodes, which usually originate from the final calculation, so the merging rule adopts a covering set merge. High-level nodes are generally the summary of the final results, so a covering merge is used, that is, the attributes of multiple nodes are merged into the attributes of a single node to retain all information.
[0079] The bottom-level nodes (third level and below) originate from the computation process. The data used in this process is required independently by each node, so intersection-based merging is used in the lower tree levels. Bottom-level nodes are generally generated during the computation process, and each node requires independent data; therefore, intersection-based merging is used, which involves taking the intersection of the attributes of multiple nodes to retain all information.
[0080] As described above, the result of deduplication and merging similar items is used to set the hash reference of the duplicate item to a hash string in the same two-dimensional array, and the hash references of its subsequent nodes are also set to the corresponding node's hash string. Setting the hash references of duplicate nodes to a hash string in the same two-dimensional array facilitates subsequent searching and processing. Simultaneously, the child nodes of the node to be merged are also set to the corresponding node's hash string to preserve all information. The result of merging similar items is referenced in the original child nodes. After merging similar items, the result needs to be referenced in the original child nodes for subsequent processing and display.
[0081] After deduplication and merging, the final drill-down model can be output to the next step for further processing and display.
[0082] Step 4: Utilize forest data models to achieve rapid generation of database reorganization or behavioral results.
[0083] Figure 5 This is a schematic diagram of a forest data model in a data model drilling method of the present invention. Figure 6 This is a schematic diagram illustrating the association of business metadata with a forest data model in a data model drill-down method according to the present invention. Figure 5 , Figure 6 As shown, preferably, the data execution behavior of the lowest-level node is performed on the business metadata to associate the business metadata with the lowest-level node; the business metadata associated with the upper-level nodes is recursively processed from bottom to top; the data attributes of the business metadata are extracted and written into the metadata attributes.
[0084] In building a drill-down model, relevant information needs to be extracted from business metadata to locate existing nodes in technical metadata. Simultaneously, the business metadata needs to be connected to the lowest branch of the drill-down model to enable data drilling during data mining and analysis. Furthermore, metadata attributes need to be written into the drill-down model's attribute parameters according to lineage to ensure correct data analysis and mining in subsequent data processing. This process requires meticulous planning and design to ensure the reliability and accuracy of the drill-down model.
[0085] During metadata management, some nodes may fail to match with business metadata. In such cases, the intelligent reporting system's data model is extracted, and matching is attempted against this model. The intelligent reporting system's data model is a model used to generate reports and analyze data, typically containing relationships between multiple data sources and tables. By analyzing and matching the intelligent reporting system's data model, data tables and fields that match nodes in the data warehouse can be found. This process requires precise matching and analysis to ensure the reliability and accuracy of the data in the data warehouse. Simultaneously, it's crucial to be aware of the differences between the intelligent reporting system's data model and the data model in the data warehouse to allow for appropriate adjustments and optimizations.
[0086] In data warehouse construction, some upper-level nodes of the drill-down model may not yet have nodes that match the data model of the metadata management or intelligent reporting system. In this case, data can be displayed through a web page. Specifically, the name and attributes of the lower-level nodes can be combined with the node type and used as the name and attributes of the upper-level nodes. For example, if the name of the lower-level node is "Sales Revenue" and the attribute is "Statistics", then the name of the upper-level node can be named "Sales Revenue Statistics", and the attribute can also be set to "Statistics". The advantage of doing this is that it can quickly display data. However, it should be noted that this method is not the most ideal data management approach. Therefore, all nodes should be matched with the data model of the metadata management or intelligent reporting system as much as possible to ensure the accuracy and reliability of the data.
[0087] If there are no matching nodes among the processed nodes, they will be considered as data model candidates. In the front-end display module, nodes will be marked according to their frequency of occurrence, and users can decide whether to enter the metadata management system or the model management system.
[0088] Preferably, a URL string is generated for each node, and based on the user's current behavior, the URL string is executed and the business metadata associated with each node is output to the front-end display module.
[0089] The system iterates through the attributes of the forest data model, generating URL strings for each node. These URL strings are identified by hash characters. Using the currently displayed node as the master node and based on the forest data model, the system extracts the URLs of the current node's parent and child nodes. If the current node is already the root node or the lowest-level branch, it is left blank and not displayed, then submitted to the front-end display module. The front-end module provides the user with the option to drill up one level or down one level.
[0090] A second aspect of the present invention relates to a data model drill-down system utilizing the method of the first aspect of the present invention; the system includes an extraction module, a parsing module, a construction module, and a generation module; wherein, the extraction module is used to extract the correlation between user behavior and behavior results; the parsing module is used to parse user behavior with behavior results as the root node, and construct a multi-branch tree on the root node based on the parsing process; the construction module is used to graft, deduplicate, and merge multiple multi-branch trees to obtain a forest data model; and the generation module is used to use the forest data model to realize database reorganization or rapid generation of behavior results.
[0091] The extraction module interprets and analyzes the report generation process and user-input commands. The parsing module generates a drill-down model for each result, containing behavioral interpretations, and defines the result set as a forest data model. The construction module merges multiple results generated by user behavior into a forest, performs cross-referencing, deduplication, and merging of the structure to generate a drill-down model structure for drilling. Furthermore, the generation module is responsible for associating the drill-down model with the metadata management system, annotating the association process structure, extracting data from the drill-down model, and merging the data to display drill-down links at each level.
[0092] A third aspect of the present invention relates to a terminal, including a processor and a storage medium; the storage medium is used to store instructions; the processor is used to perform operations according to the instructions to execute the steps of the method in the first aspect of the present invention.
[0093] A fourth aspect of the present invention relates to a computer-readable storage medium having a computer program stored thereon, characterized in that the program, when executed by a processor, implements the steps of the method in the first aspect of the present invention.
[0094] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the protection scope of the claims of the present invention.
Claims
1. A data model drill-down method, characterized in that, The method includes the following steps: Extract the correlation between user behavior and behavior results; Using the behavior result as the root node, the user behavior is parsed, and a multi-branch tree is constructed on the root node based on the parsing process; Grafting, deduplication, and merging multiple multi-branch trees to obtain a forest data model includes: Traverse downwards from the roots of the multiple multi-way trees and determine the node type; if the node is an update node or a delete node, stop the analysis; if the node is a statistical node, calculation node, filtering node, association node, or grouping node, fill the node into the forest data model in sequence; add a new node to the forest data model and fill the current node's name, type, attributes, parent node number, metadata attributes, and node hash value into the forest data model; The node depth is obtained through a recursive process to deduplicate, merge, and graft sibling nodes in the multi-way tree; each bottom-level node is labeled based on the node depth; when calculating the node hash value for each bottom-level node, the parent node attribute is deleted from the attribute information of the bottom-level node. Starting from the bottommost node, backtrack backwards, send the node hash value of the bottommost node to the upper node, remove the parent node attribute from the upper node, and merge and calculate the node hash value of the upper node. Construct the relationships between the nodes, node hash values, tree names, arrival path parameters, and node data, and generate a two-dimensional array; The two-dimensional array is bubble sorted based on the node hash value; if there are nodes with the same hash value, node deduplication is performed at different levels. Merging sibling nodes in the multi-way tree also includes: The filter nodes are not merged; a covering merge is performed on the first and second layer nodes, and an intersection merge is performed on the third and lower layer nodes. The forest data model is used to rapidly generate database restructuring or behavioral results, including: The data execution behavior of the lowest-level node is performed on the business metadata to associate the business metadata with the lowest-level node; the data execution behavior includes data statistics, data calculation, data filtering, data association, and data grouping; The business metadata associated with the upper-level nodes is recursively assigned from bottom to top. Extract the data attributes of the business metadata and write them into the metadata attributes; A URL string is generated for each node. Based on the user's current behavior, the URL string is executed and the business metadata associated with each node is output to the front-end display module.
2. The data model drill-down method according to claim 1, characterized in that: The extraction of the correlation between user behavior and behavior results also includes: The user behavior includes one or more of the following: using data reports, multidimensional data analysis, drag-and-drop data analysis, and custom SQL models; The behavioral result is a data report generated based on the user's behavior.
3. The data model drill-down method according to claim 1, characterized in that: The step of using the behavior result as the root node to parse the user behavior and constructing a multi-branch tree on the root node based on the parsing process further includes: Extract keywords, identifiers, function words, logical functions, and punctuation from the user behavior; Using the keywords, identification words, function words, and logical function focus punctuation marks, multiple data execution behaviors in the user behavior and the logical relationships between the multiple data execution behaviors are obtained; Using the multiple data execution behaviors as nodes, a multi-branch tree of the behavior results is generated.
4. The data model drill-down method according to claim 3, characterized in that: The data execution behaviors include data statistics, data calculation, data filtering, data association, and data grouping; The node types are statistical nodes, calculation nodes, filtering nodes, association nodes, and grouping nodes.
5. A data model drilling system utilizing the method of any one of claims 1; characterized in that: The system includes an extraction module, a parsing module, a construction module, and a generation module; wherein, The extraction module is used to extract the correlation between user behavior and behavior results; The parsing module is used to parse the user behavior with the behavior result as the root node, and to construct a multi-branch tree on the root node based on the parsing process. The construction module is used to graft, deduplicatize, and merge multiple multi-branch trees to obtain a forest data model; The generation module is used to rapidly generate database reorganization or behavioral results using the forest data model.
6. A terminal, comprising a processor and a storage medium; characterized in that: The storage medium is used to store instructions; The processor is configured to operate according to the instructions to perform the steps of the method according to any one of claims 1-4.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the program implements the steps of the method according to any one of claims 1-4.
Citation Information
Patent Citations
Data drilling method, proxy server, service calling system and medium
CN112039989A
Data table association analysis method and device, equipment and storage medium
CN113268485A
Data blood relationship analysis method and device based on metadata acquisition and electronic equipment
CN116431668A
Relational database drill-down convention and reporting tool
US6993533B1
