Frozen meat trading trend prediction method and system based on big data

By combining blockchain technology and deep learning models, building composite features and using Bayesian neural networks for dynamic parameter adjustment, the problem of traditional prediction methods being difficult to capture market dynamics and evaluation uncertainty is solved, and accurate prediction and risk assessment of frozen meat trading trends are achieved.

CN119762138APending Publication Date: 2025-04-04LIANNONG (SHENZHEN) INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411899334.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-23
Publication Date
2025-04-04

AI Technical Summary

Technical Problem

Traditional frozen meat trading trend prediction methods rely on limited historical data and empirical judgments, making it difficult to fully capture market dynamics and potential risks, and existing prediction models have shortcomings in adapting to market changes and uncertainty assessments.

Method used

By combining blockchain technology, feature cross-combination, variational Bayesian inference and deep learning models, real-time transaction data on the blockchain platform is extracted, composite features are constructed, and dynamic parameter adjustment is used to use Bayesian neural network models combining LSTM network and attention mechanism to achieve accurate prediction and uncertainty evaluation of frozen meat trading trends.

Benefits of technology

Accurate prediction and uncertainty assessment of frozen meat trading trends are achieved, strong support for market decisions, improve the accuracy and robustness of the forecasts, and promptly trigger early warning mechanisms to deal with potential market risks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119762138A_ABST
    Figure CN119762138A_ABST
Patent Text Reader

Abstract

The present invention provides a method and system for predicting frozen meat trading trends based on big data, which relate to the technical field of agricultural product trading. The method comprises the following steps: collecting and extracting multiple single features related to frozen meat trading from a blockchain platform in real time using a sliding window; cross-combining multiple single features, and constructing a composite feature based on the correlation degree between the cross-combined single features; approximating the posterior distribution of a pre-constructed prediction model based on a variational Bayesian inference framework, and dynamically adjusting the model parameters according to the approximated result; inputting multiple single features and the composite features into a Bayesian neural network model after the model parameters are updated, and outputting the prediction result; generating a confidence interval of each point estimate in a pre-selected time series based on the Bayesian neural network model after the model parameters are updated, and triggering an early warning mechanism when the corresponding confidence interval is exceeded. The present invention realizes accurate prediction and uncertainty assessment of frozen meat trading trends.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of agricultural product trading, and in particular to a method and system for predicting frozen meat trading trends based on big data. Background Art

[0002] With the rapid development of information technology, big data and blockchain technology are increasingly being used in all walks of life, especially in the field of bulk agricultural and sideline products trade. These technologies have significantly improved transaction transparency, data security and transaction efficiency. As an important part of bulk agricultural and sideline products, the accurate prediction of frozen meat trading trends is crucial for market participants. However, traditional forecasting methods often rely on limited historical data and empirical judgments, making it difficult to fully capture market dynamics and potential risks.

[0003] In the current trade theme of bulk agricultural and sideline products blockchain platform, the collection, processing and analysis of frozen meat transaction data face many challenges. On the one hand, the transaction data on the blockchain platform has the characteristics of real-time, high concurrency and immutability. How to efficiently extract valuable information from massive data has become a major problem. On the other hand, frozen meat transactions are affected by many factors, including seasonal demand, supply chain stability, policy changes, etc. The complex relationship between these factors makes the prediction of transaction trends particularly complicated.

[0004] To overcome these challenges, the industry has begun to explore forecasting methods based on big data and machine learning technologies. However, most existing forecasting models are based on fixed feature sets and parameters, which are difficult to adapt to the rapid changes in the market environment. In addition, these models are also insufficient in assessing the uncertainty of forecast results and cannot provide effective risk warnings for market participants.

[0005] Therefore, it is necessary to provide a frozen meat trading trend prediction method and system based on big data to solve the above technical problems. Summary of the invention

[0006] In order to solve the above technical problems, the present invention provides a frozen meat trading trend prediction method and system based on big data. By combining blockchain technology, feature cross-combination, variational Bayesian inference and deep learning model, accurate prediction and uncertainty assessment of frozen meat trading trends are achieved, providing strong support for decision-making in the frozen meat trading market.

[0007] In one aspect, the present invention provides a method for predicting frozen meat trading trends based on big data, the method comprising the following steps:

[0008] A sliding window is used to collect and extract multiple single features related to frozen meat transactions from the blockchain platform in real time, where a single feature refers to a metric directly related to frozen meat transactions;

[0009] Cross-combining the multiple single features, and constructing a composite feature based on the correlation degree between the cross-combined single features;

[0010] Based on the variational Bayesian inference framework, the posterior distribution of the pre-built prediction model is approximated, and the model parameters are dynamically adjusted according to the approximation result, wherein the prediction model is a Bayesian neural network model combining an LSTM network and an attention mechanism;

[0011] Inputting the multiple single features and the composite features into the Bayesian neural network model after the model parameters are updated, and outputting a prediction result, wherein the prediction result is a plurality of point estimates on a preselected time series;

[0012] Based on the Bayesian neural network model after the model parameters are updated, a confidence interval for each point estimate in the preselected time series is generated, and an early warning mechanism is triggered when the point estimate exceeds the corresponding confidence interval.

[0013] Preferably, the method of using a sliding window to collect and extract multiple single features related to frozen meat transactions from the blockchain platform in real time includes:

[0014] Using the set sliding window parameters, the record data of frozen meat transactions are traversed in real time on the blockchain platform, wherein the sliding window parameters include a preset window size and a sliding step size;

