Multi-model inference chain data analysis method and device based on natural language input, medium and program product
By constructing a multi-model inference chain and introducing a large language model scheduling hub, the problems of semantic parsing and full-process automation in data analysis were solved, realizing an efficient and transparent data analysis process, and improving the credibility of analysis results and the adoption rate by managers.
Patent Information
- Application Number
- CN202511564098.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-30
- Publication Date
- 2026-02-10
AI Technical Summary
Existing technologies lack semantic parsing capabilities, multi-model collaborative reasoning capabilities, and fully automated execution in data analysis, resulting in low analysis efficiency, inconsistent results, and opaque processes.
By employing a multi-model inference chain data analysis method based on natural language input, we utilize neural network models to analyze user needs, construct a multi-model inference chain, introduce a large language model as a scheduling hub, record and display the analysis process, and achieve an automated closed loop from data acquisition to result generation.
It improves the consistency, controllability, and quality of data analysis, ensures the transparency and verifiability of the analysis process, reduces the workload of manual configuration and maintenance, and increases the trustworthiness and adoption rate of analysis conclusions.
Smart Images

Figure CN121503660A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of electronic digital data processing, and in particular to a multi-model inference chain data analysis method based on natural language input. Background Technology
[0002] With the widespread application of big data and artificial intelligence, data analysis has become an important tool for various organizations to optimize operations and support decision-making. Existing data analysis processes typically include data collection, cleaning, modeling, computation, and interpretation. However, in practice, these processes are often completed independently by different tools or systems, lacking a unified semantic framework and execution chain, resulting in low analysis efficiency and poor result consistency.
[0003] To improve the ease of use of data analysis, the industry has proposed a variety of technical solutions:
[0004] One type is the multidimensional analysis method based on business intelligence (BI) tools, which provides users with interactive reports and graphical displays through pre-modeling and visualization components. This type of method can present data results intuitively, but it has problems such as relying on manual configuration of analysis logic and difficulty in dynamically constructing analysis processes according to natural language requirements.
[0005] Another type is the Natural Language to Structured Query (Text2SQL) approach, which uses natural language processing technology to convert user input into SQL query statements and execute them directly in the database. This type of method lowers the barrier to data access, but it is usually limited to the query stage and lacks multi-stage analysis capabilities such as prediction, attribution, and simulation. It is also difficult to support the collaborative execution across multiple analysis models.
[0006] With the development of Large Language Model (LLM) technology, some solutions attempt to use LLM as an interface for data analysis, generating and interpreting results through natural language. While these methods have advantages in semantic understanding and natural language interaction, in complex business scenarios, LLM itself lacks the ability to directly perform multi-stage data computation and lacks precise scheduling and control over the execution order of multiple models and data dependencies, easily leading to problems such as inference chain interruptions and inconsistent results.
[0007] Specifically, the current technology mainly faces the following coexisting technical problems:
[0008] - Insufficient semantic parsing capabilities: Users' natural language needs are difficult to directly and accurately translate into structured analysis task descriptions, and there is a lack of mechanisms to automatically identify analysis objectives, indicators, time ranges, and business contexts.
[0009] - Lack of multi-model collaborative reasoning capability: Analysis tasks often involve multiple different types of models (such as trend analysis, predictive analysis, causal reasoning, attribution analysis, etc.), but existing technologies lack a reasoning chain mechanism to orderly combine these models, establish data dependencies, and execute them continuously.
[0010] -Analysis of fragmented links and insufficient full-process automation: In existing solutions, data acquisition, model execution, and result generation are completed by different tools, lacking a unified scheduling center. This results in the need for multiple manual interventions in the analysis process, leading to low execution efficiency and inconsistent results.
[0011] - The process of directly using large language models for analysis is opaque: Although large language models have strong semantic understanding and generation capabilities, their internal reasoning paths, model selection processes, and data processing logic are not visible to users, and administrators cannot verify whether the analysis steps are scientific and reasonable.
[0012] - Lack of observability and traceability of results: Without the recording and visualization of the analysis process, data flow and intermediate results, even if the final result is correct, it is difficult for managers to adopt it because the formation process cannot be explained.
[0013] In summary, existing technologies still have shortcomings in three aspects: semantic parsing capabilities, multi-model collaborative reasoning, and end-to-end automated execution.
[0014] - Lack of a mechanism to directly map natural language requirements to multi-model inference chains;
[0015] - Lack of a unified central authority to dynamically schedule and manage the model call order and data flow;
[0016] - It is difficult to complete the closed-loop processing of data acquisition, model collaborative reasoning and result generation within a single system.
[0017] Therefore, there is a need to provide a method that can overcome at least some of the shortcomings mentioned above. Summary of the Invention
[0018] The objective of this invention is to provide a multi-model inference chain data analysis method, device, medium, and program product based on natural language input, which can automatically parse natural language business requirements into a multi-model inference chain execution plan, and complete an automated closed loop from data acquisition to result generation in a unified system.
[0019] The present invention also aims to provide a multi-model inference chain data analysis method, device, medium and program product based on natural language input, which can also use a large language model as a central hub to dynamically schedule various analysis models and manage data dependencies.
[0020] The present invention also aims to provide a multi-model inference chain data analysis method, device, medium and program product based on natural language input, which can record and display each step of the inference chain execution during the analysis process, ensuring scientific rigor, transparency and traceability, and providing managers with the analytical conclusions and suggestions needed for decision-making in a clear, understandable and verifiable manner.
[0021] In a first aspect of the present invention, a multi-model inference chain data analysis method based on natural language input is provided, the method comprising the steps of:
[0022] S1: Receive analysis questions in natural language form submitted by users;
[0023] S2: Utilize the deployed neural network model to perform intent recognition, business entity and analysis indicator extraction, time range parsing, and output type judgment on the analysis question text. The recognized intent, extracted business entities, extracted analysis indicators, parsed time range, and judged output type are organized into a semantic task structure by corresponding to the analysis task type, analysis object, analysis indicator, time range, and expected output content in key-value pairs.
[0024] S3: Map the semantic task structure into a structured analysis model that conforms to a predetermined specification;
[0025] S4: Register the structured analysis model as an instance to the analysis model library, wherein, during registration, a unique identifier ID is assigned to the structured analysis model and its attribution information is written, the attribution information including the upstream model ID that the structured analysis model depends on when it is executed and / or the downstream model ID that is affected by the running result of the structured analysis model;
[0026] S5: Read the upstream model ID and downstream model ID in this instance, parse the attribution relationship information of the upstream and downstream models, expand layer by layer in this way, and construct the multi-model inference chain of this instance based on the dependency relationship between the models;
[0027] S6: Execute each model instance sequentially or in parallel according to the order determined by the multi-model inference chain;
[0028] S7: Integrate the final output obtained from executing the multi-model inference chain into a comprehensive analysis report.
[0029] In a second aspect of the invention, a computer device is provided, including a processor, a memory, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the method described in the first aspect.
[0030] In a third aspect of the invention, a computer-readable storage medium is provided having a computer program / instructions stored thereon, characterized in that the computer program / instructions, when executed by a processor, implement the steps of the method described in the first aspect.
[0031] In a fourth aspect of the invention, a computer program product is provided, comprising a computer program / instructions, characterized in that, when executed by a processor, the computer program / instructions implement the steps of the method described in the first aspect.
[0032] This invention achieves automatic mapping from natural language analysis requirements to standardized model instances through semantic parsing and the Text2Model structured model instance generation mechanism, ensuring consistency and reusability of analysis task definitions, reducing manual configuration and maintenance workload, and improving task initialization efficiency and accuracy.
[0033] Introducing a large language model as the inference and scheduling hub in the inference chain planning stage can dynamically select and combine multiple analysis model instances conforming to the Text2Model specification according to task requirements, forming an optimal multi-model inference chain structure, effectively solving the problem of one-sided or poor adaptability of analysis results caused by single model calls and fixed analysis links.
[0034] By setting up multi-level observability control points during the execution of the multi-model inference chain, the input data, execution logic and output results of each link are recorded, so as to realize the traceability and verifiability of the entire analysis process. This solves the problems of opacity and lack of credibility of results in black box AI analysis, and improves the trustworthiness and adoption rate of analysis conclusions.
[0035] The data access and preprocessing stage supports real-time loading and standardized processing of multi-source heterogeneous data, and is deeply integrated with the inference chain execution to ensure data consistency and quality control during cross-model analysis, avoiding analysis interruptions or result distortion caused by inconsistent data structures.
[0036] In summary, this invention uses a large language model as the driving force, organically combining semantic parsing, model scheduling, and multi-model inference chains to achieve automated execution from natural language to full-process data analysis, thereby improving the coherence, controllability, and quality of the analysis results.
[0037] Other features and advantages of the present invention will become clearer after reading the detailed description of the embodiments of the present invention in conjunction with the accompanying drawings. Attached Figure Description
[0038] Figure 1 A flowchart of an embodiment of the method according to the present invention;
[0039] Figure 2 This is a schematic diagram of one embodiment of a constructed multi-model inference chain.
[0040] For clarity, these figures are schematic and simplified, showing only the details necessary for understanding the invention, while omitting other details. Detailed Implementation
[0041] The embodiments and examples of the present invention will now be described in detail with reference to the accompanying drawings.
[0042] The scope of the invention will become apparent from the detailed description given below. However, it should be understood that while the detailed description and specific examples illustrate preferred embodiments of the invention, they are given for illustrative purposes only.
[0043] Figure 1 A flowchart of a preferred embodiment of the multi-model inference chain data analysis method based on natural language input according to the present invention is shown.
[0044] In step S1, the system receives analysis questions submitted by users in natural language form, such as: "Are the costs of cardiology departments abnormal in the past six months?" The submission of analysis questions can be done through web input boxes, voice recognition interfaces, BI platform integration portals, etc.
[0045] In step S2, the deployed neural network model is used to perform intent recognition, business entity and analysis indicator extraction, time range parsing, and output type determination on the analysis question text. The recognized intent, extracted business entities, extracted analysis indicators, parsed time range, and determined output type are organized into a semantic task structure in key-value pairs, corresponding to the analysis task type, analysis object, analysis indicator, time range, and expected output content, respectively.
[0046] For intent recognition, pre-trained neural network models (such as multi-classifiers based on LSTM or Transformer architectures) can automatically identify the analysis task type from the natural language questions input by users. For example, a trained intent classification model based on a Transformer encoder can be used to model the analysis question text, and then output the analysis task type label through a classification head. The training data for this intent classification model can be selected according to the application domain. For example, labeled medical operational analysis corpora can be used for supervised learning during the training phase. The task types that the model can identify include: trend analysis, anomaly detection, comparison analysis, attribution analysis, and forecast analysis. For example, if the input question is "Has there been any abnormality in the workload of the cardiology department in the past six months?", the intent recognition result is "anomaly detection". "Anomaly detection" is mapped to "anomaly detection" and written into the task type field of the semantic task structure, forming the following structure:
[0047]
[0048] When the task type is unclear, the intent classification model automatically determines the closest question intent category (such as "trend analysis," "anomaly detection," or "comparative analysis") as the current analysis task type. This ensures that the model can still be built successfully even in the absence of explicit task prompts, demonstrating good fault tolerance and engineering stability.
[0049] For extracting business entities and analytical metrics, a trained named entity recognition method based on a Transformer encoder and pointer mechanism can be used to semantically parse the natural language analysis question input by the user, automatically extracting business entities (such as departments, units, and projects) and analytical metrics (such as costs, revenues, visits, and workloads). Specifically, the analysis question text is first segmented and part-of-speech tagged to form a token sequence. Then, a semantic encoding model based on a Transformer structure (such as a pre-trained model of BERT, RoBERTa, or ELECTRA) is called to perform contextual modeling on the tokens, obtaining the semantic position and association of each word in the sentence. In the entity recognition stage, a pointer mechanism is used to predict the start and end positions of each type of entity in the text and assign it a corresponding category label, such as "ORG_DEPT" (department) and "MEASURE" (metric). For example, for the analysis question "Are the workload and costs of the cardiology department abnormal in the past six months?", the system can identify "cardiology department" as the business object and "workload" and "costs" as analytical metrics. After standardization and mapping, the recognition results are converted into a unified system encoding format, such as mapping "cardiology" to "CARDIOLOGY" and "cost" to "cost_total", and written into the target_entity and metrics fields of the analysis object in the semantic task structure, forming the following structure:
[0050]
[0051] For time range parsing, trained neural network models can be used to automatically identify, structurally extract, and standardize time expressions contained in natural language text. For example, a trained neural network model based on a Transformer encoder structure (such as BERT, RoBERTa, or ELECTRA, fine-tuned with corpora from real-world scenarios like healthcare operations analysis, can accurately identify and standardize ambiguous, relative, and complex time expressions) to recognize time points or time intervals in natural language analysis text and automatically convert them into standard date format text that the system can process. For instance, using a large corpus of business queries containing time expressions as training data, this model can identify specific time points (such as "January 15, 2024") or time intervals (such as "last three months," "last quarter," "last year's data") in the text and automatically convert them into standard date format text that the system can process. For inputs with ambiguous time expressions, corresponding default values can be provided as time ranges (such as "recent" automatically mapped to "last_3_months"). For example, if a user inputs, "Please analyze the changes in the average cost of surgical departments in the first half of the year," the system can recognize the time expression "first half of the year," parse it into a standard time range, standardize the recognized time range into a unified structure, and write it into the time range field of the semantic task structure, forming the following structure:
[0052]
[0053] For output type determination, a model with the same structure as intent recognition can be used to identify the type of output the user desires. Multi-label output is supported, and recognizable output types include: charts, structured summaries, and yes / no answers (boolean answer). The identified output type is mapped to a system-unified encoding format and then written into the expected_output field of the semantic task structure, forming the following structure:
[0054]
[0055] In step S3, the semantic task structure is mapped to a structured analysis model conforming to a predetermined specification. The structured analysis model with the predetermined specification includes elements such as input parameters, data source definition, analysis logic, and output format. In this embodiment, mapping the semantic task structure to a structured analysis model conforming to the predetermined specification includes:
[0056] Step S31: Based on the predefined parameter mapping table, convert the analysis objects and time ranges in the semantic task structure into the corresponding system modeling parameter formats. For example, "cardiology" → "dept":"cardiology", "last six months" → "time_window":"last_6_months". Write the converted system modeling parameter formats into the input_params field of the analysis model schema, as shown in the example below:
[0057]
[0058] Step S32: Based on the domain metric dictionary, obtain the underlying field representation, unit, and data table source corresponding to the analysis metrics. For example, "unit_cost" is bound to the field cost / workload and points to the fact_dept_costs table. Write the obtained underlying field representation into the field binding metrics field in the analysis model schema, as shown in the example below:
[0059]
[0060]
[0061] Each standard metric name in the domain metric dictionary includes its common synonyms, alternative names, and historically high-frequency expressions, enabling the matching of fuzzy user expressions (such as "spending") to standard metrics (such as "total_cost"). For example, the standard metric "total_cost" is associated with terms such as "spending," "expenses," and "total expenditure." When processing user input text, the system calculates the similarity between the extracted original terms and the metric dictionary, comprehensively using string edit distance, word vector semantic similarity (such as cosine similarity based on a pre-trained model), and rule engine judgment to determine the most likely corresponding standard metric. After a successful match, the system replaces the original expression with the standard metric name and writes it into the metrics field of the semantic task structure.
[0062] Step S33: Based on the pre-configured mapping table between analysis task types and analysis logic combinations, select the corresponding analysis logic combination based on the analysis task type, and write the selected analysis logic combination into the `logic` field of the analysis model schema. For example, select the corresponding analysis template, such as "trend change + threshold judgment," based on the analysis task type, such as anomaly detection, and configure it as the model logic layer.
[0063] During the deployment phase, a mapping table is pre-configured between "analysis task types" and "analysis logic combinations." Each task type corresponds to one or more standard logic module combinations. For example, the template for an anomaly detection task is "trend comparison + threshold judgment," and the template for the "comparative analysis" task is "group comparison + difference sorting." This mapping table is stored in the model schema in a structured configuration format and is defined as follows:
[0064] - Supported task types (e.g., anomaly_detection, trend_analysis, compare_analysis, etc.);
[0065] -Analysis logic components corresponding to each task type (e.g., trend_compare, deviation_threshold, dimension_breakdown, etc.);
[0066] - Parameter prerequisites required for specific logic (such as whether a time range or dimension field is required);
[0067] - Optional output suggestions (such as prioritizing the display of charts or conclusion text).
[0068] Example configuration is as follows:
[0069]
[0070]
[0071] Once the system identifies the analysis task type (e.g., "anomaly_detection") from the semantic task structure, it performs the following processing:
[0072] -Based on the analysis task type, search for a matching logical combination in the analysis task type and analysis logic combination mapping table;
[0073] - Verify whether the semantic task structure contains input fields that meet the matching logical combination requirements;
[0074] - If included, write the corresponding logical flow of the matching logical combination into the logic field of the analysis model schema;
[0075] - If not included, the default logical path will be written into the analysis logic field of the analysis model schema to generate basic statistical logic or simple comparative analysis logic.
[0076] The output example is as follows:
[0077]
[0078] For different analysis task types, the system calls corresponding logical templates based on semantic structure, realizing automatic configuration and combination of the logical layer, reducing the need for manual setting of logical processes. The entire process requires no user intervention and features a configurable, scalable, and reusable template-based structure design. This significantly reduces the reliance on analytical experience in the modeling process, improves the automation and logical consistency of model building, and is particularly suitable for intelligent modeling applications aimed at non-technical users.
[0079] Step S34: Based on the system's built-in mapping relationship between indicators and data sources, match the underlying data source for each analysis indicator and write the matched underlying data source into the data source field of the analysis model schema.
[0080] The system maintains a structured index data source mapping table to describe the data table name or API path that each index should use under different analysis dimensions. For example, "unit_cost" corresponds to the data table "fact_dept_costs" under the department dimension and "fact_doctor_costs" under the doctor dimension. Once the system identifies the analysis indices (such as "unit_cost" and "surgery_volume") and the analysis objects (such as "cardiology" and "Zhang San") in the semantic task structure, it determines the granularity (such as department, doctor, disease) based on the entity type and uses this as the basis to find the most matching data table or API path. Matching prioritizes dimension-related configurations; if no explicit dimension definition is provided, the default index data source is used as a fallback. The matching result is written to the data_source field in the model schema.
[0081]
[0082] This data source information will be used for data acquisition operations in the subsequent model scheduling and execution phases to ensure that the generated model is runnable and context-consistent.
[0083] Step S35: Configure the output format, such as chart type (e.g., line chart, bar chart), text summarization rules, structured JSON output template, etc., according to the expected output content in the semantic task structure, and write the configured output format into the output field of the analysis model schema:
[0084]
[0085] The expected output identified by the system within the semantic task structure is the result of the user's question being classified by the neural network intent recognition model. This includes the output type label the user desires, such as "chart," "structured_summary," and "boolean_answer." During processing, the output type label is matched against a predefined output template library. This library defines the specific representations corresponding to different output types, for example:
[0086] - When the recognition result contains "chart", the system will automatically recommend the most suitable chart type according to the task type, such as a line chart for trend analysis tasks, a bar chart for comparison analysis tasks, and a marked line chart for anomaly detection tasks.
[0087] - When the recognition result contains "structured_summary", the system will call the text summary template to generate a natural language description containing the main indicator values and brief explanations;
[0088] - When the recognition result contains "boolean_answer", the system will configure a Boolean structured output (yes / no) and can attach a description of the triggering conditions.
[0089] For example, if the input question is "Has the workload of the cardiology department been abnormal in the past six months?", and the expected output content in the semantic task structure is identified as ["chart","structured_summary"], the system automatically generates the following schema fragment:
[0090] {
[0091] "output":["line_chart","structured_summary"]
[0092] }
[0093] The "line_chart" comes from the default chart configuration when the task type is "anomaly detection", and the "structured_summary" corresponds to the standard summary template, thus automatically completing the configuration of the output format.
[0094] Step S36: Generate a JSON structured analysis model corresponding to the analysis problem by combining the input parameters, field bindings, analysis logic, data source, and output format fields. The final generated schema structure is shown below:
[0095]
[0096] This schema structure can be used for model scheduling and execution, as well as as a carrier for model card persistence, version control, or deployment to the BI platform.
[0097] In an embodiment, the method of the present invention further includes validating the generated analysis model schema structure, detecting whether the fields are complete, whether the data source is available, and whether the logic matches the task type, thereby improving robustness and user experience under varying natural language input.
[0098] In step S4, the generated structured analysis model is registered as an instance to the analysis model library. During registration, a unique identifier ID is assigned to the structured analysis model and its attribution information is written. The attribution information includes the upstream model ID that the structured analysis model depends on during execution and / or the downstream model ID that is affected by the running result of the structured analysis model.
[0099] Attribution information in the structured analysis model instance (Model) is predefined manually by domain experts during the model registration phase. In this embodiment, the attribution relationships field of the model is configured by experts according to business logic, including:
[0100] -drivers: Represents the upstream model IDs that this model depends on during execution, i.e., the prerequisite models necessary to complete the calculation of this model;
[0101] -impacts: Characterizes the downstream model IDs affected by the results of this model, i.e., which models will directly consume the output of this model as input conditions;
[0102] -weight_hint: Used to indicate the relative importance of each upstream model in the attribution relationship;
[0103] -dimension_tags: Used to limit the range of analytical dimensions to which attribution relationships apply.
[0104] The above information is written and stored in the model library when a model instance is created or registered, becoming a fixed input condition for the generation of the inference chain.
[0105] An example structure for representing attribution relationships in a Model instance is as follows:
[0106]
[0107] In step S5, the upstream model ID and downstream model ID in the instance are read, the attribution relationship information of the upstream and downstream models is parsed, and the process is expanded layer by layer in this manner to construct the multi-model inference chain of the instance based on the dependency relationship between the models.
[0108] For example, the system reads the downstream model IDs listed in the `impacts` field of the currently input model instance and locates these downstream models in the model registry as the starting nodes (root nodes) of the inference chain. The system then parses the `drivers` field of these downstream models, identifies the upstream model IDs they depend on, and searches for the corresponding model instances in the model registry, making them child models of the root node. The system then reads the upstream model IDs listed in the `drivers` field of the currently input model instance, locates these upstream models in the model registry, and adds them to the inference chain as the direct parent nodes of the root node. This process unfolds layer by layer, forming a multi-branch dependency tree structure starting with the target model and sequentially connected by multiple model instances, with each model instance being a node in the tree. The connections between models are established through the correspondence between the model IDs in the `drivers` and `impacts` fields, thus forming a traceable causal dependency chain.
[0109] During the generation of the inference chain, the `drivers` field is consistently used to indicate upstream dependencies, ensuring that the output of the previous model can serve as the input of the next model. The `impacts` field records the IDs of downstream models affected by the current model's results, ensuring that the current model's output can be passed to subsequent related models during execution. Together, they form a complete causal dependency chain. Ultimately, the system obtains a multi-model dependency structure that expands layer by layer from the user's problem.
[0110] In this embodiment, the attribution relationship information also includes weights (weight_hint field) indicating the relative importance of each upstream model in the attribution relationship. During step S5, when constructing the multi-model attribution chain, the branches of the multi-model attribution chain are sorted and pruned according to the corresponding weights. In this embodiment, the attribution relationship information also includes a dimension_tags field defining the applicable analysis dimensions for the attribution relationship. When constructing the multi-model attribution chain, the dimension_tags field is used to verify the consistency of data dimensions when connecting nodes. If necessary, the system automatically inserts a transformation module to maintain consistency in the upstream and downstream data structures.
[0111] The generated inference chain is a dependency tree structure of finite depth, which can be dynamically adjusted based on model priority, path importance, or execution resources. The analysis path expands step by step from the target model to the original factor model, until all leaf nodes are basic models from which data can be directly obtained.
[0112] In this embodiment, observable control points are set in each model of the multi-model inference chain to record the input data, processing logic and output results of the corresponding model during execution, so as to facilitate the manager's post-event verification and process traceability.
[0113] In step S6, each model instance is executed sequentially or in parallel according to the order determined by the multi-model inference chain. Each model instance is called sequentially according to the planned order, and during processing, the input data, execution logic, and output results of each node can be recorded in the observability log. Simultaneously, based on the requirements of the inference chain, data is automatically extracted from various data sources such as databases, APIs, and files, and preprocessing operations such as cleaning, formatting, and outlier handling are performed to ensure that the structure and quality of the model input data meet the requirements of the Model instance. This process can also be recorded in the observability log.
[0114] S7: Integrate the final output obtained from executing the multi-model inference chain and the observability records of the observability control points into a comprehensive analysis report that includes data results, analysis conclusions, inference chain visualization, and process description. Present the report to the manager in a verifiable manner to provide them with scientific, transparent, and traceable decision support.
[0115] Figure 2A schematic diagram of an embodiment of a constructed multi-model inference chain is shown. This inference chain consists of multiple structured analysis model instances conforming to the Text2Model definition specification, including a trend analysis model instance 301, a predictive analysis model instance 302, an attribution analysis model instance 303, and an optimization suggestion generation model instance 304. Each model instance obtains input data from one or more specified data sources and sets observability recording points 501, 502, 503, and 504 respectively during execution to save input data, processing logic, and output results. In specific implementation, the trend analysis model instance 301 obtains historical data from data source 1, performs time series analysis and pattern recognition on the data to identify major trends, cyclical characteristics, and abnormal fluctuations, and records data input and analysis steps through observability recording point 501 during execution. The results of the trend analysis serve as input to the predictive analysis model instance 302. Simultaneously, the predictive analysis model instance can also obtain supplementary data from data source 2 to construct a predictive model and generate predicted values for future indicators. In this stage, observability recording point 502 is used to save the parameters, running logs, and prediction results of the predictive model. The prediction results are passed to attribution analysis model instance 303. This model instance combines prediction bias and external variable information, obtains influencing factor data from data source 3, and performs multivariate regression, causal inference, or other attribution analysis methods to identify key factors causing prediction bias. During execution, it saves input data, causal relationship models, and analysis conclusions through observability recording point 503. Finally, the attribution analysis results are passed to optimization suggestion generation model instance (304). This model instance generates actionable optimization suggestions based on the identified influencing factors and management objectives, combined with business rules and expert knowledge. During execution, it records input data, generation logic, and suggestion results through observability recording point 504. This optimization suggestion will serve as the final decision support output, allowing managers to directly refer to it in business adjustments and strategic planning. Thus, trend analysis, predictive analysis, attribution analysis, and optimization suggestion generation model instances can be combined as needed to achieve a closed-loop analysis from data exploration, pattern recognition, future prediction, cause analysis to optimization suggestion output. This satisfies managers' requirements for intuitive results while ensuring the scientific rigor and transparency of the analysis process, enhancing the application value and practicality of data analysis in decision support scenarios.
[0116] In another embodiment, a computer device is provided, including a processor, a memory, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the method described above.
[0117] In another embodiment, a computer-readable storage medium is provided that stores a computer program / instructions thereon, characterized in that the computer program / instructions, when executed by a processor, implement the steps of the method described above.
[0118] In another embodiment, a computer program product is provided, including a computer program / instructions, characterized in that the computer program / instructions, when executed by a processor, implement the steps of the method described above.
[0119] The various embodiments described herein, or their specific features, structures, or characteristics, may be suitably combined in one or more embodiments of the invention. Furthermore, in some cases, the order of steps described in the flowcharts and / or pipeline processes may be modified where appropriate, and they need not be performed in the exact order described. Additionally, various aspects of the invention may be implemented using software, hardware, firmware, or combinations thereof, and / or other computer-implemented modules or devices that perform the described functions. Software implementations of the invention may include executable code stored in a computer-readable medium and executed by one or more processors. Computer-readable media may include computer hard disk drives, ROM, RAM, flash memory, portable computer storage media such as CD-ROM, DVD-ROM, flash drives, and / or other devices having a Universal Serial Bus (USB) interface, and / or any other suitable tangible or non-transitory computer-readable medium or computer memory on which executable code can be stored and executed by a processor. The invention may be used in conjunction with any suitable operating system.
[0120] Unless explicitly stated otherwise, the singular forms “a” and “the” used herein include the plural meaning (i.e., meaning “at least one”). It should be further understood that the terms “having,” “comprising,” and / or “including” as used in the specification indicate the presence of the described features, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, elements, components, and / or combinations thereof. The term “and / or” as used herein includes any and all combinations of one or more of the listed related items.
[0121] The foregoing has described some preferred embodiments of the present invention. However, it should be emphasized that the present invention is not limited to these embodiments, but can be implemented in other ways within the scope of the present invention. Those skilled in the art can make various modifications and variations to the present invention based on the inventive concept and without departing from the scope of the present invention, and such modifications or variations still fall within the protection scope of the present invention.
Claims
1. A multi-model inference chain data analysis method based on natural language input, characterized in that, The method includes the following steps: S1: Receive analysis questions in natural language form submitted by users; S2: Utilize the deployed neural network model to perform intent recognition, business entity and analysis indicator extraction, time range parsing, and output type judgment on the analysis question text. The recognized intent, extracted business entities, extracted analysis indicators, parsed time range, and judged output type are organized into a semantic task structure by corresponding to the analysis task type, analysis object, analysis indicator, time range, and expected output content in key-value pairs. S3: Map the semantic task structure into a structured analysis model that conforms to a predetermined specification; S4: Register the structured analysis model as an instance to the analysis model library, wherein, during registration, a unique identifier ID is assigned to the structured analysis model and its attribution information is written, the attribution information including the upstream model ID that the structured analysis model depends on when it is executed and / or the downstream model ID that is affected by the running result of the structured analysis model; S5: Read the upstream model ID and downstream model ID in this instance, parse the attribution relationship information of the upstream and downstream models, expand layer by layer in this way, and construct the multi-model inference chain of this instance based on the dependency relationship between the models; S6: Execute each model instance sequentially or in parallel according to the order determined by the multi-model inference chain; S7: Integrate the final output obtained from executing the multi-model inference chain into a comprehensive analysis report.
2. The method according to claim 1, characterized in that, The method further includes: Observability control points are set in each model of the multi-model inference chain to record the input data, processing logic and output results of the corresponding model during execution.
3. The method according to claim 2, characterized in that, Step S7 includes: The final output obtained from executing the multi-model inference chain and the observability records of the observability control points are integrated into a comprehensive analysis report.
4. The method according to claim 1, characterized in that, The attribution information also includes weights used to indicate the relative importance of each upstream model in the attribution relationship, wherein in step S5, when constructing the multi-model attribution chain, the branches of the multi-model attribution chain are sorted and pruned according to the corresponding weights.
5. The method according to claim 1, characterized in that, Step S3 includes: S31: Based on the predefined parameter mapping table, the analysis objects and time ranges in the semantic task structure are converted into the corresponding system modeling parameter formats, and the converted system modeling parameter formats are written into the input parameter fields in the analysis model schema; S32: Based on the domain indicator dictionary, obtain the underlying field expression, unit, and data table source corresponding to the analysis indicator, and write the obtained underlying field expression into the field binding field in the analysis model schema; S33: Based on the pre-configured mapping table between analysis task types and analysis logic combinations, select the corresponding analysis logic combination based on the analysis task type, and write the selected analysis logic combination into the analysis logic field in the analysis model schema; S34: Based on the system's built-in mapping relationship between indicators and data sources, match the underlying data source for each analysis indicator and write the matched underlying data source into the data source field of the analysis model schema; S35: Configure the output format according to the expected output content, and write the configured output format into the output format field in the analysis model schema; S36: Generate a JSON structured analysis model corresponding to the analysis problem by combining the input parameters, field bindings, analysis logic, data source, and output format fields.
6. The method according to claim 5, characterized in that, Step S33 includes: Based on the analysis task type in the semantic task structure, search for a matching logical combination in the pre-configured mapping table between analysis task type and analysis logical combination. Verify whether the semantic task structure contains input fields that meet the logical combination requirements for matching; If included, the corresponding logical flow of the matched logical combination will be written into the analysis logic field of the analysis model schema; If not included, the default logical path will be written to the analysis logical field of the analysis model schema.
7. The method according to claim 5, characterized in that, Each indicator in the domain indicator dictionary includes its standard name and its synonyms, alternative names, and historically high-frequency expressions.
8. A computer device, comprising a processor, a memory, and a computer program stored in the memory, characterized in that, The processor executes the computer program to implement the steps of the method according to any one of claims 1-7.
9. A computer-readable storage medium having a computer program / instructions stored thereon, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the method according to any one of claims 1-7.
10. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the method described in any one of claims 1-7.
Citation Information
Cited By
Method, device, medium and program product for generating analysis model Schema based on natural language input
CN121502405A
Method, device, medium, and program product for generating an analysis model schema based on natural language input
CN121502405B