Coal market prediction analysis method and system based on AI large model

Through a prediction method based on AI large models, using the Transformer architecture and multi-head attention mechanism, combined with data cleaning, standardization and feature engineering, the problem of low coal market prediction accuracy was solved, and higher prediction accuracy and fitting capabilities were achieved.

CN120707196AInactive Publication Date: 2025-09-26GUONENG SHUTONG (BEIJING) TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510803782.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-16
Publication Date
2025-09-26
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The coal market forecasting accuracy in existing technologies is low, especially when faced with interference from multiple external factors and nonlinear characteristics of data, the forecasting effect is poor.

Method used

A prediction method based on a large AI model is adopted. By minimizing the loss function and optimizing the parameters, the Transformer architecture and multi-head attention mechanism are combined to perform data cleaning, standardization, and feature engineering, and build a data model to improve prediction accuracy.

Benefits of technology

It improves the accuracy and fitting degree of coal market forecasts, can better handle complex nonlinear relationships and multi-factor influences, and generate more accurate forecast analysis reports.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120707196A_ABST
    Figure CN120707196A_ABST
Patent Text Reader

Abstract

The invention provides a coal market prediction analysis method and system based on an AI large model, and the method comprises the following steps: comprehensively collecting the historical data of a coal market based on manpower, and carrying out the preprocessing of the historical data, so as to obtain standard data; the method comprises the following steps: building an AI large model based on a Transform architecture; and training the standard data through the AI large model, optimizing the AI large model through the minimization loss function in the training process to obtain a data model, predicting the coal market according to the data model, and generating a prediction analysis report. According to the method, when the standard data is trained through the AI large model, the loss function is minimized as an optimization parameter, so that the error between the predicted value on the obtained data model and the true value yi is as small as possible, and the prediction precision of the coal market 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 market forecasting and analysis, and in particular to a coal market forecasting and analysis method and system based on an AI large model. Background Art

[0002] As a vital energy resource, coal's market environment and supply and demand are influenced by a variety of complex factors, such as the macroeconomic situation and natural disasters. Traditional coal market forecasting and analysis typically employ statistical time series analysis, regression analysis, or simple machine learning models.

[0003] For example, in the prior art, when using time series statistics, a method of analysis is used to analyze and predict data by specifically applying stochastic process theory and mathematical statistics methods to study the patterns and characteristics of data sequences that change over time. This method arranges the historical data of the research object into a chronological sequence. By analyzing this data, it uncovers trends, cyclical changes, and irregular fluctuations in the data over time, thereby inferring future development trends. While this method can model and predict time series data with a certain degree of stability, its prediction accuracy is often low in situations such as the coal market, which is subject to interference from multiple external factors and has highly nonlinear data characteristics.

[0004] In summary, the technical problem actually solved by the present invention is how to improve the accuracy of coal market forecasting. Summary of the Invention

[0005] In order to overcome the technical defects of the above-mentioned prior art in predicting the coal market with low accuracy, the purpose of the present invention is to provide a coal market forecasting and analysis method and system based on AI big model, which uses the AI ​​big model to train the standard data by minimizing the loss function as the optimization parameter, so that the prediction value on the obtained data model is and the true value y i The error between them should be as small as possible, so as to improve the accuracy of coal market forecast.

[0006] The present invention discloses a coal market forecasting and analysis method based on an AI large model, comprising the following steps:

[0007] Based on manual and comprehensive collection of historical data of the coal market, and pre-processing of the historical data to obtain standard data;

[0008] Build a large AI model based on the Transformer architecture;

[0009] The standard data is trained using the AI ​​big model, and the AI ​​big model is optimized by minimizing the loss function during the training process to obtain the data model. The minimization loss function is:

[0010]

[0011] Among them, L is the minimization loss function, N is the number of standard data, yi is the true value, is the predicted value;

[0012] The coefficient of determination and accuracy of the data model are calculated based on the following formula:

[0013]

[0014] Among them, R 2 is the coefficient of determination, M is the number of test data selected from the labeled data, is the mean of the true values;

[0015] When the coefficient of determination is closer to 1, the data model has a higher degree of fit for coal market forecasting;