[0015] From the recorded data of each captured frozen meat transaction, a single feature related to the frozen meat transaction is parsed and extracted.

[0016] Preferably, cross-combining the plurality of single features and constructing a composite feature based on the correlation between the cross-combined single features includes:

[0017] Cross-combine the extracted multiple single features in pairs to form feature pairs;

[0018] Calculating the degree of association between each feature pair, wherein the degree of association is obtained based on a statistical correlation analysis method;

[0019] According to the calculated correlation degree, feature pairs whose correlation degree exceeds a preset correlation degree threshold are selected for combination, and a composite feature is constructed using a weighted product method.

[0020] Preferably, the method of constructing a composite feature by using a weighted product method comprises:

[0021] According to the influence of each single feature on the prediction result, the weight of each feature in the weighted product is determined, wherein the weight is calculated based on the correlation between each single feature and the frozen meat trading trend in the historical data, and the historical performance score of each feature is adjusted in real time in combination with prior knowledge;

[0022] For each selected feature pair, a composite feature is generated using a weighted product formula, where the weighted product formula is:

[0023]

[0024] Among them, F represents the composite feature, F i represents the i-th single feature, ω i Represents the weight of the i-th single feature.

[0025] Preferably, the variational Bayesian inference framework is used to approximate the posterior distribution of the pre-built prediction model, and the model parameters are dynamically adjusted according to the approximation result, including:

[0026] Constructing a Bayesian neural network model combining an LSTM network and an attention mechanism, and initializing model parameters of the Bayesian neural network model;

[0027] Using the variational Bayesian inference framework, the approximate posterior distribution of the model parameters is estimated by minimizing the KL divergence between the true posterior distribution and the approximate posterior distribution.

[0028] According to the approximate posterior distribution obtained by variational inference, the model parameters are dynamically updated by sampling.

[0029] Preferably, the use of a variational Bayesian inference framework to estimate the approximate posterior distribution of the model parameters by minimizing the KL divergence between the true posterior distribution and the approximate posterior distribution comprises:

[0030] Select a variational distribution q(θ) that meets the preset conditions to approximate the true posterior distribution p(θ|D), where θ represents the model parameters and D represents the training data of the prediction model;

[0031] Based on maximizing the evidence lower bound, the KL divergence KL(q(θ)||p(θ|D)) is indirectly minimized to obtain the optimized variational distribution q(θ).

[0032] Preferably, the Bayesian neural network model includes:

[0033] LSTM layer, used to capture dependencies in feature sequences, where the feature sequence refers to a sequence consisting of single features and composite features;

[0034] The attention mechanism layer is used to evaluate the contribution of each feature in the feature sequence to the prediction result and assign different feature weights to each feature according to the contribution;

[0035] The Bayesian layer is used to introduce the prior distribution of the weights of the model parameters, so that the model parameters are regarded as random variables to output a probability distribution when predicting.

[0036] Preferably, the step of outputting the prediction results comprises:

[0037] The input features are forward propagated through the LSTM layer and the attention mechanism layer;

[0038] Based on the intermediate representation generated by forward propagation, the Bayesian layer obtains the probability distribution of the prediction result at each time point from the posterior distribution through multiple sampling;

[0039] According to the probability distribution, the point estimate value of each time point is calculated and output, wherein the point estimate value constitutes a plurality of prediction results on the preselected time series.

[0040] Preferably, the Bayesian neural network model based on the updated model parameters generates a confidence interval for each point estimate in the preselected time series, and triggers an early warning mechanism when the point estimate exceeds the corresponding confidence interval, including:

[0041] If the probability distribution of the prediction result conforms to the normal distribution, the normal approximate interval of the probability distribution of the prediction result is taken as the confidence interval;

[0042] If the probability distribution of the prediction results does not conform to the normal distribution, the Bootstrap resampling method is used to estimate the confidence interval;

[0043] After calculating the point estimate value and its corresponding confidence interval at each time point, if the point estimate value at a certain time point exceeds its corresponding confidence interval, the early warning mechanism is immediately triggered.

[0044] On the other hand, the present invention also provides a frozen meat transaction trend prediction system based on big data, which is used to execute a frozen meat transaction trend prediction method based on big data, and the system comprises:

[0045] A feature extraction module, for collecting and extracting multiple single features related to frozen meat transactions from the blockchain platform in real time using a sliding window, wherein the single feature refers to a metric directly related to the frozen meat transaction;

[0046] A composite feature construction module, used for cross-combining the plurality of single features and constructing a composite feature based on the correlation degree between the cross-combined single features;

[0047] A model parameter dynamic adjustment module, which is used to approximate the posterior distribution of a pre-built prediction model based on a variational Bayesian inference framework, and dynamically adjust the model parameters according to the approximation result, wherein the prediction model is a Bayesian neural network model combining an LSTM network and an attention mechanism;

[0048] A prediction result output module, used for inputting the multiple single features and the composite features into the Bayesian neural network model after the model parameters are updated, and outputting the prediction results, wherein the prediction results are multiple point estimates on a preselected time series;

[0049] The early warning trigger module is used to generate a confidence interval for each point estimate in the preselected time series based on the Bayesian neural network model after the model parameters are updated, and trigger the early warning mechanism when the point estimate exceeds the corresponding confidence interval.

[0050] Compared with the related art, the method and system for predicting frozen meat trading trends based on big data provided by the present invention have the following beneficial effects:

[0051] The present invention makes full use of the real-time transaction data on the blockchain platform, efficiently extracts multiple single features related to frozen meat transactions through sliding window technology, and constructs composite features based on cross-combination and correlation analysis to more comprehensively reflect market dynamics. At the same time, the present invention adopts a Bayesian neural network model that combines LSTM network and attention mechanism, and uses the variational Bayesian inference framework to dynamically adjust the model parameters to improve the accuracy and robustness of the prediction.

[0052] In terms of the output of forecast results, the present invention not only provides multiple point estimates on the pre-selected time series, but also generates a confidence interval for each point estimate based on the Bayesian neural network model after the model parameters are updated. This allows market participants to more intuitively understand the uncertainty range of the forecast results and trigger the early warning mechanism in time when the point estimate exceeds the confidence interval, thereby effectively responding to potential market risks.

[0053] In summary, the frozen meat trading trend prediction method based on big data proposed in the present invention optimizes the data processing process, improves the model prediction ability and strengthens the risk warning mechanism. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] Figure 1 This is a flow chart of the method for predicting frozen meat trading trends based on big data proposed by the present invention;

[0055] Figure 2 This is a module structure diagram of the frozen meat trading trend prediction system based on big data proposed by the present invention. DETAILED DESCRIPTION

[0056] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only the parts related to the present invention, rather than all structures, are shown in the accompanying drawings. In addition, the embodiments of the present invention and the features in the embodiments may be combined with each other without conflict.

[0057] It should also be noted that, for ease of description, only the part relevant to the present invention but not all content is shown in the accompanying drawings. It should be mentioned before discussing exemplary embodiments in more detail that some exemplary embodiments are described as processing or methods depicted as flow charts. Although the flow chart describes each operation (or step) as sequential processing, many operations therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of each operation can be rearranged. When its operation is completed, the processing can be terminated, but it can also have additional steps not included in the accompanying drawings. The processing can correspond to methods, functions, procedures, subroutines, subprograms, etc.

[0058] Embodiment 1

[0059] It should be noted that all frozen meat transaction data recorded on the blockchain platform is encrypted and verified, ensuring the authenticity and integrity of the data. Once the data is written to the blockchain, it cannot be tampered with or deleted, which provides a reliable basis for subsequent data analysis. In addition, all parties involved can view the transaction records on the blockchain, ensuring data transparency and helping to build trust, especially when multiple stakeholders are involved.

[0060] On the one hand, the present invention provides a method for predicting frozen meat trading trends based on big data, referring to Figure 1 As shown, the method comprises the following steps:

[0061] S1: A sliding window is used to collect and extract multiple single features related to frozen meat transactions from the blockchain platform in real time, where a single feature refers to a metric directly related to frozen meat transactions.

[0062] Specifically, step S1 specifically includes the following steps:

[0063] S11: Using the set sliding window parameters, traverse the record data of frozen meat transactions on the blockchain platform in real time, wherein the sliding window parameters include a preset window size and a sliding step size.

[0064] In this embodiment, the sliding window mechanism is used to collect the latest data of frozen meat transactions from the blockchain platform in real time. The parameter setting of the sliding window is the key. The window size determines the amount of data captured each time, while the sliding step controls the frequency of data updates. Exemplarily, the window size can be set to the transaction records of the past 7 days, and the sliding step can be set to update once a day. In this way, the latest 7-day transaction data can be obtained at each time point to ensure the timeliness and continuity of the data. In this way, the sliding window mechanism can effectively capture the dynamic changes of the market and provide a basis for subsequent feature extraction and analysis.

[0065] Therefore, the sliding window mechanism not only improves the efficiency of data collection, but also reduces the dependence on historical data, allowing the model to respond to market changes more quickly. In addition, the parameters of the sliding window can be flexibly adjusted according to actual needs to adapt to different market environments and forecasting needs. For example, in the case of large market fluctuations, the sliding step size can be shortened and the data update frequency can be increased to improve the sensitivity of the forecast.

[0066] S12: Parse and extract a single feature related to the frozen meat transaction from the recorded data of each captured frozen meat transaction.

[0067] In this embodiment, these single features include market price, transaction volume, transaction time, buyer and seller information, etc. In order to ensure that the extracted features are representative, data parsing is performed according to predefined rules and standards. For example, market price can be represented by indicators such as average price, highest price, lowest price, etc.; transaction volume can be represented by indicators such as total transaction volume and single transaction volume, etc.; transaction time can be represented by a specific timestamp or time period.

[0068] The feature extraction process includes not only simple numerical analysis, but also the processing of unstructured data. For example, for buyer and seller information, natural language processing (NLP) technology is used to convert it into quantifiable features. In addition, external data sources (such as weather data, policies and regulations, etc.) can be combined to further enrich the feature set. In this way, more comprehensive and accurate single features can be extracted, providing rich input for subsequent feature combination and prediction.

[0069] The accuracy of feature extraction directly affects the quality of the final prediction results. High-quality features can better reflect the real situation of the market and improve the prediction accuracy of the model. At the same time, the automation of the feature extraction process also greatly reduces the need for manual intervention and improves the efficiency and reliability of data processing.

[0070] S2: Cross-combining the multiple single features, and constructing a composite feature based on the correlation degree between the cross-combined single features.

[0071] Specifically, step S2 includes the following steps:

[0072] S21: Cross-combine the extracted multiple single features in pairs to form feature pairs.

