Method and device for predicting network packet loss amount of server, and electronic equipment

By employing a nonlinear regression model and a probabilistic variable selection strategy, the problem of inaccurate packet loss prediction in traditional models during database migration scenarios was solved, achieving accurate prediction of server packet loss and improving the accuracy and reliability of predictions.

CN122093291APending Publication Date: 2026-05-26INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
INDUSTRIAL AND COMMERCIAL BANK OF CHINA
Filing Date
2026-03-06
Publication Date
2026-05-26

Smart Images

  • Figure CN122093291A_ABST
    Figure CN122093291A_ABST
Patent Text Reader

Abstract

The invention discloses a server network packet loss prediction method and device and electronic equipment, and relates to the technical field of big data. The method comprises the following steps: acquiring historical transaction data and historical packet loss data of a server; constructing a regression model based on the historical transaction data and the historical packet loss data; training the regression model by using a variable selection strategy to obtain a trained prediction model; and based on the trained prediction model, determining the packet loss quantity of the server in the target time period according to the transaction quantity of the server in the target time period. The technical problem that in the prior art, due to the fact that a traditional parameter regression model is difficult to accurately capture the complex nonlinear relation between the server transaction number and the network packet loss number, prediction of the packet loss number is not accurate under the scene that network traffic such as database migration is overloaded is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of big data technology, and more specifically, to a method, apparatus, and electronic device for predicting packet loss in a server network. Background Technology

[0002] In the field of computer network operation and performance analysis, the relationship between server transaction volume and network packet loss rate is a key indicator for assessing system stability, conducting capacity planning, and providing risk warnings. Especially in scenarios where network traffic may exceed capacity, such as database migrations or peak business periods, accurate prediction of packet loss is crucial for ensuring service continuity and optimizing resource allocation. Traditional analysis methods often rely on parametric statistical models, such as linear regression or generalized linear models. These methods typically require pre-assuming that the transaction volume and packet loss satisfy a specific functional form (such as linear, polynomial, etc.) and perform parameter fitting based on historical data.

[0003] However, existing technical solutions have significant limitations. Because there is often a complex, non-linear, dynamic relationship between server transactions and network packet loss, and this relationship can change with variations in server type, business load patterns, and network environment, traditional parametric regression models, constrained by predefined function forms, struggle to flexibly and accurately capture this complex and time-varying correlation. This leads to inaccurate packet loss prediction in scenarios with excessive network traffic, such as database migration.

[0004] There is currently no effective solution to the above problems. Summary of the Invention

[0005] This application provides a method, apparatus, and electronic device for predicting server network packet loss, in order to at least solve the technical problem in the prior art where the use of traditional parametric regression models makes it difficult to accurately capture the complex nonlinear relationship between the number of server transactions and the number of network packet loss, resulting in inaccurate prediction of packet loss in scenarios such as database migration and network traffic overload.

[0006] According to one aspect of the embodiments of this application, a method for predicting server network packet loss is provided, comprising: acquiring historical transaction data and historical packet loss data of the server, wherein the historical transaction data represents the number of transactions processed by the server within a historical time period, and the historical packet loss data represents the number of data packets lost in network transmission within the historical time period; constructing a regression model based on the historical transaction data and historical packet loss data, wherein the regression model is used to fit the nonlinear relationship between the historical transaction data and the historical packet loss data through basis functions; training the regression model using a variable selection strategy to obtain a trained prediction model, wherein the variable selection strategy is used to select basis functions related to the relationship between the number of server transactions and the number of packet losses through probabilistic indicator variables, and to update the model parameters of the regression model through sampling operations; and determining the number of packet losses of the server within a target time period based on the number of transactions of the server within a target time period according to the trained prediction model.

[0007] Optionally, a regression model is constructed based on historical transaction data and historical packet loss data, including: performing a double logarithmic transformation on the historical transaction data and historical packet loss data to obtain the transformed transaction quantity characteristics and packet loss quantity characteristics; selecting a set of basis functions, wherein the set of basis functions includes a first basis function and a second basis function. The first basis function is a radially symmetric kernel function defined in the form of a quadratic polynomial on the server transaction quantity characteristic space. The function value of the first basis function depends on the Euclidean distance between the server transaction quantity and a preset center point. The second basis function is a spline function defined on the server transaction quantity characteristic space based on the combination of the cube of the absolute value of the radial distance and a linear term. The second basis function achieves global smooth interpolation by minimizing curvature energy, which is used to provide a fit to the overall data trend in the regression model; and constructing a regression model based on the transformed transaction quantity characteristics, packet loss quantity characteristics, and the set of basis functions.

[0008] Optionally, a variable selection strategy is used to train the regression model to obtain a trained predictive model, including: setting a prior distribution related to the model parameters of the regression model, wherein the model parameters include regression coefficients, indicator variables, and error covariance matrix, wherein each basis function in the basis function set corresponds to an indicator variable, and the value of the indicator variable is used to control the enabled or disabled state of the basis function corresponding to the indicator variable in the regression model; based on the prior distribution, iteratively extracting parameter samples through a posterior distribution simulation algorithm until the regression model converges, wherein the posterior distribution simulation algorithm is a calculation method that numerically approximates and characterizes the parameter uncertainty by iteratively generating a random sample sequence that follows the posterior probability distribution of the model parameters, and the parameter samples include a set of parameter values ​​selected in each iteration for the regression coefficients, indicator variables, and error covariance matrix; the convergence criterion for the regression model is: in a preset number of consecutive iterations, the range of change of the sample statistics of the regression coefficients and indicator variables is less than a preset convergence threshold; and determining the trained predictive model based on the set of parameter samples generated by continuing iteration after satisfying the criterion.

[0009] Optionally, each iteration of the parameter sample extraction process using the posterior distribution simulation algorithm includes: determining the conditional posterior distribution of the regression coefficients based on the current state of the indicator variable, the current value of the error covariance matrix, and all historical data, and extracting a new set of regression coefficient samples from the conditional posterior distribution of the regression coefficients as the first sub-parameter sample; determining the conditional posterior distribution of the error covariance matrix based on the first sub-parameter sample, the current state of the indicator variable, and all historical data, and extracting a new error covariance matrix sample from the conditional posterior distribution of the error covariance matrix as the second sub-parameter sample; and further extracting the parameter samples based on the first sub-parameter sample, the second sub-parameter sample, and all historical data. According to the algorithm, for the indicator variable, a target operation is performed to obtain the latest state of the indicator variable. The target operation includes: generating candidate states of the indicator variable based on the proposed probability distribution corresponding to the indicator variable; calculating the acceptance probability of the state transition based on the ratio of the conditional posterior probability density of the candidate state of the indicator variable to the current state of the indicator variable; updating the state of the indicator variable to the candidate state if the acceptance probability is greater than or equal to the preset probability; keeping the state of the indicator variable unchanged if the acceptance probability is less than the preset probability; and forming a set of parameter samples extracted in this iteration by combining the obtained first sub-parameter sample, second sub-parameter sample, and the latest states of all indicator variables.

[0010] Optionally, selecting the basis function set further includes: constructing a first candidate model using a first basis function and a second candidate model using a second basis function, based on the transformed transaction quantity characteristics; calculating the mean squared deviation of the first candidate model and the second candidate model based on a preset validation dataset; comparing the mean squared deviations and selecting the basis function corresponding to the candidate model with the smallest mean squared deviation as the target basis function in the basis function set.

