Data insight method and system based on AI large model

By introducing adaptive attention fusion loss function and reinforcement learning mechanism into the AI ​​big model, the problem of lack of business orientation when generating insight reports is solved, and a more accurate and more in line with business needs is achieved.

CN120087372APending Publication Date: 2025-06-03SHANGHAI HEYIN NETWORK TECHNOLOGY CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510140270.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-08
Publication Date
2025-06-03

AI Technical Summary

Technical Problem

Existing AI models lack clear business orientation when generating insight reports, fail to provide truly valuable business insights, and lack optimization strategies for business goals when analyzing data.

Method used

A data insight method based on AI large model is proposed, which fine-tunes the large language AI model through adaptive attention fusion loss function, and a reinforcement learning mechanism is introduced during the fine-tuning process to guide the model to be business goals-oriented when analyzing data and generate insight reports that meet business needs.

Benefits of technology

It improves the depth and accuracy of the model's data analysis, enhances the business orientation of the model, and generates insight reports that are more in line with business needs, and improves the quality of insight reports.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120087372A_ABST
    Figure CN120087372A_ABST
Patent Text Reader

Abstract

The invention provides a data insight method and system based on an AI large model, and the method comprises the steps: obtaining business data, and carrying out the preprocessing; constructing a data insight model based on a big language AI model, in the construction process, performing fine adjustment on the big language AI model by adopting an adaptive attention fusion loss function, and in the fine adjustment process, introducing a reinforcement learning mechanism to guide the model to generate an insight report meeting service requirements by taking a service target as a guide when the model analyzes data; and inputting the business data into the data insight model, carrying out deep analysis to obtain an analysis result, and generating a high-quality insight report according to a business optimization strategy obtained by reinforcement learning by taking a business target as a guide in the analysis process. According to the method, the deep analysis capability of the large language AI model, fine adjustment of the adaptive attention fusion loss function and guidance of a reinforcement learning mechanism are combined, so that the data analysis depth and accuracy of the model are improved, the service guidance quality is enhanced, and the quality of an insight report is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data insight analysis, and particularly to a data insight method and system based on an AI large model. Background Art

[0002] Traditional data analysis methods often rely on manual work, including manual data collection, collation, analysis, and report writing. This not only has low work efficiency, is error-prone, but also difficult to capture complex relationships and potential patterns in the data. It is unable to handle large-scale and high-dimensional data effectively and cannot provide comprehensive and in-depth business insights.

[0003] However, with the strong rise of artificial intelligence, large language AI models (such as ChatGPT, BERT) have been widely used in various industries, especially in the field of data analysis. Although existing AI large models perform well in data processing and analysis, they often lack clear business orientation when generating insight reports, which means that the reports generated by the models may be disconnected from business goals and cannot provide truly valuable business insights. Moreover, when existing AI large models analyze data, they often lack optimization strategies targeted at business goals, which results in the models being unable to provide targeted optimization suggestions when generating insight reports, reducing the practicality and value of the reports. Summary of the Invention

[0004] Based on this, the purpose of the present invention is to propose a data insight method and system based on an AI large model to solve the above-mentioned problems.

[0005] A data insight method based on an AI large model according to the present invention, the method includes:

[0006] Obtain business data and perform preprocessing;

[0007] Based on a large language AI model, construct a data insight model with deep understanding ability. During the model construction process, use an adaptive attention fusion loss function to finely tune the large language AI model, and introduce a reinforcement learning mechanism during the fine-tuning process to guide the model to be business goal-oriented when analyzing data and generate insight reports that meet business requirements;

[0008] Input the preprocessed business data into the constructed data insight model for in-depth analysis, generate analysis results, and generate high-quality insight reports based on the business optimization strategy obtained by reinforcement learning with business goals as the orientation during the analysis process.

[0009] Furthermore, during the model construction process, using an adaptive attention fusion loss function to finely tune the large language AI model includes:

[0010] Select a suitable large language AI pre-trained model;

[0011] Construct a dataset based on historical business data and divide it into a training set, a validation set, and a test set;

[0012] Define basic loss functions, including attention mechanism loss, data reconstruction loss, and business relevance loss. Among them, the attention mechanism loss is used to measure the rationality of the attention allocation of each part of the input by the data insight model when generating parsing results. The data reconstruction loss is used to measure the data reconstruction ability of the data insight model when generating parsing results. The business relevance loss is defined according to specific business requirements and is used to reflect the contribution or deviation degree of the data insight model to business goals;

[0013] Fuse each of the basic loss functions according to a preset ratio to form an adaptive attention fusion loss function. The calculation formula is:

[0014] L total = αL 1 + βL 2 + γL 3 ,

[0015] where L total is the total loss function, that is, the adaptive attention fusion loss function, L 1 is the attention mechanism loss, L 2 is the data reconstruction loss, L 3 is the business relevance loss, and α, β, and γ are the weights of each loss term, which are dynamically adjusted according to the training stage;

[0016] Use a deep learning framework to load the pre-trained large language AI model and the dataset, and define the model structure, including an input layer, an attention mechanism layer, and an output layer;

[0017] Write a training loop. In each training epoch, send the training data into the model, calculate the adaptive attention fusion loss function, and update the model parameters using an optimizer;

[0018] Set training parameters, including the learning rate, the number of training epochs, and the batch size;

[0019] Start the training process, let the model perform iterative training on the training data. During the training process, monitor the change of the adaptive attention fusion loss function and the performance of the model on the validation set, and adjust the training parameters and the weights of the loss terms in a timely manner according to the monitoring results to optimize the parsing results of the model;

[0020] Evaluate the performance of the fine-tuned model on the test set. The model performance includes the accuracy, stability, and compliance with business requirements of the parsing results;

