Natural language dialogue-oriented index prediction method and device

By integrating multi-source indicator data, building knowledge graphs and natural language processing technologies, and combining ARIMA and linear regression algorithms, the problems of real-time indicator prediction and inaccurate intent recognition of large models in existing technologies are solved, flexible and accurate indicator prediction is achieved, and enterprise-level conversational interaction is supported.

CN120633912AInactive Publication Date: 2025-09-12SHANDONG INSPUR CLOUD GOVERNMENT INFORMATION TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510690817.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-27
Publication Date
2025-09-12
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing indicator data prediction models are difficult to achieve real-time processing and prediction, lack flexibility and adaptability, and the prediction process of large models is difficult to understand and explain, affecting the trust and decision-making accuracy of corporate managers or government service scenarios.

Method used

Integrate multi-source indicator data, build a subject domain knowledge graph, extract indicators, dimensions and time information in user prediction questions through natural language processing technology, use ARIMA model and linear regression algorithm to make targeted predictions, including data cleaning, conversion and standardization, construct the correlation between indicators and dimensions, and improve prediction accuracy by regularly updating the database and dictionary library.

Benefits of technology

It achieves real-time and accurate indicator prediction, solves the problem of inaccurate intent recognition of large models, provides a flexible and scalable prediction solution, and supports enterprise-level conversational indicator prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120633912A_ABST
    Figure CN120633912A_ABST
Patent Text Reader

Abstract

The invention provides a natural language dialogue-oriented index prediction method and device. Integrating multi-source index data, constructing a subject domain knowledge graph, defining indexes, dimensions, dimension values and date fields, and establishing an association relationship between the indexes and the dimensions; indexes, dimensions, dimension values and time information in a user prediction problem are extracted through a natural language processing technology, and whether the prediction problem is a single-index time sequence prediction problem or a multi-index correlation joint prediction problem is judged; for the single-index time sequence prediction problem, performing prediction through an ARIMA model; and for the multi-index correlation joint prediction class problem, performing prediction through a linear regression algorithm. The scheme of the invention can solve the problem of real-time performance of index prediction, the problem of inaccurate intention recognition of a large model for prediction problems and the problem of black box of a large model index prediction algorithm.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a method and device for predicting indicators for natural language dialogue. Background Art

[0002] Existing indicator data prediction models are mostly based on statistical methods or machine learning algorithms. Building these models requires professional data analysts with deep mathematical and statistical knowledge. Furthermore, adjusting and optimizing model parameters requires extensive practical experience and computing resources. In a rapidly changing business environment, real-time updating and prediction of indicator data are particularly important. However, traditional prediction methods often struggle to achieve real-time data processing and prediction, resulting in prediction results lagging behind actual business conditions. When using large models to predict indicator data, the prediction process is often a "black box" that is difficult to understand and explain. This can impact the trust in prediction results and the accuracy of decision-making for business managers or government service providers.

[0003] The core of conversational interaction lies in natural language understanding technology. However, due to the complexity and diversity of natural language, accurately understanding user intent remains a challenge. Different business scenarios and metrics may require different prediction models. Existing systems often use fixed approaches for model selection and parameter tuning, lacking flexibility and adaptability.

[0004] Existing data processing technologies and cloud computing environments also provide fundamental support for the implementation of this technology. For example, efficient data indexing and retrieval technologies, real-time data stream processing technologies, and a resilient and scalable cloud computing infrastructure collectively ensure that large-scale model-based intelligent forecasting systems maintain high responsiveness and stable operation in large-scale data environments. Therefore, it is within this technological context that this invention explores and implements a new, universal, enterprise-level conversational indicator forecasting solution. Summary of the Invention

[0005] The embodiments of the present invention provide an indicator prediction method and device for natural language dialogue, which can solve the real-time problem of indicator prediction, the inaccurate intention recognition problem of large models for prediction problems, and the black box problem of large model indicator prediction algorithms.

[0006] According to one aspect of the present invention, a method for predicting indicators for natural language dialogue is provided, comprising:

[0007] Integrate multi-source indicator data and build a subject domain knowledge graph, define indicators, dimensions, dimension values ​​and date fields, and establish the relationship between indicators and dimensions;

[0008] Extract the indicators, dimensions, dimension values, and time information from the user's prediction problem through natural language processing technology, and determine whether the prediction problem is a single-indicator time series prediction problem or a multi-indicator correlation joint prediction problem;

[0009] For the single-indicator time series prediction problem, prediction is performed using the ARIMA model; for the multi-indicator correlation joint prediction problem, prediction is performed using the linear regression algorithm.

[0010] Optionally, the integration of multi-source indicator data and construction of a subject domain knowledge graph, definition of indicators, dimensions, dimension values, and date fields, and establishment of associations between indicators and dimensions may include:

[0011] Access databases, data warehouses, web services, and Excel multi-source data, and perform cleaning, conversion, standardization, and normalization through the data governance center;

[0012] Build a dimensional model based on the subject domain data table, set indicators, dimensions, dimension values ​​and date fields, and construct the association relationship and data set between the indicator model and the dimensional model;

[0013] Write indicators, dimensions, dimension value dictionaries and their synonyms into the graph database, vector database and HanLP dual data dictionary tree, and update the HanLP custom dictionary library.

[0014] Optionally, extracting indicators, dimensions, dimension values, and time information from the user question using natural language processing technology to determine whether the prediction problem is a single-indicator time series prediction problem or a multi-indicator correlation joint prediction problem includes:

[0015] To solve the prediction problem, the HanLP word segmentation tool is used to split the indicators, dimensions, and dimension value keywords in the custom dictionary library;

[0016] Perform keyword matching on the remaining words through the HanLP double-array dictionary tree, set a matching threshold, and retain the indicators, dimensions, and time information above the threshold;

[0017] Identify the prediction problem type based on keywords. If a keyword or future time description is preset and only a single indicator is involved, it is determined to be a single-indicator time series prediction problem. If it involves at least two indicators and a correlation between dimension values, it is determined to be a multi-indicator correlation joint prediction problem.

[0018] Optionally, for single-indicator time series prediction problems, extract the time interval in the user's question and obtain the historical data of the indicator for the preset time period; for multi-indicator correlation joint prediction problems, extract the dimension value as a filtering condition and query the historical data of multiple indicators for the preset time period.

[0019] Optionally, the forecasting using the ARIMA model includes:

[0020] Perform a stationary test on the historical data of the indicator. If the data is not stationary, perform differential processing to make it stable.

[0021] The autocorrelation function ACF and partial autocorrelation function PACF are used to determine the number of autoregressive terms, number of differences and number of moving average terms in the ARIMA model;

[0022] The model parameters were estimated using the least squares method or maximum likelihood estimation method;

[0023] The validity of the model was tested by residual analysis and AIC criterion;

[0024] The historical data and time order of the indicator are brought into the model to predict future indicator values.

[0025] Optionally, the prediction is performed using a linear regression algorithm, including:

[0026] Parsing the syntax of the prediction problem to determine the independent variables that affect the prediction index and the dependent variables to be predicted;

[0027] Acquiring historical data of the independent variable and the dependent variable;

[0028] Use the least squares method to build a linear regression model and estimate the regression coefficients;

[0029] The linear regression model was tested for significance by t-test and F-test;

[0030] The linear regression model is used to predict the future indicator value of the dependent variable based on the new input value of the independent variable.

[0031] Optionally, the method further includes: updating the index, dimension and dimension value information in the graph database, the vector database and the HanLP custom dictionary library through a timed pull mechanism.

[0032] According to another aspect of the present invention, there is provided an indicator prediction device for natural language dialogue, comprising:

[0033] Integration unit, used to integrate multi-source indicator data and build a subject domain knowledge graph, define indicators, dimensions, dimension values ​​and date fields, and establish the relationship between indicators and dimensions;

[0034] A determination unit is configured to extract indicators, dimensions, dimension values, and time information from a user's prediction problem through natural language processing technology, and determine whether the prediction problem is a single-indicator time series prediction problem or a multi-indicator correlation joint prediction problem;

[0035] The prediction unit is used to predict the single-indicator time series prediction problem through the ARIMA model; and to predict the multi-indicator correlation joint prediction problem through the linear regression algorithm.

[0036] According to another aspect of the present invention, an electronic device is provided, comprising:

[0037] At least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to execute the indicator prediction method for natural language dialogue described in any embodiment of the present invention.

[0038] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the indicator prediction method for natural language dialogue described in any embodiment of the present invention when executed.

[0039] The embodiment of the present invention provides an indicator prediction method and device for natural language dialogue, which integrates multi-source indicator data and constructs a subject domain knowledge graph, defines indicators, dimensions, dimension values ​​and date fields, and establishes an association relationship between indicators and dimensions; extracts indicators, dimensions, dimension values ​​and time information in user prediction problems through natural language processing technology, and determines whether the prediction problem is a single indicator time series prediction problem or a multi-indicator correlation joint prediction problem; for the single indicator time series prediction problem, prediction is performed using an ARIMA model; for the multi-indicator correlation joint prediction problem, prediction is performed using a linear regression algorithm. The solution of the present invention can solve the real-time problem of indicator prediction, the problem of inaccurate intention recognition of large models for prediction problems, and the black box problem of large model indicator prediction algorithms.