[0011] Optionally, the method for predicting server network packet loss also includes: constructing a correlation statistical model based on historical transaction data and historical packet loss data. The correlation statistical model is a statistical model constructed to analyze the correlation between the number of transactions and the number of packet losses on a server. The correlation statistical model fits the regression relationship of each server through nonparametric basis functions and quantifies the correlation between the regression equations of different servers through the cross-server error covariance matrix. The correlation statistical model is used to perform quantitative analysis on the packet loss correlation between servers.

[0012] Optionally, the method for predicting packet loss in the server network includes: constructing a nonparametric regression equation for each server, wherein the correlation of each nonparametric regression equation is characterized by the cross-server error covariance matrix; and using a joint training method based on probabilistic inference to jointly train the correlation statistical model, wherein the joint training method uses the prior distribution of the model parameters and numerically approximates the posterior distribution of the model parameters based on historical transaction data and historical packet loss data of multiple servers to synchronously estimate the regression equation parameters of all servers in the multiple servers.

[0013] Optionally, the method for predicting packet loss in the server network also includes: calculating the packet loss correlation coefficient between servers based on the trained correlation statistical model; marking the servers corresponding to the packet loss correlation coefficient as related server groups when the packet loss correlation coefficient exceeds a preset threshold; and jointly adjusting the packet loss prediction results of related server groups.

[0014] Optionally, the method for predicting server network packet loss also includes: generating an early warning report on server packet loss risk based on a trained prediction model or a trained correlation statistical model. The early warning report includes the predicted number of packet losses, packet loss trends, and related server information. Based on the early warning report, the resource allocation strategy for the server and related server groups is adjusted, or expansion operations are triggered.

[0015] According to another aspect of the embodiments of this application, a server network packet loss prediction device is also provided, comprising: a first acquisition unit, configured to acquire historical transaction data and historical packet loss data of the server, wherein the historical transaction data represents the number of transactions processed by the server within a historical time period, and the historical packet loss data represents the number of data packets lost in network transmission within the historical time period; a first processing unit, configured to construct a regression model based on the historical transaction data and historical packet loss data, wherein the regression model is used to fit the nonlinear relationship between the historical transaction data and the historical packet loss data through basis functions; a second processing unit, configured to train the regression model using a variable selection strategy to obtain a trained prediction model, wherein the variable selection strategy is used to select basis functions related to the relationship between the number of server transactions and the number of packet losses through probabilistic indicator variables, and to update the model parameters of the regression model through sampling operations; and a third processing unit, configured to determine the number of packet losses of the server within a target time period based on the number of transactions of the server within a target time period, according to the trained prediction model.

[0016] According to another aspect of the embodiments of this application, a computer-readable storage medium is also provided, wherein a computer program is stored in the computer-readable storage medium, wherein when the computer program is executed, the device where the computer-readable storage medium is located executes the above-described method for predicting server network packet loss.

[0017] According to another aspect of the embodiments of this application, an electronic device is also provided, wherein the electronic device includes one or more processors and a memory, the memory being used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to perform the above-described method for predicting server network packet loss.

[0018] According to another aspect of the embodiments of this application, a computer program product is also provided, which includes a computer program or instructions that, when executed by a processor, implement the above-described method for predicting server network packet loss.

[0019] This application helps to solve the problem in existing technologies where the use of traditional parametric regression models results in inaccurate prediction of the complex nonlinear relationship between the number of server transactions and the number of network packet losses in scenarios with network traffic overload, such as database migration. By introducing a nonlinear regression model and a probabilistic variable selection strategy, this application addresses the issue of inaccurate prediction of the complex nonlinear relationship between the number of server transactions and the number of network packet losses in scenarios with network traffic overload, such as database migration.

[0020] First, this application collects historical transaction data and historical packet loss data from the server and constructs a regression model using nonlinear basis functions. This model can flexibly fit the complex nonlinear relationship that may exist between the number of transactions and the number of packet losses, thus breaking the limitations of traditional linear or simple polynomial models. Second, by using a variable selection strategy, probabilistic indicator variables are introduced to screen the basis functions. This strategy allows the model to automatically identify and activate the basis functions most closely related to transaction processing and packet loss, thereby eliminating irrelevant features, reducing model complexity, avoiding overfitting, and improving prediction accuracy. Finally, sampling operations are used to update and train the model parameters. This not only yields a trained prediction model but also quantifies the uncertainty of the parameters through the posterior distribution, providing a confidence interval for the prediction of the number of packet losses and enhancing the reliability of the prediction results. Therefore, the technical solution of this application can more accurately predict the number of server packet losses in specific network traffic overload scenarios (such as database migration), providing a reference for system operation and maintenance and resource optimization, and overcoming the problem of inaccurate prediction in existing technologies. Attached Figure Description

[0021] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0022] Figure 1 This is a flowchart of a method for predicting server network packet loss according to an embodiment of this application;

[0023] Figure 2 The diagram shows the fitting effects of the MLE model, Bayesian NR model, and Bayesian NSUR model according to embodiments of this application.

[0024] Figure 3 This is a schematic diagram of a server network packet loss prediction device according to an embodiment of this application. Detailed Implementation

[0025] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0026] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0027] It should also be noted that the information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, and displayed data) collected in this application are information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, storage, use, processing, transmission, provision, disclosure, and application of related data all comply with the relevant laws, regulations, and standards of the relevant regions, necessary confidentiality measures have been taken, and they do not violate public order and good morals. Corresponding operation entry points are provided for users to choose to authorize or refuse. For example, this system has interfaces with relevant users or organizations. Before obtaining relevant information, a request to obtain the information needs to be sent to the aforementioned user or organization through the interface, and the relevant information is obtained only after receiving consent from the aforementioned user or organization.

[0028] According to an embodiment of this application, an embodiment of a method for predicting packet loss in a server network is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0029] It should be noted that the information collected in this application (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for display, data used for analysis, etc.) are information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, storage, use, processing, transmission, provision, disclosure, and application of this data all comply with relevant laws, regulations, and standards, necessary confidentiality measures have been taken, and they do not violate public order and good morals. Corresponding access points are provided for users to choose to authorize or refuse. For example, interfaces are set up between this system and relevant users or organizations, providing users with corresponding access points to choose to agree to or refuse automated decision-making results; if the user chooses to refuse, the process proceeds to the expert decision-making stage.

[0030] According to the embodiments of this application, an intelligent operation and maintenance system can be used as the execution subject of the server network packet loss prediction method of this application embodiment. The system can be a software system or an embedded system combining software and hardware. Of course, the method execution subject in the embodiments of this application can also be other forms of execution subject, such as devices, equipment, etc. It should be known by those skilled in the art that this application does not particularly limit the specific form of the method execution subject.

[0031] According to an embodiment of this application, a method embodiment for predicting packet loss in a server network is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0032] Figure 1 This is a flowchart of a server network packet loss prediction method according to an embodiment of this application, such as... Figure 1 As shown, the method includes the following steps:

[0033] Step S101: Obtain historical transaction data and historical packet loss data from the server.

[0034] In step S101, historical transaction data represents the number of transactions processed by the server within a historical time period, and historical packet loss data represents the number of data packets lost during network transmission within a historical time period.

[0035] Step S102: Based on historical transaction data and historical packet loss data, a regression model is constructed, wherein the regression model is used to fit the nonlinear relationship between historical transaction data and historical packet loss data through basis functions.