[0021] Adjust the model structure, loss function, and training strategy according to the evaluation results.

[0022] Furthermore, the basic loss function is the attention mechanism loss. Defining the basic loss function includes:

[0023] When the data insight model generates an analysis result, calculate the attention weight for each input part, which is used to represent the degree of attention of the data insight model to each input part;

[0024] Define the ideal attention weight for each input part, which is used to reflect the degree of attention that the data insight model should have for each input part under ideal circumstances;

[0025] Define the attention mechanism loss by calculating the difference between the attention weight and the ideal attention weight. The calculation formula is:

[0026]

[0027] where n is the number of input parts, a i is the attention weight of the data insight model for the i-th part of the input, is the ideal attention weight.

[0028] Furthermore, the basic loss function is the data reconstruction loss. Defining the basic loss function includes:

[0029] Define the data reconstruction loss by calculating the difference between the model output and the original input data. The calculation formula is:

[0030]

[0031] where m is the number of training samples, y j is the original input data of the j-th training sample, y′ j is the model output of the j-th training sample, and the model output is the analysis result generated by the data insight model.

[0032] Furthermore, the basic loss function is the business relevance loss. Defining the basic loss function includes:

[0033] Define business goals according to business requirements, including increasing sales;

[0034] Design a metric function to quantify the fit between the model output and the business goals, including accuracy and business logic fit;

[0035] Define the business relevance loss by calculating the difference between the model output and the business goals based on the metric function. The calculation formula is:

[0036]

[0037] where k is the number of products involved in the calculation, B p is the actual sales volume of product p, B' p is the sales volume of product p predicted by the model, and w p is the weight of product p.

[0038] Furthermore, during the fine-tuning process, a reinforcement learning mechanism is introduced to guide the data insight model to be oriented towards business goals when analyzing data and generate insight reports that meet business requirements, including:

[0039] Set business goals;

[0040] Define the state space, where the state space contains all analysis results, and the analysis results include key metrics related to the business, abnormal changes, and potential trends;

[0041] Define the action space, where the action space contains all business optimization strategies;

[0042] Regard the data insight model as an agent, and its analysis process as the interaction process between the agent and the environment;

[0043] Define a policy network as the decision-making engine of the data insight model when analyzing data, which is used to explore and select the optimal business optimization strategy according to the current state, guiding the data insight model to make decisions that meet business goals;

[0044] Define a reward function based on the business goals, which is used to evaluate the effects of different business optimization strategies under different analysis results and reflect the achievement of business goals;

[0045] Use historical business data to train the policy network so that it learns to guide the data insight model to generate the optimal business optimization strategy according to the current analysis result during the analysis process. During the training process, evaluate the effect of the generated business optimization strategy according to the reward function, calculate the reward value, and update the parameters of the policy network according to the reward value. Through continuous trial and error and learning, the policy network gradually optimizes its strategy to maximize the cumulative reward, that is, to maximize the long-term achievement of business goals.

[0046] Furthermore, input the preprocessed business data into the constructed data insight model for in-depth analysis to generate analysis results, and during the analysis process, be oriented towards business goals and generate high-quality insight reports according to the business optimization strategies obtained from reinforcement learning, including:

[0047] Input the preprocessed business data into the constructed data insight model for in-depth analysis to generate analysis results, where the analysis results include key indicators, abnormal changes, and potential trends;

[0048] Through the policy network, guide the data insight model to explore and evaluate various business optimization strategies based on the current analysis results and business objectives, and find the optimal business optimization strategy in the current state;

[0049] Generate a corresponding insight report according to the analysis results and the optimal business optimization strategy. Among them, the content of the insight report includes a detailed description of the analysis results, suggestions for business optimization strategies, and the business impact brought by the implementation of the strategies.

[0050] The present invention also proposes a data insight system based on the AI large model for implementing the above-mentioned data insight method based on the AI large model. The system includes:

[0051] Data acquisition module: used to acquire business data and perform preprocessing;

[0052] Model construction module: used to construct a data insight model with deep understanding ability based on the large language AI model. During the model construction process, an adaptive attention fusion loss function is used to finely tune the large language AI model, and a reinforcement learning mechanism is introduced during the fine-tuning process to guide the model to be business-objective-oriented when analyzing data and generate an insight report that meets business requirements;

[0053] Insight module: used to input the preprocessed business data into the constructed data insight model for in-depth analysis to generate analysis results, and during the analysis process, be business-objective-oriented and generate a high-quality insight report according to the business optimization strategy obtained by reinforcement learning.

[0054] In summary, the data insight method based on the AI large model of the present invention improves the depth and accuracy of the model's data analysis by combining the deep analysis ability of the large language AI model, the fine-tuning of the adaptive attention fusion loss function, and the guidance of the reinforcement learning mechanism, and enhances the business orientation of the model, thereby generating an insight report that better meets business requirements and improving the quality of the insight report.

[0055] Among them, using the large language AI model as the basic architecture of the data insight model takes advantage of the powerful natural language processing, deep understanding, and analysis capabilities of the large language model, enabling data analysis to no longer be limited to surface statistics and analysis, but to be able to deeply understand the internal meaning and relationship of the data, thereby improving the depth of data analysis.

[0056] Fine-tuning the large language AI model through an adaptive attention fusion loss function can more accurately adjust the model to capture key information in the data, reduce interference, and further improve the accuracy of data parsing.