[0040] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the present invention. Other features of the present invention will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0042] Figure 1This is a flowchart of a method for predicting indicators for natural language dialogues provided by one embodiment of the present invention;

[0043] Figure 2 This is a schematic diagram of the structure of an indicator prediction device for natural language dialogue provided by one embodiment of the present invention;

[0044] Figure 3 It is a structural diagram of an electronic device for implementing the indicator prediction method for natural language dialogue according to an embodiment of the present invention. DETAILED DESCRIPTION

[0045] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0046] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0047] like Figure 1 As shown, an embodiment of the present invention provides an indicator prediction method for natural language dialogue, which may include the following steps:

[0048] S110. Integrate multi-source indicator data and build a subject domain knowledge graph, define indicators, dimensions, dimension values ​​and date fields, and establish the relationship between indicators and dimensions.

[0049] In real-world applications, data may come from various databases (such as relational databases like MySQL and non-relational databases like MongoDB), data warehouses like Hive, files like Excel, and web services. Integrating multi-source indicator data involves bringing together data from various channels and formats. During this aggregation process, data must be cleaned to remove duplicate, erroneous, and incomplete data; converted to a unified format; and standardized to ensure consistency in definitions and units.

[0050] A knowledge graph is a method of representing knowledge in the form of a graph. A subject domain knowledge graph is a knowledge graph corresponding to a specific business topic. When building a knowledge graph, it is necessary to define indicators, dimensions, dimension values, and date fields: indicators are quantitative data that measure business conditions, such as sales, profits, and the number of users; dimensions are the perspectives from which indicators are analyzed, such as time, region, and product dimensions; dimension values ​​are the specific values ​​of the dimensions, such as "2024" and "Q1" under the time dimension, and "Beijing" and "Shanghai" under the region dimension; date fields are used to record time-related data to facilitate time series analysis.

[0051] Establish an association between indicators and dimensions. For example, the sales indicator is associated with the time dimension, regional dimension, and product dimension. Through this association, indicators can be analyzed from different dimensions, such as analyzing the sales of different products in different regions at different times.

[0052] S120. Extract indicators, dimensions, dimension values, and time information from the user's prediction problem through natural language processing technology, and determine whether the prediction problem is a single-indicator time series prediction problem or a multi-indicator correlation joint prediction problem.

[0053] Natural language processing technology allows computers to understand human natural language. When a user asks a prediction question, natural language processing techniques such as word segmentation, part-of-speech tagging, and named entity recognition are used to extract indicators, dimensions, dimension values, and time information from the question. For example, for the question "Predict mobile phone sales in Beijing in 2025," the indicator extracted is "mobile phone sales," the dimensions are "time" and "region," and the dimension values ​​are "2025" and "Beijing," respectively.

[0054] Based on the extracted information, determine whether the prediction problem is a single-indicator time series prediction problem or a multi-indicator correlation joint prediction problem:

[0055] Single-indicator time series forecasting problems typically involve only one indicator and focus on its trend over time. For example, the problem of "forecasting company profits for the next five years" involves only one indicator, "company profits," and focuses on predicting future profits based on historical data.

[0056] Multi-indicator correlation joint prediction problems involve multiple indicators and require considering the correlation between them to make predictions. For example, the problem of "how much will product sales increase if advertising investment increases by 20%" involves two indicators, "advertising investment" and "product sales," and the correlation between them needs to be analyzed to make predictions.

[0057] S130: For single-indicator time series prediction problems, prediction is performed using the ARIMA model; for multi-indicator correlation joint prediction problems, prediction is performed using the linear regression algorithm.

[0058] The ARIMA (Autoregressive Integrated Moving Average) model is a commonly used time series forecasting model. It combines autoregression (AR), differencing (I), and moving average (MA). For single-indicator time series forecasting problems, the ARIMA model analyzes the indicator's historical time series data, analyzing its own characteristics such as its changing patterns, periodicity, and trend, and then predicts future values. For example, for monthly sales data, the ARIMA model can predict sales for the next few months based on sales data from several past months.

[0059] The linear regression algorithm is a statistical method used to establish a linear relationship between independent and dependent variables. For problems involving the joint prediction of multiple correlation indicators, some indicators are used as independent variables and others as dependent variables, and a linear equation is fitted using historical data. For example, when analyzing the relationship between advertising investment and product sales, advertising investment is used as the independent variable and product sales as the dependent variable. Using historical data, a linear regression equation is derived. Given a new advertising investment value, this equation can be used to predict product sales.

[0060] In summary, the solution of the embodiments of the present invention, from data integration and modeling, to understanding and classification of user problems, and then to targeted prediction of different types of problems, solves the real-time problem of indicator prediction, the inaccurate intention recognition problem of large models for prediction-type problems, and the black box problem of large model indicator prediction algorithms.