[0036] Optionally, the process of constructing a regression model based on the acquired historical transaction data and packet loss data is implemented as follows: First, the number of server transactions and the number of packet losses are transformed by natural logarithms to obtain double logarithmic features, thereby eliminating the influence of trends and enhancing linear fit. Next, two basis functions with complementary characteristics (quadratic regenerating kernel basis function and thin-slice spline basis function) are used to capture local nonlinear fluctuations and global smoothing trends in the data, respectively. By using all historical observation points as the central nodes of the basis functions, a design matrix X of dimension n×q is constructed (n is the number of time points, and q is the number of basis functions). This establishes a regression model structure of the form Y = Xβ+ε, where Y is the packet loss observation matrix, β is the regression coefficient matrix, and ε is the error term following a multidimensional normal distribution. Essentially, this model uses a linear combination of basis functions to approximate the unknown nonlinear relationship between transactions and packet loss, thereby achieving flexible and adaptive relationship fitting without pre-setting a specific function form, providing a basic model framework for subsequent variable selection and parameter estimation.

[0037] Step S103: The regression model is trained using a variable selection strategy to obtain the trained prediction model. The variable selection strategy is used to select basis functions related to the relationship between the number of server transactions and the number of packet losses through probabilistic indicator variables, and to update the model parameters of the regression model through sampling operations.

[0038] During the model training phase, the variable selection strategy is implemented as follows: First, an indicator variable following a Bernoulli distribution is introduced for each basis function. When the indicator variable = 1, the basis function is included in the model; otherwise, it is excluded. This probabilistic mechanism enables adaptive screening of basis functions, thereby identifying the core basis functions that are truly related to the number of server transactions and packet loss. Based on this, iterative sampling training is performed using the Markov Chain Monte Carlo (MCMC) method: In each iteration, based on the current indicator variable state and the error covariance matrix, the conditional posterior distribution of the regression coefficients is sampled and updated; then, based on the new coefficients and indicator variables, the conditional posterior distribution of the error covariance matrix is ​​sampled and updated; finally, the state of each indicator variable is updated based on the posterior probability ratio. After multiple iterations, when the parameter sequence tends to stabilize, the model is considered converged, and the collected samples at this point are an approximation of the posterior distribution of the model parameters. The regression coefficients and posterior mean obtained from these samples constitute the final training prediction model. This model not only achieves the screening of key features, but also quantifies the uncertainty of parameter estimation.

[0039] Step S104: Based on the trained prediction model, determine the number of packets lost by the server in the target time period according to the number of transactions of the server in the target time period.

[0040] In the prediction phase, based on the trained prediction model, the determination of the number of packet losses for the target time period is implemented as follows: First, the observed transaction count for the target time period is subjected to a logarithmic transformation consistent with the training phase, and mapped to a corresponding design vector using the basis functions selected during training (such as quadratic regeneration kernels or thin-slice spline basis functions). Then, this design vector is combined with the posterior mean of the regression coefficient matrix obtained from training (or other statistics based on the posterior distribution) to obtain a point estimate of the number of packet losses on a logarithmic scale through linear calculation. Further, to quantify the uncertainty of the prediction, posterior prediction sampling can be performed based on the posterior distribution of the model parameters: that is, multiple sets of parameter samples (including regression coefficients and error covariance matrix) are extracted from the converged MCMC chain. Each set of parameters can generate a possible predicted value for the number of packet losses, thus forming a complete posterior prediction distribution. Based on this distribution, not only can a single predicted value of the number of packet losses for the target time period (such as the posterior prediction mean) be output, but a prediction interval with a specified confidence level (such as 95%) can also be provided, achieving interval estimation of the packet loss risk. Finally, the prediction results (including point estimates and interval estimates) are converted back to the original scale, which is the prediction of the specific number of packet losses of the server in the target time period and its uncertainty range, which can be directly used for system capacity early warning and resource planning decisions.

[0041] In one optional embodiment, a regression model is constructed based on historical transaction data and historical packet loss data, including: performing a double logarithmic transformation on the historical transaction data and historical packet loss data to obtain transformed transaction quantity features and packet loss quantity features; selecting a set of basis functions, wherein the set of basis functions includes a first basis function and a second basis function, the first basis function being a radially symmetric kernel function defined in the form of a quadratic polynomial on the server transaction quantity feature space, the function value of the first basis function depending on the Euclidean distance between the server transaction quantity and a preset center point, the second basis function being a spline function defined on the server transaction quantity feature space based on a combination of the cube of the absolute value of the radial distance and a linear term, the second basis function achieving global smooth interpolation by minimizing curvature energy, used to provide a fit to the overall data trend in the regression model; and constructing a regression model based on the transformed transaction quantity features and packet loss quantity features and the set of basis functions.

[0042] In a specific embodiment of constructing the regression model, the historical transaction data and packet loss data are first transformed using the natural logarithm to obtain double logarithmic features, thereby eliminating potential non-stationary trends and stabilizing variance, making potential nonlinear relationships easier to model. The selection of the basis function set includes: the first basis function is a quadratic regenerative kernel basis function, which centers on each historical observation point in the transaction quantity feature space, with the function value increasing with the square of the Euclidean distance between the evaluation point and the center point, forming a radially symmetric local response surface, adept at capturing local fluctuations in the data; the second basis function is a thin-slice spline basis function, based on a combination of a cubic radial basis function and a linear term, achieving global smoothing by minimizing the overall curvature energy, used to fit the macroscopic trend between the transaction quantity and the packet loss quantity. Based on this, each historical observation point is used as the center node of the two basis functions, and the basis function values ​​are calculated for all observed data points to construct a design matrix. Finally, the transformed packet loss quantity feature is used as the response variable, and the design matrix is ​​used as the explanatory variable to establish a linear regression model. This achieves efficient and flexible fitting of the original nonlinear relationship through the linear combination of basis functions, laying the foundation for subsequent variable selection and parameter estimation.

[0043] In an optional embodiment, a variable selection strategy is used to train the regression model to obtain a trained predictive model, including: setting a prior distribution related to the model parameters of the regression model, wherein the model parameters include regression coefficients, indicator variables, and error covariance matrix, wherein each basis function in the basis function set corresponds to an indicator variable, and the value of the indicator variable is used to control the enabled or disabled state of the basis function corresponding to the indicator variable in the regression model; based on the prior distribution, iteratively extracting parameter samples through a posterior distribution simulation algorithm until the regression model converges, wherein the posterior distribution simulation algorithm is a calculation method that numerically approximates and characterizes the parameter uncertainty by iteratively generating a random sample sequence that follows the posterior probability distribution of the model parameters, and the parameter samples include a set of parameter values ​​selected in each iteration for the regression coefficients, indicator variables, and error covariance matrix; the convergence criterion for the regression model is: in a preset number of consecutive iterations, the range of change of the sample statistics of the regression coefficients and indicator variables is less than a preset convergence threshold; and determining the trained predictive model based on the set of parameter samples generated by continuing iteration after satisfying the criterion.