[0016] Forecast the coal market based on the data model and generate a forecast analysis report.

[0017] Preferably, in the step of manually and comprehensively collecting historical data of the coal market and preprocessing the historical data to obtain standard data, the preprocessing includes data cleaning, data standardization, and feature engineering processing of the historical data;

[0018] Data cleaning includes removing duplicate historical data, correcting erroneous historical data, and filling in missing historical data. When filling in missing historical data, the mean filling method is used for numerical historical data, and the mode filling method is used for categorical historical data.

[0019] Feature engineering involves converting each piece of historical data into high-quality features that can be used by large AI models.

[0020] Preferably, data normalization adopts the Z-score normalization method, and the calculation formula of Z-score normalization is:

[0021]

[0022] in, It represents the standard data after the historical data is normalized, x i It represents historical data, u represents the mean of historical data, and σ represents the standard deviation of historical data.

[0023] Preferably, the feature engineering process includes combining original features of historical data to extract new features, and screening the extracted new features;

[0024] The extracted new features are screened and sorted in descending order using the random forest algorithm, and N new features are selected from the sorting to be input into the AI ​​large model.

[0025] Preferably, in the step of building an AI large model based on the Transformer architecture, the AI ​​large model includes an input layer, a multi-head attention mechanism layer, a feedforward neural network layer, and an output layer; wherein the multi-head attention mechanism layer includes multiple attention heads, and the calculation formula of each attention head is:

[0026]

[0027] Among them, Q, K, and V represent the query matrix, key matrix, and value matrix respectively, dk represents the dimension of the key matrix, and softmax represents the activation function.

[0028] Preferably, the feedforward neural network layer includes at least two fully connected layers, and a ReLU activation function is used between the two fully connected layers. The expression of the ReLU activation function is:

[0029] ReLU(x)=max(0,x)

[0030] Where x is the input value.

[0031] In view of this, the present invention also provides a coal market forecasting and analysis system based on an AI large model, comprising a collection / preprocessing module, a model building module, a training module, and a forecasting module; wherein,

[0032] Collection / preprocessing module: used to manually collect historical data of the coal market and preprocess the historical data to obtain standard data;

[0033] Model building module: used to build large AI models based on the Transformer architecture;

[0034] Training module: This module is used to train the AI ​​model built by the model building module on standard data. During the training process, the AI ​​model is optimized by minimizing the loss function to obtain the data model. The minimization loss function is:

[0035]

[0036] Prediction module: used to predict the coal market based on the data model obtained by the training module and generate a forecast analysis report.

[0037] The beneficial effect of the present invention is that when training the standard data through the AI ​​big model, the loss function is minimized as the optimization parameter, so that the prediction value on the acquired data model is and the true value y iThe error between them is as small as possible, thereby improving the accuracy of coal market prediction; the existing technology usually only focuses on the basic data of the coal market, and the collection of external factors such as macroeconomics, policies and regulations, and energy structure is not comprehensive or in-depth. In this application, historical data of the coal market will be comprehensively collected to make the prediction structure more accurate; in the existing technology, data cleaning and standardization are relatively simple, and in-depth mining and processing of data characteristics are ignored. In the present invention, not only conventional historical data are cleaned and standardized, but also feature engineering is performed to combine original features, extract and screen new features to improve the accuracy of historical data preprocessing and the efficiency of AI large model training to obtain data models; the traditional time series analysis methods used in the existing technology have low prediction accuracy for the complex nonlinear relationships and multi-factor interactions in the coal market. The AI ​​large model constructed by the Transformer architecture in this application uses a multi-head attention mechanism to automatically capture the correlation between different features, and a feedforward neural network to perform nonlinear feature extraction and transformation, which can better handle the complex laws and multi-factor influences of the coal market, thereby improving the fitting ability and prediction accuracy of the data model. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Figure 1 A schematic diagram of the steps of a coal market forecasting and analysis method and system based on an AI large model. DETAILED DESCRIPTION

[0039] The advantages of the present invention are further described below with reference to the accompanying drawings and specific embodiments.

[0040] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all possible embodiments consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.

