A modeling optimization method of a complex system mgmlm
By constructing a hybrid prediction framework combining multivariate grey models, long short-term memory networks, and Markov chains, the problem of predicting nonlinear and stochastic fluctuations in complex network public opinion information systems is solved, achieving high-precision and robust prediction of public opinion events.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- XIAN UNIV OF POSTS & TELECOMM
- Filing Date
- 2026-03-11
- Publication Date
- 2026-07-10
AI Technical Summary
Existing technologies struggle to simultaneously capture the nonlinear dependencies, dynamics, and random fluctuations within complex online public opinion information systems, resulting in insufficient accuracy and robustness in public opinion prediction.
A multivariate grey model is used to capture trends, a long short-term memory network is used to mine nonlinear dynamics, and a Markov chain is used to correct random fluctuations. A hybrid prediction framework, MGMLM, is constructed, and the prediction results are optimized through a multi-layer model.
It significantly improves the accuracy and robustness of public opinion event prediction, overcomes the problems of insufficient residual correction and insufficient information mining in traditional models, and achieves accurate prediction of complex systems.
Smart Images

Figure CN122365115A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of public opinion prediction technology, and in particular to a modeling and optimization method for complex systems using MGMLM. Background Technology
[0002] With the deep integration and widespread adoption of 5G mobile communication technology, big data, and artificial intelligence, we are experiencing an unprecedented wave of social informatization. The internet, especially the mobile internet, has become deeply embedded in all aspects of social life, reshaping the patterns of information dissemination, interpersonal interaction, and public opinion generation. Social media platforms, as emerging digital public spheres, have replaced traditional media as the core arena for the generation and fermentation of public opinion. Against this backdrop, online public opinion information has become crucial for understanding public sentiment and providing early warnings of social risks.
[0003] Online public opinion, as a collection of emotions, attitudes, opinions, and demands expressed by the public on specific issues online, has become a key variable reflecting public sentiment, influencing public decision-making, shaping corporate brands, and even affecting social stability. Its generation and evolution are no longer limited to the one-way dissemination of traditional media, but exhibit complex characteristics of instantaneous, interactive, and non-linear diffusion across multiple platforms such as social media, news apps, and forums, constituting a typical complex social system. Such systems possess highly non-linear, dynamic, and multi-factor coupling characteristics, making accurate prediction extremely challenging. Research on online public information has undergone a paradigm shift from classical mathematical models to computational social science. Among existing technologies, the DK model, by establishing a formal analogy between information dissemination and infectious disease mechanisms, provides a theoretical foundation for subsequent research. Based on this, scholars have continuously improved the explanatory power of models for different information dissemination methods. The SIR model has constructed a multi-layered network information dissemination model, providing a quantifiable and verifiable analytical framework for cross-platform information dissemination mechanisms. Blockchain technology has constructed a highly credible information governance framework, reflecting the continuous progress in combining theoretical research with governance practice.
[0004] Single prediction models often struggle to capture the inherent evolutionary patterns and characterize complex nonlinear dependencies. They may perform poorly when dealing with small samples and clearly trending sequences due to insufficient data. Furthermore, they fail to effectively handle inherent random fluctuations and do not fully utilize the dynamic synergistic relationships between variables for trend modeling. Existing hybrid models typically perform only one residual correction, failing to deeply explore the nonlinear dynamics and random components still inherent in the residuals, thus limiting further improvements in prediction accuracy.
[0005] Therefore, it is necessary to propose a solution to improve one or more problems existing in the above-mentioned related technical solutions.
[0006] It should be noted that the information disclosed in the background section above is only used to enhance the understanding of the background of this application, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention
[0007] The purpose of this disclosure is to provide a modeling and optimization method and system for complex systems using MGMLM, thereby overcoming, to at least some extent, one or more problems caused by the limitations and defects of related technologies.
[0008] A modeling and optimization method for complex systems according to an embodiment of this disclosure includes the following steps: Obtain the original time series data of the target public opinion event. The original time series data includes the main variable of the network search index, the related variables of the network consultation index, and the related variables of the network comprehensive index. Based on the original time series data, construct a multivariate grey model to predict the trend of the network search index and obtain the first predicted value sequence and the corresponding first-level residual sequence. Using the first-level residual sequence as training data, a long short-term memory network model is constructed and trained. The trained long short-term memory network model is used to predict the first-level residual sequence to obtain a nonlinear residual prediction value sequence. Based on the first prediction value sequence and the nonlinear residual prediction value sequence, a second prediction value sequence and the corresponding second-level residual sequence are calculated. Based on the Markov chain, the second-order residual sequence is divided into states and probabilistically corrected to determine the random fluctuation correction value sequence. The final predicted value sequence of the network search index is calculated based on the second predicted value sequence and the random fluctuation correction value sequence.
[0009] In an exemplary embodiment of this application, the steps of constructing a multivariate grey model based on the original time series data, performing trend prediction on the network search index, and obtaining a first predicted value sequence and a corresponding first-level residual sequence include: The original sequences of the main variables and related variables are accumulated once to generate the first-order accumulated sequence of each variable; Based on the first-order cumulative sequence, a whitening differential equation containing one development coefficient and multiple driving coefficients is constructed. The development coefficient and driving coefficient are solved using the least squares method; Based on the solved parameters, the time response function of the first-order cumulative sequence of the main variables is calculated, and the first predicted value sequence is obtained by cumulative subtraction and restoration. The difference between the predicted value and the actual observed value is calculated to obtain the first-order residual sequence.
[0010] In an exemplary embodiment of this application, the expression of the whitening differential equation is: in, A first-order cumulative sequence of the main variable. It is the development coefficient. It is the driving coefficient. Let N be the first-order cumulative sequence of the i-th related variable, and N be the number of related variables.
[0011] In an exemplary embodiment of this application, the expression for the time response function of the first-order cumulative sequence of the main variable is: in, The predicted value of the first-order cumulative sequence of the main variable at time k. The first observation of the original sequence of the main variable. , For the parameter to be estimated, Let be the original observation value of the first-order cumulative sequence of the i-th related variable at time k.
[0012] In an exemplary embodiment of this application, the expression for the first predicted value sequence is: in, This is the first predicted value sequence. The first observation of the original sequence is the main variable, and n is the total length of the entire time series.
[0013] In an exemplary embodiment of this application, the steps of constructing and training a long short-term memory network model using the first-level residual sequence as training data, predicting the first-level residual sequence using the trained long short-term memory network model to obtain a nonlinear residual prediction value sequence, and calculating a second prediction value sequence and the corresponding second-level residual sequence based on the first prediction value sequence and the nonlinear residual prediction value sequence include: The first-level residual sequence is constructed into a supervised learning sample set using the sliding window method, with the residual values of multiple consecutive historical moments as input features and the residual value of the next moment as output labels. Construct a neural network model containing at least one LSTM layer and train it using the supervised learning sample set; The first-level residual sequence is input into the trained LSTM model to obtain a nonlinear residual prediction sequence; The first predicted value sequence is added to the nonlinear residual predicted value sequence to obtain the second predicted value sequence, and the difference between the second predicted value and the actual observed value is calculated to obtain the second-level residual sequence.
[0014] In an exemplary embodiment of this application, the expression for the second predicted value sequence is: in, This is the second predicted value sequence. This is the first predicted value sequence. This is a sequence of nonlinear residual values predicted by LSTM.
[0015] In an exemplary embodiment of this application, the steps of performing state partitioning and probabilistic correction on the second-order residual sequence based on a Markov chain to determine a random fluctuation correction value sequence, and calculating the final predicted value sequence of the network search index based on the second predicted value sequence and the random fluctuation correction value sequence include: The second-order residual sequence is clustered using a clustering algorithm, dividing it into multiple discrete states, each state corresponding to a state interval and a cluster center value; Calculate the state transition probability matrix based on the state sequence of the second-order residual sequence; Based on the state transition probability matrix, the current and previous states, and the instantaneous value of the second-order residual, the correction value is calculated using a dynamic weighted fusion formula to obtain a sequence of random fluctuation correction values. The second predicted value sequence is added to the random fluctuation correction value sequence to obtain the final predicted value sequence of the network search index.
[0016] In an exemplary embodiment of this application, the dynamic weighted fusion formula is: in, This is a correction value for random fluctuations. This indicates the state at the previous moment. Under the given conditions, the residual at the current time is predicted as the state. The probability, The cluster center value of the current state S represents the average expected value of the residual level of that state. Harmonic coefficient .
[0017] In an exemplary embodiment of this application, the final predicted value sequence is obtained by the following formula: in, Represents the final predicted value sequence. This represents the second predicted value sequence. It is a sequence of corrected values for random fluctuations.
[0018] This application proposes a modeling and optimization method for complex systems using MGMLM. This method systematically solves the technical challenge of a single model failing to adequately address the multiple characteristics of complex public opinion events, including trend, nonlinearity, and randomness, by sequentially utilizing a multivariate grey model to capture the collaborative trends among multiple variables of the target public opinion event, a long short-term memory network to mine the nonlinear dynamic dependencies in the residuals, and a Markov chain to correct random fluctuations. Furthermore, it specifically models the first-level residuals output by the multivariate grey model and the second-level residuals output by the long short-term memory network, deeply mining key information contained in the residuals that was not captured by the preceding models. In the Markov correction stage, the correction intensity can be adaptively adjusted according to the regularity of state transitions, achieving intelligent smoothing and optimization of the random fluctuation components in the prediction residuals. This significantly improves the robustness of the final prediction results and the accuracy and robustness of the target public opinion event prediction, overcoming the limitations of traditional hybrid models that only perform single residual corrections and have insufficient information mining. Attached Figure Description
[0019] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application. It is obvious that the drawings described below are merely some embodiments of this application, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.
[0020] Figure 1 This diagram illustrates the steps of a modeling and optimization method for a complex system MGMLM in an exemplary embodiment of this application. Figure 2 This invention illustrates an LSTM network diagram in an exemplary embodiment of this application. Figure 3 This invention illustrates a MGMLM system diagram in an exemplary embodiment of this application. Figure 4 The original data graph in the exemplary experiment of this application is shown; Figure 5 This illustrates a data graph after a single accumulation in an exemplary experiment of this application; Figure 6 This paper shows a comparison chart of LSTM without variables in the exemplary experiments of this application; Figure 7 This paper presents a comparison graph of the model under different parameters in an exemplary experiment of this application; Figure 8 This paper shows a comparison of model errors in an exemplary experiment of this application; Figure 9 This paper presents a comparison chart of model accuracy in exemplary experiments of this application; Figure 10 The diagram shows a comparison of predictions from different models in an exemplary experiment of this application. Detailed Implementation
[0021] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, they are provided so that this disclosure will be more comprehensive and complete, and will fully convey the concept of the exemplary embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
[0022] Furthermore, the accompanying drawings are merely illustrative of this disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and therefore repeated descriptions of them will be omitted. Some block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.
[0023] This example implementation first provides a modeling and optimization method for MGMLM in complex systems. This method can be applied to a terminal device, such as a mobile terminal like a mobile phone, desktop computer, personal digital assistant, laptop, tablet, or smartwatch. (Reference) Figure 1 As shown, the method may include the following steps: Step S101: Obtain the original time series data of the target public opinion event. The original time series data includes at least the main variable of the network search index, the related variables of the network consultation index, and the related variables of the network comprehensive index. Based on the original time series data, construct a multivariate grey model to predict the trend of the network search index and obtain the first predicted value sequence and the corresponding first-level residual sequence.
[0024] Step S102: Using the first-level residual sequence as training data, construct and train a long short-term memory network model, use the trained long short-term memory network model to predict the first-level residual sequence to obtain a nonlinear residual prediction value sequence, and calculate a second prediction value sequence and the corresponding second-level residual sequence based on the first prediction value sequence and the nonlinear residual prediction value sequence.
[0025] Step S103: Based on the Markov chain, perform state partitioning and probabilistic correction on the second-order residual sequence to determine the random fluctuation correction value sequence, and calculate the final predicted value sequence of the network search index based on the second predicted value sequence and the random fluctuation correction value sequence.
[0026] The modeling and optimization method for complex systems proposed in this application addresses the technical challenge of a single model failing to simultaneously account for the multiple characteristics of complex public opinion events, including trend, nonlinearity, and randomness, by sequentially utilizing a multivariate grey model to capture the collaborative trends among multiple variables of the target public opinion event, a long short-term memory network to mine the nonlinear dynamic dependencies in the residuals, and a Markov chain to correct random fluctuations. Furthermore, it specifically models the first-level residuals output by the multivariate grey model and the second-level residuals output by the long short-term memory network, deeply mining the key information contained in the residuals that was not captured by the preceding models. In the Markov correction stage, it adaptively adjusts the correction intensity according to the regularity of state transitions, achieving intelligent smoothing and optimization of the random fluctuation components in the prediction residuals. This significantly improves the robustness of the final prediction results and the accuracy and robustness of the target public opinion event prediction, overcoming the limitations of traditional hybrid models that only perform single residual corrections and have insufficient information mining.
[0027] Below, as Figures 1-10 As shown, a more detailed explanation will be given of the modeling and optimization method for complex systems MGMLM proposed in this example embodiment.
[0028] It is important to understand that current information prediction still has significant limitations for issues like tariffs, which are both policy-sensitive and socially complex: most models struggle to simultaneously capture the deterministic trends, nonlinear dependencies, and random fluctuations in the evolution of target public opinion events, and lack dynamic modeling of multivariate interaction effects. Therefore, this paper innovatively constructs a hybrid prediction framework (MGMLM) that integrates a multivariate grey model, a long short-term memory network (LSTM), and a Markov model, and applies it to the prediction research of tariff-based target public opinion events. The design logic of this hybrid framework is as follows: the multivariate grey model is responsible for collaboratively modeling multiple related features in the system, such as search volume, consultation volume, and overall volume, effectively handling small-sample, information-poor initial data and capturing its deterministic trend components. The LSTM network is responsible for capturing the complex patterns of nonlinear and long-term dependencies inherent in the residual sequence after fitting the grey model, learning deeper patterns beyond deterministic trends. The Markov model is responsible for state partitioning and transition probability calculation of the residual sequence after LSTM prediction, correcting prediction errors caused by random fluctuations, and further improving the model's accuracy and robustness. This sequential modeling strategy, which combines trend fitting, nonlinear learning, and stochastic correction, promises to achieve more accurate and reliable predictions of target public opinion events based on tariffs.
[0029] Step S101: Obtain the original time series data of the target public opinion event. The original time series data includes at least the main variable of the network search index, the related variables of the network consultation index, and the related variables of the network comprehensive index. Based on the original time series data, construct a multivariate grey model to predict the trend of the network search index and obtain the first predicted value sequence and the corresponding first-level residual sequence.
[0030] Specifically, the construction of the multivariate grey model (MGM) is based on the multivariate discrete grey model (MGM). This model not only considers the changing trend of the dominant feature (main variable) of the system itself, but also integrates the influence of other related feature variables (driving variables) on the main variable, thus enabling a more comprehensive description of the dynamic behavior of the system. Assume the system has one main variable and N-1 related variables, each variable having... The original non-negative sequence of the periodic observation data is defined as: Main variable sequence: , The first of the main variables One observation data point.
[0031] Related variable sequence: , For the first The first related variable One observation data point.
[0032] The first-order cumulative sequence is generated by summing the original sequences of the main variable and related variables. The non-stationary original sequences are then transformed into approximately stationary monotonic sequences for all variable sequences. Perform an accumulation (1-AGO) to obtain the generated sequence: in, For the first Each variable was accumulated once.
[0033] Build Based on the first-order cumulative sequence, a whitened differential equation containing one development coefficient and multiple driving coefficients is constructed; a whitened form differential equation describing the relationship between the system's characteristic variables and related factor variables is also constructed. in: A first-order cumulative sequence of the main variable. It is the development coefficient. It is the driving coefficient, that is It is the driving coefficient. Let N be the first-order cumulative sequence of the i-th related variable, and N be the number of related variables.
[0034] Background value generation: The background value reflects the average state of the system. The differential equation is discretized, and the mean is used to generate the background value. This involves the 1-AGO sequence of the main variables. The nearest neighbor mean is generated to obtain the background value sequence: Discretization of differential equations is necessary because data in practice is discrete, requiring the transformation of continuous differential equations into discrete equations. The differential at time k is the result of a first-order cumulative sequence of the main variables. It can be approximated as: Depend on Substituting, we get: Therefore: Matrix representation: Representing discrete equations in matrix form. ,in: , , Parameter calculations are performed using the least squares method to solve for the development coefficient and driving coefficient; the parameter vector is then solved using the least squares method. : The parameter estimates are obtained as follows: The time response formula calculates the time response function of the first-order cumulative sequence of the main variables based on the solved parameters, and obtains the first predicted value sequence by cumulative subtraction and restoration, and calculates the difference between it and the actual observed value to obtain the first-order residual sequence.
[0035] Solving the differential equation yields the time response function of the first-order cumulative sequence: ; in, The predicted value of the first-order cumulative sequence of the main variable at time k. The first observation of the original sequence of the main variable. , For the parameter to be estimated, Let be the original observation value of the first-order cumulative sequence of the i-th related variable at time k.
[0036] The prediction value of the original sequence is obtained by subtracting and reverting the original sequence: ; in, This is the first predicted value sequence. The first observation of the original sequence is the main variable, and n is the total length of the entire time series.
[0037] Step S102: Using the first-level residual sequence as training data, construct and train a long short-term memory network model, use the trained long short-term memory network model to predict the first-level residual sequence to obtain a nonlinear residual prediction value sequence, and calculate a second prediction value sequence and the corresponding second-level residual sequence based on the first prediction value sequence and the nonlinear residual prediction value sequence.
[0038] It is important to understand that while grey models can effectively capture the trend components of public opinion sequences, the complex nonlinear dependencies and long-term dynamic correlations inherent in the data of target public opinion events are difficult to fully characterize using linear models. The introduction of LSTM aims to deeply mine the deep nonlinear time-series patterns composed of complex factors in the evolution of target public opinion events, thereby compensating for the limitations of grey models in this regard.
[0039] The core mechanism of an LSTM unit is that it regulates the flow and memory of information through three gating structures (input gate, forget gate, and output gate) and a cell state. Its computational process is as follows: The forget gate determines the cell state from the previous moment. Which information is discarded?
[0040] in, For the current input, This is the hidden state from the previous moment. For activation function, and For the corresponding weights and biases. Output It is a value between 0 and 1, where 1 represents complete retention and 0 represents complete forgetting.
[0041] The input gate determines which new information will be stored in the cell state.
[0042] in, Control the update frequency. Indicates the candidate new cell state value, This represents the weight matrix of the input gate. The weight matrix represents the state of the candidate cells.
[0043] Cell state update, updating the old cell state Update to the current cell state , Here, ⊙ represents element-wise multiplication. This operation combines forgetting and remembering, enabling selective information transfer.
[0044] The output gate determines the final hidden state output based on the current cell state. in, for The value of the output gate at each moment. It serves as the hidden output for the current moment and is passed to the next moment. It can also be used to generate the final predicted value for that moment. This is the bias vector corresponding to the output gate.
[0045] Specifically, the input and output settings of the LSTM network are as follows: the first-level residual sequence is constructed into a supervised learning sample set using the sliding window method, with the residual values at multiple consecutive historical time points as input features and the residual value at the next time point as the output label; the input of the LSTM network is the multidimensional residual sequence fitted by the MGM model. Its mathematical expression is: ; in, This is the second predicted value sequence. This is the first predicted value sequence. This is a sequence of nonlinear residual values predicted by LSTM.
[0046] The network's input sequence consists of standardized historical residual data. The one-dimensional residual sequence needs to be constructed into supervised learning samples with time steps. This construction method assumes the residual sequence generated by the multivariate grey model on the training set is... Where m=80 is the number of training set samples, and this sequence will be used as the training data for the LSTM model. To construct training samples suitable for supervised learning, a backtracking time step needs to be defined. By using the sliding window method, the residual sequence is constructed into sample pairs, that is, using continuous... One residual predicts the next residual.
[0047] Network input With output Construct it as follows: , Each row of samples From continuous It consists of historical residual values, and its corresponding target value. For the residual of the next moment This structure transforms the univariate time series prediction problem into a supervised learning problem, enabling LSTM to learn from historical windows. Learning to predict The value at any given moment.
[0048] Set a time window length, for example =3 indicates that the residuals of the past 3 days are used to predict the residuals of the next day. The original residual sequence... Convert to the following structure: Table 1 Sliding Window Table It captures complex nonlinear fluctuations that multivariate grey models fail to describe and outputs predictions of future residuals. The predicted output of the mixed model is obtained by adding the trend prediction of the multivariate grey model to the residual correction value of the LSTM model. Its mathematical expression is: in, This is the second predicted value sequence. This is the first predicted value sequence. This is a sequence of nonlinear residual values predicted by LSTM.
[0049] Network construction: Construct a neural network model containing at least one LSTM layer and train it using the supervised learning sample set; such as Figure 2 As shown, a two-layer LSTM network is constructed. The first-level residual sequence is input into the trained LSTM model to obtain a nonlinear residual prediction sequence. The first prediction sequence is added to the nonlinear residual prediction sequence to obtain a second prediction sequence, and the difference between the second prediction sequence and the actual observation is calculated to obtain a second-level residual sequence. This allows for the full learning of complex patterns in the residual sequence. The first-layer LSTM learns the dependencies in the residual sequence and returns a complete sequence for use by the next layer. The second-layer LSTM further learns higher-level temporal features, and finally, the predicted values are output through a fully connected layer.
[0050] The core task of the LSTM module is to mine and predict the complex nonlinear characteristics and long-term dependencies inherent in the residual sequences generated by multivariate grey models. While MGM models can effectively capture the dominant trend of a system, their linear mechanism struggles to characterize fluctuations caused by complex factors such as sudden public opinion events and the nonlinear propagation of market sentiment. This fluctuation information is hidden in the residual sequences, and LSTM, with its unique gating mechanism, can efficiently learn and accurately predict such nonlinear time series patterns.
[0051] Step S103: Based on the Markov chain, perform state partitioning and probabilistic correction on the second-order residual sequence to determine the random fluctuation correction value sequence, and calculate the final predicted value sequence of the network search index based on the second predicted value sequence and the random fluctuation correction value sequence.
[0052] It's important to understand that while the hybrid model of MGM and LSTM significantly improves prediction accuracy, its final output residual sequence... A certain degree of random volatility may still exist. This volatility stems from the inherent uncertainty of the system and is difficult for deterministic models to fully capture. To further enhance the robustness of the model and reduce prediction errors, a Markov chain is introduced to perform state partitioning and probabilistic correction on the second-order residual sequence. This method does not attempt to predict precise residual values, but rather analyzes the statistical characteristics and state transition patterns of the residual sequence to perform probabilistic optimization and smoothing correction on the prediction results of the MGM-LSTM model, thereby effectively suppressing random volatility components.
[0053] A Markov process is a stochastic process. A discrete-time Markov chain is defined by a state space and a set of transition probabilities. The set of all possible states is called the state space, denoted as $\mathbf{a}$. For any Regarding the state of everything have: in, For the first The state at any given moment, For the first The state at time t is called a stochastic process. This is a Markov chain. The most significant characteristic of a Markov chain is its lack of aftereffects (i.e., the Markov property). The Markov property states that the next state of an objective thing depends only on its current state and does not require knowledge of its past states.
[0054] Specifically, the secondary residual sequence is clustered using a clustering algorithm, dividing it into multiple discrete states, each state corresponding to a state interval and a cluster center value.
[0055] The first step in Markov chain correction is to divide the discrete residual sequence into a finite number of discrete state intervals through clustering. To overcome the subjectivity of traditional equal-interval partitioning methods, the K-means clustering algorithm is used for unsupervised learning of the training residuals to objectively determine the center and boundaries of the state intervals. Clustering divides the residual values into K states (e.g., ...). Each state corresponds to a cluster center. .
[0056] Let the second-order residual sequence be... ,in This represents the second-order residual at time point i. The goal of state partitioning is to... Divide into K disjoint subsets This ensures that each residual point is assigned to the state corresponding to the nearest cluster center. The objective function of K-means clustering is: in, It is the index of the sample point; For belonging to the first The set of all sample points in each cluster; Let K be the cluster center for the i-th state. The number of states K is determined using the silhouette coefficient method for optimal selection. Silhouette coefficient The calculation formula is: in, This represents the average distance from sample i to other samples in the same cluster. This represents the minimum average distance from sample i to samples in other clusters. By comparing the average silhouette coefficients corresponding to different K values, the K value that maximizes the silhouette coefficient is selected as the optimal number of states. After clustering, each state... The numerical range of is determined by the minimum and maximum values of the residual points it contains: Meanwhile, cluster centers As a typical representative value of this state, it reflects the average level of the residuals within the interval of this state.
[0057] Based on the state sequence of the second-order residual sequence, the state transition probability matrix is calculated. After dividing the state intervals, a Markov state transition probability matrix is constructed based on the state sequence. Let the state sequence be... The elements of the state transition probability matrix P Indicates from state Transition to state The probability is calculated using the following formula: in: Representing state Transition to state The observation frequency, K is the total number of states.
[0058] Therefore, the state transition matrix can be obtained: Based on the state transition probability matrix, the current and previous states, and the instantaneous value of the second-order residual, the correction value is calculated using a dynamic weighted fusion formula to obtain a sequence of random fluctuation correction values.
[0059] A hybrid correction strategy is used for the final residual sequence. Optimization is performed. This strategy comprehensively considers the instantaneous value of the current residual (instant error) and the statistical center of its current state (the statistical mean of the residuals, usually the average of the cluster centers of that state), through an adjustable weighting parameter. Combining the two aims to simultaneously capture the dynamic changes in the sequence and maintain overall stability.
[0060] For the test set The residual at each moment Its correction value The calculation formula is as follows: in, This indicates the state at the previous moment. Under the given conditions, the residual at the current time is predicted as the state. The probability is obtained directly from the state transition probability matrix P. The cluster center value of the current state S represents the average expected value of the residual level of that state. Harmonic coefficient It is used to dynamically adjust the contribution ratio of the instantaneous value weighted probability and the state center value in the final correction.
[0061] The second predicted value sequence is added to the random fluctuation correction value sequence to obtain the final predicted value sequence of the network search index.
[0062] The Markov correction is then added to the initial predictions of the MGM-LSTM model to obtain the final prediction results: in, Represents the final predicted value sequence. This represents the second predicted value sequence. It is a sequence of corrected values for random fluctuations.
[0063] In this hybrid prediction framework, the Markov chain acts as a stochastic optimizer. It does not directly perform deterministic predictions, but rather optimizes and smooths the output of the GM-LSTM model at a probabilistic level. Its core function is to reduce the uncertainty caused by random fluctuations in the prediction results, thereby further improving the model's robustness and generalization ability.
[0064] To comprehensively evaluate the performance of the constructed MGMLM hybrid model in predicting target public opinion events based on tariffs, a comprehensive evaluation was conducted from multiple dimensions, including prediction accuracy, robustness, generalization ability, and model comparison. Based on the final predicted value sequence and the corresponding original observations of the network search index, several pre-set evaluation indicators were calculated to quantify the prediction accuracy and robustness of the hybrid model. The pre-set evaluation indicators include at least absolute error indicators, relative error indicators, goodness-of-fit indicators, and robustness indicators. Absolute error indicators include mean absolute error (MAE) and root mean square error (RMSE); relative error indicators include mean absolute percentage error (MAPE); and goodness-of-fit indicators include the coefficient of determination (CDO). Robustness metrics include residual standard deviation and Hill inequality coefficient. Furthermore, through comparative experiments with traditional single-model and two-stage hybrid models, the contributions of each module are analyzed in depth to verify the effectiveness and advancement of this hybrid framework.
[0065] The absolute error index includes: Mean Absolute Error (MAE): ,in, Let be the original observation value at time i, which is the actual observation value of the web search index. Let be the model prediction value at time i, i.e., the prediction value output by the MGMLM model, and n be the total number of samples in the time series.
[0066] Root Mean Square Error (RMSE): ,in, Let be the original observation value at time i, which is the actual observation value of the web search index. Let be the model prediction value at time i, i.e., the predicted value output by the MGMLM model, and n be the total number of samples in the time series. This is to accumulate the squared errors over all time points.
[0067] The relative error indices include: Mean Absolute Percentage Error (MAPE): Goodness-of-fit indices include: Coefficient of determination ( ): in, For the original observation value at time i, Let be the model prediction value at time i, i.e., the prediction value output by the MGMLM model. The average of all observations; Robustness indicators include: Residual standard deviation: ,in, Let be the residual at time i, which is the difference between the original observed value and the model prediction. The average of all residuals is given by n, where n is the total number of samples in the time series. Hill's inequality coefficients: .
[0068] To verify the effectiveness of the technical solution of this invention, a complete computational experimental system was designed and implemented. The overall architecture of the system is as follows: Figure 3 As shown, its core process follows a collaborative computation paradigm of data preprocessing, multivariate grey prediction, deep learning residual fluctuation, stochastic fluctuation optimization, and prediction estimation. The specific steps are as follows: Data preprocessing: After collection, the raw data is first cleaned to handle missing and outlier values, providing a high-quality data foundation for subsequent modeling; Trend prediction (MGM module): The preprocessed multivariate time-series data is input into the multivariate grey model; Nonlinear correction (LSTM module): The first-level residual sequence generated by the MGM model is used as a new learning target and input into the Long Short-Term Memory network. Markov chain module: To further smooth the stochastic fluctuations in the prediction results, the K-means clustering algorithm is introduced to divide the state of the second-level residual sequence predicted by the LSTM module, and a state transition probability matrix is constructed using the Markov chain to probabilistically correct the LSTM output, thereby significantly improving the robustness of the model. Finally, the system generates the final predicted value by superimposing the trend prediction of GM(1,3), the nonlinear correction of LSTM, and the stochastic optimization results of Markov, and uses multiple evaluation metrics to comprehensively quantify and evaluate the model performance.
[0069] A data cleaning experiment was conducted, using relevant tariffs in 2025 as an example to establish an MGMLM model. The search index was used as the main variable, and the consultation index and comprehensive index were used as related factor variables. The experimental data are as follows: Figure 4 As shown. The first 80 data points are selected as the training set, and the remaining 28 data points are used as the validation set. Z-score standardization is applied to the original data to eliminate the influence of data units. The standardized data are then summed once, as shown. Figure 5 As shown in the figure, the multivariate grey model experiment was conducted to verify the basic performance of the multivariate grey model in prediction. First, the MGM model was independently tested and analyzed.
[0070] Experimental setup and parameter estimation: The multivariate grey model MGM(1,3) was used for model construction. The model was based on a first-order cumulative generation sequence, and its whitening differential equation is as follows: in, The first-order cumulative sequence of the main variable (search index), and These are the first-order cumulative sequences of the relevant variables (consultation index and comprehensive index).
[0071] The parameter estimation results were obtained by solving the least squares method: in: , B and Y are matrix representations.
[0072] The time response function is: Figure 10 The results demonstrate the predictive performance of the MGM model on the test set. It can be seen that the model's predicted curve and the actual value curve are generally consistent in trend, but there are significant deviations in specific values. Particularly in regions with large data fluctuations, the model's adaptability is clearly insufficient.
[0073] This experiment explores nonlinear feature mining using a dual-layer LSTM network. Building upon the MGM model, a dual-layer Long Short-Term Memory (LSTM) network is introduced to systematically mine the implicit nonlinear dynamic features within the residual sequences. The LSTM model architecture and training settings employ a dual-layer LSTM structure. The primary LSTM layer captures short-term temporal dependencies, while the advanced LSTM layer integrates long-term temporal patterns. Dual Dropout layers ensure model robustness, and the prediction results are finally output through a fully connected layer. Training parameters were systematically optimized using the Adam optimizer (learning rate 0.001), with mean squared error as the loss function, a batch size of 64, and a training duration of 150 epochs. The input data uses three time steps, which experiments have validated as the optimal setting for this dataset. During data preprocessing, the MGM residual sequences are normalized to the [-1, 1] interval, significantly accelerating model convergence.
[0074] Table 2 compares the accuracy of different models in the model performance and analysis section.
[0075] Table 2 Accuracy Comparison of Different Models As shown in Table 2, the introduction of the LSTM model significantly improved prediction performance. Compared with the single MGM model, the MAE of the hybrid model decreased from 2378.757 to 982.185, a reduction of 58.7%; the RMSE decreased from 2904.806 to 1969.125, a reduction of 32.2%. More importantly, R² increased from 0.202 to 0.633, indicating that the model can explain 63.3% of the data variation, and the goodness of fit improved by 215%. These metrics fully demonstrate the superior ability of LSTM to capture nonlinear features.
[0076] like Figure 6 As shown, the MGMLM model performs best in the search index prediction task and can accurately track the dynamic changes of the actual value; the univariate LSTM cannot fully capture the fluctuation pattern; the multivariate LSTM input provides additional information and improves the prediction, but there is still lag or overfitting.
[0077] Performance analysis of the Markov correction model: To further improve prediction accuracy, a Markov chain is introduced to correct for stochastic fluctuations in the residual sequence based on the MGM+two-layer LSTM hybrid model. The experimental setup and performance of the Markov correction model are analyzed.
[0078] Experimental setup and parameter determination: The Markov state partitioning employed the K-means clustering algorithm to divide the second-order residual sequence into discrete states. To scientifically determine the optimal number of states K, the silhouette coefficient was used for evaluation. The clustering quality evaluation results for different K values are shown in Table 3.
[0079] Table 3 Clustering Quality Assessment Table Although the silhouette coefficient was highest (0.8353) when K=2, indicating optimal clustering quality, actual prediction performance analysis showed that the prediction error on the test set significantly decreased when K=5. This indicates a certain inconsistency between clustering quality indicators and prediction task performance. Finally, based on the principle of optimal prediction performance, the number of states K=5 was determined. The state interval partitioning results are shown in Table 4. K-means clustering divided the residual sequence into 5 state intervals: Table 4. State Interval Division Table The division of state intervals reflects different intensity levels of residual fluctuations, from extreme negative fluctuations (state 0) to extreme positive fluctuations (state 4), forming a complete spectrum of fluctuation intensity.
[0080] The state transition table for K=5 is shown in Table 5, and the state transition probability matrix is obtained by analyzing it: Table 5 State Transition Table The Markov correction strategy employs a weighted fusion method, and the correction formula is as follows: like Figure 7 As shown, the optimal parameters are determined through grid search. This indicates that the modified strategy relies more heavily on the statistical central tendency of the state. Analysis of the modification effect, as shown in Table 6, reveals that all indicators of the Markov modified model are significantly better than the previous two models. Table 6 Comparison of Accuracy of Different Models Experimental results show that the proposed correction strategy can significantly improve the model's prediction accuracy and robustness, providing an effective solution for predicting complex public opinion time series.
[0081] Visual analysis of the correction effect Figure 10 The comparison of prediction performance before and after Markov correction is shown. It can be seen that the predicted curve after Markov correction almost completely overlaps with the actual value curve, especially in regions with large sequence fluctuations, where the correction effect is particularly significant. This indicates that Markov correction not only improves overall prediction accuracy but also effectively captures the local fluctuation characteristics of the sequence. By modeling the random fluctuations of the residual sequence as a state transition process, Markov correction effectively reduces prediction uncertainty.
[0082] Data Interpretation and Analysis: Based on the data shown in Table 7, the predicted values of the MGM, MGML, and MGMLM models are compared. Table 7 Prediction Tables for Different Models Detailed data strongly demonstrates the effectiveness of the hybrid modeling strategy. The MGM model provides basic trend predictions, but its residuals are large, exhibiting significant systematic bias. The MGML model, through an LSTM network, effectively learns the nonlinear patterns in the residuals, achieving a first leap in prediction accuracy. Building upon this, the MGMLM model introduces a Markov chain to partition and probabilistically correct the random fluctuations in the residuals, achieving a second improvement in prediction accuracy and a qualitative leap in model robustness. This comparison table not only verifies the contribution of each improvement step but also ultimately establishes the MGMLM model as the leading optimal solution, with predictions closer to the real data, smaller residuals, and more stable performance.
[0083] Figure 8A comprehensive comparative analysis of the performance of three models—MGM (Multivariate Grey Model), MGML (Multivariate Grey + LSTM Model), and MGMLM (Multivariate Grey + LSTM + Markov Chain Model)—on three key evaluation metrics—MAE (Mean Absolute Error), RMSE (Root Mean Square Error), and RSE (Standard Residual Error)—was conducted using planar bar charts. The MGM model's MAE value was 2373.470, the MGML model decreased to 979.822, while the MGMLM model achieved an MAE of 195.404, indicating near-perfect prediction accuracy in terms of mean absolute error, significantly outperforming the other two models. The MGM model's RMSE value was 2904.408, the MGML model showed slight improvement, but the MGMLM model significantly reduced it to 1200, not only reducing the mean error but also effectively controlling the impact of outliers in the predictions, thus improving the model's robustness. The RMSE decreased by 90.7% from 2904.408 to 270.988, demonstrating the advantage of mixed models in handling data with large variance. The RSE value of the MGM model is 1951.778, that of the MGML model is 1956.742, while that of the MGMLM model drops to 270.822. This further confirms the superiority of the MGMLM model in residual control, indicating that its prediction results are closer to the distribution center of the true values and reduce the variability of the overall error.
[0084] Figure 9 The performance of the MGM, MGML, and MGMLM methods on the three core evaluation metrics—Mean Absolute Percentage Error (MAPE), Coefficient of Determination (R²), and Theil's U—was compared using a 3D bar chart. Key conclusions can be drawn from the chart: In terms of prediction accuracy (MAPE), the MGMLM model performs best, with the lowest MAPE value of only 1.77%, significantly better than the MGML model's 6.53% and the MGM model's 21.62%. This indicates that the MGMLM model has the smallest average deviation between predicted and actual values, resulting in the highest prediction accuracy. In terms of goodness of fit (R²), the MGMLM model also demonstrates a significant advantage, with an R² value as high as 0.993, very close to 1, indicating that the model can explain 99.3% of the data fluctuations, demonstrating excellent fit. In contrast, the MGML model has an R² of 0.631, while the MGM model has an R² of only 0.198, indicating limited fitting ability. Regarding prediction robustness (Theil's U), the MGMLM model has the lowest Theil's U coefficient at 0.011, indicating that its prediction error distribution is the most concentrated, and the model has the strongest robustness and reliability. The coefficients for the MGML and MGM models are 0.08 and 0.108, respectively, indicating relatively poor robustness.
[0085] like Figure 10As shown, this line chart compares the actual observed values with the prediction performance of three prediction models (MGM, MGML, and MGMLM) on the relevant tariff information search index. Several key conclusions can be drawn: Overall trend fit: MGM model: Its predicted value remained relatively stable around the 10,000 level, failing to capture the sharp decline in the actual value around the 85-hour mark and subsequent fluctuations, indicating a significant prediction bias. MGML model: An improvement over the MGM model, but its predicted trajectory is still relatively flat, unable to accurately track rapid changes in the actual value, especially in the 90-100 hour range, where there is a significant discrepancy. MGMLM model: Its predicted trajectory has the highest degree of agreement with the actual value. It not only successfully predicted the sharp decline in the trend but also closely followed the fluctuations of the actual value throughout the time series, demonstrating excellent fitting ability. The magnified window in the chart further highlights the advantage of the MGMLM model in capturing details. Within this key range, the actual value exhibits complex fluctuations. The prediction line of the MGMLM model almost overlaps with the actual value, accurately reproducing every peak and trough of the fluctuations. The MGML model's predictions, however, appear overly smooth, while the MGM model fails to respond to any changes at all. This demonstrates the effectiveness of integrating Markov chains for stochastic adjustments, enabling the model to capture subtle fluctuations that are difficult to describe by deterministic models.
[0086] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the embodiments of this application, "multiple" means two or more, unless otherwise explicitly specified.
[0087] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. In addition, those skilled in the art can combine and integrate the different embodiments or examples described in this specification.
[0088] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein.
Claims
1. A modeling and optimization method for complex systems using MGMLM, characterized in that, Includes the following steps: Obtain the original time series data of the target public opinion event. The original time series data includes the main variable of the network search index, the related variables of the network consultation index, and the related variables of the network comprehensive index. Based on the original time series data, construct a multivariate grey model to predict the trend of the network search index and obtain the first predicted value sequence and the corresponding first-level residual sequence. Using the first-level residual sequence as training data, a long short-term memory network model is constructed and trained. The trained long short-term memory network model is used to predict the first-level residual sequence to obtain a nonlinear residual prediction value sequence. Based on the first prediction value sequence and the nonlinear residual prediction value sequence, a second prediction value sequence and the corresponding second-level residual sequence are calculated. Based on the Markov chain, the second-order residual sequence is divided into states and probabilistically corrected to determine the random fluctuation correction value sequence. The final predicted value sequence of the network search index is calculated based on the second predicted value sequence and the random fluctuation correction value sequence.
2. The modeling and optimization method for complex systems using MGMLM according to claim 1, characterized in that, The steps for constructing a multivariate grey model based on the original time series data, predicting the trend of the network search index, and obtaining the first predicted value sequence and the corresponding first-level residual sequence include: The original sequences of the main variables and related variables are accumulated once to generate the first-order accumulated sequence of each variable; Based on the first-order cumulative sequence, a whitening differential equation containing one development coefficient and multiple driving coefficients is constructed. The development coefficient and driving coefficient are solved using the least squares method; Based on the solved parameters, the time response function of the first-order cumulative sequence of the main variables is calculated, and the first predicted value sequence is obtained by cumulative subtraction and restoration. The difference between the predicted value and the actual observed value is calculated to obtain the first-order residual sequence.
3. The modeling and optimization method for complex systems using MGMLM according to claim 2, characterized in that, The expression for the whitening differential equation is: in, A first-order cumulative sequence of the main variable. It is the development coefficient. It is the driving coefficient. Let N be the first-order cumulative sequence of the i-th related variable, and N be the number of related variables.
4. The modeling and optimization method for complex systems using MGMLM according to claim 3, characterized in that, The expression for the time response function of the first-order cumulative sequence of the main variable is: in, The predicted value of the first-order cumulative sequence of the main variable at time k. The first observation of the original sequence of the main variable. , For the parameter to be estimated, Let be the original observation value of the first-order cumulative sequence of the i-th related variable at time k.
5. The modeling and optimization method for complex systems using MGMLM according to claim 4, characterized in that, The expression for the first predicted value sequence is: in, This is the first predicted value sequence. The first observation of the original sequence is the main variable, and n is the total length of the entire time series.
6. The modeling and optimization method for complex systems using MGMLM according to claim 1, characterized in that, Using the first-level residual sequence as training data, a long short-term memory network model is constructed and trained. The trained long short-term memory network model is then used to predict the first-level residual sequence to obtain a nonlinear residual prediction value sequence. The steps of calculating the second prediction value sequence and the corresponding second-level residual sequence based on the first prediction value sequence and the nonlinear residual prediction value sequence include: The first-level residual sequence is constructed into a supervised learning sample set using the sliding window method, with the residual values of multiple consecutive historical moments as input features and the residual value of the next moment as output labels. Construct a neural network model containing at least one LSTM layer and train it using the supervised learning sample set; The first-level residual sequence is input into the trained LSTM model to obtain a nonlinear residual prediction sequence; The first predicted value sequence is added to the nonlinear residual predicted value sequence to obtain the second predicted value sequence, and the difference between the second predicted value and the actual observed value is calculated to obtain the second-level residual sequence.
7. The modeling and optimization method for complex systems using MGMLM according to claim 1, characterized in that, The expression for the second predicted value sequence is: in, This is the second predicted value sequence. This is the first predicted value sequence. This is a sequence of nonlinear residual values predicted by LSTM.
8. The modeling and optimization method for complex systems using MGMLM according to claim 1, characterized in that, The steps of performing state partitioning and probabilistic correction on the second-order residual sequence based on Markov chains to determine the random fluctuation correction value sequence, and calculating the final predicted value sequence of the network search index based on the second predicted value sequence and the random fluctuation correction value sequence include: The second-order residual sequence is clustered using a clustering algorithm, dividing it into multiple discrete states, each state corresponding to a state interval and a cluster center value; Calculate the state transition probability matrix based on the state sequence of the second-order residual sequence; Based on the state transition probability matrix, the current and previous states, and the instantaneous value of the second-order residual, the correction value is calculated using a dynamic weighted fusion formula to obtain a sequence of random fluctuation correction values. The second predicted value sequence is added to the random fluctuation correction value sequence to obtain the final predicted value sequence of the network search index.
9. The modeling and optimization method for complex systems using MGMLM according to claim 8, characterized in that, The dynamic weighted fusion formula is as follows: in, This is a correction value for random fluctuations. This indicates the state at the previous moment. Under the given conditions, the residual at the current time is predicted as the state. The probability, The cluster center value of the current state S represents the average expected value of the residual level of that state. Harmonic coefficient .
10. The modeling and optimization method for complex systems using MGMLM according to claim 9, characterized in that, The final predicted value sequence is obtained using the following formula: in, Represents the final predicted value sequence. This represents the second predicted value sequence. It is a sequence of corrected values for random fluctuations.