A state diagram-based intelligent data analysis system and method
By combining state diagram modeling with an improved liquid neural network, the problem of inconsistent analysis links in natural language data analysis is solved, and an intelligent data analysis system with strong complex analysis capabilities, high path stability, and accurate reporting is realized.
Patent Information
- Application Number
- CN202610638470.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-11
- Publication Date
- 2026-07-31
AI Technical Summary
Existing technologies struggle to maintain consistency and stability in the analysis chain during scenarios involving multiple table joins, complex filtering, and continuous reasoning in natural language data analysis. Query results are disconnected from analysis results, leading to low accuracy in report generation.
A method combining state graph modeling and improved liquid neural network is adopted to construct an initial state graph of intent nodes, evidence nodes, pattern nodes and state edges. The improved liquid neural network is used to jointly update the node state values and state edge activation values to generate the target path and realize dynamic reasoning and closed-loop update.
It improves complex analysis capabilities, path selection stability and result interpretability, generates highly accurate analysis reports, and is suitable for multi-table association and continuous analysis scenarios.
Smart Images

Figure CN122489606A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of artificial intelligence and data analysis technology, and in particular to an intelligent data analysis system and method based on state diagrams. Background Technology
[0002] As enterprise data scale continues to expand, natural language processing (NLP) data analysis technology is gradually becoming an important development direction in the field of intelligent analytics. Current technologies primarily rely on converting NLP to structured query statements, fixed statistical scripts, or business intelligence tools to complete data processing. While these methods can achieve basic queries and some statistical analysis, the overall processing flow mostly revolves around single retrieval, single generation, and static execution. It is typically driven by field matching, rule configuration, or fixed templates, lacking unified modeling of the relationships between business knowledge, table fields, logical foreign keys, query intent, and analysis results. This makes it difficult to maintain consistency and stability in the analysis chain under scenarios involving multi-table joins, complex filtering, continuous reasoning, and multi-stage analysis.
[0003] Furthermore, existing technologies typically output query results directly or call independent analysis scripts for further processing after query execution. They lack dynamic reasoning and closed-loop update mechanisms for the analysis path, cannot continuously correct node relationships, connection paths, and analysis steps based on execution results, and are difficult to uniformly associate query results, analysis results, original query intent, evidence content, and field relationships. This can easily lead to problems such as unstable path selection, insufficient complex analysis capabilities, weak interpretability of results, and low accuracy of report generation.
[0004] Therefore, how to provide an intelligent data analysis system and method based on state diagrams is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0005] One objective of this invention is to propose an intelligent data analysis system and method based on state diagrams. This invention employs a combination of state diagram modeling and an improved liquid neural network. It unifies the analysis object, indicator definitions, time ranges, filtering conditions, and output formats obtained from natural language query parsing with business knowledge, table fields, and logical foreign keys to construct an initial state diagram composed of intent nodes, evidence nodes, pattern nodes, and state edges. Based on this, the improved liquid neural network is used to jointly update node state values and state edge activation values, generating and filtering target paths. Then, the structured query statement is executed, analysis code is generated and executed, result nodes are constructed, and paths are reconstructed sequentially, ultimately outputting an analysis report. Compared to existing technologies, this invention can incorporate query intent, evidence content, field relationships, query results, and analysis results into the same state diagram for dynamic reasoning and closed-loop updates. It has advantages such as strong complex analysis capabilities, stable path selection, good result interpretability, high report generation accuracy, and applicability to multi-table joins and continuous analysis scenarios.
[0006] According to an embodiment of the present invention, an intelligent data analysis method based on a state diagram includes the following steps: S1. Receive natural language queries and historical dialogues, extract the analysis object, indicator scope, time range, filtering conditions and output format, and form a query element set; S2. Retrieve and query business knowledge, table fields, and logical foreign keys that match the feature set to form an evidence set, field set, and relationship set; S3. Construct intent nodes based on query element sets, evidence nodes based on evidence sets, pattern nodes based on field sets, and state edges based on relationship sets to form an initial state graph. S4. Input the initial state graph into the improved liquid neural network, update the node state values and state edge activation values, generate candidate paths, sort the candidate paths according to the sum of state edge activation values, retain the highest connected node sequence, and form the target path. S5. Generate and execute structured query statements according to the target path to obtain query results. Construct execution nodes according to the query results and establish state edges with the pattern nodes in the target path to form the first update state graph. S6. Input the first updated state graph into the improved liquid neural network, generate and execute analysis code according to the target path and query results, obtain analysis results, construct result nodes according to the analysis results, and establish state edges with the execution nodes to form the second updated state graph; S7. Input the second updated state graph into the improved liquid neural network, update the node state values and state edge activation values, delete state edges with decreasing activation values, reconstruct the target path, and generate an analysis report based on the reconstructed target path, query results, and analysis results.
[0007] Optionally, S1 specifically includes: S11. Perform sentence segmentation, word segmentation, synonym replacement, and unit unification on the natural language query to obtain a standardized query statement; S12. Extract the analysis object description, indicator description, time description, condition description and output description that are consistent with the theme of the normalized query statement from the historical dialogue to obtain the context statement set; S13. Perform term tagging on the standardized query statement and context statement set, extract business entity terms, indicator terms, time terms, condition terms and presentation terms to obtain a candidate term set; S14. Determine the business entity words as the analysis objects, the indicator words as the indicator scope, the time words as the time range, the condition words as the filtering conditions, and the presentation words as the output format to obtain the element itemset. S15. Perform an integrity check on the feature itemset, and add any missing feature items that exist in the context statement set to the feature itemset to form the query feature set.
[0008] Optionally, S2 specifically includes: S21. Read the analysis object, indicator scope, time range and filtering conditions from the query element set to form a search term set; S22. Retrieve business knowledge containing terms related to the analysis object and terms related to the indicator definition from the business knowledge to form a candidate set of evidence; S23. Retrieve table fields containing terms related to the analysis object, the indicator scope, the time range, and the filtering conditions to form a candidate set of fields; S24. Retrieve logical foreign keys that correspond to the field candidate set from the logical foreign keys to form a relation candidate set; S25. Delete duplicate business knowledge in the evidence candidate set, duplicate table fields in the field candidate set, and duplicate logical foreign keys in the relationship candidate set to obtain the evidence set, field set, and relationship set.
[0009] Optionally, S3 specifically includes: S31. Read the analysis object, indicator scope, time range, filtering conditions and output format from the query element set, and write the analysis object, indicator scope, time range, filtering conditions and output format into a node record to form an intent node. S32. Traverse the evidence set and write each piece of business knowledge into a node record to form an evidence node; S33. Traverse the field set and write each table field into a node record to form a schema node; S34. Compare the analysis objects and indicator definitions in the query element set with the business knowledge in the evidence set one by one. When the business knowledge contains words of analysis objects or indicator definitions, establish a state edge between the intent node and the corresponding evidence node. S35. Compare the analysis objects, indicator definitions, time ranges and filtering conditions in the query element set with the table fields in the field set item by item. When the table field contains the corresponding words, establish a state edge between the intent node and the corresponding pattern node. S36. Based on the logical foreign key relationships in the relation set, establish state edges between the corresponding schema nodes; S37. Write the intent node, evidence node, pattern node and state edge into the same graph structure to form the initial state graph.
[0010] Optionally, the improved liquid neural network includes a node embedding module, a state edge embedding module, a node state recursion module, a state edge activation recursion module, a node edge coupling bridge module, and a path scoring module. The intent nodes, evidence nodes, and pattern nodes in the initial state graph are input into the node embedding module. The node type labels and node content sequences are extracted, converted, and then concatenated in the node order to form a node feature sequence. The state edges in the initial state graph are input into the state edge embedding module. The start node label, end node label, and connection relationship label are extracted, transformed, and then concatenated in the state edge order to form a state edge feature sequence. The node feature sequence is input into the node state recursion module, which generates a time adjustment value of the same dimension as the node feature for each node, and multiplies it with the corresponding node feature dimension by dimension to form the initial node state sequence. The state edge feature sequence is input into the state edge activation recursion module, which generates time adjustment values of the same dimension as the state edge features for each edge, and multiplies them dimension by dimension with the corresponding state edge features. Then, it is concatenated with the initial state of the corresponding start node and the initial state of the end node to form a one-dimensional sequence. The values at each position of the one-dimensional sequence are weighted and accumulated to form the initial state edge activation sequence. The initial node state sequence and the initial state edge activation sequence are input into the node edge coupling bridge module, and a node edge bidirectional liquid co-evolution mechanism is introduced. The state edge activation value is written back to the node state for update, and the updated node state is written back to the state edge activation value for update, thus forming the co-evolution state edge activation sequence. The co-evolution state edge activation sequence is input into the path scoring module. The combination of state edges connected in the order of intent node, evidence node, and pattern node is extracted. The activation values in each state edge combination are accumulated edge by edge and sorted according to the accumulation results. The candidate paths are then output.
[0011] Optionally, the node-edge bidirectional liquid co-evolution mechanism specifically includes: Extract all state edge activation values connected to any target node according to the node label, and form the start activation sequence and the end activation sequence according to the start connection state edge and the end connection state edge respectively. The activation values of each state edge in the starting activation sequence and the ending activation sequence are compared with the numerical signs of the corresponding dimensions of the initial node state of the target node one by one. If the signs are the same, the original values are retained, and if the signs are opposite, they are multiplied by a fixed reduction factor. The retained state edge activation value and the reduced state edge activation value are accumulated according to the node dimension to form the initial feedback value and the termination feedback value. Then, the initial feedback value and the termination feedback value are added dimension by dimension to form the bidirectional feedback value of the target node, and written into the dimension corresponding to the initial node state of the target node to form the updated state value of the target node. Read the start node update state value and end node update state value corresponding to any target state edge according to the state edge mark, and compare the signs of the corresponding dimensions of the two values one by one. If the signs are the same, add them one by one to the activation value of the corresponding dimension of the target state edge; if the signs are opposite, subtract them one by one from the activation value of the corresponding dimension of the target state edge. Repeatedly perform state edge activation value extraction, sign comparison, reduction coefficient multiplication, and feedback writing on all nodes, and repeatedly perform node update state value reading, sign comparison, and activation value adjustment on all state edges to form a co-evolved state edge activation sequence.
[0012] Optionally, S5 specifically includes: S51. Read the pattern nodes in the target path, extract the table fields and data tables corresponding to each pattern node according to the state edge connection order, and form a field sequence and a data table sequence. S52. Read the state edges in the target path, extract the logical foreign keys between adjacent pattern nodes, and form a sequence of connection conditions. S53. Read the intent nodes in the target path, extract the analysis object, indicator scope, time range and filtering conditions, and determine the main query table, statistical fields, time fields and filtering fields; S54. Construct a structured query statement by combining the main query table, join condition sequence, statistical fields, time fields, and filter fields, and execute the structured query statement to obtain the query results; S55. Construct execution nodes based on query results, and establish state edges between execution nodes and pattern nodes in the target path to form the first update state graph.
[0013] Optionally, S6 specifically includes: S61. Input the first updated state graph into the improved liquid neural network, read the state edges between the execution node and the pattern node in the target path, extract the pattern node connected to the execution node, and form an analysis node sequence. S62. Read the returned fields and field values in the query results, and match the returned fields with the corresponding table fields of the pattern nodes in the analysis node sequence one by one to form an analysis data sequence; S63. According to the node connection order in the target path, write the field names in the analysis node sequence and the field values in the analysis data sequence into the data reading statement, field processing statement and result output statement respectively, and concatenate them in the execution order to form the analysis code; S64. Execute the analysis code, read the result name and result value output by the code, and form the analysis result; S65. Construct result nodes based on the analysis results, and establish state edges between the result nodes and the execution nodes to form a second updated state graph.
[0014] Optionally, S7 specifically includes: S71. Input the second updated state graph into the improved liquid neural network and read the state values of each node and the activation values of each state edge. S72. Perform recursive update on the state value of each node and the activation value of each state edge again, and compare the activation values of the state edges before and after the update. Delete the state edges whose activation values decrease, and keep the state edges whose activation values do not decrease. S73. Based on the connectivity of the edges in the preserved state, connect the intent node, evidence node, pattern node, execution node, and result node to reconstruct the target path; S74. Extract the returned fields and field values from the query results, as well as the result names and result values from the analysis results, in the order of the reconstructed target path to form a report data sequence; S75. Write the report data sequence into the analysis report to form an analysis report containing query results and analysis results.
[0015] An intelligent data analysis system based on a state diagram according to an embodiment of the present invention includes the following modules: The query element parsing module is used to extract the analysis object, indicator scope, time range, filtering conditions and output format, and generate a query element set; The evidence retrieval module is used to retrieve business knowledge, table fields, and logical foreign keys to generate evidence sets, field sets, and relationship sets. The state graph construction module is used to construct intent nodes, evidence nodes, pattern nodes, and state edges to generate an initial state graph. The liquid path reasoning module is used to input the initial state graph into the improved liquid neural network, update the node state values and state edge activation values, and generate candidate paths and target paths. The query execution module is used to generate and execute structured query statements, generate query results and the first update state graph; The analysis execution module is used to generate and execute analysis code, generate analysis results, and a second updated state graph. The path reconstruction and report generation module is used to update node state values and state edge activation values, reconstruct the target path, and generate an analysis report.
[0016] The beneficial effects of this invention are: This invention establishes a state graph organization mechanism centered on query elements, evidence content, table field relationships, logical foreign key relationships, execution results, and analysis results. It also introduces an improved liquid neural network into the state graph reasoning process, achieving dynamic joint modeling from natural language query to target analysis path determination. By synchronously recursively updating node state values and state edge activation values, and introducing a bidirectional liquid co-evolution mechanism in the node edge coupling bridge module, this invention can continuously filter effective connections between intent nodes, evidence nodes, and pattern nodes, suppressing unstable paths and invalid associations, and generating connections consistent with the query intent. Figure 1 The target path is determined. Compared to existing technologies that rely on single field matching, fixed rules, or static process execution, this invention significantly improves path stability, relationship organization capabilities, and query accuracy in scenarios involving complex multi-table joins, complex filtering, and continuous analysis.
[0017] This invention further achieves closed-loop processing of query execution, analysis execution, and result write-back by writing query results to execution nodes, analysis results to result nodes, and continuing recursive updates and path reconstruction on the updated state graph. By deleting edges in decreasing activation values and reconstructing target paths, this invention can continuously correct the analysis chain based on execution results, avoiding the problems of disconnected query and analysis results, non-retrospective analysis processes, and unstable report output found in existing technologies. Therefore, this invention can achieve dynamic adjustment of analysis paths, unified association between query and analysis results, and traceable interpretation of report results in natural language-driven data analysis scenarios, possessing advantages such as strong complex analysis capabilities, stable path reasoning, good result consistency, and high report accuracy. Attached Figure Description
[0018] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings: Figure 1 This is a flowchart of a state diagram-based intelligent data analysis system and method proposed in this invention. Figure 2 This is a schematic diagram of the structure of an improved liquid neural network for an intelligent data analysis system and method based on state diagrams proposed in this invention. Figure 3 This is a schematic diagram of the system structure of an intelligent data analysis system and method based on state diagrams proposed in this invention. Detailed Implementation
[0019] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.
[0020] refer to Figures 1-2 A state diagram-based intelligent data analysis method includes the following steps: S1. Receive natural language queries and historical dialogues, extract the analysis object, indicator scope, time range, filtering conditions and output format, and form a query element set; S2. Retrieve and query business knowledge, table fields, and logical foreign keys that match the feature set to form an evidence set, field set, and relationship set; S3. Construct intent nodes based on query element sets, evidence nodes based on evidence sets, pattern nodes based on field sets, and state edges based on relationship sets to form an initial state graph. S4. Input the initial state graph into the improved liquid neural network, update the node state values and state edge activation values, generate candidate paths, sort the candidate paths according to the sum of state edge activation values, retain the highest connected node sequence, and form the target path. S5. Generate and execute structured query statements according to the target path to obtain query results. Construct execution nodes according to the query results and establish state edges with the pattern nodes in the target path to form the first update state graph. S6. Input the first updated state graph into the improved liquid neural network, generate and execute analysis code according to the target path and query results, obtain analysis results, construct result nodes according to the analysis results, and establish state edges with the execution nodes to form the second updated state graph; S7. Input the second updated state graph into the improved liquid neural network, update the node state values and state edge activation values, delete state edges with decreasing activation values, reconstruct the target path, and generate an analysis report based on the reconstructed target path, query results, and analysis results.
[0021] In this embodiment, S1 specifically includes: S11. Perform sentence segmentation, word segmentation, synonym replacement, and dimension unification on natural language queries to obtain standardized query statements. When segmenting sentences, use periods, semicolons, question marks, exclamation marks, and line breaks as segmentation boundaries. When replacing synonyms, replace words with the same meaning with unified terms. When unifying dimensions, convert amounts, quantities, and times into a unified expression form. S12. Extract the analysis object description, indicator description, time description, condition description and output description that are consistent with the theme of the normalized query statement from the historical dialogue to obtain the context statement set. If the theme is consistent, retain the corresponding statement; if the theme is inconsistent, delete the corresponding statement. S13. Perform term tagging on the standardized query statement and context statement set, extract business entity terms, indicator terms, time terms, condition terms and presentation terms to obtain a candidate term set. Business entity terms correspond to the analysis object, indicator terms correspond to the statistical target, time terms correspond to the statistical interval, condition terms correspond to the filtering relationship, and presentation terms correspond to the output method. S14. Determine the business entity words as the analysis object, the indicator words as the indicator scope, the time words as the time range, the condition words as the filtering conditions, and the presentation words as the output format to obtain the element itemset. Write the filtering conditions according to the field name, comparison relationship, and value content. S15. Perform an integrity check on the feature itemset, and add any missing feature items that exist in the context statement set to the feature itemset to form a query feature set. During the integrity check, the analysis object, indicator scope, time range, filtering conditions, and output format are checked in sequence.
[0022] In this embodiment, S2 specifically includes: S21. Read the analysis object, indicator scope, time range and filtering conditions from the query element set to form a search term set. When reading, extract the analysis object words, indicator scope words, time range words and field name words and value words in the filtering conditions in sequence, and write them into the search term set in the reading order. S22. Retrieve business knowledge containing terms related to the analysis object and terms related to the indicator scope from the business knowledge, and form a candidate set of evidence. During the retrieval, compare the terms related to the analysis object and terms related to the indicator scope in the retrieval term set with each piece of business knowledge. Business knowledge containing both types of terms is written into the candidate set of evidence. S23. Search the table fields for those containing words related to the analysis object, the indicator scope, the time range, and the filtering conditions, and form a field candidate set. During the search, compare each type of term in the search term set with the table field name and field description item by item, and write the table fields containing the corresponding words into the field candidate set. S24. Retrieve logical foreign keys that correspond to the field candidate set in the logical foreign keys to form a relation candidate set. During retrieval, read the fields of both ends of each logical foreign key and write the logical foreign keys whose fields of both ends are located in the field candidate set into the relation candidate set. S25. Delete duplicate business knowledge in the evidence candidate set, duplicate table fields in the field candidate set, and duplicate logical foreign keys in the relationship candidate set to obtain the evidence set, field set, and relationship set. When deleting duplicates, retain business knowledge with the same content once, table fields with the same name once, and logical foreign keys with the same fields in both tables once.
[0023] In this embodiment, S3 specifically includes: S31. Read the analysis object, indicator scope, time range, filter conditions and output format from the query element set, and write the analysis object, indicator scope, time range, filter conditions and output format into a node record to form an intent node. When writing, the fixed field order is analysis object field, indicator scope field, time range field, filter condition field and output format field. The time range field is written in the order of start time and end time, and the filter condition field is written in the order of field name, comparison relationship and value content. S32. Traverse the evidence set and write each piece of business knowledge into a node record to form an evidence node. During traversal, each piece of business knowledge generates a corresponding evidence node and writes the content of the business knowledge into the corresponding node record. S33. Traverse the field set, write each table field into a node record to form a pattern node. During traversal, generate a pattern node for each table field and write the table field name and the data table to which it belongs into the corresponding node record. S34. Compare the analysis objects and indicator definitions in the query element set with the business knowledge in the evidence set one by one. When the business knowledge contains the words of analysis object or indicator definition, establish a state edge between the intent node and the corresponding evidence node. During the comparison, match the terms in the business knowledge with the words of analysis object and indicator definition one by one. When the match is successful, establish the corresponding state edge. S35. Compare the analysis objects, indicator definitions, time ranges and filtering conditions in the query element set with the table fields in the field set item by item. When the table field contains the corresponding words, establish a state edge between the intent node and the corresponding pattern node. During the comparison, match each type of word with the table field name and field description. When a match is found, establish the corresponding state edge. S36. Based on the logical foreign key relationship in the relation set, establish state edges between the corresponding schema nodes. When establishing them, connect the schema nodes at both ends of the same logical foreign key into a state edge. S37. Write the intent node, evidence node, pattern node and state edge into the same graph structure to form an initial state graph. When writing, write all nodes first, then write all state edges, and form a complete graph structure according to the connection relationship between nodes and state edges.
[0024] In this embodiment, the improved liquid neural network includes a node embedding module, a state edge embedding module, a node state recursion module, a state edge activation recursion module, a node edge coupling bridge module, and a path scoring module. The node embedding module extracts node type labels and node content sequences from intent nodes, evidence nodes, and pattern nodes in the initial state graph, generating a node feature sequence, where: The node embedding module consists of a node reader, a type encoder, a content expander, a content mapper, and a feature concatenation unit. The node reader reads intent nodes, evidence nodes, and pattern nodes from the initial state graph. The type encoder converts node type tags into one-hot vectors and maps them to type vectors. The content expander expands the node content sequence according to the word order. The content mapper converts the expanded words into content embedding vectors. The feature concatenation unit concatenates the type vectors and content embedding vectors according to the node arrangement order to form a node feature sequence. The intent nodes, evidence nodes, and pattern nodes in the initial state diagram are embedded into the input node module. Each node in the initial state diagram has a node label, a node type label, and a node content sequence. The node label is a unique number of the node in the initial state diagram. The node type label includes intent type, evidence type, and pattern type. The node content sequence is determined according to the node type. The node content sequence of the intent node includes the analysis object, indicator scope, time range, filtering conditions, and output format. The node content sequence of the evidence node includes business knowledge content. The node content sequence of the pattern node includes table field names, the data table to which it belongs, and field descriptions. The node embedding module reads the node type tag and node content sequence of each node, converts the node type tag into a one-hot vector, and inputs the one-hot vector into the type mapping parameters stored in the node embedding module to obtain a type vector with a dimension of 32. The node embedding module expands the node content sequence according to the word order, performs word number conversion and word vector lookup for each word to obtain an initial content vector arranged in word order, and then inputs the initial content vector into the content mapping parameters stored in the node embedding module to obtain a content embedding vector with a dimension of 96. The word order refers to the writing order of the node content sequence in the node record. The word order of the intent node is the analysis object, indicator scope, time range, filtering conditions, and output format. The word order of the evidence node is the order of the words in the business knowledge content from left to right. The word order of the pattern node is the table field name, the data table to which it belongs, and the field description. The node embedding module concatenates the type vector and content embedding vector according to the node arrangement order to form a 128-dimensional node feature, and the node feature sequence is composed of all node features. The node arrangement order refers to the order in which nodes are written into the initial state graph: first, intent nodes are arranged, then evidence nodes, and finally pattern nodes. Within the same type of node, nodes are arranged in ascending order of node label. Concatenating according to the node arrangement order means that within each node, the type vector and content embedding vector are first concatenated, and then the node features are arranged sequentially according to the node arrangement order. Through this process, intent nodes, evidence nodes, and pattern nodes are converted into node features of a unified dimension, which facilitates entry into the liquid recursive process.
[0025] The state edge embedding module extracts start node labels, end node labels, and connection relationship labels from the state edges in the initial state graph, generating a state edge feature sequence, where: The state edge embedding module consists of a state edge reader, a node label encoder, a relation label encoder, an edge vector mapper, and an edge feature concatenation unit. The state edge reader reads the start node label, end node label, and connection relation label of each state edge. The node label encoder converts the start node label and end node label into start vector and end vector, respectively. The relation label encoder converts the connection relation label into relation vector. The edge feature concatenation unit concatenates the start vector, end vector, and relation vector in the order of start vector, end vector, and relation vector to form a state edge feature sequence. The state edges in the initial state graph are input into the state edge embedding module. Each state edge in the initial state graph has a state edge label, a start node label, a stop node label, and a connection relationship label. The connection relationship label includes a semantic connection label between the intent node and the evidence node, a field connection label between the intent node and the pattern node, and a logical foreign key connection label between the pattern nodes. The state edge embedding module reads the start node label, end node label, and connection relationship label of each state edge, converts the start node label into a start one-hot vector, the end node label into a end one-hot vector, and the connection relationship label into a relationship one-hot vector. Then, it inputs the start one-hot vector, end one-hot vector, and relationship one-hot vector into the mapping parameters stored in the state edge embedding module to obtain the start vector, end vector, and relationship vector. The start vector is 32-dimensional, the end vector is 32-dimensional, and the relationship vector is 64-dimensional. The state edge embedding module concatenates the start vector, end vector, and relationship vector in the order of start vector, end vector, and relationship vector to form a 128-dimensional state edge feature, and the state edge feature sequence is composed of all the state edge features. The state edge arrangement order refers to the order in which state edges are written into the initial state graph. First, state edges between intention nodes and evidence nodes are arranged, then state edges between intention nodes and pattern nodes are arranged, and finally state edges between pattern nodes are arranged. Within the same type of state edge, they are arranged in ascending order of the starting node label. If the starting node labels are the same, they are arranged in ascending order of the ending node label. Through this process, state edges are transformed from static connection relationships in the graph structure into edge features that can participate in model recursion.
[0026] The node state recursion module performs time-adjusted recursion on the node feature sequence to generate an initial node state sequence, where: The node state recursion module consists of a node feature input device, a time adjustment generator, a dimension-by-dimensional recursive device, and a node state output device. The node feature input device receives the node feature sequence. The time adjustment generator performs linear mapping and Sigmoid activation on each node feature to generate a time adjustment value consistent with the dimension of the node feature. The dimension-by-dimensional recursive device multiplies the value of each dimension of the node feature with the corresponding dimension time adjustment value. The node state output device outputs the initial node state sequence according to the node arrangement order. The node feature sequence is input into the node state recursion module. The node state recursion module performs a linear mapping on each 128-dimensional node feature and inputs the linear mapping result into the Sigmoid activation function to obtain 128-dimensional time adjustment values. Each dimension of the time adjustment value is greater than 0 and less than 1. The node state recursion module multiplies the value of each dimension of the node feature with the corresponding time adjustment value dimension by dimension to obtain the 128-dimensional initial node state. The node dimension refers to the position index in the 128-dimensional vector, with the first to the 128th dimensions corresponding to the 128 numerical positions in the vector. The time adjustment value generation and dimension-by-dimensional multiplication process are repeated for all nodes and arranged according to the node arrangement order to form the initial node state sequence. The node state value is used to represent the effectiveness of the node in the current analysis task, and the time adjustment value is used to control the retention strength and decay strength of the node feature when entering the recursion process.
[0027] The state edge activation recursion module performs edge activation recursion on the state edge feature sequence, the initial state of the starting node, and the initial state of the ending node to generate the initial state edge activation sequence, where: The state edge activation recursive module consists of a state edge feature input device, an edge time adjustment generator, a node state reader, a one-dimensional sequence splicer, a position weighted accumulator, and an edge activation output device. The state edge feature input device receives the state edge feature sequence. The edge time adjustment generator generates state edge time adjustment values that are consistent with the dimension of the state edge features. The node state reader reads the initial state of the starting node and the initial state of the ending node corresponding to the same state edge. The one-dimensional sequence splicer splices the initial state of the starting node, the initial state of the ending node, and the time-adjusted state edge features into a one-dimensional sequence. The position weighted accumulator performs weighted accumulation on the one-dimensional sequence. The edge activation output device outputs the initial state edge activation sequence. The state edge feature sequence is input into the state edge activation recursive module. The state edge activation recursive module performs a linear mapping on each 128-dimensional state edge feature and inputs the linear mapping result into the Sigmoid activation function to obtain the 128-dimensional state edge time adjustment value. Then, the value of each dimension of the state edge feature is multiplied by the corresponding dimension's state edge time adjustment value to obtain the time-adjusted state edge feature. The state edge activation recursive module reads the initial state of the start node and the initial state of the end node corresponding to the same state edge. The initial state of the start node and the initial state of the end node are both 128-dimensional vectors. They are concatenated into a 384-dimensional one-dimensional sequence according to the order of the initial state of the start node, the initial state of the end node, and the time-adjusted state edge feature. The state edge activation recursive module uses the position weight matrix stored in the module to perform weighted accumulation on the 384-dimensional one-dimensional sequence to form a 128-dimensional initial state edge activation vector. The position weight matrix is the mapping parameter in the state edge activation recursive module, with 128 rows and 384 columns. Each row corresponds to an output dimension, and each column corresponds to an input position in the one-dimensional sequence. The elements in the position weight matrix represent the influence strength of the corresponding input position on the corresponding output dimension. For any output dimension, the 384 position values in the one-dimensional sequence are read, and the row weight corresponding to that output dimension in the position weight matrix is read. Each position value is multiplied by the position weight in the same column, and all product results are accumulated to obtain the state edge activation value of that output dimension. The above process is performed sequentially on the first to the 128th dimensions to obtain the 128-dimensional initial state edge activation vector. The state edge activation value refers to the value at the corresponding dimension position in the state edge activation vector, which is used to represent the effective strength of the connection relationship between two nodes in the current analysis task. The above process is repeated for all state edges to form the initial state edge activation sequence.
[0028] The node-edge coupling bridge module performs bidirectional liquid co-evolution of the initial node state sequence and the initial state edge activation sequence to generate a co-evolution state edge activation sequence, wherein: The node-edge coupling bridge module consists of a connection edge extractor, a start-end grouper, a sign comparator, a reduction processor, a node feedback writer, a state edge reverse corrector, and a co-evolution outputter. The connection edge extractor extracts the activation vectors of the state edges connected to the target node according to the node label. The start-end grouper divides the state edges into start connection state edges and end connection state edges. The sign comparator compares the sign of the state edge activation values with the numerical values of the corresponding dimensions of the node state values. The reduction processor performs reduction on the dimensions with opposite signs. The node feedback writer forms the updated state value of the target node. The state edge reverse corrector corrects the state edge activation values according to the updated state values of the start and end nodes. The co-evolution outputter outputs the co-evolution state edge activation sequence. The initial node state sequence and the initial state edge activation sequence are input into the node-edge coupling bridge module, and a node-edge bidirectional liquid co-evolution mechanism is introduced. The node-edge coupling bridge module calls the node-edge bidirectional liquid co-evolution mechanism to perform bidirectional coupling updates on the initial state edge activation sequence and the initial node state sequence, so that the state edge activation value is written back to the corresponding node state, and the updated node state acts in reverse on the corresponding state edge activation value, forming a co-evolution state edge activation sequence. The specific execution process of the node-edge bidirectional liquid co-evolution mechanism is described in the corresponding implementation.
[0029] The path scoring module extracts connected state edges from the co-evolved state edge activation sequence, combines them, calculates the cumulative path activation value, and outputs candidate paths, where: The path scoring module consists of a connected path extractor, a path validity checker, an edge activation aggregator, a path sorter, and a candidate path outputter. The connected path extractor extracts state edge combinations that are connected in the order of intent node, evidence node, and pattern node, starting from the intent node. The path validity checker deletes state edge combinations that are broken, have inconsistent connection directions, or lack evidence nodes or pattern nodes. The edge activation aggregator accumulates the state edge activation values one edge at a time to obtain the cumulative path activation value. The path sorter sorts the paths from high to low according to the cumulative path activation value. The candidate path outputter outputs candidate paths. The co-evolution state edge activation sequence is input into the path scoring module. The path scoring module starts from the intent node and extracts combinations of state edges connected in the order of intent node, evidence node, and pattern node. Adjacent state edges in a connected state edge combination share nodes, and the path must include at least one intent node, one evidence node, and one pattern node. The state edge connection order refers to the arrangement of state edges in the candidate path: starting from the intent node, it first passes through the state edge between the intent node and the evidence node, then through the state edge between the intent node and the pattern node or the state edge of the pattern node associated with the evidence node, and finally through the pattern node. Logical foreign key state edges between nodes; for each connected state edge combination, the path scoring module reads the 128-dimensional co-evolution state edge activation vector of each state edge in the combination, and first sums the values of the first to the 128th dimensions of the state edge activation vector to obtain the total edge activation value of the state edge. Then, it accumulates the total edge activation value of each edge according to the connection order of the state edges to obtain the cumulative path activation value. If the state edge combination has node breaks, inconsistent connection directions, or lacks any type of node such as evidence nodes or pattern nodes, the state edge combination is deleted. Finally, candidate paths are output in descending order of cumulative path activation value.
[0030] In the specific implementation process, the improved liquid neural network inherits the recursive framework of the liquid neural network in terms of overall structure, which controls the intensity of state updates through time adjustment values, but it has been improved in terms of processing objects and recursive direction. Traditional liquid neural networks use input sequences or node states as the main recursive objects, and connection relationships usually only participate in the organization as external structures. In this implementation, the initial state graph is split into node-side input and state-side input. The node-side input enters the node embedding module, and the state-side input enters the state-side embedding module, so that the node content and connection relationships form recursive feature sequences respectively.
[0031] During the node-side recursion phase, the node embedding module uniformly encodes intent nodes, evidence nodes, and pattern nodes into a node feature sequence. Intent nodes carry the analysis object, indicator caliber, time range, filtering conditions, and output format; evidence nodes carry business knowledge content; and pattern nodes carry field names, the data table they belong to, and field descriptions. The node state recursion module generates time adjustment values for node features and adjusts the node features through dimension-wise multiplication to form an initial node state sequence. This process enables different types of nodes to form different state update intensities according to their content and type, avoiding the use of the same recursion intensity for all nodes.
[0032] In the state edge recursion stage, the state edge embedding module converts the start node label, end node label, and connection relationship label into a state edge feature sequence, transforming the state edge from a static connection symbol into an edge input that can participate in the recursion. The state edge activation recursion module first generates time adjustment values for the state edge features, and then combines the initial state of the start node and the initial state of the end node to form an initial state edge activation sequence. Compared with the traditional liquid neural network that only updates the node state, this implementation gives the state edge an independent recursion channel, and the state edge activation value can reflect the effectiveness of the connection relationship between nodes and the path traversal strength.
[0033] During the node-edge coupling phase, the node-edge coupling bridge module introduces a bidirectional liquid co-evolution mechanism for nodes and edges. This mechanism performs bidirectional coupling updates on the node state and the activation values of the state edges, enabling the node state to absorb the activation information of the connected state edges and allowing the activation values of the state edges to be corrected based on the updated states of the two nodes. Through this bidirectional transmission process, the node state and the activation values of the state edges form a co-evolutionary relationship, which can enhance the connection path that is consistent with the query intent, evidence content, and field relationships, while weakening paths with unstable connection relationships or weak semantic associations.
[0034] During the path output phase, the path scoring module extracts connected state edge combinations based on the co-evolution state edge activation sequence. Only state edge combinations that conform to the sequential connected relationship of intent nodes, evidence nodes, and pattern nodes are retained, and the cumulative path activation value is obtained by accumulating edge by edge. This process can limit the selection of target paths to connected structures with complete semantic and field support, reducing the probability of irrelevant evidence, irrelevant fields, and erroneous table relationships entering the target path.
[0035] The improvement of this implementation lies in extending the node recursion mechanism of the traditional liquid neural network into a joint structure of node state recursion, state edge activation recursion, and bidirectional co-evolution of nodes and edges. By adding a state edge embedding module and a state edge activation recursion module, the state edge gains independent time adjustment and activation update capabilities. By adding a node edge coupling bridge module, the node state and the state edge activation value can be mutually corrected. The path scoring module outputs candidate paths based on the co-evolution state edge activation sequence, and the path analysis no longer depends on static field matching or fixed rule selection.
[0036] The beneficial effect of this improvement is that the intent nodes, evidence nodes, pattern nodes, and state edges in the initial state graph can be dynamically reasoned within the same model. The relationships between query intent, business knowledge, table fields, and logical foreign keys can be continuously updated through node state values and state edge activation values. Compared to traditional liquid neural networks that only process sequence states or node states, this implementation can explicitly characterize the intensity of changes in connection relationships, improve the stability and accuracy of candidate path generation, and thus enhance the reliability of path selection in complex multi-table queries, business knowledge augmentation analysis, and continuous data analysis scenarios.
[0037] In this embodiment, the node-edge bidirectional liquid co-evolution mechanism specifically includes: Extract the activation values of all state edges connected to any target node based on the node label. The state edge activation value is a 128-dimensional state edge activation vector. The node label is the unique number of the node in the initial state graph. If the starting node label of a state edge is the same as the target node label, then the state edge is classified as the starting connection state edge. If the ending node label of a state edge is the same as the target node label, then the state edge is classified as the ending connection state edge. Arrange the state edge activation vectors corresponding to the starting connection state edges in ascending order of the state edge labels to form the starting activation sequence. Arrange the state edge activation vectors corresponding to the ending connection state edges in ascending order of the state edge labels to form the ending activation sequence. Each state edge activation vector in the starting and ending activation sequences is compared dimension-by-dimensionally with the initial state of the target node. The initial state of the target node is a 128-dimensional node state vector, where the corresponding dimension refers to the dimension with the same position index in the two 128-dimensional vectors. The numerical signs include positive, negative, and zero. When both values are positive, both are negative, or both are zero, they are considered to have the same sign. When one value is positive and the other is negative, or one value is zero and the other is non-zero, they are considered to have opposite signs. When the signs are the same, the activation value of the state edge in that dimension is retained. When the signs are opposite, the activation value of the state edge in that dimension is multiplied by a fixed reduction factor, which is 0.5. The initial activation sequence, after preservation or reduction, is accumulated dimensionally to obtain a 128-dimensional initial feedback value. The termination activation sequence, after preservation or reduction, is accumulated dimensionally to obtain a 128-dimensional termination feedback value. The initial and termination feedback values are added dimensionally to obtain a 128-dimensional bidirectional feedback value for the target node. The bidirectional feedback value for the target node is added dimensionally to the initial node state of the target node to obtain the updated state value of the target node. The process of extracting state edges, grouping initial and termination nodes, comparing signs, reducing the size of the node, accumulating feedback, and writing node states is repeated for all nodes to form an updated node state sequence. Read the start node update state value and end node update state value corresponding to any target state edge according to the state edge label. The start node update state value and end node update state value are both from the update node state sequence and are both 128-dimensional vectors. The corresponding dimension activation value of the target state edge is the value in the target state edge activation vector that has the same dimension index as the start node update state value and the end node update state value, and comes from the initial state edge activation sequence. The signs of the updated state values of the starting and ending nodes are compared dimension by dimension. If the signs are the same, the average value of the updated state values of the starting and ending nodes in the corresponding dimension is calculated and added to the activation value of the corresponding dimension of the target state edge to obtain the enhanced dimension activation value. If the signs are opposite, the absolute value of the difference between the updated state values of the starting and ending nodes in the corresponding dimension is calculated and subtracted from the activation value of the corresponding dimension of the target state edge to obtain the suppressed dimension activation value. The above process is performed sequentially on dimensions 1 to 128 to obtain the target state edge update activation vector. The process of repeatedly reading the state value of the starting node, reading the state value of the ending node, comparing the sign, enhancing the dimension activation value, and suppressing the dimension activation value is performed on all state edges to form a co-evolution state edge activation sequence. Through this process, the state edge activation value first affects the node state according to the connection direction, and the updated node state then corrects the state edge activation value in the reverse direction. This strengthens the connection relationship that is consistent with the node state direction and suppresses the connection relationship that conflicts with the node state direction, thereby realizing the bidirectional liquid co-evolution of the node state and the state edge activation value.
[0038] In this embodiment, S5 specifically includes: S51. Read the pattern nodes in the target path, extract the table fields and data tables corresponding to each pattern node according to the state edge connection order, and form a field sequence and a data table sequence. The state edge connection order is the connection order from the intention node to the pattern node in the target path, and then the connection order along the state edges between the pattern nodes. The table fields include the field name and field type, and the data table is the name of the data table where the field is located. S52. Read the state edges in the target path, extract the logical foreign keys between adjacent pattern nodes, and form a sequence of connection conditions. The logical foreign keys include the start table field and the end table field. The start table field and the end table field are used as a set of connection conditions and arranged according to the connection order of the state edges in the target path. S53. Read the intent nodes in the target path, extract the analysis object, indicator scope, time range and filtering conditions, determine the main query table, statistical fields, time fields and filtering fields, determine the data table in the data table sequence that corresponds to the analysis object as the main query table, determine the table field in the field sequence that corresponds to the indicator scope as the statistical field, determine the table field in the field sequence that corresponds to the time range as the time field, and determine the table field in the field sequence that corresponds to the filtering conditions as the filtering field; S54. Concatenate the structured query statement according to the main query table, the sequence of join conditions, the statistical field, the time field, and the filter field, and execute the structured query statement to obtain the query results. When concatenating, first write the main query table, then write the data table join relationship according to the sequence of join conditions, and then write the time range conditions corresponding to the statistical field and the time field, and the filter conditions corresponding to the filter field to form the structured query statement. S55. Construct execution nodes according to the query results, and establish state edges between execution nodes and pattern nodes in the target path to form the first update state graph. When constructing execution nodes, write the returned fields, field values and record rows in the query results into the execution nodes, establish state edges between the execution nodes and the pattern nodes that generate the returned fields, and write the execution nodes, state edges and target paths into the initial state graph to form the first update state graph.
[0039] In this embodiment, S6 specifically includes: S61. Input the first updated state graph into the improved liquid neural network, read the state edges between the execution node and the pattern nodes in the target path, extract the pattern nodes connected to the execution node, form an analysis node sequence, the execution node records the query results, the pattern nodes record the table field information, and the pattern nodes connected to the execution node represent the source of the fields actually returned in the query results. The analysis node sequence is arranged according to the connection order of the state edges in the target path. S62. Read the returned fields and field values in the query results, match the returned fields with the corresponding table fields of the pattern nodes in the analysis node sequence one by one to form the analysis data sequence. When matching, compare the returned field name with the table field name in the pattern node. If the names match, write the returned field and its field value into the analysis data sequence. S63. According to the node connection order in the target path, write the field names in the analysis node sequence and the field values in the analysis data sequence into the data reading statement, field processing statement and result output statement respectively, and concatenate them in the execution order to form the analysis code. The data reading statement is used to read the field values, the field processing statement is used to perform statistical, grouping, sorting or filtering processing, and the result output statement is used to output the processed result name and result value. S64. Execute the analysis code, read the result name and result value output by the code, and form the analysis result. During execution, the analysis code is run in the order of data reading statement, field processing statement and result output statement, and the output content is organized into a data structure corresponding to the result name and result value. S65. Construct result nodes according to the analysis results, and establish state edges between the result nodes and the execution nodes to form a second updated state graph. When constructing the result nodes, write the result name and result value in the analysis results into the result nodes, connect the result nodes with the execution nodes that generate the analysis results as state edges, and write the result nodes and the newly added state edges into the first updated state graph to form a second updated state graph.
[0040] In this embodiment, S7 specifically includes: S71. Input the second updated state graph into the improved liquid neural network, read the state values of each node and the activation values of each state edge. The second updated state graph includes intention nodes, evidence nodes, pattern nodes, execution nodes, result nodes and state edges. The node state value is the vectorized state of each node, and the state edge activation value is the connection strength of each state edge. S72. Perform recursive updates on the state values of each node and the activation values of each state edge again, and compare the activation values of the state edges before and after the update. Delete the state edges whose activation values decrease, and retain the state edges whose activation values do not decrease. During the recursive update, the improved liquid neural network rereads the nodes and state edges in the second updated state graph, performs time adjustment updates on the node state values and the state edge activation values, and corrects the updated node state values and state edge activation values through the bidirectional liquid co-evolution mechanism of nodes and edges. During the comparison, the updated activation value of the same state edge is compared with the activation value before the update. If the updated activation value is less than the activation value before the update, delete the corresponding state edge. If the updated activation value is greater than or equal to the activation value before the update, retain the corresponding state edge. S73. Based on the connectivity of the preserved state edges, connect the intent node, evidence node, pattern node, execution node, and result node to reconstruct the target path. During reconstruction, start from the intent node and connect the evidence node, pattern node, execution node, and result node in sequence. Delete nodes and state edges that cannot form a continuous connection relationship to obtain the reconstructed target path. S74. Extract the returned fields and field values from the query results, as well as the result names and result values from the analysis results, according to the order of the reconstructed target path to form a report data sequence. The report data sequence is arranged according to the node order in the reconstructed target path. First, write the returned fields and field values corresponding to the query results, and then write the result names and result values corresponding to the analysis results. S75. Write the report data sequence into the analysis report to form an analysis report containing query results and analysis results. When writing, write the returned fields and field values into the query results section, write the result names and result values into the analysis conclusion section, and organize the report content according to the reconstructed target path order.
[0041] refer to Figure 3 A state diagram-based intelligent data analysis system includes the following modules: The query element parsing module is used to receive natural language queries and historical dialogues, extract the analysis object, indicator scope, time range, filtering conditions and output format, and generate a query element set. The evidence retrieval module is used to retrieve business knowledge, table fields, and logical foreign keys based on the query element set, and generate evidence sets, field sets, and relationship sets. The state graph construction module is used to construct intent nodes, evidence nodes, pattern nodes, and state edges based on the query feature set, evidence set, field set, and relation set, and generate an initial state graph. The liquid path reasoning module is used to input the initial state graph into the improved liquid neural network, update the node state values and state edge activation values, generate candidate paths, and determine the target path based on the candidate paths; The query execution module is used to generate and execute structured query statements based on the target path, generate query results, and construct the first update state graph based on the query results; The analysis and execution module is used to generate and execute analysis code based on the first update state diagram, the target path, and the query results, generate analysis results, and construct a second update state diagram based on the analysis results. The path reconstruction and report generation module is used to reconstruct the target path by updating the node state values and state edge activation values based on the second updated state graph, and to generate an analysis report based on the reconstructed target path, query results, and analysis results.
[0042] Example 1: To verify the feasibility of this invention in practice, it was applied to an intelligent analysis scenario of enterprise business data. This enterprise business system contains multiple data tables, including those for orders, customers, products, inventory, after-sales service, invoices, payments received, and channels. These tables are linked through logical foreign keys, and metrics such as sales revenue, repurchase rate, refund rate, inventory turnover rate, and average order value all have corresponding business definitions. Existing natural language query solutions are prone to problems such as field matching errors, missing logical foreign keys, inconsistent use of metric definitions, and inability to trace the query basis in analysis reports when faced with multiple rounds of follow-up queries, cross-table statistics, and complex filtering. This is especially true when users make continuous analysis requests such as "continue to split by channel," "only look at categories with abnormal refund rates," or "generate trend analysis from the previous results," where traditional solutions struggle to maintain consistency between the query path and the analysis results.
[0043] When applying this invention, the system first receives natural language queries and historical dialogues, extracts the analysis object, indicator scope, time range, filtering conditions, and output format to form a query element set. Then, based on the query element set, it recalls business knowledge, table fields, and logical foreign keys to construct an initial state graph including intent nodes, evidence nodes, pattern nodes, and state edges. Subsequently, the initial state graph is input into an improved liquid neural network to recursively update node state values and state edge activation values, generating candidate paths and determining the target path. The system then generates and executes a structured query statement according to the target path, obtains the query results, and writes the query results to the execution node, forming a first updated state graph. For requests requiring further statistical analysis, sorting, grouping, or trend analysis, the system generates and executes analysis code based on the first updated state graph, the target path, and the query results. After obtaining the analysis results, it constructs a result node, forming a second updated state graph. Finally, by updating the node state values and state edge activation values again, deleting state edges with decreasing activation values, reconstructing the target path, and generating an analysis report.
[0044] To verify the effectiveness, common natural language processing (NLP) requests within the enterprise were selected as test samples. The test content covered tasks such as single-table queries, multi-table join queries, interpretation of indicator definitions, follow-up questions, analysis code generation, and report generation. The test set contained a total of 300 NLP queries, involving 16 business data tables, 38 logical foreign keys, and 20 business indicator definitions. Each query was pre-labeled manually with the correct query elements, target data table, target fields, inter-table join relationships, and expected analysis results.
[0045] The method of this invention is compared with traditional natural language to structured query methods and fixed-process data analysis methods. The statistical results are shown in the table below: Table 1 Comparison of Effects in Intelligent Analysis Scenarios for Enterprise Operation Data
[0046] As can be seen from the data in Table 1 above, the method of the present invention significantly outperforms traditional natural language to query methods and fixed-process data analysis methods in terms of accuracy in query element extraction, business knowledge matching, multi-table join path accuracy, structured query execution success rate, analysis code execution success rate, analysis conclusion accuracy, and report conclusion traceability. Traditional natural language to query methods mainly rely on the direct conversion of text to structured query statements, and are insufficient in multi-table joins and understanding business contexts. Their multi-table join path accuracy is only 72.8%, and their report conclusion traceability rate is only 63.7%, indicating that they are prone to problems such as missing table joins, incorrect field matching, and unclear report basis. Fixed-process data analysis methods rely on fixed templates and preset processes to complete the analysis, achieving an analysis code execution success rate of 83.5%. However, their query element extraction accuracy and multi-table join path accuracy are still relatively low, indicating limited adaptability to complex natural language and continuous follow-up questions. The method of this invention achieves a query element extraction accuracy of 94.8%, a business knowledge matching accuracy of 91.6%, and a multi-table join path accuracy of 90.7% through query element parsing, evidence recall, state graph construction, and improved liquid neural network path reasoning. This demonstrates that it can more accurately understand user intent, match business knowledge, and determine cross-table analysis paths.
[0047] Furthermore, the success rate of structured query execution using the method of this invention reaches 93.1%, the success rate of analysis code execution reaches 92.6%, the accuracy rate of analysis conclusions reaches 91.4%, the traceability rate of report conclusions reaches 95.2%, and the average number of manual corrections is reduced to 0.7 times per task. This indicates that the invention not only improves the accuracy of the query stage but also enhances the stability of the query results after they enter the analysis stage. Specifically, the query element extraction accuracy rate measures the correctness of the system in extracting analysis objects, indicator definitions, time ranges, filtering conditions, and output formats from natural language queries and historical dialogues; the business knowledge matching accuracy rate measures the accuracy of the system in recalling indicator definitions and business rules; the multi-table join path accuracy rate measures the correctness of the system in generating target paths based on table fields and logical foreign keys; the structured query execution success rate measures whether the generated query statements can be executed correctly and return valid results; the analysis code execution success rate measures the stability of the system in performing statistical, grouping, sorting, or trend analysis on query results; and the report conclusion traceability rate measures whether the conclusions in the report can be traced back to the corresponding query elements, field relationships, query results, and analysis results.
[0048] This embodiment constructs a state graph containing intent nodes, evidence nodes, pattern nodes, execution nodes, and result nodes, integrating natural language queries, business knowledge, table fields, logical foreign keys, query results, and analysis results into a unified analysis chain. The improved liquid neural network dynamically updates node state values and state edge activation values, enabling it to filter out weakly related paths from candidate paths while retaining those relevant to the query intent. Figure 1 The system determines the target path; after query execution, the system writes the query results to the execution node, and after analysis execution, it writes the analysis results to the result node. Then, through the path reconstruction and report generation module, it deletes the state edges with decreasing activation values and re-determines the analysis path. Therefore, this invention effectively solves the problems of fixed query paths, error-prone cross-table relationships, disconnect between analysis results and query basis, and difficulty in tracing report conclusions in traditional solutions. It has high accuracy, stability, and engineering application value in multi-table association analysis, continuous query analysis, and automatic report generation scenarios of enterprise operating data.
[0049] The above are merely preferred embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A state diagram-based intelligent data analysis method, characterized in that, Includes the following steps: S1. Receive natural language queries and historical dialogues, extract the analysis object, indicator scope, time range, filtering conditions and output format, and form a query element set; S2. Retrieve and query business knowledge, table fields, and logical foreign keys that match the feature set to form an evidence set, field set, and relationship set; S3. Construct intent nodes based on query element sets, evidence nodes based on evidence sets, pattern nodes based on field sets, and state edges based on relationship sets to form an initial state graph. S4. Input the initial state graph into the improved liquid neural network, update the node state values and state edge activation values, generate candidate paths, sort the candidate paths according to the sum of state edge activation values, retain the highest connected node sequence, and form the target path. S5. Generate and execute structured query statements according to the target path to obtain query results. Construct execution nodes according to the query results and establish state edges with the pattern nodes in the target path to form the first update state graph. S6. Input the first updated state graph into the improved liquid neural network, generate and execute analysis code according to the target path and query results, obtain analysis results, construct result nodes according to the analysis results, and establish state edges with the execution nodes to form the second updated state graph; S7. Input the second updated state graph into the improved liquid neural network, update the node state values and state edge activation values, delete state edges with decreasing activation values, reconstruct the target path, and generate an analysis report based on the reconstructed target path, query results, and analysis results.
2. The intelligent data analysis method based on state diagrams according to claim 1, characterized in that, S1 specifically includes: S11. Perform sentence segmentation, word segmentation, synonym replacement, and unit unification on the natural language query to obtain a standardized query statement; S12. Extract the analysis object description, indicator description, time description, condition description and output description that are consistent with the theme of the normalized query statement from the historical dialogue to obtain the context statement set; S13. Perform term tagging on the standardized query statement and context statement set, extract business entity terms, indicator terms, time terms, condition terms and presentation terms to obtain a candidate term set; S14. Determine the business entity words as the analysis objects, the indicator words as the indicator scope, the time words as the time range, the condition words as the filtering conditions, and the presentation words as the output format to obtain the element itemset. S15. Perform an integrity check on the feature itemset, and add any missing feature items that exist in the context statement set to the feature itemset to form the query feature set.
3. The intelligent data analysis method based on state diagrams according to claim 1, characterized in that, S2 specifically includes: S21. Read the analysis object, indicator scope, time range and filtering conditions from the query element set to form a search term set; S22. Retrieve business knowledge containing terms related to the analysis object and terms related to the indicator definition from the business knowledge to form a candidate set of evidence; S23. Retrieve table fields containing terms related to the analysis object, the indicator scope, the time range, and the filtering conditions to form a candidate set of fields; S24. Retrieve logical foreign keys that correspond to the field candidate set from the logical foreign keys to form a relation candidate set; S25. Delete duplicate business knowledge in the evidence candidate set, duplicate table fields in the field candidate set, and duplicate logical foreign keys in the relationship candidate set to obtain the evidence set, field set, and relationship set.
4. The intelligent data analysis method based on state diagrams according to claim 1, characterized in that, S3 specifically includes: S31. Read the analysis object, indicator scope, time range, filtering conditions and output format from the query element set, and write the analysis object, indicator scope, time range, filtering conditions and output format into a node record to form an intent node. S32. Traverse the evidence set and write each piece of business knowledge into a node record to form an evidence node; S33. Traverse the field set and write each table field into a node record to form a schema node; S34. Compare the analysis objects and indicator definitions in the query element set with the business knowledge in the evidence set one by one. When the business knowledge contains words of analysis objects or indicator definitions, establish a state edge between the intent node and the corresponding evidence node. S35. Compare the analysis objects, indicator definitions, time ranges and filtering conditions in the query element set with the table fields in the field set item by item. When the table field contains the corresponding words, establish a state edge between the intent node and the corresponding pattern node. S36. Based on the logical foreign key relationships in the relation set, establish state edges between the corresponding schema nodes; S37. Write the intent node, evidence node, pattern node and state edge into the same graph structure to form the initial state graph.
5. The intelligent data analysis method based on state diagrams according to claim 1, characterized in that, The improved liquid neural network includes a node embedding module, a state edge embedding module, a node state recursion module, a state edge activation recursion module, a node edge coupling bridge module, and a path scoring module. The intent nodes, evidence nodes, and pattern nodes in the initial state graph are input into the node embedding module. The node type labels and node content sequences are extracted, converted, and then concatenated in the node order to form a node feature sequence. The state edges in the initial state graph are input into the state edge embedding module. The start node label, end node label, and connection relationship label are extracted, transformed, and then concatenated in the state edge order to form a state edge feature sequence. The node feature sequence is input into the node state recursion module, which generates a time adjustment value of the same dimension as the node feature for each node, and multiplies it with the corresponding node feature dimension by dimension to form the initial node state sequence. The state edge feature sequence is input into the state edge activation recursion module, which generates time adjustment values of the same dimension as the state edge features for each edge, and multiplies them dimension by dimension with the corresponding state edge features. Then, it is concatenated with the initial state of the corresponding start node and the initial state of the end node to form a one-dimensional sequence. The values at each position of the one-dimensional sequence are weighted and accumulated to form the initial state edge activation sequence. The initial node state sequence and the initial state edge activation sequence are input into the node edge coupling bridge module, and a node edge bidirectional liquid co-evolution mechanism is introduced. The state edge activation value is written back to the node state for update, and the updated node state is written back to the state edge activation value for update, thus forming the co-evolution state edge activation sequence. The co-evolution state edge activation sequence is input into the path scoring module. The combination of state edges connected in the order of intent node, evidence node, and pattern node is extracted. The activation values in each state edge combination are accumulated edge by edge and sorted according to the accumulation results. The candidate paths are then output.
6. The intelligent data analysis method based on state diagrams according to claim 5, characterized in that, The node-edge bidirectional liquid co-evolution mechanism specifically includes: Extract all state edge activation values connected to any target node according to the node label, and form the start activation sequence and the end activation sequence according to the start connection state edge and the end connection state edge respectively. The activation values of each state edge in the starting activation sequence and the ending activation sequence are compared with the numerical signs of the corresponding dimensions of the initial node state of the target node one by one. If the signs are the same, the original values are retained, and if the signs are opposite, they are multiplied by a fixed reduction factor. The retained state edge activation value and the reduced state edge activation value are accumulated according to the node dimension to form the initial feedback value and the termination feedback value. Then, the initial feedback value and the termination feedback value are added dimension by dimension to form the bidirectional feedback value of the target node, and written into the dimension corresponding to the initial node state of the target node to form the updated state value of the target node. Read the start node update state value and end node update state value corresponding to any target state edge according to the state edge mark, and compare the signs of the corresponding dimensions of the two values one by one. If the signs are the same, add them one by one to the activation value of the corresponding dimension of the target state edge; if the signs are opposite, subtract them one by one from the activation value of the corresponding dimension of the target state edge. Repeatedly perform state edge activation value extraction, sign comparison, reduction coefficient multiplication, and feedback writing on all nodes, and repeatedly perform node update state value reading, sign comparison, and activation value adjustment on all state edges to form a co-evolved state edge activation sequence.
7. The intelligent data analysis method based on state diagrams according to claim 1, characterized in that, S5 specifically includes: S51. Read the pattern nodes in the target path, extract the table fields and data tables corresponding to each pattern node according to the state edge connection order, and form a field sequence and a data table sequence. S52. Read the state edges in the target path, extract the logical foreign keys between adjacent pattern nodes, and form a sequence of connection conditions. S53. Read the intent nodes in the target path, extract the analysis object, indicator scope, time range and filtering conditions, and determine the main query table, statistical fields, time fields and filtering fields; S54. Construct a structured query statement by combining the main query table, join condition sequence, statistical fields, time fields, and filter fields, and execute the structured query statement to obtain the query results; S55. Construct execution nodes based on query results, and establish state edges between execution nodes and pattern nodes in the target path to form the first update state graph.
8. The intelligent data analysis method based on state diagrams according to claim 1, characterized in that, S6 specifically includes: S61. Input the first updated state graph into the improved liquid neural network, read the state edges between the execution node and the pattern node in the target path, extract the pattern node connected to the execution node, and form an analysis node sequence. S62. Read the returned fields and field values in the query results, and match the returned fields with the corresponding table fields of the pattern nodes in the analysis node sequence one by one to form an analysis data sequence; S63. According to the node connection order in the target path, write the field names in the analysis node sequence and the field values in the analysis data sequence into the data reading statement, field processing statement and result output statement respectively, and concatenate them in the execution order to form the analysis code; S64. Execute the analysis code, read the result name and result value output by the code, and form the analysis result; S65. Construct result nodes based on the analysis results, and establish state edges between the result nodes and the execution nodes to form a second updated state graph.
9. The intelligent data analysis method based on state diagrams according to claim 1, characterized in that, Specifically, S7 includes: S71. Input the second updated state graph into the improved liquid neural network and read the state values of each node and the activation values of each state edge. S72. Perform recursive update on the state value of each node and the activation value of each state edge again, and compare the activation values of the state edges before and after the update. Delete the state edges whose activation values decrease, and keep the state edges whose activation values do not decrease. S73. Based on the connectivity of the edges in the preserved state, connect the intent node, evidence node, pattern node, execution node, and result node to reconstruct the target path; S74. Extract the returned fields and field values from the query results, as well as the result names and result values from the analysis results, in the order of the reconstructed target path to form a report data sequence; S75. Write the report data sequence into the analysis report to form an analysis report containing query results and analysis results.
10. The intelligent data analysis system based on state diagrams according to claim 1, characterized in that, A state diagram-based intelligent data analysis method according to any one of claims 1 to 9, characterized in that it comprises the following modules: The query element parsing module is used to extract the analysis object, indicator scope, time range, filtering conditions and output format, and generate a query element set; The evidence retrieval module is used to retrieve business knowledge, table fields, and logical foreign keys to generate evidence sets, field sets, and relationship sets. The state graph construction module is used to construct intent nodes, evidence nodes, pattern nodes, and state edges to generate an initial state graph. The liquid path reasoning module is used to input the initial state graph into the improved liquid neural network, update the node state values and state edge activation values, and generate candidate paths and target paths. The query execution module is used to generate and execute structured query statements, generate query results and the first update state graph; The analysis execution module is used to generate and execute analysis code, generate analysis results, and a second updated state graph. The path reconstruction and report generation module is used to update node state values and state edge activation values, reconstruct the target path, and generate an analysis report.