[0044] In a specific embodiment of training a regression model to obtain a predictive model, a Bayesian prior distribution is first set for the model parameters: the regression coefficients are set to a multivariate normal prior to introduce sparsity; each basis function is associated with an indicator variable whose prior is a Bernoulli distribution with a probability of 1 (enabled), while the hyperparameters themselves follow a uniform (0,1) distribution, achieving probabilistic basis function selection; the error covariance matrix is ​​assigned an inverse Wishart prior as the conjugate prior of the covariance structure. The training process uses a Markov chain Monte Carlo posterior distribution simulation algorithm for iterative sampling: in each iteration, new samples are sequentially drawn from the conditional posterior distributions of the regression coefficients and the error covariance matrix, and the state of each indicator variable is updated according to the posterior probability ratio. This process is repeated, for example, 3000 iterations, and the trajectories of the regression coefficients and indicator variables are monitored. The convergence criterion is that in 500 consecutive iterations, the range of change of each component of the posterior mean vector of the regression coefficients and the range of change of the posterior probability of the indicator variables are both less than a preset threshold. After convergence, a certain number of samples (e.g., 1000 times) are drawn as post-combustion period samples. The posterior mean (or median) of the regression coefficients and the posterior mean of the error covariance matrix calculated based on these samples together constitute the final trained prediction model. This model not only completes the automatic selection of key basis functions, but also quantifies the uncertainty of all parameter estimates.

[0045] In one optional embodiment, each iteration of the parameter sample extraction process using the posterior distribution simulation algorithm includes: determining the conditional posterior distribution of the regression coefficients based on the current state of the indicator variable, the current value of the error covariance matrix, and all historical data, and extracting a new set of regression coefficient samples from the conditional posterior distribution of the regression coefficients as the first sub-parameter sample; determining the conditional posterior distribution of the error covariance matrix based on the first sub-parameter sample, the current state of the indicator variable, and all historical data, and extracting a new error covariance matrix sample from the conditional posterior distribution of the error covariance matrix as the second sub-parameter sample; and further extracting the parameter samples based on the first sub-parameter sample, the second sub-parameter sample, and all historical data. Using historical data, for indicator variables, a target operation is performed to obtain the latest state of the indicator variables. This target operation includes: generating candidate states for the indicator variables based on the proposed probability distribution corresponding to the indicator variables; calculating the acceptance probability of state transition based on the ratio of the conditional posterior probability density of the candidate states to the current state of the indicator variables; updating the state of the indicator variables to a candidate state if the acceptance probability is greater than or equal to a preset probability; and keeping the state of the indicator variables unchanged if the acceptance probability is less than the preset probability. The obtained first sub-parameter sample, second sub-parameter sample, and the latest states of all indicator variables constitute a set of parameter samples extracted in this iteration.

[0046] In a specific embodiment of parameter sample extraction in each iteration, firstly, based on the current state of the indicator variable, the current value of the error covariance matrix, and all historical observation data, the conditional posterior distribution of the regression coefficients is determined. This distribution reflects the probabilistic characteristics of the regression coefficients given other parameters. Then, a new set of regression coefficient values ​​is randomly selected from this distribution as the first sub-parameter sample for this iteration. Next, based on the newly extracted regression coefficient sample, the current state of the indicator variable, and historical data, the conditional posterior distribution of the error covariance matrix is ​​determined. This distribution describes the uncertainty of the error covariance matrix. A new error covariance matrix sample is extracted from this distribution as the second sub-parameter sample. Finally, a state update operation is performed for each indicator variable: based on a preset suggestion probability distribution, candidate states for the indicator variable are generated; by calculating the ratio of the conditional posterior probability density of the candidate state to the current state under the given latest regression coefficients and error covariance matrix, the acceptance probability of the state transition is obtained; if the acceptance probability is not lower than a preset threshold, the indicator variable is updated to a candidate state; otherwise, its original state remains unchanged. The new regression coefficient samples, new error covariance matrix samples, and all updated indicator variable states obtained in this iteration are combined to form a complete set of parameter samples extracted in this iteration. This sample will be recorded and used for subsequent model evaluation and convergence judgment, and will also serve as the starting point for updating other parameters in the next iteration. Through repeated iterations, the true posterior distribution of the model parameters will be gradually approximated.

[0047] In an optional embodiment, selecting the basis function set further includes: constructing a first candidate model using a first basis function and a second candidate model using a second basis function, based on the transformed transaction quantity characteristics; calculating the mean squared deviation of the first candidate model and the second candidate model based on a preset validation dataset; comparing the mean squared deviations and selecting the basis function corresponding to the candidate model with the smallest mean squared deviation as the target basis function in the basis function set.

[0048] In the embodiment of selecting the basis function set, a dynamic selection mechanism based on validation set performance comparison is implemented to further optimize model fitting performance. Specifically, after completing the double logarithmic transformation of the data, two candidate regression models are independently constructed using the first basis function (i.e., the quadratic regenerating kernel basis function) and the second basis function (i.e., the thin-slice spline basis function). The first candidate model is constructed entirely based on the first basis function system, and its design matrix consists of the values ​​of the basis function at all historical observation points; the second candidate model is constructed entirely based on the second basis function system in the same way. To objectively evaluate the fitting ability of the two basis functions, a portion of the historical data that is not used for model training needs to be pre-defined as a validation dataset. Subsequently, the two constructed candidate models are used to predict on this validation dataset, and the predicted values ​​are compared with the actual packet loss observations in the validation set, and the mean squared deviation of each is calculated. The mean squared deviation is the average of the squares of the prediction errors, which can comprehensively reflect the accuracy and stability of the model prediction; the smaller the value, the better the model's fit on the validation set. Finally, by directly comparing the mean squared deviation values ​​calculated by the first and second candidate models, the basis function type corresponding to the candidate model with the smaller mean squared deviation (i.e., the first or second basis function) is selected and formally determined as the target basis function used in this modeling process. This is then used to construct the design matrix of the final regression model. This process achieves adaptive selection of basis function types, ensuring that the constructed regression model can flexibly adopt the most suitable function form to capture the intrinsic relationship between the number of transactions and the number of packet losses based on specific data characteristics, thereby improving the overall prediction accuracy and generalization ability of the model.

[0049] In an optional embodiment, the method for predicting server network packet loss further includes: constructing a correlation statistical model based on historical transaction data and historical packet loss data, wherein the correlation statistical model is a statistical model constructed to analyze the correlation between the number of transactions and the number of packet losses of a server, the correlation statistical model fits the regression relationship of each server through nonparametric basis functions, and quantifies the correlation between the regression equations of different servers through the cross-server error covariance matrix; and using the correlation statistical model to perform quantitative analysis on the packet loss correlation between servers.

[0050] In this embodiment of constructing a correlational statistical model to analyze the correlation of packet loss among multiple servers, a nonparametric regression equation is first constructed independently for each server based on all historical transaction data and packet loss data. Each equation flexibly fits the complex relationship between the number of transactions and the number of packet losses on that server through a linear combination of selected basis functions (such as quadratic regeneration kernels or thin-slice splines), thus allowing for differences in the relationship patterns among different servers. These independent regression equations are not treated in isolation but are incorporated into a unified "seemingly uncorrelated regression" system framework. The key to this framework is the introduction of a cross-server error covariance matrix. This matrix not only contains the variance information of the regression error of each server, but more importantly, its off-diagonal elements directly characterize the covariance relationship between the regression errors of any two servers. This correlational structure of the error terms essentially reflects the common unobserved factors or mutual influences present in the packet loss fluctuations of different servers after excluding the explanatory effect of the number of transactions. After construction, the correlational statistical model is used for quantitative analysis: the regression coefficients of all servers and the cross-server error covariance matrix are jointly estimated using Bayesian inference methods (such as MCMC). Based on the estimated covariance matrix, the correlation coefficient between the packet loss counts of any two servers can be calculated, thus accurately quantifying the degree of linear correlation between them. The analysis results can clearly reveal, for example, that there is a significant positive or negative correlation between the packet loss behavior of certain servers. This helps to identify server clusters that share the same network bottleneck or are affected by common external factors, providing crucial quantitative basis for system-level capacity planning, associated fault diagnosis, and collaborative resource scheduling.