[0061] In an embodiment of the present invention, multi-source indicator data is integrated and a subject domain knowledge graph is constructed, indicators, dimensions, dimension values ​​and date fields are defined, and the relationship between indicators and dimensions is established, including:

[0062] Access databases, data warehouses, web services, and Excel multi-source data, and perform cleaning, conversion, standardization, and normalization through the data governance center;

[0063] Build a dimensional model based on the subject domain data table, set indicators, dimensions, dimension values ​​and date fields, and construct the association relationship and data set between the indicator model and the dimensional model;

[0064] Write indicators, dimensions, dimension value dictionaries and their synonyms into the graph database, vector database and HanLP dual data dictionary tree, and update the HanLP custom dictionary library.

[0065] Databases are a common data storage method. For example, the relational database MySQL is used to store structured business data, while the non-relational database MongoDB can store semi-structured or unstructured data. Data warehouses (such as Hive) are used to integrate and manage large amounts of enterprise data to support decision-making and analysis. Web services can provide real-time external data, such as industry data and market trends obtained through APIs. Excel files are also a common data storage medium. Many business departments record and organize data in Excel format. Connecting to multi-source data can provide comprehensive and rich information.

[0066] Data may be erroneous, duplicated, or incomplete during the collection and storage process. Data cleaning involves removing these useless or erroneous data, such as deleting duplicate records, correcting incorrect values, and supplementing missing data, in order to improve data quality and accuracy.

[0067] The data formats of different data sources may be different. The conversion operation is to unify these data in different formats into the same format.

[0068] Ensure that the data is consistent in terms of definitions, units, etc. At the same time, the definitions of indicators also need to be unified to avoid ambiguity.

[0069] Scaling the data to a specific range, usually [0, 1] or [-1, 1], eliminates the impact of the data dimension, makes data of different indicators comparable, and helps improve the effectiveness of subsequent analysis and modeling.

[0070] A subject domain is a concept that classifies and abstracts business operations, such as the sales subject domain and the customer subject domain. Building a dimensional model based on the subject domain data table is to organize and model data from a business perspective.

[0071] In the dimensional model, you need to set indicators, dimensions, dimension values, and date fields:

[0072] Indicators are quantitative data that measure business conditions, such as sales, profits, number of customers, etc., and are the core focus of analysis and decision-making.

[0073] Dimensions are angles from which indicators are analyzed, such as time, region, and product. Using different dimensions, indicators can be analyzed from multiple perspectives, leading to a deeper understanding of the business situation.

[0074] The dimension value is the specific value of the dimension, such as "January 2024" under the time dimension, "Beijing" under the region dimension, and "mobile phone" under the product dimension.

[0075] Date fields are specifically used to record time-related data, facilitating time series analysis, such as analyzing the changing trends of indicators over time.

[0076] Construct the relationship between the indicator model and the dimensional model to clarify the connection between the indicator and each dimension. For example, the sales indicator is associated with the time dimension, the region dimension, and the product dimension. This association allows sales analysis from different dimensions, such as analyzing the sales of different products in different regions at different times.

[0077] Write indicators, dimensions, dimension value dictionaries and their synonyms into the graph database, vector database and HanLP dual data dictionary tree.

[0078] Graph databases store data in the form of graphs, where nodes represent entities and edges represent relationships between entities. Graph databases make it easy to store and query relationships between metrics and dimensions, for example, querying all dimensions related to a particular metric.

[0079] Vector databases represent data as vectors, facilitating similarity calculation and retrieval. By converting metrics, dimensions, dimension values, and their synonyms into vectors and storing them in a vector database, concepts similar to user input can be quickly found, improving data retrieval efficiency.

[0080] HanLP is a natural language processing tool. Its dual-data dictionary tree is an efficient data structure for storing and retrieving vocabulary. Writing relevant dictionaries and synonyms into the HanLP dual-data dictionary tree enables rapid identification and matching of metrics, dimensions, and other information in user input during natural language processing. Updating the HanLP custom dictionary library allows the tool to better identify and process domain-specific vocabulary. As business evolves and data is updated, new metrics, dimensions, and dimension values ​​may emerge. Timely updating of the custom dictionary library improves the accuracy and efficiency of natural language processing and ensures that the system correctly understands user query intent.

[0081] In an embodiment of the present invention, the method may further include the following steps: updating the index, dimension and dimension value information in the graph database, the vector database and the HanLP custom dictionary library through a timed pull mechanism.

[0082] The scheduled pull mechanism obtains the latest indicators, dimensions, and dimension value information from the data source (such as the database and data warehouse connected when integrating multi-source indicator data) at set time intervals.

