Purchase scheme optimization method and system based on big data
Through the improved correlation coefficient Lasso regression and bidirectional long short-term memory network model, combined with the Sparrow search algorithm, it solves the shortcomings of traditional procurement plan optimization methods in feature selection, non-linear mode processing and hyper-parameter optimization, and achieves better procurement Program optimization effect.
Patent Information
- Application Number
- CN202411129122.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-16
- Publication Date
- 2024-09-13
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
When faced with high-dimensional and large-scale procurement information, traditional procurement plan optimization methods rely on preset rules or statistical indicators to select features, which are easily affected by subjective preferences, resulting in insufficient feature subset optimization; complex nonlinear patterns and dynamic features are processed Limited capabilities and poor model stability; hyperparameter optimization is limited by the discrete nature of the search space and computational efficiency, and cannot effectively handle complex nonlinear relationships and optimization problems under large-scale data sets.
Lasso regression with improved correlation coefficient is used for feature selection to avoid subjective influence and control model complexity; a two-way long short-term memory network model is used to optimize procurement cost prediction and capture long-term dependencies and nonlinear characteristics in the data; a sparrow search algorithm is used to The model performs hyperparameter optimization to achieve information exchange and convergence acceleration to find the optimal solution.
It effectively avoids the influence of high-correlation features, controls model complexity and over-fitting problems, improves model stability and flexibility, realizes the search for optimal solutions in high-dimensional complex spaces, and improves the optimization effect of procurement plans. .
Smart Images