[0051] In one optional embodiment, the method for predicting packet loss in a server network includes: constructing a nonparametric regression equation for each server, wherein the correlation of each nonparametric regression equation is characterized by an error covariance matrix across servers; and jointly training the correlation statistical model using a probabilistic inference-based joint training method, wherein the joint training method uses the prior distribution of model parameters and numerically approximates the posterior distribution of model parameters based on historical transaction data and historical packet loss data of multiple servers to synchronously estimate the regression equation parameters of all servers in the multiple servers.

[0052] Optionally, in an embodiment where nonparametric regression equations are constructed separately for each server to form a correlation statistical model, a regression equation centered on a basis function is first independently established for each server to characterize the flexible relationship between its own transaction volume and packet loss volume. These equations are formally independent, but their inherent correlation is centrally characterized by a unified, cross-server error covariance matrix. This matrix not only contains the variance of each server's regression residuals, but more importantly, its off-diagonal elements capture the covariance between the residuals of different servers, thus statistically quantifying the collaborative fluctuations in packet loss behavior across multiple servers that are not explained by their respective transaction volumes. To train the correlation statistical model containing all these equations, a joint training method based on probabilistic inference is employed. This method first sets appropriate prior probability distributions for all parameters of the entire model—including the regression coefficients, indicator variables, and the shared cross-server error covariance matrix for each server—to incorporate domain knowledge or general assumptions about the possible ranges of the parameters. The core of the training process utilizes numerical algorithms such as Markov Chain Monte Carlo, which approximate the posterior probability distribution of the model parameters through iterative sampling based on a joint dataset of historical transaction data and packet loss data from all servers. During this joint training process, the regression equation parameters of all servers and the shared error covariance matrix are estimated and updated synchronously, rather than independently. This means that in each iteration, updating the parameters of one server immediately takes into account the current data information and parameter states of all other servers, enabling the "flow" and borrowing of information between equations through the shared error covariance structure. This synchronous joint estimation ensures that the model consistently reveals and utilizes the general patterns and interdependencies present in the data from multiple servers, ultimately resulting in a coherent statistical model that accurately reflects the statistical correlations between servers.

[0053] In an optional embodiment, the method for predicting packet loss in the server network further includes: calculating the packet loss correlation coefficient between each server based on the trained correlation statistical model; marking the server corresponding to the packet loss correlation coefficient as a related server group when the packet loss correlation coefficient exceeds a preset threshold; and jointly adjusting the packet loss prediction results of the related server group.

[0054] In this embodiment of server correlation analysis and prediction adjustment based on a trained correlation statistical model, key information is first extracted from the cross-server error covariance matrix obtained from the model estimation. The off-diagonal elements of this matrix reflect the covariance relationship between the packet loss residuals of different servers. Using these covariance values ​​and the residual variance of each server, a set of packet loss correlation coefficients between each pair of servers can be calculated. This coefficient is a scalar between -1 and 1, quantitatively describing the strength and direction of the linear correlation of packet loss behavior between each pair of servers. Subsequently, a reasonable preset threshold (e.g., 0.5 or 0.7) is set to determine whether the correlation is significant. All calculated correlation coefficients are systematically scanned, and server pairs whose absolute values ​​exceed the preset threshold are identified. Based on these identified strong correlations, multiple servers with direct or indirect strong correlations are aggregated and divided into one or more "correlated server groups" using connected component analysis or community detection algorithms in graph theory.

[0055] In the subsequent packet loss prediction stage, the prediction results for servers marked as belonging to the same related server group are no longer considered completely independent. When it is necessary to predict the future packet loss quantity for a server within the group, the prediction process will jointly consider the current or historical packet loss status information of other servers in the group. Specifically, known packet loss data or their intermediate prediction results from other servers in the group can be input into the prediction model as additional contextual features, or the estimated covariance structure can be used to perform Bayesian shrinkage adjustment on the independent prediction results of each server in the group, so that the prediction values ​​of servers in the group are corrected in a direction that is correlated with each other. This joint adjustment strategy essentially utilizes the identified statistical dependencies to reduce the uncertainty of prediction and improve the overall prediction accuracy through information sharing. It is particularly suitable when the data of a server in the group is temporarily missing or abnormal, and can use the data of related servers to make a more robust estimate, thereby achieving more reliable and collaborative system-level capacity early warning and resource planning.

[0056] In an optional embodiment, the method for predicting server network packet loss further includes: generating an early warning report on server packet loss risk based on a trained prediction model or a trained correlation statistical model, the early warning report including the predicted number of packet losses, packet loss trends and related server information; and adjusting the resource allocation strategy for the server and related server groups, or triggering expansion operations based on the early warning report.

[0057] Optionally, in the embodiment of generating a server packet loss risk warning report and adjusting resources accordingly, the system performs a forward-looking analysis of the server or related server groups based on a trained prediction model or correlation statistical model. The core content of the warning report includes: the predicted number of packet losses for a specific future time period (e.g., the next hour), given as a point estimate combined with confidence intervals, clearly quantifying the expected packet loss level and its uncertainty range; comparing recent predictions with historical benchmarks to determine whether the packet loss rate is rising, falling, or stable, and potentially identifying abrupt changes or abnormal fluctuations; and based on the analysis results of the correlation statistical model, clearly indicating a list of other servers with strong packet loss correlation to the server and their correlation coefficients, revealing potential risk transmission paths. When the warning report indicates that the predicted number of packet losses is about to exceed a safety threshold, or the packet loss trend continues to worsen, or the related server group as a whole faces high-risk pressure, the system will automatically trigger a resource management response. This includes dynamically adjusting resource allocation strategies. For example, real-time redirection of critical business traffic from servers with high load or high packet loss risk to less loaded and less correlated standby servers; or, for an identified group of related servers, coordinated adjustment of their shared network bandwidth, connection pool size, or processing priority. If predictions indicate that existing resources will soon be unable to meet demand, the system will generate explicit expansion operation suggestions or automatically trigger processes, such as proposing to add virtual machine instances to the relevant server group, increase network bandwidth quotas, or deploy additional load balancing nodes. This enables proactive and precise capacity planning and risk intervention based on data-driven principles before packet loss risks substantially impact business operations.

[0058] To more clearly explain the solution of the embodiments of this application, the implementation steps of the present invention are illustrated by taking the transaction count and packet loss data of four servers (A, B, C, D) during the database migration process from March 1 to March 4, 2024 as an example (see Table 1).

[0059] Table 1

[0060]

[0061]

[0062]

[0063] First, using a Bayesian nonparametric regression model, we analyzed the database migration from March 1st to March 4th, 2024, and found that network traffic exceeded its processing capacity, resulting in packet loss in transactions. We then analyzed the complex relationship between the number of server transactions and the number of packet losses for four servers (Server A, Server B, Server C, and Server D), and performed predictions and uncertainty quantification.

[0064] Secondly, given a new number of server transactions (or a future year for a certain server) The number of transactions on the server can be predicted using the posterior distribution. Packet loss count The distribution (including the posterior predicted mean and confidence interval) is predicted based on a double log-linear regression model. The value of this can be used for system capacity planning and risk assessment.