[0057] Moreover, during the model construction and fine-tuning process, a reinforcement learning mechanism is introduced and oriented towards business goals. This means that when the model parses data, it will pay more attention to information related to business goals and generate insight reports that better meet business needs. The reinforcement learning mechanism can guide the model to continuously optimize its strategy during the parsing process to better meet business goals, thereby enhancing the business orientation and practicality of the insight reports. At the same time, due to the combination of the business optimization strategy obtained from reinforcement learning during the parsing process, the generated insight reports not only contain in-depth analysis results of the data but also provide optimization suggestions for business goals. Such high-quality insight reports can provide more comprehensive and accurate information support for decision-makers, enabling them to make more informed business decisions.

[0058] Additional aspects and advantages of the present invention will be given in part in the following description, become apparent in part from the following description, or be understood through the embodiments of the present invention. Brief Description of the Drawings

[0059] The above and / or additional aspects and advantages of the present invention will become apparent and be readily understood from the description of the embodiments in conjunction with the following drawings, in which:

[0060] Figure 1 is a flowchart of a data insight method based on an AI large model according to Embodiment 1 of the present invention;

[0061] Figure 2 is a system block diagram of a data insight system based on an AI large model according to Embodiment 2 of the present invention. Detailed Embodiments

[0062] To facilitate the understanding of the present invention, the present invention will be described more comprehensively below with reference to the relevant drawings. Several embodiments of the present invention are shown in the drawings. However, the present invention can be implemented in many different forms and is not limited to the embodiments described herein. On the contrary, these embodiments are provided to make the disclosure of the present invention more thorough and comprehensive.

[0063] It should be noted that when an element is referred to as being "fixedly provided on" another element, it can be directly on the other element or there may also be an intermediate element. When an element is considered to be "connected" to another element, it can be directly connected to the other element or there may be an intermediate element at the same time. The terms "vertical", "horizontal", "left", "right" and similar expressions used herein are only for the purpose of illustration.

[0064] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the technical field to which this invention belongs. The terms used in the description of the present invention herein are for the purpose of describing specific embodiments only and are not intended to limit the present invention. The term "and / or" used herein includes any and all combinations of one or more of the related listed items.

[0065] Embodiment 1

[0066] Please refer to Figure 1 , the present invention provides a data insight method based on a large AI model, and this method includes steps S101 to S103:

[0067] S101, Obtain business data and perform preprocessing.

[0068] It should be noted that business data can include various business metrics, customer behavior data, market trend information, etc., as the basis for data insight. The system can support multiple data sources, including historical data in enterprise databases, structured data in external Excel files, and real-time data streams in computer memory. According to different data sources, the data format and data structure can be automatically identified through contrastive learning to ensure the flexibility and diversity of data access.

[0069] Before performing data insight, it is necessary to preprocess the accessed data. The preprocessing may include operations such as field mapping, missing value processing, data type conversion, etc. Various data cleaning methods can be used to ensure that the input data meets the analysis requirements of the model, thereby improving the accuracy of subsequent model analysis. For example, the variational autoencoder (VAE) can be used to learn the distribution of data, and missing values and outliers in the data can be intelligently filled and corrected to generate latent representations.

[0070] S102, Based on a large language AI model, construct a data insight model with deep understanding ability. During the model construction process, an adaptive attention fusion loss function is used to finely tune the large language AI model, and during the fine-tuning process, a reinforcement learning mechanism is introduced to guide the model to be business-objective-oriented when parsing data and generate an insight report that meets business requirements.

[0071] It should be noted that when constructing a data insight system, a large language AI model (such as ChatGPT, BERT, etc.) is selected as the basic architecture. The large language model has powerful language understanding, parsing, and generation capabilities and can handle complex natural language tasks. According to the specific business requirements of data insight, the large language model is optimized and adjusted to better adapt to the task scenario of data insight.

[0072] During the model construction process, an adaptive attention fusion loss function is used to finely tune the large language model. The introduced adaptive attention mechanism can dynamically adjust the attention weights according to the characteristics of the input data and business requirements, enabling the model to pay more attention to key information and improve the accuracy and depth of parsing.

[0073] Design a fusion loss function that combines multiple loss terms, such as prediction loss, attention loss, etc. By optimizing this fusion loss function, while ensuring the prediction accuracy of the model, it can guide the model to learn a more reasonable attention allocation strategy.

[0074] Use the adaptive attention fusion loss function to finely tune the large language model. During the fine-tuning process, by continuously adjusting the model parameters and the weights of the loss function, the performance of the model on specific business tasks is optimized.

[0075] During the fine-tuning process, introduce a reinforcement learning mechanism. Regard the data insight model as an agent in reinforcement learning, and regard the data parsing process as the interaction process between the agent and the environment.

[0076] A reward function closely related to the business goal can be designed. When the model generates an insight report that meets the business requirements, give a positive reward; otherwise, give a negative reward. In this way, guide the model to be oriented by the business goal when parsing data.

[0077] Under the reinforcement learning framework, the model gradually optimizes its strategy through continuous trial and error and learning. Eventually, the model can learn to generate an insight report that meets the business requirements under the given data.

[0078] In this embodiment, by integrating a large language AI model, an adaptive attention mechanism, a fusion loss function, and a reinforcement learning mechanism, etc., a data insight model with deep understanding ability is constructed. This model can accurately parse data, capture key information, and generate high-quality insight reports oriented by the business goal, providing key insight information and corresponding business optimization decisions for business data.

[0079] Further optionally, during the model construction process, using the adaptive attention fusion loss function to finely tune the large language AI model includes:

[0080] Select a suitable large language AI pre-trained model;

[0081] Construct a data set based on historical business data and divide it into a training set, a validation set, and a test set;