[0083] The new information obtained is compared with the existing data in the graph database. For newly added entities (indicators, dimensions, dimension values), corresponding nodes are created in the graph database; for new relationships between entities, corresponding edges are added; for existing entities and relationships, if the information has changed, it is updated.

[0084] Convert new indicators, dimensions, and dimension values ​​into vector form and add them to the vector database. At the same time, update the corresponding vector representation of existing data with updated information to ensure the accuracy of similarity calculation.

[0085] Add new vocabulary (metrics, dimensions, dimension values, and their synonyms) to the HanLP custom dictionary. If the information of certain vocabulary changes, update it accordingly so that HanLP can accurately recognize these professional terms when processing natural language.

[0086] In an embodiment of the present invention, natural language processing technology is used to extract indicators, dimensions, dimension values, and time information from user questions, and determine whether the prediction problem is a single-indicator time series prediction problem or a multi-indicator correlation joint prediction problem, including:

[0087] For prediction problems, the HanLP word segmentation tool is used to split the indicators, dimensions, and dimension value keywords in the custom dictionary library;

[0088] Perform keyword matching on the remaining words through the HanLP double-array dictionary tree, set a matching threshold, and retain the indicators, dimensions, and time information above the threshold;

[0089] Identify the prediction problem type based on keywords. If a keyword or future time description is preset and only a single indicator is involved, it is determined to be a single-indicator time series prediction problem. If it involves at least two indicators and a correlation between dimension values, it is determined to be a multi-indicator correlation joint prediction problem.

[0090] Natural language processing technology enables computers to understand human natural language input, convert prediction questions raised by users in everyday language into information that can be processed by computers, extract indicators, dimensions, dimension values ​​and time information in the questions, and determine the type of questions.

[0091] HanLP is a natural language processing toolkit with word segmentation capabilities. In the indicator prediction system, a custom dictionary library containing indicators, dimensions, and dimension values ​​for specific fields is pre-built. For example, in the economic field, the dictionary library may contain words such as "GDP," "per capita income," "city," and "year." When a user enters a prediction question, the HanLP word segmentation tool first attempts to split the corresponding keywords from the custom dictionary library. For example, for the question "Predict Shanghai's GDP in 2024," HanLP can directly identify and split the words "forecast," "2024," "Shanghai," and "GDP" in the custom dictionary library.

[0092] The double-array dictionary tree is an efficient data structure for quickly finding and matching words. When processing natural language, it can quickly determine whether a word is in a specific vocabulary set.

[0093] After the HanLP word segmentation tool breaks down the keywords in the custom dictionary, there may be other unrecognized words in the question. In this case, the system will perform keyword matching on these remaining words using the HanLP double-array dictionary tree.

[0094] To improve matching accuracy and efficiency, a matching threshold is set. If a word's match with a vocabulary in the dictionary exceeds the threshold, it is identified as a valid indicator, dimension, or time information and retained; if it is below the threshold, it is considered irrelevant information and discarded. For example, for the query "Estimate the GDP growth trend of Guangzhou in the next quarter," "estimate" may not be in the custom dictionary, but through double-array dictionary tree matching, if its match with "forecast" exceeds the threshold, it will be identified as a prediction-related keyword and retained.

[0095] When the system recognizes that the question contains preset prediction-related keywords (such as "forecast", "expect", "estimate", etc.), or a future time description (such as "2025", "next year", "next quarter", etc.), and the question only involves a single indicator, it is determined that the problem is a single-indicator time series prediction problem.

[0096] If the problem involves at least two indicators and there is a dimension value correlation relationship, that is, there is a connection between different indicators based on a certain dimension (such as region, time, etc.), then it is determined to be a multi-indicator correlation joint prediction problem.

[0097] In an embodiment of the present invention, for single-indicator time series prediction problems, the time interval in the user question is extracted to obtain the historical data of the indicator for the preset time period; for multi-indicator correlation joint prediction problems, the dimension value is extracted as a filtering condition to query the historical data of multiple indicators for the preset time period.

[0098] Indicator time series forecasting focuses on the changing trend of an indicator over time, aiming to predict the indicator's value at a specific point in time or time period in the future. When a user's question falls under the single-indicator time series forecasting category, the system first extracts the time interval information from the natural language input. For example, for the question "Predict Jinan's GDP in 2028," "2028" refers to a future point in time, the target time for the forecast.

[0099] To accurately predict future indicator values, it's necessary to reference past changes in that indicator. Therefore, the system retrieves historical indicator data for a preset time period, typically going back ten years (as specified in the technical proposal). In the example above, the system queries Jinan's GDP data for the past ten years (2018-2027). This data includes information on the indicator's fluctuations over time, including growth or decline trends, and forms the basis for time series analysis and forecasting. By analyzing patterns in this historical data, such as seasonal variations and long-term trends, and using time series forecasting models like ARIMA, it's possible to predict Jinan's GDP in 2028.