[0073] In this embodiment, in order to more comprehensively capture the complex relationships in frozen meat transactions, multiple extracted single features are first cross-combined in pairs to form feature pairs. These single features include market price, transaction volume, transaction time, buyer and seller information, etc. New features can be generated through cross-combination, which can reflect the interactions and potential connections between different features.

[0074] For example, cross-combining market price with trading volume can generate a new feature that represents trading activity at different price levels. This combination can not only reveal changes in market supply and demand, but also help the model better understand the impact of price fluctuations on trading behavior. Similarly, cross-combining transaction time with buyer information can generate a feature that represents the transaction frequency or preference of different buyers in a specific time period. These cross-combined features provide a rich basis for subsequent association analysis.

[0075] A large number of feature pairs are generated by cross-combining them in pairs. These feature pairs cover information of different dimensions and provide diverse inputs for subsequent association analysis and composite feature construction. This approach not only increases the number of features, but also improves the expressiveness of the features, allowing the model to capture more complex market dynamics.

[0076] S22: Calculate the degree of association between each feature pair, wherein the degree of association is obtained based on a statistical correlation analysis method.

[0077] In this embodiment, a statistical correlation analysis method is used to calculate the degree of association between each feature pair. Specifically, the Pearson Correlation Coefficient between each pair of features is calculated to quantify the linear or nonlinear relationship between the feature pairs.

[0078] For example, for the feature pair of market price and trading volume, the Pearson correlation coefficient between them is calculated to evaluate whether the two features have a significant correlation. If the correlation coefficient is close to 1 or -1, it means that there is a strong linear relationship between the two features; if the correlation coefficient is close to 0, it means that the relationship between them is weak. Similarly, for other feature pairs, the corresponding correlation indicators are calculated to evaluate the degree of association between them.

[0079] Calculating the degree of association between feature pairs is a key step in constructing composite features. By quantifying the relationship between feature pairs, we can screen out those feature pairs with strong associations, avoid introducing redundant or irrelevant features, and thus improve the efficiency and accuracy of the model.

[0080] S23: According to the calculated correlation degree, feature pairs whose correlation degree exceeds a preset correlation degree threshold are selected for combination, and composite features are constructed using a weighted product method.

[0081] In this embodiment, according to the calculated correlation degree, the feature pairs whose correlation degree exceeds the preset threshold are selected for combination to construct a composite feature. The preset correlation degree threshold can be adjusted according to actual needs, and a higher threshold (such as 0.7 or 0.8) is usually selected to ensure that the selected feature pairs have a strong correlation. In this way, it can be ensured that the generated composite feature can effectively capture the interaction between different features without introducing too much noise or redundant information.

[0082] In step S23, constructing a composite feature using the weighted product method specifically includes the following steps:

[0083] According to the influence of each single feature on the prediction result, the weight of each feature in the weighted product is determined, wherein the weight is calculated based on the correlation between each single feature and the frozen meat trading trend in the historical data, and the historical performance score of each feature is adjusted in real time in combination with prior knowledge.

[0084] In this embodiment, in order to construct a more effective composite feature, it is necessary to determine the weight of each single feature in the weighted product according to the degree of influence of each single feature on the prediction result. Specifically, based on the correlation between each single feature and the frozen meat transaction trend in the historical data, the historical performance score of each feature is calculated. This score reflects the performance of the feature in the past, that is, how much it contributed to the prediction result.

[0085] For example, if a single feature has a significant impact on the prediction results in the past, its weight will be higher; conversely, if the performance of a feature is average, its weight will be lower.

[0086] In addition, the weight of each feature can be adjusted in real time in combination with prior knowledge. For example, if the market environment changes, the importance of certain features may increase or decrease, and the weight can be dynamically adjusted according to the latest market conditions to ensure the accuracy and adaptability of the composite features.

[0087] For each selected feature pair, a composite feature is generated using a weighted product formula, where the weighted product formula is:

[0088]

[0089] Among them, F represents the composite feature, F i represents the i-th single feature, ω i Represents the weight of the i-th single feature.

[0090] In this embodiment, multiple single features can be combined into a composite feature through the weighted product formula. This composite feature not only retains the information of the original features, but also integrates the interactions between different features. The advantage of the weighted product method is that it can assign different weights according to the importance of each feature, thereby highlighting those features that have a greater impact on the prediction results, while suppressing those relatively minor features. This helps to improve the prediction accuracy and stability of the model.

[0091] S3: Based on the variational Bayesian inference framework, the posterior distribution of the pre-built prediction model is approximated, and the model parameters are dynamically adjusted according to the approximated results, wherein the prediction model is a Bayesian neural network model combining an LSTM network and an attention mechanism.

[0092] Specifically, step S3 includes the following steps:

[0093] S31: Construct a Bayesian neural network model that combines an LSTM network and an attention mechanism, and initialize model parameters of the Bayesian neural network model.

[0094] In this embodiment, we first need to build a Bayesian neural network model that combines the LSTM network and the attention mechanism. The core components of this model include:

[0095] LSTM layer: LSTM (Long Short-Term Memory Network) is a special recursive neural network (RNN) that can effectively capture long-term dependencies in time series data. For frozen meat trading trend forecasting, the LSTM layer can process feature sequences composed of single features and composite features, capturing the changing patterns of these features over time. The LSTM layer selectively retains or forgets historical information through memory units and gating mechanisms, thereby better adapting to market dynamics.