[0082] Define the basic loss functions, including the attention mechanism loss, data reconstruction loss, and business relevance loss. Among them, the attention mechanism loss is used to measure the rationality of the attention distribution of each part of the input by the data insight model when generating the parsing result. The data reconstruction loss is used to measure the data reconstruction ability of the data insight model when generating the parsing result. The business relevance loss is defined according to specific business requirements and is used to reflect the contribution or deviation degree of the data insight model to the business goal.

[0083] Fuse each of the basic loss functions according to a preset ratio to form an adaptive attention fusion loss function. The calculation formula is:

[0084] L total = αL 1 + βL 2 + γL 3 ,

[0085] where, L total is the total loss function, that is, the adaptive attention fusion loss function, L 1 is the attention mechanism loss, L 2 is the data reconstruction loss, L 3 is the business relevance loss, and α, β, and γ are the weights of each loss term, which are dynamically adjusted according to the training stage.

[0086] Use the deep learning framework to load the pre-trained large language AI model and the dataset, and define the model structure, including the input layer, attention mechanism layer, output layer, etc.

[0087] Write the training loop. In each training cycle, send the training data into the model, calculate the adaptive attention fusion loss function, and use the optimizer to update the model parameters.

[0088] Set the training parameters, including the learning rate, number of training cycles, and batch size.

[0089] Start the training process, let the model perform iterative training on the training data. During the training process, monitor the change of the adaptive attention fusion loss function and the performance of the model on the validation set, and adjust the training parameters and the weights of the loss terms in a timely manner according to the monitoring results to optimize the parsing result of the model.

[0090] Evaluate the performance of the fine-tuned model on the test set. The model performance includes the accuracy, stability of the parsing result, and the degree of fit with the business requirements.

[0091] Adjust the model structure, loss function, training strategy, etc. according to the evaluation results.

[0092] It is understandable that an adaptive attention fusion loss function is used to finely tune the large language AI model. Through this method, the model can be adjusted more precisely to better adapt to specific business scenarios.

[0093] The adaptive attention fusion loss function is the key to the training of the data insight model. This loss function is a comprehensive loss function including the attention mechanism loss, data reconstruction loss, and business relevance loss. By using the fusion loss function to finely tune the large language model, the model can consider multiple aspects simultaneously during training, such as the reasonable allocation of attention, the accurate reconstruction of data, and the close relevance to the business. The weights of each loss term can be dynamically adjusted according to the training stage, so that the model can focus on different optimization objectives in different training stages, thus more flexibly adapting to the changes in the training process and improving the training efficiency.

[0094] Deep learning frameworks such as PyTorch or TensorFlow can be used to load the pre-trained large language AI model and dataset, and define the model structure. These frameworks provide powerful computing capabilities and convenient APIs, making model training and inference more efficient.

[0095] Further optionally, the basic loss function is the attention mechanism loss. Defining the basic loss function includes:

[0096] When the data insight model generates the parsing result, calculate the attention weight of each input part, which is used to represent the degree of attention of the data insight model to each input part;

[0097] Define the ideal attention weight for each input part, which is used to reflect the degree of attention that the data insight model should have for each input part under ideal circumstances;

[0098] By calculating the difference between the attention weight and the ideal attention weight, define the attention mechanism loss. The calculation formula is:

[0099]

[0100] where n is the number of input parts, a i is the attention weight of the data insight model for the i-th part of the input, is the ideal attention weight.

[0101] It is understandable that taking the attention mechanism loss as one of the basic loss functions is a measure of the degree of attention of the data insight model to the input part when generating the parsing result. During the process of the data insight model generating the parsing result, the attention weights of each input part (such as data fields, text paragraphs, etc.) are calculated to reflect the degree of attention of the model to each input part. And ideal attention weights are defined for each input part, which reflect the degree of attention that the data insight model should have for each input part under ideal circumstances. This provides a clear goal for model training.

[0102] The attention mechanism loss is defined by calculating the difference between the actual attention weights of the model and the ideal attention weights to quantify the deviation of the model when focusing on the input part.

[0103] In the process of optimizing the data insight model in this embodiment, taking the attention mechanism loss as one of the basic loss functions, the loss is defined by calculating the difference between the actual attention weights and the ideal attention weights, thus providing a clear goal and measurement method for optimizing the performance of the data insight model. It helps the model to more accurately focus on the input part during training and improve the accuracy and reliability of the parsing result.

[0104] Further optionally, the basic loss function is the data reconstruction loss, and the definition of the basic loss function includes:

[0105] The data reconstruction loss is defined by calculating the difference between the model output and the original input data, and the calculation formula is:

[0106]

[0107] where m is the number of training samples, y j is the original input data of the jth training sample, and y′ j is the model output of the jth training sample, and the model output is the parsing result generated by the data insight model.

[0108] It is understandable that taking the data reconstruction loss as one of the basic loss functions, the loss is defined by calculating the difference between the model output and the original input data, and driving the model to learn how to accurately reconstruct the input data. During training, the model will continuously adjust its parameters to minimize the data reconstruction loss, thereby improving the model's reconstruction ability and generalization performance to be applicable to various application scenarios.

[0109] Further optionally, the basic loss function is the business relevance loss, and the definition of the basic loss function includes:

[0110] Define business goals according to business requirements, including increasing sales;

[0111] Design a metric function to quantify the fit between the model output and the business objectives, including accuracy, interpretability, and alignment with business logic;

[0112] Define the business relevance loss by calculating the difference between the model output and the business objectives based on the metric function. The calculation formula is:

[0113]

[0114] where k is the number of products involved in the calculation, B p is the actual sales volume of product p, and B' p is the sales volume of product p predicted by the model, and w p is the weight of product p (which can be based on factors such as the importance of the product and historical sales data).