[0100] Multi-indicator correlation joint prediction problems involve the correlation between multiple indicators, and these indicators are usually analyzed based on a certain dimension (such as region, time, product type, etc.). When the system determines that a user's question belongs to this category, it extracts the dimension values ​​in the question as a filtering condition. For example, for the question "Predict what the per capita income level of residents in Jinan will be when its GDP grows to 2 trillion yuan," the dimension value "Jinan City" is extracted.

[0101] Using the extracted dimension values ​​as filtering criteria, the system queries historical data for multiple related indicators within a preset time period, typically ten years. For example, in the example above, we query historical data for Jinan's GDP and per capita income over the past ten years. By analyzing the relationships between these historical data, such as linear relationships or other correlation patterns, and using methods like linear regression algorithms, we can establish a mathematical model linking GDP and per capita income. This model then predicts the likely per capita income level, assuming GDP growth reaches 2 trillion yuan.

[0102] In an embodiment of the present invention, prediction is performed using an ARIMA model, including:

[0103] Perform a stationary test on the historical data of the indicator. If the data is not stationary, perform differential processing to make it stable.

[0104] The autocorrelation function ACF and partial autocorrelation function PACF are used to determine the number of autoregressive terms, number of differences and number of moving average terms in the ARIMA model;

[0105] The model parameters were estimated using the least squares method or maximum likelihood estimation method;

[0106] The validity of the model was tested by residual analysis and AIC criterion;

[0107] Bring the indicator's historical data and time order into the model to predict future indicator values.

[0108] Stationarity of a time series refers to the stability of its statistical characteristics over time. Stationarity is crucial for ARIMA models, as most traditional time series analysis methods are based on stationary data. If the data is nonstationary, directly applying the model may lead to inaccurate forecasts. For example, economic data such as GDP growth and sales often exhibit trends or seasonality over time, and these data may not be stationary in their original state. Common stationarity tests include the ADF test. If the data is nonstationary, differencing is often used to stabilize it. Differencing involves subtracting the data from one period to the next. For example, first-order differencing involves subtracting the previous period's data from the current period's data. Differencing eliminates trend and seasonality in the data, ensuring that the data meets stationarity requirements and prepares the data for subsequent modeling.

[0109] ACF measures the correlation between the observations in the time series and themselves at different time intervals; PACF measures the direct correlation between the observations and themselves at different lag orders after eliminating the influence of the intermediate observations.

[0110] Determine the order: The number of autoregressive terms (p), the number of differencing (d), and the number of moving average terms (q) in the ARIMA model can be determined by observing the characteristics of the ACF and PACF function graphs. For example, if the ACF graph approaches 0 rapidly after lag k, and the PACF graph approaches 0 rapidly after lag p, then the values ​​of the autoregressive term p and the moving average term q can be preliminarily determined. The number of differencing d is determined by the number of differencing operations performed during the data stabilization process.

[0111] The least squares method can minimize the sum of squared errors between the model predictions and the actual observations. By solving a specific set of equations, the estimated values ​​of the various parameters in the model can be obtained, reflecting the degree of influence of different factors in the time series data on the prediction results.

[0112] The maximum likelihood estimation method seeks the model parameter values ​​that maximize the probability of the observed data, assuming the data follows a certain probability distribution. In the ARIMA model, it can fully utilize the probability information of the data to obtain more accurate parameter estimates.

[0113] Residuals are the differences between the model's predicted values ​​and the actual observed values. If the model is valid, the residuals should be a white noise sequence, meaning there is no autocorrelation between the residuals, their mean is zero, and their variance is constant. Methods such as plotting residuals and performing autocorrelation tests can be used to determine whether the residuals conform to the characteristics of white noise. If the residuals do not meet the requirements, the model needs further adjustment.

[0114] The AIC criterion is used for model selection. In the ARIMA model, the smaller the AIC value, the better the model's balance between data fit and complexity, and the higher the model's effectiveness. By comparing the AIC values ​​of different models, you can select the most appropriate ARIMA model.

[0115] After completing model construction, parameter estimation, and validation, the historical indicator data and the determined time order are incorporated into the established ARIMA model to predict future indicator values. The time order is determined based on the future time point or time period that needs to be predicted in the user's problem.

[0116] In an embodiment of the present invention, prediction is performed using a linear regression algorithm, including:

[0117] Parse the syntax of the forecasting problem and determine the independent variables that affect the forecast indicators and the dependent variables to be predicted;

[0118] Obtain historical data on independent and dependent variables;

[0119] Use the least squares method to build a linear regression model and estimate the regression coefficients;