[0041] The terms used in this disclosure are for the purpose of describing specific embodiments only and are not intended to limit the disclosure. As used in this disclosure and the appended claims, the singular forms "a," "an," "the," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and / or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.

[0042] It should be understood that although the terms first, second, third, etc. may be used in this disclosure to describe various information, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from each other. For example, without departing from the scope of this disclosure, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining."

[0043] In the description of the present invention, it should be understood that the terms "longitudinal", "transverse", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc., indicating the orientation or position relationship, are based on the orientation or position relationship shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention.

[0044] In the description of the present invention, unless otherwise specified and limited, it should be noted that the terms "installed", "connected" and "connected" should be understood in a broad sense. For example, it can be a mechanical connection or an electrical connection, or it can be the internal communication between two components. It can be a direct connection or an indirect connection through an intermediate medium. For ordinary technicians in this field, the specific meanings of the above terms can be understood according to the specific circumstances.

[0045] In the following description, the suffixes such as "module", "component" or "unit" used to represent elements are only used to facilitate the description of the present invention and have no specific meaning. Therefore, "module" and "component" can be used interchangeably.

[0046] This embodiment provides a coal market forecasting and analysis method based on an AI big model, comprising the following steps: manually and comprehensively collecting historical data of the coal market and preprocessing the historical data to obtain standard data; building an AI big model based on a Transformer architecture; training the standard data using the AI ​​big model, and optimizing the AI ​​big model during the training process by minimizing a loss function to obtain a data model, where the minimization loss function is: Among them, L is the minimization loss function, N is the number of standard data, y i is the true value, is the predicted value; the coefficient of determination and accuracy of the data model are calculated based on the following formula: Among them, R 2 is the coefficient of determination, M is the number of test data selected from the labeled data, is the mean of the true values; when the determination coefficient is closer to 1, the data model has a higher degree of fit for the coal market forecast; the coal market is forecasted based on the data model and a forecast analysis report is generated.

[0047] See Figure 1 As shown, this embodiment will describe in detail a coal market forecasting and analysis method based on an AI large model, which specifically includes the following steps:

[0048] Step S100: First, historical data of the coal market is collected manually and comprehensively, including direct market data, macroeconomic indicators, policy and regulatory data, energy structure data, climate data, etc., and the historical data is preprocessed to obtain standard data, wherein the preprocessing includes data cleaning, data standardization, and feature engineering processing of the historical data to obtain standard data.

[0049] Direct market data includes coal prices: This includes transaction prices for coal of different regions and qualities at various time points. For example, price data for different types of coal, such as thermal coal and coking coal, at production, transit, and consumption locations, as well as daily, monthly, and annual price fluctuations. Supply and demand data covers coal production, imports, exports, inventory levels, and sales. For example, this includes monthly production figures for each coal producer, changes in port inventory levels, and monthly coal sales across various distribution channels.

[0050] Macroeconomic indicators include economic growth indicators, such as gross domestic product (GDP) growth rate and industrial value-added growth rate, which reflect the overall economic development trend. Economic growth leads to increased industrial production, which in turn increases demand for coal. Price indices, such as the Consumer Price Index (CPI) and Producer Price Index (PPI), fluctuating prices can affect coal production costs and sales prices. Financial indicators include interest rates, exchange rates, and money supply. Interest rate fluctuations affect corporate financing costs, which in turn influences coal companies' production and investment decisions. Exchange rate fluctuations also impact coal imports and exports.

[0051] Policy and regulatory data includes industrial policies: Government policies regarding industrial restructuring in the coal industry, such as those eliminating outdated production capacity and consolidating coal resources, which directly impact coal production and supply. Environmental policies: Improved environmental standards, such as tightening pollutant emission standards for coal combustion, can prompt companies to increase environmental investment, restrict some coal production capacity, or promote the development of clean coal utilization technologies, influencing coal market supply, demand, and prices. Energy policies: Policies regarding energy restructuring, such as encouraging clean energy development and limiting total coal consumption, can alter coal's share of energy market demand.

[0052] Energy structure data includes the share of various energy sources: coal, oil, natural gas, hydropower, wind power, solar power, and other energy sources in total energy consumption. This data reflects the competitive landscape and development trends of the energy market. For example, a rising share of clean energy sources like wind power and solar power may lead to a decline in coal demand. Energy production structure also includes the production scale and growth trends of different energy sources. For example, rapid growth in natural gas production may displace coal in certain sectors.