[0115] It is understandable that the business relevance loss is used as one of the basic loss functions. This loss function is particularly suitable for model training scenarios that need to be directly linked to business objectives, ensuring that the model output can closely meet business requirements. According to business needs, the solution clearly defines the business objectives, such as increasing sales volume, and all model designs and trainings will be carried out around this goal. The business relevance loss, as the optimization goal of model training, drives the model to learn how to better predict and meet business objectives. During the training process, the model will continuously adjust its parameters to minimize the business relevance loss, thereby improving the practicality and value of the model in business scenarios. It can be applied to various scenarios that require the model to directly support business decisions, such as sales forecasting, product recommendation, customer segmentation, etc. By minimizing the business relevance loss, the model can better adapt to business needs.

[0116] Further optionally, during the fine-tuning process, introduce a reinforcement learning mechanism to guide the data insight model to generate an insight report that meets business needs with business objectives as the orientation when analyzing data, including:

[0117] Set business objectives;

[0118] Define the state space, where the state space contains all analysis results, and the analysis results include key metrics related to business, abnormal changes, and potential trends;

[0119] Define the action space, where the action space contains all business optimization strategies;

[0120] Regard the data insight model as an agent, and its analysis process as an interaction process between the agent and the environment. The agent selects actions based on the current state and evaluates the effects of the actions through environmental feedback;

[0121] Define a policy network as the decision-making engine of the data insight model during data parsing, which is used to explore and select the optimal business optimization strategy according to the current state, guiding the data insight model to make decisions that meet business goals;

[0122] Define a reward function based on the business goals, which is used to evaluate the effects of different business optimization strategies under different parsing results, reflecting the achievement of business goals;

[0123] Train the policy network using historical business data, enabling it to learn to guide the data insight model to generate the optimal business optimization strategy according to the current parsing result during the parsing process. During the training process, evaluate the effect of the generated business optimization strategy according to the reward function, calculate the reward value, and update the parameters of the policy network according to the reward value. Through continuous trial and error and learning, the policy network gradually optimizes its strategy to maximize the cumulative reward.

[0124] Understandably, during the process of fine-tuning the data insight model, a reinforcement learning mechanism is introduced. This mechanism enables the model to be more business-goal-oriented when parsing data, generate insight reports that meet business needs, and automatically recommend corresponding business optimization strategies.

[0125] When constructing the reinforcement learning framework, first clarify the business goals, such as increasing sales, reducing operating costs, and / or reducing customer churn rate, etc. The business goals are the core direction of model training and optimization, and also an important criterion for evaluating model performance. Then define the state space, which includes all possible parsing results. The parsing results cover key business-related indicators, abnormal changes, and potential trends. And define the action space, which includes all business optimization strategies, such as adjusting product pricing, increasing marketing activities, etc. These strategies are the action plans that the model can choose during the parsing process. Regard the data insight model as an agent, and its parsing process as the interaction process between the agent and the environment. The agent selects actions (i.e., business optimization strategies) according to the current state (i.e., parsing result), and evaluates the effect of the actions through environmental feedback (i.e., changes in business indicators). Then define a policy network as the decision-making engine of the data insight model during data parsing. The policy network explores and selects the optimal business optimization strategy according to the current state, guiding the data insight model to make decisions that meet business goals. And define a reward function based on the business goals, which is used to evaluate the effects of different business optimization strategies under different parsing results. The reward function reflects the achievement of business goals, such as maximizing profit, minimizing operating costs, etc. Through the reward function, the model can learn which strategies are beneficial to the achievement of business goals.

[0126] Then, historical business data is used to train the policy network, enabling it to learn to guide the data insight model to generate optimal business optimization strategies based on the current parsing results during the parsing process. During the training process, the effectiveness of the generated business optimization strategies is evaluated according to the reward function, the reward value is calculated, and the parameters of the policy network are updated based on the reward value. Through continuous trial and error and learning, the policy network gradually optimizes its strategies to maximize the cumulative reward, that is, to achieve the long-term maximization of business goals.

[0127] After sufficient training, the data insight model (i.e., the agent) will be able to generate insight reports that meet business requirements from the given data and automatically recommend corresponding business optimization strategies. The optimized model is deployed into the actual business environment, its performance is continuously monitored, and necessary adjustments and optimizations are made based on the feedback to ensure that the model can adapt to the changes in the actual business environment and continuously provide valuable insights and suggestions for the business.

[0128] S103, Input the preprocessed business data into the constructed data insight model for in-depth parsing to generate parsing results. During the parsing process, guided by the business goals, according to the business optimization strategies obtained from reinforcement learning, generate high-quality insight reports.

[0129] It should be noted that the optimized and adjusted data insight model performs in-depth parsing on the input business data, which includes using the model's in-depth understanding ability to extract key features in the data (these features can be explicit or implicit), identify data patterns (these patterns can be periodic, trend-based, or correlative), predict business trends, etc. The in-depth parsing process applies AI algorithms for complex calculations. Taking the neural network in deep learning as an example, steps such as inter-layer transmission and feature mapping involve a large amount of matrix operations and non-linear transformations. These calculations enable the model to automatically learn complex feature representations in the data and generate more accurate prediction results. After in-depth parsing, the model generates parsing results, which can include business key indicators and their abnormal changes, potential patterns of customer behavior, predictions of market trends, etc. These parsing results can provide strong data support for business decisions.

[0130] Since during the model construction and fine-tuning process, business goals are clarified, such as increasing sales, reducing customer churn rate, etc., these business goals will serve as the guidance for the model to parse data, ensuring that the generated parsing results are closely related to business requirements. In the model fine-tuning process, a reinforcement learning mechanism is introduced. Through rewards or punishments, the model can be guided to learn how to generate insight reports that are more in line with business goals. The insight report not only contains a detailed description of the parsing results but can also include suggestions for business optimization strategies and the possible business impacts of implementing these strategies.