[0120] The significance test of the linear regression model was performed using t-test and F-test;

[0121] The linear regression model is used to predict the future indicator value of the dependent variable based on the new input values ​​of the independent variable.

[0122] After receiving a prediction problem, the syntax must be parsed to determine the independent and dependent variables. Obtaining historical data for the independent and dependent variables. After determining the independent and dependent variables, historical data needs to be collected. This data can be obtained from previously integrated multi-source indicator data, such as databases, data warehouses, and other data sources. The larger the data volume and the wider the time range covered, the more accurately the model can capture the relationship between the independent and dependent variables.

[0123] The goal of the least squares method is to find a set of regression coefficients that minimizes the sum of squared errors between the observed values ​​of the dependent variable and the model's predicted values. The values ​​of the regression coefficients can be estimated by performing calculations on historical data.

[0124] In a regression model, each independent variable has a corresponding regression coefficient. The t-test tests whether these regression coefficients are zero. If the regression coefficient of an independent variable passes the t-test, it indicates that the independent variable has a significant effect on the dependent variable; otherwise, it indicates that the independent variable may have a small effect on the dependent variable and can be considered for removal from the model. The F-test is used to test the significance of the entire regression model, that is, to determine whether all independent variables as a whole have a significant effect on the dependent variable. The null hypothesis of the F-test is that all regression coefficients are zero. If the p-value of the F-test is less than the significance level, the null hypothesis is rejected, indicating that the regression model is significant, that is, there is a significant linear relationship between the independent and dependent variables.

[0125] When there is a new input value of the independent variable, it is substituted into the established linear regression model to calculate the predicted value of the dependent variable.

[0126] The method of the present invention combines the advantages of semantic rules, ARIMA algorithm and linear regression algorithm, and can realize fast and accurate index prediction without carrying out complicated model training. Meanwhile, the method has strong flexibility and scalability, and can be adjusted and optimized according to actual needs. By the method pointed out by the present invention, users can better grasp market dynamics and trends, and provide strong support for decision-making.

[0127] like Figure 2 As shown, an embodiment of the present invention provides an indicator prediction device for natural language dialogue, including:

[0128] Integration unit 210, used to integrate multi-source indicator data and build a subject domain knowledge graph, define indicators, dimensions, dimension values ​​and date fields, and establish associations between indicators and dimensions;

[0129] The determination unit 220 is configured to extract the indicators, dimensions, dimension values, and time information from the user's prediction question through natural language processing technology, and determine whether the prediction question is a single-indicator time series prediction problem or a multi-indicator correlation joint prediction problem;

[0130] The prediction unit 230 is used to predict single-indicator time series prediction problems using the ARIMA model; and to predict multiple-indicator correlation joint prediction problems using the linear regression algorithm.

[0131] It should be understood that the structure illustrated in the embodiments of the present invention does not constitute a specific limitation on the indicator prediction device for natural language dialogue. In other embodiments of the present invention, the indicator prediction device for natural language dialogue may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The components shown in the diagram may be implemented in hardware, software, or a combination of software and hardware.

[0132] The information interaction, execution process, etc. between the units in the above-mentioned device are based on the same concept as the embodiment of the method of the present invention. For specific contents, please refer to the description in the embodiment of the method of the present invention and will not be repeated here.

[0133] Figure 3 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or claimed herein.

[0134] like Figure 3 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., which is communicatively connected to the at least one processor 11. The memory stores a computer program that can be executed by the at least one processor. The processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. Various programs and data required for the operation of the electronic device 10 can also be stored in the RAM 13. The processor 11, ROM 12, and RAM 13 are connected to each other via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0135] Multiple components in the electronic device 10 are connected to the I / O interface 15, including an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.

[0136] Processor 11 can be any general-purpose and / or specialized processing component with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any other suitable processors, controllers, microcontrollers, etc. Processor 11 executes the various methods and processes described above, such as the indicator prediction method for natural language dialogue.

[0137] In some embodiments, the indicator prediction method for natural language dialogue can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the indicator prediction method for natural language dialogue described above can be performed. Alternatively, in other embodiments, the processor 11 can be configured to execute the indicator prediction method for natural language dialogue in any other appropriate manner (for example, by means of firmware).

[0138] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0139] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the computer program is executed by the processor, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer program may be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0140] In the context of the present invention, computer-readable storage media can be tangible media that can contain or store a computer program for use with an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. Computer-readable storage media can include but are not limited to electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, computer-readable storage media can be machine-readable signal media. More specific examples of machine-readable storage media can include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0141] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0142] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0143] A computing system may include clients and servers. The clients and servers are typically remote from each other and typically interact via a communication network. This client-server relationship arises through computer programs running on the respective computers, creating a client-server relationship. The server may be a cloud server, also known as a cloud computing server or cloud host. This server is a hosting product within the cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosting and VPS services.