[0096] Attention mechanism layer: The attention mechanism is used to evaluate the contribution of each feature in the feature sequence to the prediction result, and assign different weights to each feature according to the contribution. By introducing the attention mechanism, the model can automatically identify which features are most important for the prediction results in a specific time period, thereby improving the accuracy and explanatory power of the prediction. For example, in some time periods, market prices may be more important than trading volume; while in other time periods, buyer information may be more influential. The attention mechanism enables the model to flexibly respond to changes in different market environments.

[0097] Bayesian layer: The Bayesian layer introduces the prior distribution of the weights of the model parameters, so that the model parameters are regarded as random variables to output a probability distribution when predicting. This not only increases the uncertainty estimation ability of the model, but also enables the model to output confidence intervals during the prediction process, providing more comprehensive information support for decision-making.

[0098] After building the model, the model parameters need to be initialized. The purpose of initialization is to set reasonable initial values ​​for the model parameters so that the subsequent training process can converge faster. Common initialization methods include random initialization, Xavier initialization, and He initialization. The initialized model parameters will serve as the starting point for variational Bayesian inference, and these parameters will be continuously optimized through the variational inference framework.

[0099] S32: Use the variational Bayesian inference framework to estimate the approximate posterior distribution of model parameters by minimizing the KL divergence between the true posterior distribution and the approximate posterior distribution.

[0100] In this embodiment, the variational Bayesian inference framework is used to estimate the approximate posterior distribution of the model parameters. Variational Bayesian inference is a method of approximate Bayesian inference that aims to find an easily computable approximate distribution to replace the true posterior distribution by minimizing the KL divergence (Kullback-Leibler divergence) between the true posterior distribution and the approximate posterior distribution.

[0101] Specifically, step S32 includes the following steps:

[0102] A variational distribution q(θ) that meets the preset conditions is selected to approximate the true posterior distribution p(θ|D), where θ represents the model parameters and D represents the training data of the prediction model.

[0103] In this embodiment, in order to achieve this goal, it is first necessary to select a variational distribution q(θ) that meets the preset conditions to approximate the true posterior distribution p(θ|D), where θ represents the model parameters and D represents the training data of the prediction model. Generally, the selection of the variational distribution needs to meet the following conditions:

[0104] Parsability: The variational distribution should have a simple mathematical form, which is easy to calculate and optimize. Choices include but are not limited to Gaussian distribution and Laplace distribution.

[0105] Flexibility: The variational distribution should be flexible enough to capture the main features of the true posterior distribution. For example, multimodal distribution or multi-layer variational autoencoders (VAE) can be used to enhance the expressive power of the variational distribution.

[0106] Computational efficiency: The computational complexity of the variational distribution should be low to ensure the efficiency of the training process.

[0107] In this embodiment, a Gaussian distribution can be selected as the variational distribution because it has good analyticity and computational efficiency. For example, assuming that the variational distribution is q(θ)=N(μ,σ 2 ), where μ and σ 2 Represent the mean and variance respectively, by adjusting μ and σ 2 , which can make the variational distribution gradually approach the true posterior distribution.

[0108] Based on maximizing the evidence lower bound, the KL divergence KL(q(θ)||p(θ|D)) is indirectly minimized to obtain the optimized variational distribution q(θ).

[0109] In this embodiment, in order to make the variational distribution q(θ) closer to the true posterior distribution p(θ|D), it is necessary to minimize the KL divergence between the two. Directly minimizing the KL divergence is usually not feasible because the true posterior distribution p(θ|D) is usually unknown. Therefore, variational Bayesian inference adopts an indirect method, namely maximizing the evidence lower bound (ELBO). ELBO is a lower bound that is negatively correlated with the KL divergence, so maximizing ELBO is equivalent to minimizing the KL divergence.

[0110] Specifically, ELBO can be expressed as:

[0111]

[0112] Among them, the first It represents the expectation of the log-likelihood function of the model, reflecting the degree of fit of the model to the data. The second term KL(q(θ)||p(θ)) represents the KL divergence between the variational distribution and the prior distribution, which plays a regularization role to prevent the model from overfitting.

[0113] By maximizing ELBO, the variational distribution q(θ) can be gradually optimized to gradually approach the true posterior distribution p(θ|D). This process can be achieved through optimization algorithms such as gradient descent, and finally the optimized variational distribution is obtained.

[0114] S33: Based on the approximate posterior distribution obtained by variational inference, the model parameters are dynamically updated through sampling.

[0115] In this embodiment, according to the approximate posterior distribution q(θ) obtained by variational inference, the model parameters are dynamically updated by sampling. Specifically, multiple samples θ1, θ2, ..., θ are extracted from the approximate posterior distribution. n , and use these samples for model prediction and updating.

[0116] The variational Bayesian inference framework can effectively estimate the approximate posterior distribution of model parameters and dynamically update model parameters through sampling. Compared with traditional point estimation methods, variational Bayesian inference can provide richer uncertainty estimates, allowing the model to output not only point estimates but also corresponding confidence intervals. This uncertainty estimate helps to identify the reliability of forecast results, especially in cases of large market fluctuations or sparse data, providing more robust forecast results.

[0117] In addition, the variational Bayesian inference framework has the following advantages:

[0118] Adaptability: By dynamically updating model parameters, the system can quickly adapt to market changes and capture new market trends in a timely manner.

[0119] Robustness: Variational Bayesian inference introduces prior distribution, which plays a regularization role, prevents model overfitting, and improves the generalization ability of the model.

[0120] Explanability: Through the attention mechanism and Bayesian layer, the system can not only give prediction results, but also explain which features have the greatest impact on the prediction results and the uncertainty range of the prediction results, enhancing the interpretability of the model.