[0131] Further optionally, input the preprocessed business data into the constructed data insight model for in-depth analysis to generate an analysis result. During the analysis process, guided by the business objective, generate a high-quality insight report according to the business optimization strategy obtained through reinforcement learning, including:

[0132] Input the preprocessed business data into the constructed data insight model for in-depth analysis to generate an analysis result, where the analysis result includes key metrics, abnormal changes, and potential trends.

[0133] Through the policy network, guide the data insight model to explore and evaluate various business optimization strategies based on the current analysis result and business objective, and find the optimal business optimization strategy in the current state.

[0134] Generate a corresponding insight report according to the analysis result and the optimal business optimization strategy. Among them, the content of the insight report includes a detailed description of the analysis result, suggestions for business optimization strategies, and the business impact brought by the implementation strategy.

[0135] Understandably, use the constructed data insight model to conduct in-depth analysis on the preprocessed data. During the in-depth analysis process, the model will apply the in-depth understanding ability of AI algorithms to extract key features in the data, identify data patterns, and predict business trends, etc. And generate an analysis result, which can include key metrics (such as sales volume, user activity, etc.), abnormal changes (such as best-selling product monitoring, monitoring the appearance or disappearance of best-selling products, sudden increase or decrease in sales volume), and potential trends (such as new product insight, predicting its future development trend), etc.

[0136] After generating the analysis result, through the policy network in the reinforcement learning architecture, guide the data insight model to explore various business optimization strategies according to the current analysis result and business objective, and evaluate the contribution of each strategy to the business objective (which can be through simulation or actual testing), and finally determine the optimal business optimization strategy in the current state.

[0137] Finally, integrate the analysis result and the optimal business optimization strategy to generate an insight report, and the report content includes a detailed description of the analysis result, suggestions for business optimization strategies, and the business impact brought by the implementation strategy, etc.

[0138] In summary, the data insight method based on the AI large model of the present invention improves the depth and accuracy of the model's data analysis and enhances the business orientation of the model by combining the in-depth analysis ability of the large language AI model, the fine-tuning of the adaptive attention fusion loss function, and the guidance of the reinforcement learning mechanism, thereby generating an insight report that better meets business needs and improving the quality of the insight report.

[0139] Among them, using the large language AI model as the infrastructure of the data insight model takes advantage of the powerful natural language processing, deep understanding, and parsing capabilities of the large language model, enabling data parsing to no longer be limited to superficial statistics and analysis, but to be able to deeply understand the inherent meaning and relationships of the data, thereby improving the depth of data parsing.

[0140] By fine-tuning the large language AI model through an adaptive attention fusion loss function, the model can be adjusted more accurately to capture key information in the data, reduce interference, and further improve the accuracy of data parsing.

[0141] Moreover, during the model construction and fine-tuning process, a reinforcement learning mechanism is introduced and oriented towards business goals. This means that when the model parses data, it will pay more attention to information related to business goals and generate insight reports that better meet business needs. The reinforcement learning mechanism can guide the model to continuously optimize strategies during the parsing process to better meet business goals, thereby enhancing the business orientation and practicality of the insight reports. At the same time, due to the combination of the business optimization strategies obtained from reinforcement learning during the parsing process, the generated insight reports not only contain the in-depth parsing results of the data but also provide optimization suggestions for business goals. Such high-quality insight reports can provide more comprehensive and accurate information support for decision-makers, enabling them to make more informed business decisions.

[0142] Embodiment 2

[0143] Please refer to Figure 2 , a data insight system based on an AI large model proposed by the present invention, the system includes:

[0144] Data acquisition module: used to acquire business data and perform preprocessing;

[0145] Model construction module: used to build a data insight model with deep understanding ability based on the large language AI model. During the model construction process, the large language AI model is finely tuned using an adaptive attention fusion loss function, and during the fine-tuning process, a reinforcement learning mechanism is introduced to guide the model to be oriented towards business goals when parsing data and generate insight reports that meet business needs;

[0146] Insight module: used to input the preprocessed business data into the built data insight model for in-depth parsing, generate parsing results, and during the parsing process, be oriented towards business goals and generate high-quality insight reports according to the business optimization strategies obtained from reinforcement learning.

[0147] Further optionally, the model construction module is also used for:

[0148] Select a suitable large language AI pre-trained model;

[0149] Construct a dataset based on historical business data and divide it into a training set, a validation set, and a test set;

[0150] Define basic loss functions, including attention mechanism loss, data reconstruction loss, and business relevance loss. Among them, the attention mechanism loss is used to measure the rationality of the attention distribution of each part of the input by the data insight model when generating parsing results. The data reconstruction loss is used to measure the ability of the data insight model to reconstruct the input data when generating parsing results. The business relevance loss is defined according to specific business requirements and is used to reflect the contribution or deviation degree of the data insight model to the business goal;

[0151] Fuse each of the basic loss functions according to a preset ratio to form an adaptive attention fusion loss function. The calculation formula is:

[0152] L total = αL 1 + βL 2 + γL 3 ,

[0153] where, L total is the total loss function, that is, the adaptive attention fusion loss function, L 1 is the attention mechanism loss, L 2 is the data reconstruction loss, L 3 is the business relevance loss, and α, β, and γ are the weights of each loss term, which are dynamically adjusted according to the training stage;

[0154] Use a deep learning framework to load a pre-trained large language AI model and the dataset, and define the model structure, including an input layer, an attention mechanism layer, and an output layer;