[0053] Climate data includes meteorological conditions such as temperature, precipitation, and wind speed. For example, lower winter temperatures increase demand for coal for heating; excessive precipitation can affect coal mining and transportation, reducing supply. Natural disasters include the time, location, and impact of natural disasters such as floods, droughts, and earthquakes. Natural disasters can damage coal production facilities and disrupt transportation routes, impacting coal production and supply.

[0054] It should be noted that step S100 also includes performing a practical sequence relativity analysis on the collected historical data and the coal price series, and determining the leading-lagging relationship between the indicators and the prices by calculating the subsequent correlation coefficients between different indicators and the price series. The specific implementation is as follows:

[0055] Let the indicator series be X(t) and the coal price series be P(t). Calculate the correlation coefficient Coor(X(t), P(t+k)) at different time points k later. If there exists a case where k > 0, which maximizes the absolute value of the correlation coefficient, then X(t) is a leading indicator of the price P(t+k) (k is the leading period). For example, if the GDP growth series has the highest correlation coefficient with the coal price one month later, then the GDP growth rate is a one-month leading indicator.

[0056] Using the dynamic time warping (DTW) algorithm or cross-correlation analysis, we screen out the top N leading indicators that best match coal prices and input them into the AI ​​model as characteristics. The mathematical expression is: and When |Corr(X i (t), P(t+k))| is greater than the threshold, it is determined that X i For leading indicators.

[0057] Step S200: Build a large AI model using the Transformer architecture.

[0058] Step S300: The standard data obtained in step S100 is trained using the AI ​​big model built in step S200, and the AI ​​big model is optimized by minimizing the loss function during the training process to obtain a data model. The minimization loss function is:

[0059]

[0060] Among them, L is the minimization loss function, N is the number of standard data, y i is the true value, is the predicted value.

[0061] Step S400: In this step, the accuracy of the data model obtained in step S300 is evaluated by calculating the formula Calculate, where R 2 is the coefficient of determination, M is the number of test data selected from the labeled data, is the mean of the true values. It is the prediction error of the calculated data model, reflecting the direct deviation between the test value and the true value. For example, in some embodiments, the coal price is 800 yuan / ton, and the true value is 850 yuan / ton. Then the deviation of 50 will be included in the numerator. The sum of the squares of the deviations of all test data reflects the overall degree of "prediction inaccuracy" of the data model. The denominator is is the benchmark error, which is the error of the prediction based on the mean of the true value. Assuming the mean of the true value is 820 yuan / ton, no matter how the actual price fluctuates, using 820 / ton for prediction, the sum of the squares of all the predicted data is the total error of "blind guessing". Then R 2 The logic of deduction The essence is the error between the prediction error of the data model and the error of the most basic prediction (mean error). Then the numerator is 0, R 2 =1, it means that the data model has perfect prediction accuracy and can be used directly; if the prediction error of the data model is as bad as "mean guessing", the numerator ≈ denominator, R 2 ≈0; if the prediction error of the data model is worse than "mean guessing" (in extreme cases, such as the prediction is completely opposite), R 2 Will be a negative number.

[0062] It should be noted that, in this embodiment, the sliding window method is used to segment the historical data, and the window length changes dynamically from Lmin to Lmax (such as L = 30, 60, 90, ..., 365 days), and the data in each window is trained and verified. 2 Or mean square error, select the window length L that makes the model prediction accuracy the highest * Before each prediction, recalculate the current optimal data window L * , and according to L * Screen key leading indicators within the corresponding period to ensure that the input characteristics match the current market environment.

[0063] Step S500: forecasting the coal market according to the data model predicted in step S300 to generate a forecast analysis report to intuitively display the forecast results.

[0064] Furthermore, in the steps of manually and comprehensively collecting historical data of the coal market and preprocessing the historical data to obtain standard data, the preprocessing includes data cleaning, data standardization, and feature engineering of the historical data; data cleaning includes removing duplicate historical data, correcting erroneous historical data, and filling in missing historical data; when filling in missing historical data, the mean filling method is used to fill in numerical historical data, and the mode filling method is used to fill in categorical historical data; feature engineering includes converting each historical data into high-quality features that are suitable for use in large AI models.