[0065] Step 1: Establish a linear regression model and calculate the parameters. , , The value of .

[0066] Assume random variable and independent variable There is a linear relationship between them, so we construct formula (1):

[0067] (1)

[0068] in, y is the regression model coefficient to be predicted in this application; y is the number of packet losses; design matrix X is the number of server transactions; the x-th... Listed as The error vector follows a normal distribution, i.e. Note that X is... A matrix of order 33×4. It is The matrix of positive definite parameters to be estimated, m=4. Parameters Maximum likelihood estimation is used as a priori value in the subsequent nonparametric regression model. Parameter variance , .

[0069] Step 2: Define two different basis functions.

[0070] There is a basic function system In application Not less than the sample size Use its linear combination to estimate the function See formula (2):

[0071] (2)

[0072] Two different basis functions are used: the quadratic regeneration kernel basis function (Equation 3) and the thin-slice spline basis function (Equation 4).

[0073] (3)

[0074] (4)

[0075] Among them, take as independent variable One observation value. The fundamental function system is obtained. That is, q = n + 2 = 33 + 2. Formula (2) can be written in the form of linear regression, as shown in formula (5):

[0076] (5)

[0077] in, The design matrix X of the first Listed as The error vector follows a normal distribution, i.e. Note that X is... A matrix of order 1, generally That is, X is not full rank, n=33, q=2.

[0078] Step 3: Calculate the posterior distribution of these three parameters.

[0079] A SUR system consisting of m (4) equations can be used in... Given the conditions, it can be written as formula (6):

[0080] (6)

[0081] in , , .like ,but yes matrix, yes Dimensional vector. , , , The unknown parameters of interest are calculated using formulas (7)-(9):

[0082] (7)

[0083] (8)

[0084] (9)

[0085] in, .

[0086] Determine the parameters in the first step Priors, hyperparameters Priors, parameters ,parameter The prior is used to obtain the posterior model probability of the model, but have The species cannot be combined.

[0087] Step 4: Selection of random search variables for the nonparametric seemingly uncorrelated regression model:

[0088] ①From Sampling;

[0089] ②From Sampling;

[0090] ③For and Follow the sampling steps below. Samples were drawn from the middle.

[0091] In step ③ of the iteration, each generation One element is sampled.

[0092] Step 5: Establish a nonparametric seemingly uncorrelated regression model to obtain the final double log-linear regression model, as shown in formula (10).

[0093] (10)

[0094] According to the parameters in step four , , Based on the sampling results, correlations exist among multiple equations, allowing the establishment of a seemingly uncorrelated nonparametric regression model. This yields the final model, demonstrating the number of server transactions for the four servers (Server A, Server B, Server C, and Server D). With the number of packets lost Related to each other, given a new number of server transactions (or a future year for a certain server) The number of transactions on the server can be predicted using the posterior distribution. Packet loss count The distribution (including the posterior predicted mean and confidence interval) is predicted based on a double log-linear regression model. The value of .

[0095] Finally, the most important factor affecting the relationship between the number of transactions (X) and the number of packet losses (Y) on the four servers was identified.

[0096] 1. Define the parameter space: Clearly define the parameters to be adjusted and their value range;

[0097] 2. Define the random sampling strategy: Determine how to perform random sampling in the defined parameter space. Methods such as uniform distribution or log-uniform distribution can be used to adapt to the characteristics of different types of parameters.

[0098] Perform multiple random sampling and model evaluations: randomly sample multiple combinations of parameters, train the model using these parameters, and then evaluate the model's performance on a validation set or cross-validation.

[0099] 4. Record and compare results: Record the parameter combinations obtained from each sampling and their corresponding model performance for subsequent comparison and analysis.

[0100] 5. Select the optimal parameters: Based on the recorded results, select the parameter combination that optimizes the model performance as the final parameter tuning result.

[0101] The following data is simulated and used only for method validation. This study considers the period from March 1st to March 4th, 2024, during which database migration and transaction packet loss occurred. Table 1 shows the relationship between the number of packet losses and the number of transactions on four servers (Server A, Server B, Server C, and Server D) representing different applications. Synchronous data refers to cross-sectional data collected over a period of time, possessing both spatial and temporal characteristics. Through the study of repeated cross-sectional data, synchronous data is more suitable for dynamic research and can better detect and measure impacts that cannot be observed using only cross-sectional or time-series data. With the continuous development of banking operations, the connections between various application servers are becoming increasingly close. Servers A, B, C, and D belong to different applications. In the simulation test, transaction data belonging to business A, business B, business C, and business D, respectively, are stored on the four servers. The study considers the connections between these four different application servers and seeks to identify the inherent relationships between them.

[0102] The nonparametric regression (NR) model and the seemingly uncorrelated nonparametric regression (NSUR) model mentioned above are used to determine the relationship between packet loss and the number of server transactions. This represents the actual number of packets lost in the report. Let's consider the number of server transactions. First, we use the Maximum Likelihood Estimation (MLE) method to estimate the relationship between the number of packet losses and the number of server transactions for four different applications. Taking the logarithm eliminates the influence of trends, and the results are as follows:

[0103] Server A: , Formula (11)

[0104] Server B: , Formula (12)

[0105] C server: , Formula (13)

[0106] Server D: , Formula (14)

[0107] That is, the double log-linear regression model is formula (15):

[0108] Formula (15)

[0109] Formula (16) is obtained as follows:

[0110] Formula (16)

[0111] Formula (17) can then be obtained:

[0112] Formula (17)

[0113] The regression estimation results show that the number of packet losses on server D is most affected by the number of server transactions, while the number of packet losses on server B is relatively less affected by the number of server transactions. Now, based on the quadratic regeneration kernel basis function, the relationships between the four servers are modeled using both the NR model and the NSUR model. Table 2 lists the MSD values ​​obtained by the three methods. The Bayesian NR method has the smallest mean squared error.

[0114] Table 2

[0115]

[0116] Figure 2 The fitting results of the MLE model, Bayesian NR model, and Bayesian NSUR model are presented. Figure 2 The top-left subgraph represents the fitting effects of the MLE model, the Bayesian NR model, and the Bayesian NSUR model on the data of server A, respectively. Figure 2 The top right subgraph represents the fitting effects of the MLE model, the Bayesian NR model, and the Bayesian NSUR model on the data from server B, respectively. Figure 2 The lower left subgraph represents the fitting effects of the MLE model, the Bayesian NR model, and the Bayesian NSUR model on the data of server C, respectively. Figure 2 The lower right subgraph represents the fitting effects of the MLE model, the Bayesian NR model, and the Bayesian NSUR model on the data from server B, respectively.

[0117] Using the covariance estimate obtained from the model, the correlation coefficient between pairs of servers can be estimated through formula (17), which is then transformed into formula (18):

[0118] Formula (17)

[0119] Formula (18)

[0120] As can be seen, only servers C and B show a significant positive correlation between the number of packet losses and the number of server transactions, with a correlation coefficient of 0.6147. No significant correlation exists among the other servers. Using the NR model to fit the relationship between the number of packet losses and the number of server transactions, we can conclude that the number of server transactions is one of the important factors affecting the number of packet losses in the report.

[0121] The following table 3 explains the formula parameters that appeared in the embodiments of this application:

[0122] Table 3

[0123]

[0124]

[0125]