[0144] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in the present invention can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved. This is not limited herein.

[0145] The above specific embodiments do not limit the scope of protection of the present invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention.

Claims

1. A method for predicting indicators for natural language dialogue, characterized in that: include: Integrate multi-source indicator data and build a subject domain knowledge graph, define indicators, dimensions, dimension values ​​and date fields, and establish the relationship between indicators and dimensions; Extract the indicators, dimensions, dimension values, and time information from the user's prediction problem through natural language processing technology, and determine whether the prediction problem is a single-indicator time series prediction problem or a multi-indicator correlation joint prediction problem; For the single-indicator time series prediction problem, prediction is performed using the ARIMA model; for the multi-indicator correlation joint prediction problem, prediction is performed using the linear regression algorithm.

2. The method according to claim 1, characterized in that The method of integrating multi-source indicator data and constructing a subject domain knowledge graph, defining indicators, dimensions, dimension values ​​and date fields, and establishing the relationship between indicators and dimensions includes: Access databases, data warehouses, web services, and Excel multi-source data, and perform cleaning, conversion, standardization, and normalization through the data governance center; Build a dimensional model based on the subject domain data table, set indicators, dimensions, dimension values ​​and date fields, and construct the association relationship and data set between the indicator model and the dimensional model; Write indicators, dimensions, dimension value dictionaries and their synonyms into the graph database, vector database and HanLP dual data dictionary tree, and update the HanLP custom dictionary library.

3. The method according to claim 1, characterized in that The method of extracting indicators, dimensions, dimension values, and time information from user questions through natural language processing technology and determining whether the prediction problem is a single-indicator time series prediction problem or a multi-indicator correlation joint prediction problem includes: To solve the prediction problem, the HanLP word segmentation tool is used to split the indicators, dimensions, and dimension value keywords in the custom dictionary library; Perform keyword matching on the remaining words through the HanLP double-array dictionary tree, set a matching threshold, and retain the indicators, dimensions, and time information above the threshold; Identify the prediction problem type based on keywords. If a keyword or future time description is preset and only a single indicator is involved, it is determined to be a single-indicator time series prediction problem. If it involves at least two indicators and a correlation between dimension values, it is determined to be a multi-indicator correlation joint prediction problem.

4. The method according to claim 3, characterized in that For single-indicator time series prediction problems, extract the time interval in the user's question and obtain the historical data of the indicator for the preset time period; for multi-indicator correlation joint prediction problems, extract the dimension value as the filtering condition and query the historical data of multiple indicators for the preset time period.

5. The method according to claim 1, wherein The prediction using the ARIMA model includes: Perform a stationary test on the historical data of the indicator. If the data is not stationary, perform differential processing to make it stable. The autocorrelation function ACF and partial autocorrelation function PACF are used to determine the number of autoregressive terms, number of differences and number of moving average terms in the ARIMA model; The model parameters were estimated using the least squares method or maximum likelihood estimation method; The validity of the model was tested by residual analysis and AIC criterion; The historical data and time order of the indicator are brought into the model to predict future indicator values.

6. The method according to claim 1, characterized in that The prediction is performed by a linear regression algorithm, including: Parsing the syntax of the prediction problem to determine the independent variables that affect the prediction index and the dependent variables to be predicted; Acquiring historical data of the independent variable and the dependent variable; Use the least squares method to build a linear regression model and estimate the regression coefficients; The linear regression model was tested for significance by t-test and F-test; The linear regression model is used to predict the future indicator value of the dependent variable based on the new input value of the independent variable.

7. The method according to claim 2, characterized in that The method also includes: updating the index, dimension and dimension value information in the graph database, the vector database and the HanLP custom dictionary library through a timed pull mechanism.

8. An indicator prediction device for natural language dialogue, characterized in that: include: Integration unit, used to integrate multi-source indicator data and build a subject domain knowledge graph, define indicators, dimensions, dimension values ​​and date fields, and establish the relationship between indicators and dimensions; A determination unit is configured to extract indicators, dimensions, dimension values, and time information from a user's prediction problem through natural language processing technology, and determine whether the prediction problem is a single-indicator time series prediction problem or a multi-indicator correlation joint prediction problem; The prediction unit is used to predict the single-indicator time series prediction problem through the ARIMA model; and to predict the multi-indicator correlation joint prediction problem through the linear regression algorithm.

9. An electronic device, characterized in that include: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the indicator prediction method for natural language dialogue according to any one of claims 1 to 7.

10. A computer-readable medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement an indicator prediction method for natural language dialogue according to any one of claims 1 to 7 when executed.