[0121] S4: Input the multiple single features and the composite features into the Bayesian neural network model after the model parameters are updated, and output a prediction result, wherein the prediction result is a plurality of point estimates on a preselected time series.

[0122] Specifically, the output steps of the prediction results include:

[0123] S41: The input features are forward propagated through the LSTM layer and the attention mechanism layer.

[0124] In this embodiment, the extracted multiple single features and constructed composite features need to be first input into the Bayesian neural network model that has been optimized by the variational Bayesian inference framework. This process mainly includes two core steps: forward propagation of the LSTM layer and feature weighting of the attention mechanism layer.

[0125] Forward propagation of LSTM layer: LSTM layer is one of the core components of the model, which can effectively capture the long-term dependencies in time series data. The feature sequence input to the LSTM layer consists of single features and composite features, which change over time and reflect the dynamics of the frozen meat trading market. The LSTM layer selectively retains or forgets historical information through memory units and gating mechanisms (input gate, forget gate, and output gate), so as to better adapt to market changes.

[0126] Specifically, the LSTM layer calculates the hidden state and cell state at the current moment based on the input features at the current moment and the hidden state at the previous moment. These hidden states contain important information in the time series and provide a basis for subsequent predictions.

[0127] Feature weighting of the attention mechanism layer: In order to further improve the accuracy and explanatory power of the model, the attention mechanism layer is introduced. The attention mechanism is used to evaluate the contribution of each feature in the feature sequence to the prediction result and assign different weights to each feature according to the contribution.

[0128] Through the attention mechanism, the model can automatically identify which features are most important to the prediction results in a specific time period. For example, in some time periods, market prices may be more important than transaction volume; while in other time periods, buyer information may be more influential. The attention mechanism enables the model to flexibly respond to changes in different market environments, improving the accuracy and stability of predictions.

[0129] Through the forward propagation of the LSTM layer and the attention mechanism layer, the intermediate representation of each time point is generated. These intermediate representations not only contain the dependencies in the time series, but also integrate the importance weights of different features, providing richer information support for subsequent predictions.

[0130] S42: Based on the intermediate representation generated by forward propagation, the Bayesian layer obtains the probability distribution of the prediction result at each time point from the posterior distribution through multiple sampling.

[0131] In this embodiment, the Bayesian layer is responsible for introducing the prior distribution of the weights of the model parameters, so that the model parameters are regarded as random variables. During the prediction process, the Bayesian layer obtains the probability distribution of the prediction results at each time point from the posterior distribution through multiple sampling. Specifically, this process includes the following steps:

[0132] Sampling of the posterior distribution: In the variational Bayesian inference framework, an approximate posterior distribution of the model parameters has been obtained. In the prediction phase, the Bayesian layer will extract multiple samples from this approximate posterior distribution. Each sample represents a set of possible model parameters that reflect the uncertainty of the model about the data.

[0133] For each time point, the Bayesian layer uses these sampled model parameters, combined with the intermediate representation generated by the forward propagation, to calculate the prediction result at that time point. Since the model parameters of each sample are different, the prediction results will also be different, thus forming a probability distribution. This probability distribution not only contains the point estimate, but also reflects the uncertainty range of the prediction result.

[0134] Through multiple sampling, the uncertainty of the forecast results can be captured more comprehensively. Compared with the traditional point estimation method, variational Bayesian inference can provide richer uncertainty estimates, allowing the model to output not only point estimates but also corresponding confidence intervals. This uncertainty estimate helps to identify the reliability of the forecast results, especially in the case of large market fluctuations or sparse data, providing more robust forecast results.

[0135] S43: Calculate and output the point estimate for each time point according to the probability distribution, wherein the point estimate constitutes a plurality of prediction results on the preselected time series.

[0136] In this embodiment, the last step is to calculate and output the point estimate value at each time point based on the probability distribution. Specifically, this process includes the following steps:

[0137] Calculation of point estimates: For each time point, a point estimate is calculated based on the probability distribution of the prediction results. Point estimation methods include but are not limited to mean, median or mode. For example, the mean of the probability distribution can be selected as the point estimate because it represents the expected value of the prediction results. In addition, the median or mode of the probability distribution can also be selected to reduce the impact of extreme values ​​and improve the robustness of the prediction.

[0138] The calculated point estimates constitute multiple forecast results on the pre-selected time series. These forecast results not only reflect the trend of frozen meat trading, but also provide important references for decision makers. For example, decision makers can adjust inventory management, formulate pricing strategies or optimize supply chains based on these forecast results.

[0139] S5: Based on the Bayesian neural network model after the model parameters are updated, a confidence interval for each point estimate in the preselected time series is generated, and an early warning mechanism is triggered when the point estimate exceeds the corresponding confidence interval.

[0140] Specifically, step S5 includes:

[0141] Generating confidence intervals for each point estimate is an important part of the forecast output. Confidence intervals not only provide a range of uncertainty in the forecast, but also provide decision makers with a basis for evaluating the reliability of the forecast. Specifically, the process of generating confidence intervals involves the following two steps:

[0142] Confidence interval under normal distribution assumption: If the probability distribution of the prediction result conforms to the normal distribution, the normal approximation interval can be directly used as the confidence interval. The normal distribution has good mathematical properties, and the calculation of its confidence interval is relatively simple. Specifically, a 95% confidence interval can be constructed by calculating the mean and standard deviation of the probability distribution. For example, for a normal distribution N(μ, σ2 ), the 95% confidence interval can be expressed as [μ-1.96σ, μ+1.96σ], which includes approximately 95% of the prediction results and provides a reasonable uncertainty estimate for decision makers.