[0126] like Figure 3 As shown, according to another aspect of the embodiments of this application, a server network packet loss prediction device is also provided, comprising: a first acquisition unit 301, configured to acquire historical transaction data and historical packet loss data of the server, wherein the historical transaction data represents the number of transactions processed by the server within a historical time period, and the historical packet loss data represents the number of data packets lost in network transmission within the historical time period; a first processing unit 302, configured to construct a regression model based on the historical transaction data and historical packet loss data, wherein the regression model is used to fit the nonlinear relationship between the historical transaction data and the historical packet loss data through basis functions; a second processing unit 303, configured to train the regression model using a variable selection strategy to obtain a trained prediction model, wherein the variable selection strategy is used to select basis functions related to the relationship between the number of server transactions and the number of packet losses through probabilistic indicator variables, and to update the model parameters of the regression model through sampling operations; and a third processing unit 304, configured to determine the number of packet losses of the server in a target time period based on the number of transactions of the server in a target time period according to the trained prediction model.

[0127] Optionally, the first processing unit 302 includes: a first processing subunit, used to perform double logarithmic transformation on historical transaction data and historical packet loss data to obtain transformed transaction quantity features and packet loss quantity features; a selection subunit, used to select a set of basis functions, wherein the set of basis functions includes a first basis function and a second basis function, the first basis function being a radially symmetric kernel function defined in the form of a quadratic polynomial on the server transaction quantity feature space, the function value of the first basis function depending on the Euclidean distance between the server transaction quantity and a preset center point, the second basis function being a spline function defined on the server transaction quantity feature space based on a combination of the cube of the absolute value of the radial distance and a linear term, the second basis function achieving global smooth interpolation by minimizing curvature energy, used to provide a fit to the overall data trend in the regression model; and a model construction subunit, used to construct a regression model based on the transformed transaction quantity features and packet loss quantity features and the set of basis functions.

[0128] Optionally, the second processing unit 303 includes: a setting subunit, used to set a prior distribution related to the model parameters of the regression model, wherein the model parameters include regression coefficients, indicator variables, and error covariance matrix, wherein each basis function in the basis function set corresponds to an indicator variable, and the value of the indicator variable is used to control the enabled or disabled state of the basis function corresponding to the indicator variable in the regression model; an iterative processing subunit, used to iteratively extract parameter samples based on the prior distribution using a posterior distribution simulation algorithm until the regression model converges, wherein the posterior distribution simulation algorithm is a calculation method that numerically approximates and characterizes the parameter uncertainty by iteratively generating a random sample sequence that follows the posterior probability distribution of the model parameters, and the parameter samples include a set of parameter values ​​selected in each iteration for the regression coefficients, indicator variables, and error covariance matrix; the judgment condition for the convergence of the regression model is: in a preset number of consecutive iterations, the change range of the sample statistics of the regression coefficients and indicator variables is less than a preset convergence threshold; and a first determining subunit, used to determine the trained prediction model based on the parameter sample set generated by continuing iteration after satisfying the judgment condition.

[0129] Optionally, the iterative processing subunit includes: a first processing module, used to determine the conditional posterior distribution of the regression coefficients based on the current state of the indicator variable, the current value of the error covariance matrix, and all historical data, and to extract a new set of regression coefficient samples from the conditional posterior distribution of the regression coefficients as the first sub-parameter sample; a second processing module, used to determine the conditional posterior distribution of the error covariance matrix based on the first sub-parameter sample, the current state of the indicator variable, and all historical data, and to extract a new error covariance matrix sample from the conditional posterior distribution of the error covariance matrix as the second sub-parameter sample; and a third processing module, used to determine the conditional posterior distribution of the error covariance matrix based on the first sub-parameter sample, the second sub-parameter sample, and all historical data. For the data, targeting the indicator variable, the target operation is performed to obtain the latest state of the indicator variable. The target operation includes: generating candidate states of the indicator variable based on the proposed probability distribution corresponding to the indicator variable; calculating the acceptance probability of state transition according to the ratio of the conditional posterior probability density of the candidate state of the indicator variable to the current state of the indicator variable; updating the state of the indicator variable to the candidate state if the acceptance probability is greater than or equal to the preset probability; and keeping the state of the indicator variable unchanged if the acceptance probability is less than the preset probability. The fourth processing module is used to form a set of parameter samples extracted in this iteration from the obtained first sub-parameter sample, second sub-parameter sample, and the latest states of all indicator variables.

[0130] Optionally, the selection subunit includes: a model building module, used to build a first candidate model using a first basis function and a second candidate model using a second basis function based on the transformed transaction quantity characteristics; a calculation module, used to calculate the mean squared deviation of the first candidate model and the second candidate model based on a preset validation dataset; and a selection module, used to compare the mean squared deviations and select the basis function corresponding to the candidate model with the smallest mean squared deviation as the target basis function in the basis function set.

[0131] Optionally, the device for predicting server network packet loss further includes: a fourth processing unit, used to construct a correlation statistical model based on historical transaction data and historical packet loss data, wherein the correlation statistical model is a statistical model constructed to analyze the correlation between the number of transactions and the number of packet losses of a server, the correlation statistical model fits the regression relationship of each server through nonparametric basis functions, and quantifies the correlation between the regression equations of different servers through the cross-server error covariance matrix; and an analysis unit, used to perform quantitative analysis of the packet loss correlation between servers using the correlation statistical model.

[0132] Optionally, the device for predicting packet loss in the server network further includes: a fifth processing unit, used to construct a nonparametric regression equation for each server, wherein the correlation of each nonparametric regression equation is characterized by an error covariance matrix across servers; and a model training unit, used to jointly train the correlation statistical model using a joint training method based on probability inference, wherein the joint training method uses the prior distribution of model parameters and numerically approximates the posterior distribution of model parameters based on historical transaction data and historical packet loss data of multiple servers to synchronously estimate the regression equation parameters of all servers in the multiple servers.

[0133] Optionally, the device for predicting packet loss in the server network further includes: a calculation unit for calculating the packet loss correlation coefficient between servers based on the trained correlation statistical model; a marking unit for marking the server corresponding to the packet loss correlation coefficient as a related server group when the packet loss correlation coefficient exceeds a preset threshold; and an adjustment unit for jointly adjusting the packet loss prediction results of the related server group.

[0134] Optionally, the device for predicting server network packet loss also includes: a report generation unit, used to generate an early warning report on server packet loss risk based on a trained prediction model or a trained correlation statistical model, the early warning report including the predicted number of packet loss, packet loss trend and related server information; and a resource adjustment unit, used to adjust the resource allocation strategy of the server and related server groups or trigger expansion operations based on the early warning report.

[0135] According to another aspect of the embodiments of this application, a computer-readable storage medium is also provided, wherein a computer program is stored in the computer-readable storage medium, wherein when the computer program is executed, the device where the computer-readable storage medium is located executes the above-described method for predicting server network packet loss.

[0136] According to another aspect of the embodiments of this application, an electronic device is also provided, wherein the electronic device includes one or more processors and a memory, the memory being used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to perform the above-described method for predicting server network packet loss.

[0137] According to another aspect of the embodiments of this application, a computer program product is also provided, which includes a computer program or instructions that, when executed by a processor, implement the above-described method for predicting server network packet loss.

[0138] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0139] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0140] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.

[0141] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0142] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0143] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard drive, magnetic disk, or optical disk.