[0155] Write a training loop. In each training epoch, send the training data into the model, calculate the adaptive attention fusion loss function, and use an optimizer to update the model parameters;

[0156] Set training parameters, including the learning rate, the number of training epochs, and the batch size;

[0157] Start the training process, let the model perform iterative training on the training data. During the training process, monitor the change of the adaptive attention fusion loss function and the performance of the model on the validation set, and adjust the training parameters and the weights of the loss terms in a timely manner according to the monitoring results to optimize the parsing results of the model;

[0158] Evaluate the performance of the fine-tuned model on the test set. The model performance includes the accuracy, stability of the parsing results, and the degree of fit with the business requirements;

[0159] Adjust the model structure, loss function, and training strategy according to the evaluation results.

[0160] Further optionally, the basic loss function is an attention mechanism loss, and the model construction module is further configured to:

[0161] When the data insight model generates an analysis result, calculate the attention weight of each input part, which is used to represent the degree of attention of the data insight model to each input part;

[0162] Define an ideal attention weight for each input part, which is used to reflect the degree of attention that the data insight model should have for each input part under ideal circumstances;

[0163] Define the attention mechanism loss by calculating the difference between the attention weight and the ideal attention weight. The calculation formula is:

[0164]

[0165] where n is the number of input parts, a i is the attention weight of the data insight model for the i-th part of the input, and is the ideal attention weight.

[0166] Further optionally, the basic loss function is a data reconstruction loss, and the model construction module is further configured to:

[0167] Define the data reconstruction loss by calculating the difference between the model output and the original input data. The calculation formula is:

[0168]

[0169] where m is the number of training samples, y j is the original input data of the j-th training sample, and y′ j is the model output of the j-th training sample. The model output is the analysis result generated by the data insight model.

[0170] Further optionally, the basic loss function is a business relevance loss, and the model construction module is further configured to:

[0171] Define a business goal according to business requirements, including increasing sales;

[0172] Design a metric function for quantifying the degree of fit between the model output and the business goal, including accuracy and business logic fit;

[0173] Define the business relevance loss by calculating the difference between the model output and the business goal based on the metric function. The calculation formula is:

[0174]

[0175] where k is the number of products involved in the calculation, B p is the actual sales volume of product p, B' p is the sales volume of product p predicted by the model, w p is the weight of product p.

[0176] Further optionally, the model construction module is further configured to:

[0177] Set business objectives;

[0178] Define the state space, where the state space contains all parsing results, and the parsing results include key metrics, abnormal changes, and potential trends related to the business;

[0179] Define the action space, where the action space contains all business optimization strategies;

[0180] Regard the data insight model as an agent, and its parsing process as an interaction process between the agent and the environment;

[0181] Define a policy network as the decision-making engine of the data insight model when parsing data, which is used to explore and select the optimal business optimization strategy according to the current state, and guide the data insight model to make decisions that meet the business objectives;

[0182] Define a reward function based on the business objectives, which is used to evaluate the effects of different business optimization strategies under different parsing results and reflect the achievement of the business objectives;

[0183] Use historical business data to train the policy network so that it learns to guide the data insight model to generate the optimal business optimization strategy according to the current parsing result during the parsing process. During the training process, evaluate the effect of the generated business optimization strategy according to the reward function, calculate the reward value, and update the parameters of the policy network according to the reward value. Through continuous trial and error and learning, the policy network gradually optimizes its strategy to maximize the cumulative reward, that is, to maximize the long-term achievement of the business objectives.

[0184] Further optionally, the insight module is further configured to:

[0185] Input the preprocessed business data into the constructed data insight model for in-depth parsing to generate parsing results, where the parsing results include key metrics, abnormal changes, and potential trends;

[0186] Through the policy network, guide the data insight model to explore and evaluate various business optimization strategies according to the current parsing result and business objectives, and find the optimal business optimization strategy in the current state;

[0187] Generate a corresponding insight report according to the parsing result and the optimal business optimization strategy. The content of the insight report includes a detailed description of the parsing result, suggestions for the business optimization strategy, and the business impact brought by the implementation strategy.

[0188] The above-described embodiments merely represent several implementation manners of the present invention. The description is relatively specific and detailed, but it should not be construed as a limitation on the scope of the patent of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present invention, several variations and improvements can still be made, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the appended claims.

Claims

1. A data insight method based on AI big model, characterized in that: The method comprises: Obtain business data and perform preprocessing; Based on the big language AI model, a data insight model with deep understanding capabilities is built. During the model construction process, an adaptive attention fusion loss function is used to fine-tune the big language AI model. During the fine-tuning process, a reinforcement learning mechanism is introduced to guide the model to be business-oriented when parsing data and generate insight reports that meet business needs; The pre-processed business data is input into the constructed data insight model for in-depth analysis to generate analysis results. During the analysis process, guided by business goals, high-quality insight reports are generated based on the business optimization strategies obtained through reinforcement learning.