[0143] Confidence intervals under non-normal distribution: If the probability distribution of the predicted results does not conform to the normal distribution, more complex methods are needed to estimate the confidence interval. A commonly used method is the Bootstrap resampling method. The Bootstrap method generates multiple sample sets by randomly sampling (with replacement) from the original data, and then recalculates the probability distribution of the predicted results for each sample set. By sorting these resampled distributions, specific percentiles (such as 2.5% and 97.5%) can be selected as the upper and lower bounds of the confidence interval. This method is suitable for non-normal distributions and can more accurately capture the uncertainty of the predicted results.

[0144] Through the above two methods, confidence intervals can be flexibly generated for each time point according to different probability distribution types. The generation of confidence intervals not only improves the interpretability of the prediction results, but also provides more information support for decision makers, helping them to better evaluate the reliability of the prediction.

[0145] In this embodiment, the early warning mechanism is also triggered when the point estimate exceeds the corresponding confidence interval. The role of the early warning mechanism is to promptly remind decision makers to pay attention to abnormal situations and avoid potential risks. Specifically, the process of triggering the early warning mechanism includes the following steps:

[0146] Compare the point estimate with the confidence interval: At each time point, compare the calculated point estimate with the corresponding confidence interval. If the point estimate falls within the confidence interval, the forecast result is considered to be within the expected range and no warning needs to be triggered; if the point estimate exceeds the upper and lower bounds of the confidence interval, the forecast result is considered to have abnormal fluctuations, which may reflect major changes in the market environment or other uncertainties.

[0147] When the point estimate exceeds the confidence interval, the early warning mechanism is triggered immediately. The early warning mechanism can notify relevant personnel in a variety of ways, including but not limited to sending emails, text messages, or displaying alarm information on the monitoring platform. The early warning content usually includes specific information about the abnormal time point, the comparison results between the point estimate and the confidence interval, and possible cause analysis. With timely early warnings, decision makers can quickly take countermeasures and adjust strategies to cope with market changes.

[0148] By triggering the early warning mechanism, decision makers can be reminded in time when abnormal market fluctuations occur, helping them to respond quickly and reduce potential risks. The introduction of the early warning mechanism not only improves the robustness of the system, but also enhances the practicality and reliability of the forecast results.

[0149] Embodiment 2

[0150] On the other hand, the present invention also provides a frozen meat trading trend prediction system based on big data, which is used to execute a frozen meat trading trend prediction method based on big data, referring to Figure 2 As shown, the system comprises:

[0151] The feature extraction module 100 is used to collect and extract multiple single features related to frozen meat transactions from the blockchain platform in real time using a sliding window, where a single feature refers to a metric directly related to frozen meat transactions.

[0152] The composite feature construction module 200 is used to cross-combine the multiple single features and construct a composite feature based on the correlation degree between the cross-combined single features.

[0153] The model parameter dynamic adjustment module 300 is used to approximate the posterior distribution of a pre-built prediction model based on a variational Bayesian inference framework, and dynamically adjust the model parameters according to the approximation result, wherein the prediction model is a Bayesian neural network model combining an LSTM network and an attention mechanism.

[0154] The prediction result output module 400 is used to input the multiple single features and the composite features into the Bayesian neural network model after the model parameters are updated, and output the prediction results, wherein the prediction results are multiple point estimates on a pre-selected time series.

[0155] The early warning trigger module 500 is used to generate a confidence interval for each point estimate in the preselected time series based on the Bayesian neural network model after the model parameters are updated, and trigger an early warning mechanism when the point estimate exceeds the corresponding confidence interval.