[0065] In this embodiment, the preprocessing of historical data to obtain standard data in step S100 is described in detail. The preprocessing specifically includes data cleaning, data standardization, feature engineering, etc.

[0066] Data cleaning specifically involves removing duplicate content from historical data to reduce the amount of historical data stored. This can reduce the workload during transmission, analysis, and organization to increase efficiency. Data cleaning also includes correcting erroneous historical data and filling in missing historical data to ensure the availability of each piece of historical data.

[0067] In this embodiment, the mean filling method is used to fill in the missing historical data. Numerical historical data such as coal production, price, and transportation volume are often missing due to various reasons. The mean filling method calculates the average value of all valid data in the single numerical historical data and uses this as the basis for filling the missing values. In this embodiment, the coal production data is used as an example to illustrate the filling of missing historical data using the mean filling method. For example, in a quarter, the production of a coal enterprise in the first two months was 100,000 tons and 120,000 tons respectively, and the production data for the third month was missing. At this time, the average of the production of the first two months is first calculated, which is (10+12)÷2=110,000 tons, and then 110,000 tons is filled into the missing position of the third month's production.

[0068] In this embodiment, the mode filling method is used to fill missing historical data for categorical historical data. Categorical historical data includes information such as coal origin, quality grade, and transportation method. This data may be missing due to various reasons during the collection and recording process. For example, when recording coal transaction data, the origin information of some coal may be omitted due to data entry negligence, or when compiling coal quality test results, the quality grade data of individual batches of coal may be missing. In this embodiment, the mode filling method involves counting the most frequently occurring category in the historical data for a particular categorical type and then using that category for filling. This implementation will be described in detail using an example. For example, when compiling coal origin data, there are multiple origins such as "Shanxi," "Shaanxi," "Inner Mongolia," and "Xinjiang." The statistics show that Shanxi appears the most frequently, meaning that "Shanxi" is the mode of the historical data for this categorical type. When origin information is missing, "Shanxi" is used to fill in the missing information. In this embodiment, when filling categorical historical data using the mode filling method, the distribution characteristics of the original categories of the data can be maintained to the greatest extent, avoiding the destruction of the inherent laws of the data due to arbitrary filling of missing values.

[0069] The feature engineering process involves in-depth processing of the acquired historical data to convert it into high-quality features suitable for large AI models.

[0070] Furthermore, the data is normalized using the Z-score normalization method, and the calculation formula for Z-score normalization is: in, It represents the standard data after the historical data is normalized, x i It represents historical data, u represents the mean of historical data, and σ represents the standard deviation of historical data.

[0071] In this embodiment, data annotation is described in detail. The data standardization adopts the Z-score standardization method. The calculation formula of the Z-score standardization method is: It represents the standard data after the historical data is normalized, x i In some embodiments, for the coal price data, the mean u and standard deviation σ are calculated first. For example, the original value of a coal price x is i is 500 yuan / ton, the calculated mean u is 450 yuan / ton, and the standard deviation σ is 50 yuan / ton, then the standardized value is

[0072] Furthermore, feature engineering processing includes combining original features of historical data to extract new features, and screening the extracted new features; screening the extracted new features using the random forest algorithm for descending sorting, and screening N new features from the sorting to input into the AI ​​large model.

[0073] In this embodiment, feature engineering is described in detail. This process combines the original features of historical data to extract new features. These new features are then sorted in descending order using a random forest algorithm. N new features are selected from this sorting to be input into the AI ​​model for training. In some embodiments, coal prices and supply and demand are combined to obtain a new feature, the ratio of price to supply and demand. New features such as trend and seasonality are extracted from coal production using methods such as time series decomposition. A random forest algorithm is then used to sort all new features in descending order of importance. For example, if 50 new features are extracted, these are selected from the front to the back as needed and input into the AI ​​model.