[0144] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. A method for predicting packet loss rate of a server network, the method comprising: The method comprises: obtaining historical transaction data and historical packet loss data of a server, wherein the historical transaction data represents a number of transactions processed by the server in a historical time period, and the historical packet loss data represents a number of data packets lost in network transmission in the historical time period; constructing a regression model based on the historical transaction data and the historical packet loss data, wherein the regression model is used to fit a nonlinear relationship between the historical transaction data and the historical packet loss data by a base function; training the regression model using a variable selection strategy to obtain a trained prediction model, wherein the variable selection strategy is used to screen a base function related to both the number of transactions and the number of packet losses of the server by a probabilistic indicator variable, and to update model parameters of the regression model by a sampling operation; determining the number of packet losses of the server in a target time period based on the trained prediction model and the number of transactions of the server in the target time period.

2. The method of claim 1, wherein, The method of constructing a regression model based on the historical transaction data and the historical packet loss data comprises: performing double logarithmic conversion processing on the historical transaction data and the historical packet loss data to obtain converted transaction quantity features and packet loss quantity features; selecting a base function set, wherein the base function set comprises a first base function and a second base function, the first base function is a radial symmetric kernel function defined in the form of a quadratic polynomial in the server transaction quantity feature space, and the function value of the first base function depends on the Euclidean distance between the server transaction quantity and a preset center point, the second base function is a spline function defined based on the combination of the absolute value of the radial distance to the third power and the linear term in the server transaction quantity feature space, and the second base function realizes global smooth interpolation by minimizing curvature energy and is used to fit the overall data trend in the regression model; constructing the regression model according to the converted transaction quantity features and packet loss quantity features and the base function set.

3. The method of claim 2, wherein, The method of training the regression model using a variable selection strategy to obtain a trained prediction model comprises: setting a prior distribution related to model parameters of the regression model, wherein the model parameters comprise regression coefficients, indicator variables, and error covariance matrices, wherein each base function in the base function set corresponds to an indicator variable, and the value of the indicator variable is used to control the enable or disable state of the base function corresponding to the indicator variable in the regression model; Based on the prior distribution, parameter samples are iteratively extracted using a posterior distribution simulation algorithm until the regression model converges. The posterior distribution simulation algorithm is a computational method that numerically approximates and characterizes parameter uncertainty by iteratively generating a random sample sequence that follows the posterior probability distribution of the model parameters. The parameter samples include a set of parameter values ​​selected in each iteration for the regression coefficients, the indicator variables, and the error covariance matrix. The convergence criterion for the regression model is that, in a predetermined number of consecutive iterations, the variation range of the sample statistics of the regression coefficients and the indicator variables is less than a predetermined convergence threshold. The trained prediction model is determined based on the set of parameter samples generated by iterating after satisfying the judgment condition.

4. The method of claim 3, wherein, Each iteration of the parameter sample extraction process using the posterior distribution simulation algorithm includes: Based on the current state of the indicator variable, the current value of the error covariance matrix, and all historical data, the conditional posterior distribution of the regression coefficients is determined, and a new set of regression coefficient samples is extracted from the conditional posterior distribution of the regression coefficients as the first sub-parameter sample. Based on the first sub-parameter sample, the current state of the indicator variable, and all historical data, the conditional posterior distribution of the error covariance matrix is ​​determined, and a new error covariance matrix sample is extracted from the conditional posterior distribution of the error covariance matrix as the second sub-parameter sample. Based on the first sub-parameter sample, the second sub-parameter sample, and all historical data, a target operation is performed on the indicative variable to obtain the latest state of the indicative variable. The target operation includes: generating candidate states for the indicative variable based on the proposed probability distribution corresponding to the indicative variable; calculating the acceptance probability of a state transition based on the ratio of the conditional posterior probability density of the candidate states to the current state of the indicative variable; updating the state of the indicative variable to the candidate state if the acceptance probability is greater than or equal to a preset probability; and keeping the state of the indicative variable unchanged if the acceptance probability is less than the preset probability. The first sub-parameter sample, the second sub-parameter sample, and the latest states of all indicator variables are used to form a set of parameter samples extracted in this iteration.

5. The method of claim 2, wherein, Choosing the basis function set also includes: Based on the transformed transaction quantity characteristics, a first candidate model is constructed using the first basis function, and a second candidate model is constructed using the second basis function; Based on a preset validation dataset, the mean squared deviation of the first candidate model and the second candidate model is calculated; By comparing the mean squared deviations, the basis function corresponding to the candidate model with the smallest mean squared deviation is selected as the target basis function in the basis function set.

6. The method of claim 1, wherein, The method for predicting server network packet loss also includes: Based on the historical transaction data and the historical packet loss data, a correlation statistical model is constructed. The correlation statistical model is a statistical model constructed to analyze the correlation between the number of transactions and the number of packet losses of a server. The correlation statistical model fits the regression relationship of each server through nonparametric basis functions and quantifies the correlation between the regression equations of different servers through the cross-server error covariance matrix. The correlation statistical model described above is used to quantitatively analyze the packet loss correlation between servers.

7. The method of claim 6, wherein, The method for predicting server network packet loss includes: A nonparametric regression equation is constructed for each server, wherein the correlation of each nonparametric regression equation is characterized by the error covariance matrix across servers. The correlation statistical model is jointly trained using a probabilistic inference-based joint training method. This method uses the prior distribution of the model parameters and the posterior distribution of the model parameters based on the historical transaction data and historical packet loss data of multiple servers to numerically approximate the parameters of the regression equation for all servers in the multiple servers.

8. The method of claim 7, wherein, The method for predicting server network packet loss also includes: Based on the trained correlation statistical model, the packet loss correlation coefficient between each server is calculated; If the packet loss correlation coefficient exceeds a preset threshold, the server corresponding to the packet loss correlation coefficient will be marked as a related server group. The packet loss prediction results of the relevant server groups are jointly adjusted.

9. The method of claim 8, wherein, The method for predicting server network packet loss also includes: Based on the trained prediction model or the trained correlation statistical model, an early warning report on server packet loss risk is generated. The early warning report includes the predicted number of packet losses, packet loss trends, and related server information. Based on the warning report, the resource allocation strategy for the server and the related server group is adjusted, or an expansion operation is triggered.

10. A server network packet loss prediction apparatus, characterized by, include: The first acquisition unit is used to acquire historical transaction data and historical packet loss data of the server, wherein the historical transaction data represents the number of transactions processed by the server within a historical time period, and the historical packet loss data represents the number of data packets lost in network transmission within the historical time period. The first processing unit is used to construct a regression model based on the historical transaction data and the historical packet loss data, wherein the regression model is used to fit the nonlinear relationship between the historical transaction data and the historical packet loss data through basis functions; The second processing unit is used to train the regression model using a variable selection strategy to obtain a trained prediction model. The variable selection strategy is used to select basis functions related to the relationship between the number of server transactions and the number of packet losses through probabilistic indicator variables, and to update the model parameters of the regression model through sampling operations. The third processing unit is used to determine the number of packets lost by the server in the target time period based on the trained prediction model and the number of transactions of the server in the target time period.

11. A computer readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein when the computer program is executed, the device in which the computer-readable storage medium is located performs the server network packet loss prediction method according to any one of claims 1 to 9.

12. An electronic device, comprising: It includes one or more processors and a memory, the memory being used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to perform the server network packet loss prediction method according to any one of claims 1 to 9.

13. A computer program product, characterised in that, It includes a computer program or instructions that, when executed by a processor, implement the server network packet loss prediction method of any one of claims 1 to 9.