[0156] The present application is described with reference to flowcharts and / or block diagrams of methods, devices (systems) and computer program products according to embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0157] Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, the storage medium including a read-only memory (ROM), a random access memory (RAM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electronically erasable programmable read-only memory (EEPROM), a compact disc (CD-ROM) or other optical disc storage, magnetic disk storage, magnetic tape storage, or any other computer-readable medium that can be used to carry or store data.

[0158] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device that includes a series of elements includes not only those elements, but also other elements that are not explicitly listed, or includes elements that are inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device that includes the elements.

Claims

1. A method for predicting frozen meat trading trends based on big data, characterized in that: The method comprises the following steps: A sliding window is used to collect and extract multiple single features related to frozen meat transactions from the blockchain platform in real time, where a single feature refers to a metric directly related to frozen meat transactions; Cross-combining the multiple single features, and constructing a composite feature based on the correlation degree between the cross-combined single features; Based on the variational Bayesian inference framework, the posterior distribution of the pre-built prediction model is approximated, and the model parameters are dynamically adjusted according to the approximation result, wherein the prediction model is a Bayesian neural network model combining an LSTM network and an attention mechanism; Inputting the multiple single features and the composite features into the Bayesian neural network model after the model parameters are updated, and outputting a prediction result, wherein the prediction result is a plurality of point estimates on a preselected time series; Based on the Bayesian neural network model after the model parameters are updated, a confidence interval for each point estimate in the preselected time series is generated, and an early warning mechanism is triggered when the point estimate exceeds the corresponding confidence interval.

2. A method for predicting frozen meat trading trends based on big data according to claim 1, characterized in that: The sliding window is used to collect and extract multiple single features related to frozen meat transactions from the blockchain platform in real time, including: Using the set sliding window parameters, the record data of frozen meat transactions are traversed in real time on the blockchain platform, wherein the sliding window parameters include a preset window size and a sliding step size; From the recorded data of each captured frozen meat transaction, a single feature related to the frozen meat transaction is parsed and extracted.

3. The method for predicting frozen meat trading trends based on big data according to claim 2, characterized in that: The cross-combining of the plurality of single features and constructing a composite feature based on the correlation between the cross-combined single features includes: Cross-combine the extracted multiple single features in pairs to form feature pairs; Calculating the degree of association between each feature pair, wherein the degree of association is obtained based on a statistical correlation analysis method; According to the calculated correlation degree, feature pairs whose correlation degree exceeds a preset correlation degree threshold are selected for combination, and a composite feature is constructed using a weighted product method.

4. The method for predicting frozen meat trading trends based on big data according to claim 3 is characterized in that: The method of constructing a composite feature by using a weighted product method includes: According to the influence of each single feature on the prediction result, the weight of each feature in the weighted product is determined, wherein the weight is calculated based on the correlation between each single feature and the frozen meat trading trend in the historical data, and the historical performance score of each feature is adjusted in real time in combination with prior knowledge; For each selected feature pair, a composite feature is generated using a weighted product formula, where the weighted product formula is: Among them, F represents the composite feature, F i represents the i-th single feature, ω i Represents the weight of the i-th single feature.

5. The method for predicting frozen meat trading trends based on big data according to claim 4 is characterized in that: The variational Bayesian inference framework is based on which the posterior distribution of the pre-built prediction model is approximated, and the model parameters are dynamically adjusted according to the approximation result, including: Constructing a Bayesian neural network model combining an LSTM network and an attention mechanism, and initializing model parameters of the Bayesian neural network model; Using the variational Bayesian inference framework, the approximate posterior distribution of the model parameters is estimated by minimizing the KL divergence between the true posterior distribution and the approximate posterior distribution. According to the approximate posterior distribution obtained by variational inference, the model parameters are dynamically updated by sampling.

6. A method for predicting frozen meat trading trends based on big data according to claim 5, characterized in that: The variational Bayesian inference framework is used to estimate the approximate posterior distribution of the model parameters by minimizing the KL divergence between the true posterior distribution and the approximate posterior distribution, including: Select a variational distribution q(θ) that meets the preset conditions to approximate the true posterior distribution p(θ|D), where θ represents the model parameters and D represents the training data of the prediction model; Based on maximizing the evidence lower bound, the KL divergence KL(q(θ)||p(θ|D)) is indirectly minimized to obtain the optimized variational distribution q(θ).

7. A method for predicting frozen meat trading trends based on big data according to claim 6, characterized in that: The Bayesian neural network model includes: LSTM layer, used to capture dependencies in feature sequences, where the feature sequence refers to a sequence consisting of single features and composite features; The attention mechanism layer is used to evaluate the contribution of each feature in the feature sequence to the prediction result and assign different feature weights to each feature according to the contribution; The Bayesian layer is used to introduce the prior distribution of the weights of the model parameters, so that the model parameters are regarded as random variables to output a probability distribution when predicting.

8. The method for predicting frozen meat trading trends based on big data according to claim 7, characterized in that: The step of outputting the prediction results comprises: The input features are forward propagated through the LSTM layer and the attention mechanism layer; Based on the intermediate representation generated by forward propagation, the Bayesian layer obtains the probability distribution of the prediction result at each time point from the posterior distribution through multiple sampling; According to the probability distribution, the point estimate value of each time point is calculated and output, wherein the point estimate value constitutes a plurality of prediction results on the preselected time series.

9. The method for predicting frozen meat trading trends based on big data according to claim 8, characterized in that: The Bayesian neural network model based on the updated model parameters generates a confidence interval for each point estimate in the preselected time series, and triggers an early warning mechanism when the point estimate exceeds the corresponding confidence interval, including: If the probability distribution of the prediction result conforms to the normal distribution, the normal approximate interval of the probability distribution of the prediction result is taken as the confidence interval; If the probability distribution of the prediction results does not conform to the normal distribution, the Bootstrap resampling method is used to estimate the confidence interval; After calculating the point estimate value and its corresponding confidence interval at each time point, if the point estimate value at a certain time point exceeds its corresponding confidence interval, the early warning mechanism is immediately triggered.

10. A frozen meat trading trend prediction system based on big data, used to execute a frozen meat trading trend prediction method based on big data as claimed in any one of claims 1 to 9, characterized in that: The system comprises: A feature extraction module, for collecting and extracting multiple single features related to frozen meat transactions from the blockchain platform in real time using a sliding window, wherein the single feature refers to a metric directly related to the frozen meat transaction; A composite feature construction module, used for cross-combining the plurality of single features and constructing a composite feature based on the correlation degree between the cross-combined single features; A model parameter dynamic adjustment module, which is used to approximate the posterior distribution of a pre-built prediction model based on a variational Bayesian inference framework, and dynamically adjust the model parameters according to the approximation result, wherein the prediction model is a Bayesian neural network model combining an LSTM network and an attention mechanism; A prediction result output module, used for inputting the multiple single features and the composite features into the Bayesian neural network model after the model parameters are updated, and outputting the prediction results, wherein the prediction results are multiple point estimates on a preselected time series; The early warning trigger module is used to generate a confidence interval for each point estimate in the preselected time series based on the Bayesian neural network model after the model parameters are updated, and trigger the early warning mechanism when the point estimate exceeds the corresponding confidence interval.