[0074] Furthermore, in the step of building an AI large model based on the Transformer architecture, the AI ​​large model includes an input layer, a multi-head attention mechanism layer, a feedforward neural network layer, and an output layer; wherein the multi-head attention mechanism layer includes multiple attention heads, and the calculation formula for each attention head is: Among them, Q, K, and V represent the query matrix, key matrix, and value matrix respectively, d k It is represented as the dimension of the key matrix and softmax is represented as the activation function.

[0075] In this embodiment, the AI ​​big model is described in detail. The AI ​​big model includes an input layer, a multi-head attention mechanism layer, a feedforward neural network layer, and an output layer. The multi-head attention mechanism layer includes multiple attention heads, and the calculation method of each attention head is calculated by the formula Calculation, where Q, K, and V are represented as query matrix, key matrix, and value matrix, respectively. k It is represented as the dimension of the key matrix, and softmax is represented as the activation function. It should be noted that in the AI ​​model built on the Transformer architecture, when the standard data is input into the multi-head attention mechanism layer, it will be projected into the query matrix Q, the key matrix K and the value matrix V. Each attention head is calculated according to the formula Calculate, assuming d k =64, by calculating QK T Get the correlation score between features, divided by To prevent excessively large scores from causing the softmax function gradient to vanish, the scores are then converted into probability distributions through the softmax activation function to determine the weight of each feature under the current attention head. Finally, they are multiplied by the value matrix V to obtain the attention head output. Assuming there are eight attention heads, the outputs of these eight attention heads are concatenated by dimension, then linearly transformed to integrate feature correlation information from multiple perspectives to obtain the final output of the multi-head attention mechanism layer. This enables the model to more comprehensively and deeply capture the complex interrelationships between different features in coal market data, improving the AI ​​model's ability to understand and process data.

[0076] Furthermore, the feedforward neural network layer includes at least two fully connected layers, and a ReLU activation function is used between the two fully connected layers. The expression of the ReLU activation function is: ReLU(x)=max(0,x), where x is the input value.

[0077] In this embodiment, the feedforward neural network layer will be described in detail. The feedforward neural network layer includes at least two fully connected layers, one of which maps the data output by the multi-head attention mechanism layer from dimension n1 to n2, and performs preliminary integration and transformation on the data. The ReLU activation function is used between the two fully connected layers. This function can introduce nonlinear factors, break the limitations of linear models, and enable the AI ​​large model to learn more complex data patterns. For example, in some embodiments, when x=1, the output of the ReLU activation function is 0, which suppresses negative features; when the input x=2, the output is 2, and the positive features are retained. The output of the first fully connected layer is activated by ReLU and serves as the input of the second fully connected layer. The second fully connected layer then maps the data from dimension n2 to the final output dimension, further refining the features, and preparing for the model to output accurate coal market forecast results, thereby increasing the AI ​​large model's ability to understand and process data.

[0078] This embodiment also provides a coal market forecasting and analysis system based on an AI big model, comprising a collection / preprocessing module, a model building module, a training module, and a forecasting module; wherein the collection / preprocessing module is used to manually and comprehensively collect historical data of the coal market and preprocess the historical data to obtain standard data; the model building module is used to build an AI big model based on a Transformer architecture; the training module is used to train the standard data using the AI ​​big model built by the model building module, and optimize the AI ​​big model by minimizing the loss function during the training process to obtain a data model, wherein the minimization loss function is:

[0079]

[0080] Prediction module: used to predict the coal market based on the data model obtained by the training module and generate a forecast analysis report.

[0081] In this embodiment, the above-mentioned coal market forecasting and analysis system based on the AI ​​large model will be described in detail, which includes a collection / preprocessing module, a model building module, a training module, and a prediction module.

[0082] Including collection / preprocessing module: used to collect historical data of coal market based on manual and comprehensive methods, and preprocess the historical data to obtain standard data.

[0083] Model building module: used to build large AI models based on the Transformer architecture

[0084] Training module: Used to train the standard data obtained by the collection / preprocessing module using the AI ​​big model built by the model building module, and optimize the AI ​​big model by minimizing the loss function during the training process to obtain the data model. The minimization loss function is:

[0085]

[0086] Among them, L is the minimization loss function, N is the number of standard data, y i is the true value, is the predicted value.