2. The data insight method based on AI big model according to claim 1 is characterized in that: During the model construction process, an adaptive attention fusion loss function is used to fine-tune the large language AI model, including: Choose a suitable large language AI pre-training model; Build a data set based on historical business data and divide it into training set, validation set and test set; Define basic loss functions, including attention mechanism loss, data reconstruction loss, and business relevance loss. The attention mechanism loss is used to measure the rationality of the attention allocation of the data insight model to each part of the input when generating parsing results. The data reconstruction loss is used to measure the ability of the data insight model to reconstruct the input data when generating parsing results. The business relevance loss is defined according to specific business needs and is used to reflect the contribution or deviation of the data insight model to the business goals. The basic loss functions are fused according to a preset ratio to form an adaptive attention fusion loss function, and the calculation formula is: L total =αL1+βL2+γL3, Among them, L total is the total loss function, i.e., the adaptive attention fusion loss function, L1 is the attention mechanism loss, L2 is the data reconstruction loss, L3 is the business relevance loss, α, β, and γ are the weights of each loss term, which are dynamically adjusted according to the training stage; Use a deep learning framework to load pre-trained large language AI models and datasets, and define the model structure, including the input layer, attention mechanism layer, and output layer; Write a training loop that feeds the model with training data, computes the adaptive attention fusion loss function, and updates the model parameters using the optimizer in each training cycle. Set training parameters, including learning rate, number of training epochs, and batch size; Start the training process and let the model perform iterative training on the training data. During the training process, monitor the changes in the adaptive attention fusion loss function and the performance of the model on the validation set, and adjust the training parameters and loss item weights in a timely manner according to the monitoring results to optimize the model's parsing results. Evaluate the performance of the fine-tuned model on the test set, including the accuracy and stability of the parsing results and the degree of fit with business requirements; Adjust the model structure, loss function and training strategy based on the evaluation results.

3. The data insight method based on AI big model according to claim 2 is characterized in that: The basic loss function is the attention mechanism loss, and the definition of the basic loss function includes: When the data insight model generates a parsing result, an attention weight of each input part is calculated to indicate the degree of attention paid by the data insight model to each input part; Define the ideal attention weight for each input part to reflect how much attention the data insight model should pay to each input part under ideal circumstances; The attention mechanism loss is defined by calculating the difference between the attention weight and the ideal attention weight, and the calculation formula is: Where n is the number of input parts, a i is the attention weight of the Data Insight model on the input of part i, is the ideal attention weight.

4. The data insight method based on AI big model according to claim 2 is characterized in that: The basic loss function is data reconstruction loss, and the definition of the basic loss function includes: The data reconstruction loss is defined by calculating the difference between the model output and the original input data. The calculation formula is: Among them, m is the number of training samples, y j is the original input data of the jth training sample, y′ j is the model output of the jth training sample, and the model output is the parsing result generated by the data insight model.

5. The data insight method based on AI big model according to claim 2 is characterized in that: The basic loss function is a business correlation loss, and the definition of the basic loss function includes: Define business objectives based on business needs, including increasing sales; Design a metric function to quantify the fit between the model output and the business objectives, including accuracy and fit with business logic; The business relevance loss is defined by calculating the difference between the model output and the business goal based on the metric function, and the calculation formula is: Among them, k is the number of products involved in the calculation, B p is the actual sales volume of product p, B′ p is the sales volume of product p predicted by the model, w p is the weight of product p.

6. The data insight method based on AI big model according to claim 1 is characterized in that: During the fine-tuning process, a reinforcement learning mechanism is introduced to guide the data insight model to be business-oriented when parsing data and generate insight reports that meet business needs, including: Setting business goals; Defining a state space, wherein the state space contains all analysis results, including key indicators, abnormal changes and potential trends related to the business; Defining an action space, wherein the action space includes all business optimization strategies; The data insight model is regarded as an intelligent agent, and its parsing process is regarded as an interaction process between the intelligent agent and the environment; Define a policy network as the decision engine of the data insight model when parsing data. It is used to explore and select the best business optimization strategy based on the current status and guide the data insight model to make decisions that meet business goals. Based on the business objectives, a reward function is defined to evaluate the effects of different business optimization strategies under different analysis results, reflecting the achievement of the business objectives; Use historical business data to train the policy network so that it can learn to guide the data insight model to generate the optimal business optimization strategy according to the current analysis results during the analysis process. During the training process, the effect of the generated business optimization strategy is evaluated according to the reward function, the reward value is calculated, and the parameters of the policy network are updated according to the reward value. Through continuous trial and error and learning, the policy network gradually optimizes its strategy to maximize the cumulative reward, that is, to achieve long-term maximization of business goals.

7. The data insight method based on AI big model according to claim 6 is characterized in that: The pre-processed business data is input into the constructed data insight model for in-depth analysis to generate analysis results. During the analysis process, guided by business goals, a high-quality insight report is generated based on the business optimization strategy obtained through reinforcement learning, including: Input the pre-processed business data into the constructed data insight model, perform in-depth analysis, and generate analysis results, which include key indicators, abnormal changes, and potential trends; Through the policy network, the data insight model is guided to explore and evaluate various business optimization strategies according to the current analysis results and business goals, and find the best business optimization strategy under the current state; A corresponding insight report is generated according to the analysis results and the optimal business optimization strategy, wherein the content of the insight report includes a detailed description of the analysis results, suggestions for business optimization strategies, and business impacts brought about by implementing the strategies.

8. A data insight system based on an AI big model, used to implement the data insight method based on an AI big model as described in any one of claims 1 to 7, characterized in that: The system comprises: Data acquisition module: used to acquire business data and perform preprocessing; Model building module: used to build a data insight model with deep understanding capabilities based on the big language AI model. During the model building process, the adaptive attention fusion loss function is used to fine-tune the big language AI model. During the fine-tuning process, the reinforcement learning mechanism is introduced to guide the model to be business-oriented when parsing data and generate insight reports that meet business needs; Insight module: used to input pre-processed business data into the constructed data insight model, conduct in-depth analysis, generate analysis results, and during the analysis process, generate high-quality insight reports based on business optimization strategies obtained through reinforcement learning and guided by business goals.

Citation Information

Cited By

  • RAG and preference alignment collaborative optimization method and system oriented to power field

    CN121980039A

  • Rag and preference alignment collaborative optimization method and system for power field

    CN121980039B