Figure CN118644189A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of procurement scheme optimization, and specifically to a procurement scheme optimization method and system based on big data. Background Art
[0002] Procurement solution optimization improves procurement efficiency, reduces costs, and enhances the stability and flexibility of the supply chain through sophisticated data analysis and forecasting technology, enabling companies to better respond to market changes and risks while improving overall operational efficiency, market competitiveness, and corporate profit margins. It is an indispensable and important part of modern enterprise management.
[0003] However, when traditional procurement plan optimization methods are used for cost forecasting, there are technical problems such as relying on preset rules or statistical indicators to select features in the face of high-dimensional, large-scale procurement information, and being easily affected by subjective preferences, resulting in a suboptimal selected feature subset; when traditional procurement plan optimization methods are used for cost forecasting, there are technical problems such as limited ability to process complex nonlinear patterns and dynamic features of procurement information, resulting in poor model stability and lack of flexibility; when traditional procurement plan optimization methods are used for cost forecasting, there is a technical problem that when optimizing hyperparameters, they are limited by the discreteness of the search space and computational efficiency, and cannot effectively handle optimization problems under complex nonlinear relationships and large-scale data sets. Summary of the invention
[0004] In view of the above situation, in order to overcome the defects of the prior art, the present invention provides a procurement scheme optimization method and system based on big data. In view of the technical problem that when the traditional procurement scheme optimization method is used for cost prediction, there is a situation in which the features are selected based on preset rules or statistical indicators in the face of high-dimensional and large-scale procurement information, and they are easily affected by subjective preferences, resulting in the selected feature subset being not optimized enough, this scheme creatively adopts lasso regression with improved correlation coefficient for feature selection, which is not affected by subjective influences and avoids the influence of high-correlation features. At the same time, regularization is performed in the selection process, which can control the model complexity and overfitting problems; in view of the technical problem that when the traditional procurement scheme optimization method is used for cost prediction, there is a situation in which the complex nonlinear patterns and dynamic characteristics of procurement information are processed In order to solve the technical problem that the model has limited rational ability, resulting in poor stability and inflexibility, this solution creatively uses a bidirectional long short-term memory network model to predict procurement costs in order to optimize procurement plans, effectively capture long-term dependencies and nonlinear characteristics in the data, and consider the previous and subsequent information at the same time, effectively handle complex patterns and dynamic changes; in order to solve the technical problem that when traditional procurement plan optimization methods are used for cost prediction, there is hyperparameter optimization, which is limited by the discreteness of the search space and the computational efficiency, and cannot effectively handle optimization problems under complex nonlinear relationships and large-scale data sets, this solution creatively uses the sparrow search algorithm to optimize the model's hyperparameters, realize information exchange and convergence acceleration during the optimization process, and more effectively find the optimal solution in high-dimensional complex space.
[0005] The technical solution adopted by the present invention is as follows: The procurement plan optimization method based on big data provided by the present invention comprises the following steps:
[0006] Step S1: data collection;
[0007] Step S2: data preprocessing;
[0008] Step S3: feature selection;
[0009] Step S4: constructing a procurement optimization model;
[0010] Step S5: hyperparameter optimization;
[0011] Step S6: Procurement plan optimization.
[0012] Furthermore, in step S1, the data collection is used to collect historical data required for the optimization of the procurement plan, specifically, to obtain a procurement optimization historical data set through collection;
[0013] The procurement optimization historical data set specifically includes product information data, supplier information data, historical procurement data and market dynamics data. The product information data specifically includes product types, product specifications and product prices. The supplier information data specifically includes supplier basic information, supplier supply capacity and supplier price level. The historical procurement data specifically includes historical procurement prices, historical procurement quantities and historical procurement times.
[0014] Furthermore, in step S2, the data preprocessing is used to preprocess the historical data, and specifically includes the following steps:
[0015] Step S21: data cleaning, which is used to clean the data, specifically to remove missing values, duplicate values and outliers, to obtain a preliminary processed data set;
[0016] Step S22: data set segmentation, which is used to segment the data set, specifically, by segmenting the preliminary processed data set to obtain a procurement optimization data set and a procurement optimization test set;
[0017] Step S23: data encoding, used to convert the data into digital form, specifically encoding the procurement optimization data set by a one-hot encoding method to obtain an encoded data set;
[0018] Step S24: data normalization, which is used to normalize the data, specifically, normalizing the encoded data set by a minimum-maximum method to obtain a normalized data set;
[0019] Step S25: preprocessing, specifically, performing data preprocessing through the data cleaning, the data set segmentation, the data encoding and the data normalization to obtain the normalized data set and the procurement optimization test set.
[0020] Further, in step S3, the feature selection is used to select features that contribute to the optimization of the procurement plan and eliminate redundant features, specifically using lasso regression with improved correlation coefficient to perform feature selection on the normalized data set to obtain a procurement optimization training set;
[0021] The feature selection specifically includes the following steps:
[0022] Step S31: Calculate the Pearson correlation coefficient using the following formula:
[0023] ;
[0024] In the formula, represents the correlation coefficient between feature A and feature B, The first data points, The first data points, represents the mean of feature A, represents the mean of feature B, represents the number of data points of feature A, Represents the number of data points of feature B;
[0025] Step S32: preliminary screening, for preliminary screening of features, specifically, merging the feature pairs whose absolute values of the Pearson correlation coefficients in the normalized data set are greater than or equal to 0.7 to obtain a preliminary screening feature data set;
[0026] Step S33: Feature selection based on lasso regression, the steps include:
[0027] Step S331: Design a lasso regression loss function, the formula used is as follows:
[0028] ;
[0029] In the formula, represents the lasso regression loss function, represents the number of samples, represents the number of features, represents the actual observed value of the cth sample, represents the d-th eigenvalue of the c-th sample, represents the regression coefficient of the dth feature, represents the regularization parameter;
[0030] Step S332: determining the regression coefficient, specifically by minimizing the loss function through a gradient descent algorithm to determine the optimal regression coefficient;
[0031] Step S333: performing feature selection, specifically performing feature selection based on the optimal regression coefficient to obtain a procurement optimization training set.
[0032] Further, in step S4, the procurement optimization model is constructed to construct a model required for procurement scheme optimization, specifically to construct a bidirectional long short-term memory network model and perform model training to obtain a procurement optimization model;
[0033] The procurement optimization model construction specifically includes the following steps:
[0034] Step S41: construct a forward module, the formula used is as follows:
[0035] ;
[0036] In the formula, represents the output of the forget gate at time t, represents the sigmoid function, represents the forward forget gate weight matrix, represents the forward hidden state at time t-1, represents the input at time t, represents the forward forget gate bias term, represents the output of the positive input gate at time t, represents the forward input gate weight matrix, represents the forward input gate bias term, represents the candidate unit state at time t, represents the weight matrix used to calculate the positive candidate unit state, represents the bias term used to calculate the positive candidate unit state, represents the unit state at the positive time t, represents the unit state at time t-1 in the forward direction, Indicates the output of the positive output gate at time t, represents the forward output gate weight matrix, represents the forward output gate bias term, Indicates the hidden state at the positive time t;
[0037] Step S42: Construct a reverse module, the formula used is as follows:
[0038] ;
[0039] In the formula, Represents the output of the forget gate at the reverse time t, represents the reverse forget gate weight matrix, represents the reverse hidden state at time t-1, represents the reverse forget gate bias term, Represents the output of the input gate at time t, represents the reverse input gate weight matrix, represents the reverse input gate bias term, represents the state of the candidate unit at the reverse time t, represents the weight matrix used to calculate the reverse candidate unit state, represents the bias term used to calculate the reverse candidate cell state, represents the state of the unit at the reverse time t, Represents the state of the unit at the reverse time t-1, Represents the output of the output gate at time t in the reverse direction, represents the reverse output gate weight matrix, represents the reverse output gate bias term, Represents the hidden state at the reverse time t;
[0040] Step S43: Design a loss function, the formula used is as follows:
[0041] ;
[0042] In the formula, represents the model loss function value, represents the number of training samples, represents the forecast value of procurement cost, Indicates the actual value of purchase cost;
[0043] Step S44: model construction and training, specifically, constructing the bidirectional long short-term memory network model by constructing the forward module, constructing the reverse module and designing the loss function, and performing model training based on the procurement optimization training set to obtain a procurement optimization model.
[0044] Further, in step S5, the hyperparameter optimization is specifically to optimize the hyperparameters of the procurement optimization model using a sparrow search algorithm and verify the model performance to obtain an optimized procurement optimization model;
[0045] The hyperparameter optimization specifically includes the following steps:
[0046] Step S51: Initialization, the steps include:
[0047] Step S511: Initialize the sparrow population, as shown below:
[0048] ;
[0049] In the formula, X represents the search space, Represents the first sparrow unit, Represents the second sparrow unit, Indicates Sparrow unit, Indicates the number of sparrow units;
[0050] Step S512: Set the fitness, as shown below:
[0051] ;
[0052] In the formula, Fi represents the overall fitness, represents a fitness function, wherein the fitness function selects a root mean square error between the predicted value of the procurement cost and the actual value of the procurement cost as a fitness function value;
[0053] Step S52: updating the position, specifically constructing a discoverer unit set, a follower unit set and a scout unit set and updating the position;
[0054] The updating position step comprises:
[0055] Step S521: The discoverer unit position is updated, and the formula used is as follows:
[0056] ;
[0057] In the formula, represents the position of the j-th dimension of the i-th discoverer unit in the q+1-th iteration, represents the position of the j-th dimension of the i-th discoverer unit in the q-th iteration, represents a random value in the range [0,1]. Indicates the number of discoverer units, Indicates a random value whose range follows a normal distribution, L represents 1× A matrix whose elements are all 1. represents the number of dimensions of the sparrow unit, Wn represents the warning value, which is a random value in the range of [0,1], and St represents the safety value, which is a random value in the range of [0.5,1];
[0058] Step S522: The follower unit position is updated, and the formula used is as follows:
[0059] ;
[0060] In the formula, represents the position of the j-th dimension of the k-th follower unit at the q+1-th iteration, represents the position of the j-th dimension of the k-th follower unit at the q-th iteration, represents the position of the j-th dimension of the follower unit with the worst fitness in the q-th iteration, represents the j-th dimension position of the follower unit with the best fitness in the q-th iteration, and A represents 1× A random matrix whose elements are 1 or -1. T represents the matrix transpose operation. Indicates the number of follower units;
[0061] Step S523: The scout unit position is updated, and the formula used is as follows:
[0062] ;
[0063] In the formula, represents the position of the j-th dimension of the g-th scout unit in the q+1-th iteration, represents the position of the j-th dimension of the g-th scout unit at the q-th iteration, represents the global optimal position of the qth iteration, represents a random value from a normal distribution with a mean of 0 and a variance of 1. Represents a random value in the range [-1,1]. represents the global worst position of the qth iteration, represents a constant used to avoid the denominator being 0. represents the fitness of the g-th scout unit, represents the optimal fitness, represents the worst fitness;
[0064] Step S53: iterative calculation, specifically iterative calculation until a maximum number of iterations is reached or the optimal fitness and optimal sparrow unit position are obtained;
[0065] Step S54: hyperparameter optimization and verification of model performance, specifically, through the initialization, the update position and the iterative calculation, the hyperparameter optimization of the procurement optimization model is performed based on the sparrow search algorithm, and the model performance is verified based on the procurement optimization test set to obtain the optimized procurement optimization model.
[0066] Furthermore, in step S6, the procurement scheme is optimized by processing the collected data through the optimized procurement optimization model to obtain procurement cost forecast data, and optimizing the procurement scheme based on the procurement cost forecast data.
[0067] The procurement scheme optimization system based on big data provided by the present invention includes a data acquisition module, a data preprocessing module, a feature selection module, a procurement optimization model construction module, a hyperparameter optimization module and a procurement scheme optimization module;
[0068] The data collection module is used for data collection, and obtains a procurement optimization historical data set through data collection, and sends the procurement optimization historical data set to the data preprocessing module;
[0069] The data preprocessing module is used for data preprocessing, and obtains a normalized data set and a procurement optimization test set through data preprocessing, and sends the normalized data set to the feature selection module, and sends the procurement optimization test set to the hyperparameter optimization module;
[0070] The feature selection module is used for feature selection, and obtains a procurement optimization training set through feature selection, and sends the procurement optimization training set to the procurement optimization model construction module;
[0071] The procurement optimization model construction module is used to construct a procurement optimization model, obtain the procurement optimization model by constructing a bidirectional long short-term memory network model, and send the procurement optimization model to the hyperparameter optimization module;
[0072] The hyperparameter optimization module is used for hyperparameter optimization, and obtains an optimized procurement optimization model through hyperparameter optimization, and sends the optimized procurement optimization model to the procurement solution optimization module;
[0073] The procurement plan optimization module is used for procurement plan optimization. Through procurement plan optimization, procurement cost forecast data is obtained and procurement plan optimization is performed.
[0074] The beneficial effects achieved by the present invention using the above scheme are as follows:
[0075] (1) When using traditional procurement scheme optimization methods for cost forecasting, there are technical problems such as relying on preset rules or statistical indicators to select features in the face of high-dimensional, large-scale procurement information, and being easily influenced by subjective preferences, resulting in the selected feature subset being not optimized enough. This scheme creatively uses lasso regression with improved correlation coefficient for feature selection, which is not affected by subjective influences and avoids the influence of highly correlated features. At the same time, regularization is performed during the selection process, which can control model complexity and overfitting problems.
[0076] (2) When using traditional procurement plan optimization methods to forecast costs, there are technical problems such as limited ability to process complex nonlinear patterns and dynamic features of procurement information, resulting in poor model stability and lack of flexibility. This solution creatively uses a bidirectional long short-term memory network model to forecast procurement costs in order to optimize procurement plans. It effectively captures long-term dependencies and nonlinear features in the data, while taking into account previous and subsequent information, effectively processing complex patterns and dynamic changes.
[0077] (3) When traditional procurement plan optimization methods are used for cost forecasting, when there is hyperparameter optimization, they are limited by the discreteness of the search space and the computational efficiency, and cannot effectively handle the technical problems of optimization problems under complex nonlinear relationships and large-scale data sets. This solution creatively uses the sparrow search algorithm to optimize the model's hyperparameters, realize information exchange and accelerate convergence during the optimization process, and more effectively find the optimal solution in a high-dimensional complex space. BRIEF DESCRIPTION OF THE DRAWINGS
[0078] Figure 1 A schematic diagram of the process of the procurement scheme optimization method based on big data provided by the present invention;
[0079] Figure 2 A schematic diagram of a procurement plan optimization system based on big data provided by the present invention;
[0080] Figure 3 A schematic diagram of the process of feature selection in step S3;
[0081] Figure 4 A schematic diagram of the process of constructing a procurement optimization model for step S4;
[0082] Figure 5 Schematic diagram of the process of hyperparameter optimization in step S5.
[0083] The accompanying drawings are used to provide further understanding of the present invention and constitute a part of the specification. They are used to explain the present invention together with the embodiments of the present invention and do not constitute a limitation of the present invention. DETAILED DESCRIPTION
[0084] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments; based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0085] In the description of the present invention, it should be understood that terms such as “upper”, “lower”, “front”, “back”, “left”, “right”, “top”, “bottom”, “inside” and “outside” indicating directions or positional relationships are based on the directions or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific direction, be constructed and operated in a specific direction, and therefore should not be understood as limiting the present invention.
[0086] Example 1, see Figure 1 The technical solution adopted by the present invention is as follows: The procurement scheme optimization method based on big data provided by the present invention comprises the following steps:
[0087] Step S1: data collection;
[0088] Step S2: data preprocessing;
[0089] Step S3: feature selection;
[0090] Step S4: constructing a procurement optimization model;
[0091] Step S5: hyperparameter optimization;
[0092] Step S6: Procurement plan optimization.
[0093] Example 2, see Figure 1 and Figure 2 In step S1, the data collection is used to collect historical data required for optimizing the procurement plan, specifically, to obtain a procurement optimization historical data set through collection;
[0094] The procurement optimization historical data set specifically includes product information data, supplier information data, historical procurement data and market dynamics data. The product information data specifically includes product types, product specifications and product prices. The supplier information data specifically includes supplier basic information, supplier supply capacity and supplier price level. The historical procurement data specifically includes historical procurement prices, historical procurement quantities and historical procurement times.
[0095] Example 3, see Figure 1 and Figure 2 This embodiment is based on the above embodiment. In step S2, the data preprocessing is used to preprocess the historical data, and specifically includes the following steps:
[0096] Step S21: data cleaning, which is used to clean the data, specifically to remove missing values, duplicate values and outliers, to obtain a preliminary processed data set;
[0097] Step S22: data set segmentation, which is used to segment the data set, specifically, by segmenting the preliminary processed data set to obtain a procurement optimization data set and a procurement optimization test set;
[0098] Step S23: data encoding, used to convert the data into digital form, specifically encoding the procurement optimization data set by a one-hot encoding method to obtain an encoded data set;
[0099] Step S24: data normalization, which is used to normalize the data, specifically, normalizing the encoded data set by a minimum-maximum method to obtain a normalized data set;
[0100] Step S25: preprocessing, specifically, performing data preprocessing through the data cleaning, the data set segmentation, the data encoding and the data normalization to obtain the normalized data set and the procurement optimization test set.
[0101] Example 4, see Figure 1 , Figure 2 and Figure 3 This embodiment is based on the above embodiment. In step S3, the feature selection is used to select features that contribute to the optimization of the procurement plan and eliminate redundant features. Specifically, the feature selection is performed on the normalized data set using lasso regression with improved correlation coefficient to obtain a procurement optimization training set.
[0102] The feature selection specifically includes the following steps:
[0103] Step S31: Calculate the Pearson correlation coefficient using the following formula:
[0104] ;
[0105] In the formula, represents the correlation coefficient between feature A and feature B, The first data points, The first data points, represents the mean of feature A, represents the mean of feature B, represents the number of data points of feature A, Represents the number of data points of feature B;
[0106] Step S32: preliminary screening, for preliminary screening of features, specifically, merging the feature pairs whose absolute values of the Pearson correlation coefficients in the normalized data set are greater than or equal to 0.7 to obtain a preliminary screening feature data set;
[0107] Step S33: Feature selection based on lasso regression, the steps include:
[0108] Step S331: Design a lasso regression loss function, the formula used is as follows:
[0109] ;
[0110] In the formula, represents the lasso regression loss function, represents the number of samples, represents the number of features, represents the actual observed value of the cth sample, represents the d-th eigenvalue of the c-th sample, represents the regression coefficient of the dth feature, represents the regularization parameter;
[0111] Step S332: determining the regression coefficient, specifically by minimizing the loss function through a gradient descent algorithm to determine the optimal regression coefficient;
[0112] Step S333: performing feature selection, specifically performing feature selection based on the optimal regression coefficient to obtain a procurement optimization training set.
[0113] By performing the above operations, when performing cost forecasting for traditional procurement scheme optimization methods, there is a technical problem that when faced with high-dimensional, large-scale procurement information, features are selected based on preset rules or statistical indicators, and they are easily affected by subjective preferences, resulting in the selected feature subset being not optimized enough. This solution creatively uses lasso regression with improved correlation coefficient for feature selection, which is not affected by subjective factors and avoids the influence of high-correlation features. At the same time, regularization is performed during the selection process, which can control model complexity and overfitting problems.
[0114] Example 5, see Figure 1 , Figure 2 and Figure 4 , this embodiment is based on the above embodiment. In step S4, the procurement optimization model is constructed to construct a model required for procurement scheme optimization, specifically to construct a bidirectional long short-term memory network model and perform model training to obtain a procurement optimization model;
[0115] The procurement optimization model construction specifically includes the following steps:
[0116] Step S41: construct a forward module, the formula used is as follows:
[0117] ;
[0118] In the formula, represents the output of the forget gate at time t, represents the sigmoid function, represents the forward forget gate weight matrix, represents the forward hidden state at time t-1, represents the input at time t, represents the forward forget gate bias term, represents the output of the positive input gate at time t, represents the forward input gate weight matrix, represents the forward input gate bias term, represents the candidate unit state at time t, represents the weight matrix used to calculate the positive candidate unit state, represents the bias term used to calculate the positive candidate unit state, represents the unit state at the positive time t, represents the unit state at time t-1 in the forward direction, Indicates the output of the positive output gate at time t, represents the forward output gate weight matrix, represents the forward output gate bias term, Indicates the hidden state at the positive time t;
[0119] Step S42: Construct a reverse module, the formula used is as follows:
[0120] ;
[0121] In the formula, Represents the output of the forget gate at the reverse time t, represents the reverse forget gate weight matrix, represents the reverse hidden state at time t-1, represents the reverse forget gate bias term, Represents the output of the input gate at time t, represents the reverse input gate weight matrix, represents the reverse input gate bias term, represents the state of the candidate unit at the reverse time t, represents the weight matrix used to calculate the reverse candidate unit state, represents the bias term used to calculate the reverse candidate cell state, represents the state of the unit at the reverse time t, Represents the state of the unit at the reverse time t-1, Represents the output of the output gate at time t in the reverse direction, represents the reverse output gate weight matrix, represents the reverse output gate bias term, Represents the hidden state at the reverse time t;
[0122] Step S43: Design a loss function, the formula used is as follows:
[0123] ;
[0124] In the formula, represents the model loss function value, represents the number of training samples, represents the forecast value of procurement cost, Indicates the actual value of purchase cost;
[0125] Step S44: model construction and training, specifically, constructing the bidirectional long short-term memory network model by constructing the forward module, constructing the reverse module and designing the loss function, and performing model training based on the procurement optimization training set to obtain a procurement optimization model.
[0126] By performing the above operations, when the traditional procurement plan optimization method is used for cost forecasting, there is a limited ability to process the complex nonlinear patterns and dynamic characteristics of procurement information, resulting in poor model stability and insufficient flexibility. This solution creatively uses a bidirectional long short-term memory network model to predict procurement costs in order to optimize procurement plans, effectively capturing long-term dependencies and nonlinear characteristics in the data, while taking into account previous and subsequent information, effectively processing complex patterns and dynamic changes.
[0127] Example 6, see Figure 1 , Figure 2 and Figure 5 , this embodiment is based on the above embodiment. In step S5, the hyperparameter optimization is specifically to optimize the hyperparameters of the procurement optimization model using a sparrow search algorithm and verify the model performance to obtain an optimized procurement optimization model;
[0128] The hyperparameter optimization specifically includes the following steps:
[0129] Step S51: Initialization, the steps include:
[0130] Step S511: Initialize the sparrow population, as shown below:
[0131] ;
[0132] In the formula, X represents the search space, Represents the first sparrow unit, Represents the second sparrow unit, Indicates Sparrow unit, Indicates the number of sparrow units;
[0133] Step S512: Set the fitness, as shown below:
[0134] ;
[0135] In the formula, Fi represents the overall fitness, represents a fitness function, wherein the fitness function selects a root mean square error between the predicted value of the procurement cost and the actual value of the procurement cost as a fitness function value;
[0136] Step S52: updating the position, specifically constructing a discoverer unit set, a follower unit set and a scout unit set and updating the position;
[0137] The updating position step comprises:
[0138] Step S521: The discoverer unit position is updated, and the formula used is as follows:
[0139] ;
[0140] In the formula, represents the position of the j-th dimension of the i-th discoverer unit in the q+1-th iteration, represents the position of the j-th dimension of the i-th discoverer unit in the q-th iteration, represents a random value in the range [0,1]. Indicates the number of discoverer units, Indicates a random value whose range follows a normal distribution, L represents 1× A matrix whose elements are all 1. represents the number of dimensions of the sparrow unit, Wn represents the warning value, which is a random value in the range of [0,1], and St represents the safety value, which is a random value in the range of [0.5,1];
[0141] Step S522: The follower unit position is updated, and the formula used is as follows:
[0142] ;
[0143] In the formula, represents the position of the j-th dimension of the k-th follower unit at the q+1-th iteration, represents the position of the j-th dimension of the k-th follower unit at the q-th iteration, represents the position of the j-th dimension of the follower unit with the worst fitness in the q-th iteration, represents the j-th dimension position of the follower unit with the best fitness in the q-th iteration, and A represents 1× A random matrix whose elements are 1 or -1. T represents the matrix transpose operation. Indicates the number of follower units;
[0144] Step S523: The scout unit position is updated, and the formula used is as follows:
[0145] ;
[0146] In the formula, represents the position of the j-th dimension of the g-th scout unit in the q+1-th iteration, represents the position of the j-th dimension of the g-th scout unit at the q-th iteration, represents the global optimal position of the qth iteration, represents a random value from a normal distribution with a mean of 0 and a variance of 1. Represents a random value in the range [-1,1]. represents the global worst position of the qth iteration, represents a constant used to avoid the denominator being 0. represents the fitness of the g-th scout unit, represents the optimal fitness, represents the worst fitness;
[0147] Step S53: iterative calculation, specifically iterative calculation until a maximum number of iterations is reached or the optimal fitness and optimal sparrow unit position are obtained;
[0148] Step S54: hyperparameter optimization and verification of model performance, specifically, through the initialization, the update position and the iterative calculation, the hyperparameter optimization of the procurement optimization model is performed based on the sparrow search algorithm, and the model performance is verified based on the procurement optimization test set to obtain the optimized procurement optimization model.
[0149] By performing the above operations, when the traditional procurement plan optimization method is used for cost prediction, when there is hyperparameter optimization, it is limited by the discreteness and computational efficiency of the search space and cannot effectively handle the technical problem of optimization problems under complex nonlinear relationships and large-scale data sets. This solution creatively uses the sparrow search algorithm to optimize the model's hyperparameters, realize information exchange and convergence acceleration during the optimization process, and more effectively find the optimal solution in high-dimensional complex space.
[0150] Embodiment 7, see Figure 1 and Figure 2 This embodiment is based on the above embodiment. In step S6, the procurement plan is optimized, specifically by processing the collected data through the optimized procurement optimization model to obtain procurement cost forecast data, and optimizing the procurement plan based on the procurement cost forecast data.
[0151] Embodiment 8, see Figure 1 and Figure 2 , this embodiment is based on the above embodiment, and the procurement scheme optimization system based on big data provided by the present invention includes a data acquisition module, a data preprocessing module, a feature selection module, a procurement optimization model construction module, a hyperparameter optimization module and a procurement scheme optimization module;
[0152] The data collection module is used for data collection, and obtains a procurement optimization historical data set through data collection, and sends the procurement optimization historical data set to the data preprocessing module;
[0153] The data preprocessing module is used for data preprocessing, and obtains a normalized data set and a procurement optimization test set through data preprocessing, and sends the normalized data set to the feature selection module, and sends the procurement optimization test set to the hyperparameter optimization module;
[0154] The feature selection module is used for feature selection, and obtains a procurement optimization training set through feature selection, and sends the procurement optimization training set to the procurement optimization model construction module;
[0155] The procurement optimization model construction module is used to construct a procurement optimization model, obtain the procurement optimization model by constructing a bidirectional long short-term memory network model, and send the procurement optimization model to the hyperparameter optimization module;
[0156] The hyperparameter optimization module is used for hyperparameter optimization, and obtains an optimized procurement optimization model through hyperparameter optimization, and sends the optimized procurement optimization model to the procurement solution optimization module;
[0157] The procurement plan optimization module is used for procurement plan optimization. Through procurement plan optimization, procurement cost forecast data is obtained and procurement plan optimization is performed.
[0158] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.
[0159] While the embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that many changes, modifications, substitutions and variations can be made to the embodiments without departing from the principles and spirit of the invention.
[0160] The present invention and its embodiments are described above, and such description is not restrictive. The drawings show only one embodiment of the present invention, and the actual structure is not limited thereto. In short, if ordinary technicians in the field are inspired by it, without departing from the purpose of the invention, they can design a structure and embodiment similar to the technical solution without creativity, which should belong to the protection scope of the present invention.
Claims
1. A procurement scheme optimization method based on big data, characterized by: The method comprises the following steps: Step S1: data collection; Step S2: Data preprocessing, data cleaning, data set segmentation, data encoding and data normalization of the collected historical data; Step S3: feature selection, specifically, using lasso regression with improved correlation coefficient to perform feature selection; Step S4: constructing a procurement optimization model, specifically constructing a bidirectional long short-term memory network model and performing model training; Step S5: Hyperparameter optimization, specifically using the sparrow search algorithm to optimize the model's hyperparameters and verify the model performance; Step S6: Procurement plan optimization.
2. The procurement scheme optimization method based on big data according to claim 1 is characterized in that: In step S3, the feature selection is used to select features that contribute to the optimization of the procurement plan and eliminate redundant features, specifically, using lasso regression with improved correlation coefficient to perform feature selection on the normalized data set to obtain a procurement optimization training set; The feature selection specifically includes the following steps: Step S31: Calculate the Pearson correlation coefficient using the following formula: ; In the formula, represents the correlation coefficient between feature A and feature B, The first data points, The first data points, represents the mean of feature A, represents the mean of feature B, represents the number of data points of feature A, Represents the number of data points of feature B; Step S32: preliminary screening, for preliminary screening of features, specifically, merging the feature pairs whose absolute values of the Pearson correlation coefficients in the normalized data set are greater than or equal to 0.7 to obtain a preliminary screening feature data set; Step S33: Feature selection based on lasso regression, the steps include: Step S331: Design a lasso regression loss function, the formula used is as follows: ; In the formula, represents the lasso regression loss function, represents the number of samples, represents the number of features, represents the actual observed value of the cth sample, represents the dth eigenvalue of the cth sample, represents the regression coefficient of the dth feature, represents the regularization parameter; Step S332: determining the regression coefficient, specifically by minimizing the loss function through a gradient descent algorithm to determine the optimal regression coefficient; Step S333: performing feature selection, specifically performing feature selection based on the optimal regression coefficient to obtain a procurement optimization training set.
3. The procurement scheme optimization method based on big data according to claim 1 is characterized in that: In step S4, the procurement optimization model is constructed to construct a model required for procurement scheme optimization, specifically to construct a bidirectional long short-term memory network model and perform model training to obtain a procurement optimization model; The procurement optimization model construction specifically includes the following steps: Step S41: construct a forward module, the formula used is as follows: ; In the formula, represents the output of the forget gate at time t, represents the sigmoid function, represents the forward forget gate weight matrix, represents the forward hidden state at time t-1, represents the input at time t, represents the forward forget gate bias term, represents the output of the positive input gate at time t, represents the forward input gate weight matrix, represents the forward input gate bias term, represents the state of the candidate unit at time t, represents the weight matrix used to calculate the positive candidate unit state, represents the bias term used to calculate the positive candidate unit state, represents the unit state at the positive time t, represents the unit state at time t-1 in the forward direction, Indicates the output of the positive output gate at time t, represents the forward output gate weight matrix, represents the forward output gate bias term, Indicates the hidden state at the positive time t; Step S42: Construct a reverse module, the formula used is as follows: ; In the formula, Represents the output of the forget gate at the reverse time t, represents the reverse forget gate weight matrix, represents the reverse hidden state at time t-1, represents the reverse forget gate bias term, Represents the output of the input gate at time t, represents the reverse input gate weight matrix, represents the reverse input gate bias term, represents the state of the candidate unit at the reverse time t, represents the weight matrix used to calculate the reverse candidate unit state, represents the bias term used to calculate the reverse candidate cell state, represents the state of the unit at the reverse time t, Represents the state of the unit at the reverse time t-1, Represents the output of the output gate at time t in the reverse direction, represents the reverse output gate weight matrix, represents the reverse output gate bias term, Represents the hidden state at the reverse time t; Step S43: Design a loss function, the formula used is as follows: ; In the formula, represents the model loss function value, represents the number of training samples, represents the forecast value of procurement cost, Indicates the actual value of purchase cost; Step S44: model construction and training, specifically, constructing the bidirectional long short-term memory network model by constructing the forward module, constructing the reverse module and designing the loss function, and performing model training based on the procurement optimization training set to obtain a procurement optimization model.
4. The method for optimizing procurement plans based on big data according to claim 1, characterized in that: In step S5, the hyperparameter optimization is specifically to optimize the hyperparameters of the procurement optimization model using a sparrow search algorithm and verify the model performance to obtain an optimized procurement optimization model; The hyperparameter optimization specifically includes the following steps: Step S51: Initialization, the steps include: Step S511: Initialize the sparrow population, as shown below: ; In the formula, X represents the search space, Represents the first sparrow unit, Represents the second sparrow unit, Indicates Sparrow unit, Indicates the number of sparrow units; Step S512: Set the fitness, as shown below: ; In the formula, Fi represents the overall fitness, represents a fitness function, wherein the fitness function selects a root mean square error between the predicted value of the procurement cost and the actual value of the procurement cost as a fitness function value; Step S52: updating the position, specifically constructing a discoverer unit set, a follower unit set and a scout unit set and updating the position; The updating position step comprises: Step S521: The discoverer unit position is updated, and the formula used is as follows: ; In the formula, represents the position of the j-th dimension of the i-th discoverer unit in the q+1-th iteration, represents the position of the j-th dimension of the i-th discoverer unit in the q-th iteration, represents a random value in the range [0,1]. Indicates the number of discoverer units, Indicates a random value whose range follows a normal distribution, L represents 1× A matrix whose elements are all 1. represents the number of dimensions of the sparrow unit, Wn represents the warning value, which is a random value in the range of [0,1], and St represents the safety value, which is a random value in the range of [0.5,1]; Step S522: The follower unit position is updated, and the formula used is as follows: ; In the formula, represents the position of the j-th dimension of the k-th follower unit at the q+1-th iteration, represents the position of the j-th dimension of the k-th follower unit at the q-th iteration, represents the position of the j-th dimension of the follower unit with the worst fitness in the q-th iteration, represents the j-th dimension position of the follower unit with the best fitness in the q-th iteration, and A represents 1× A random matrix whose elements are 1 or -1. T represents the matrix transpose operation. Indicates the number of follower units; Step S523: The scout unit position is updated, and the formula used is as follows: ; In the formula, represents the position of the j-th dimension of the g-th scout unit in the q+1-th iteration, represents the position of the j-th dimension of the g-th scout unit at the q-th iteration, represents the global optimal position of the qth iteration, represents a random value from a normal distribution with a mean of 0 and a variance of 1. Represents a random value in the range [-1,1]. represents the global worst position of the qth iteration, represents a constant used to avoid the denominator being 0. represents the fitness of the g-th scout unit, represents the optimal fitness, represents the worst fitness; Step S53: iterative calculation, specifically iterative calculation until a maximum number of iterations is reached or the optimal fitness and optimal sparrow unit position are obtained; Step S54: hyperparameter optimization and verification of model performance, specifically, through the initialization, the update position and the iterative calculation, the hyperparameter optimization of the procurement optimization model is performed based on the sparrow search algorithm, and the model performance is verified based on the procurement optimization test set to obtain the optimized procurement optimization model.
5. The method for optimizing procurement plans based on big data according to claim 1, characterized in that: In step S1, the data collection is used to collect historical data required for procurement scheme optimization, specifically, to obtain a procurement optimization historical data set through collection; The procurement optimization historical data set specifically includes product information data, supplier information data, historical procurement data and market dynamics data. The product information data specifically includes product types, product specifications and product prices. The supplier information data specifically includes supplier basic information, supplier supply capacity and supplier price level. The historical procurement data specifically includes historical procurement prices, historical procurement quantities and historical procurement times.
6. The method for optimizing procurement plans based on big data according to claim 1, characterized in that: In step S2, the data preprocessing is used to preprocess the historical data, and specifically includes the following steps: Step S21: data cleaning, which is used to clean the data, specifically to remove missing values, duplicate values and outliers, to obtain a preliminary processed data set; Step S22: data set segmentation, which is used to segment the data set, specifically, by segmenting the preliminary processed data set to obtain a procurement optimization data set and a procurement optimization test set; Step S23: data encoding, used to convert the data into digital form, specifically encoding the procurement optimization data set by a one-hot encoding method to obtain an encoded data set; Step S24: data normalization, which is used to normalize the data, specifically, normalizing the encoded data set by a minimum-maximum method to obtain a normalized data set; Step S25: preprocessing, specifically, performing data preprocessing through the data cleaning, the data set segmentation, the data encoding and the data normalization to obtain the normalized data set and the procurement optimization test set.
7. The method for optimizing procurement plans based on big data according to claim 1, characterized in that: In step S6, the procurement plan is optimized by processing the collected data through the optimized procurement optimization model to obtain procurement cost forecast data, and optimizing the procurement plan based on the procurement cost forecast data.
8. A procurement scheme optimization system based on big data, used to implement the procurement scheme optimization method based on big data as described in any one of claims 1 to 7, characterized in that: It includes data acquisition module, data preprocessing module, feature selection module, procurement optimization model building module, hyperparameter optimization module and procurement plan optimization module.
9. The procurement plan optimization system based on big data according to claim 8 is characterized in that: The data collection module is used for data collection, and obtains a procurement optimization historical data set through data collection, and sends the procurement optimization historical data set to the data preprocessing module; The data preprocessing module is used for data preprocessing, and obtains a normalized data set and a procurement optimization test set through data preprocessing, and sends the normalized data set to the feature selection module, and sends the procurement optimization test set to the hyperparameter optimization module; The feature selection module is used for feature selection, and obtains a procurement optimization training set through feature selection, and sends the procurement optimization training set to the procurement optimization model construction module; The procurement optimization model construction module is used to construct a procurement optimization model, obtain the procurement optimization model by constructing a bidirectional long short-term memory network model, and send the procurement optimization model to the hyperparameter optimization module; The hyperparameter optimization module is used for hyperparameter optimization, and obtains an optimized procurement optimization model through hyperparameter optimization, and sends the optimized procurement optimization model to the procurement solution optimization module; The procurement plan optimization module is used for procurement plan optimization. Through procurement plan optimization, procurement cost forecast data is obtained and procurement plan optimization is performed.
Citation Information
Patent Citations
Power grid line operation safety optimization method and system and storage medium
CN113361187A
Sparse LSTM landslide dynamic prediction method based on Cauchy disturbance sparrow optimization
CN113947009A
Building energy consumption prediction method based on feature selection and SSA-BiLSTM
CN116629428A
Wind power ultra-short-term prediction method and system based on improved TCN-LSTM model
CN117350421A
Neural network model-based power grid material purchasing process optimization method
CN118469507A
Cited By
Vehicle type expansion evaluation method and system based on voice middleware
CN119293302A
A vehicle model expansion evaluation method and system based on voice middleware
CN119293302B