[0087] Prediction module: used to predict the coal market based on the data model predicted by the training module to generate a forecast analysis report to intuitively display the results.

[0088] It should be noted that the embodiments of the present invention have better practicability and do not impose any form of limitation on the present invention. Any technician familiar with the field may use the technical content disclosed above to change or modify it into an equivalent effective embodiment. However, any modification or equivalent changes and modifications made to the above embodiments based on the technical essence of the present invention without departing from the content of the technical solution of the present invention are still within the scope of the technical solution of the present invention.

Claims

1. A coal market forecasting and analysis method based on AI large model, characterized by: The following steps are involved: Comprehensively collecting historical data of the coal market manually, and preprocessing the historical data to obtain standard data; Build the AI ​​model based on the Transformer architecture; The standard data is trained by the AI ​​big model, and the AI ​​big model is optimized by minimizing the loss function during the training process to obtain a data model. The minimization loss function is: Among them, L is the minimization loss function, N is the number of standard data, y i is the true value, is the predicted value; The coefficient of determination of the data model is calculated based on the following formula to evaluate the accuracy. The formula is: Among them, R 2 is the coefficient of determination, M is the number of test data selected from the labeled data, is the mean of the true values; When the determination coefficient is closer to 1, the degree of fit of the data model to the coal market forecast is higher; The coal market is predicted based on the data model and a forecast analysis report is generated.

2. The coal market forecasting and analysis method based on the AI ​​large model according to claim 1 is characterized in that: In the step of manually and comprehensively collecting historical data of the coal market and preprocessing the historical data to obtain standard data, the preprocessing includes data cleaning, data standardization, and feature engineering processing of the historical data; The data cleaning includes removing duplicate historical data, correcting erroneous historical data, and filling missing historical data; when filling missing historical data, the mean filling method is used to fill in numerical historical data, and the mode filling method is used to fill in categorical historical data; The feature engineering process includes converting each of the historical data into high-quality features that are applicable to the AI ​​big model.

3. The coal market forecasting and analysis method based on the AI ​​large model according to claim 2 is characterized in that: The data standardization adopts the Z-score standardization method, and the calculation formula of the Z-score standardization is: in, It represents the standard data after the historical data is normalized, x i is represented by the historical data, u is represented by the mean of the historical data, and σ is represented by the standard deviation of the historical data.

4. The coal market forecasting and analysis method based on the AI ​​large model according to claim 2 is characterized in that: The feature engineering process includes combining original features of the historical data to extract new features, and screening the extracted new features; The extracted new features are screened and sorted in descending order using a random forest algorithm, and N new features are screened out from the sorting to be input into the AI ​​large model.

5. The coal market forecasting and analysis method based on the AI ​​large model according to claim 4 is characterized in that: In the step of building the AI ​​large model based on the Transformer architecture, the AI ​​large model includes an input layer, a multi-head attention mechanism layer, a feedforward neural network layer, and an output layer; wherein the multi-head attention mechanism layer includes multiple attention heads, and the calculation formula of each attention head is: Among them, Q, K, and V represent the query matrix, key matrix, and value matrix respectively, d k It is represented as the dimension of the key matrix and softmax is represented as the activation function.

6. The coal market forecasting and analysis method based on the AI ​​large model according to claim 5 is characterized in that: The feedforward neural network layer includes at least two fully connected layers, and a ReLU activation function is used between the two fully connected layers. The expression of the ReLU activation function is: ReLU(x)=max(0,x) Where x is the input value.

7. A coal market forecasting and analysis system based on AI large model, characterized by: It includes collection / preprocessing module, model building module, training module and prediction module; among them, The collection / preprocessing module is used to manually and comprehensively collect historical data of the coal market and preprocess the historical data to obtain standard data; The model building module is used to build the AI ​​large model based on the Transformer architecture; The training module is used to train the standard data using the AI ​​big model built by the model building module, and optimize the AI ​​big model by minimizing the loss function during the training process to obtain a data model. The minimization loss function is: The prediction module is used to predict the coal market based on the data model obtained by the training module and generate a prediction analysis report.

Citation Information

Cited By

  • Intelligent decision generation method and device based on coal, equipment and storage medium

    CN122264485A