Grain storage environment prediction method and prediction system based on optimized extreme learning machine, and computer equipment
The Duckling algorithm optimizes the input layer weight and hidden layer threshold of the extreme learning machine, which solves the problem of insufficient randomness and long-term dependency capture capabilities in the prediction of grain storage environment, and achieves more efficient and accurate prediction effects.
Patent Information
- Application Number
- CN202510393588.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-31
- Publication Date
- 2025-08-19
AI Technical Summary
In the prior art, the limit learning machine has input layer weights and hidden layer threshold initialization randomness in the prediction of grain storage environment, causing fluctuations in the output results, and the single hidden layer structure is difficult to capture the long-term dependencies in the time series, resulting in limited processing capabilities and inability to meet the performance requirements of the deep learning model.
The dung beetle algorithm is used to optimize the input layer weight and hidden layer threshold of the extreme learning machine. By simulating the survival behavior of dung beetle in nature, the dung beetle algorithm is used for iterative optimization to generate optimization parameters to improve the prediction performance of the extreme learning machine.
It improves the prediction performance of the extreme learning machine, reduces the number of iteration updates, improves the running speed and prediction accuracy of the model, and can better capture complex changes in the grain storage environment.
Smart Images

Figure CN120509509A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of grain storage environment prediction, and in particular to a grain storage environment prediction method, a prediction system and computer equipment based on an optimized extreme learning machine. Background Art
[0002] During grain storage, temperature and humidity are key factors affecting food safety. Once temperature and humidity exceed safe storage thresholds, microorganisms within the grain become active, causing localized temperature increases and mold. Due to grain's poor thermal conductivity and minimal internal air flow, heat accumulates, further exacerbating localized overheating and creating a "honeycomb" pattern of rising temperatures. This can also lead to problems such as mold and insect infestations, posing significant challenges to storage management and severely compromising grain safety and quality.
[0003] To effectively address this issue, many grain depots have implemented intelligent sensor systems within their silos. These sensors, arranged in a layered, matrix configuration, monitor the temperature and humidity inside the grain in real time. Using the Internet of Things and wireless transmission technology, they transmit this data to a display screen in the central control room. Compared to traditional methods that rely on periodic manual sampling of temperature and humidity data, this system not only ensures data continuity but also significantly improves the efficiency of grain monitoring and enhances the intelligence of stored grain monitoring.
[0004] However, changes in temperature and humidity within a grain pile are a complex and slow process. This complexity stems primarily from the fact that grain pile temperature is a function of multiple factors, including air temperature, warehouse temperature, and the temperature within the grain. Grain, as a naturally slow heat-conducting medium, experiences relatively slow internal heat transfer and temperature and humidity changes. When tens of thousands of tons of grain are stored in warehouses for extended periods, improper environmental control can lead to increased activity of local microorganisms and pests, leading to mold and mildew contamination, seriously impacting grain quality. Because there is virtually no air flow within the grain pile, conventional detection methods often indicate that by the time sensors detect abnormal local temperature and humidity, mold is already highly active and may have already spread over a large area.
[0005] The existing BP neural network predicts the grain storage environment. However, the BP neural network has a high number of iterative updates, resulting in a long model running time. The Extreme Learning Machine (ELM) network model, on the other hand, is characterized by solving the weights from the hidden layer to the output layer through a single equation rather than traditional iterative optimization. This eliminates the need to set control parameters such as the learning rate and momentum factor, reduces the number of iterative updates, and greatly reduces the model running time. Therefore, it is more effective in detecting grain storage environments. However, the initialization of the input layer weights and hidden layer thresholds of the extreme learning machine is random, resulting in fluctuations in the output results. Multiple experiments need to be averaged to stabilize the performance. In addition, the single hidden layer structure makes it difficult to capture long-term dependencies in time series, resulting in limited processing capabilities and the inability to meet the performance requirements of deep learning models for complex nonlinear problems. Summary of the Invention
[0006] In order to address the deficiencies of the prior art, the present invention provides a grain storage environment prediction method, prediction system and computer equipment based on an optimized extreme learning machine, which improves the prediction performance of the extreme learning machine.
[0007] The present invention solves the above-mentioned technical problems by adopting a technical solution: a method for predicting grain storage environment based on an optimized extreme learning machine, comprising the following steps:
[0008] Obtain granary environmental information and generate input layer parameters based on the granary environmental information;
[0009] Use the pre-trained Extreme Learning Machine (ELM) to predict the input layer parameters and generate prediction results;
[0010] Among them, the method of training the extreme learning machine includes:
[0011] Generate original parameters based on the input layer weight matrix and hidden layer threshold vector of the extreme learning machine;
[0012] The original parameters are used as position information to perform iterative optimization using the dung beetle optimizer (DBO) to obtain the optimized parameters, which include the optimization weight W and the optimization threshold b.
[0013] The extreme learning machine is trained according to the optimized parameters.
[0014] As a further optimization of the grain storage environment prediction method based on the optimized extreme learning machine, the specific method of using the original parameters as position information to perform iterative optimization using the dung beetle algorithm to obtain the optimized parameters includes:
[0015] The ball rolling stage, foraging stage, reproduction stage and resource competition stage in the dung beetle algorithm are repeated, and the optimized parameters are updated iteratively.
[0016] As a further optimization of the invention of a grain storage environment prediction method based on an optimized extreme learning machine: the rolling ball stage specifically includes:
[0017] In the absence of obstacles, the dung beetle pushes the dung ball to roll along a straight line with the sun's position as a reference. The formula for this process is:
[0018] X i (t+1)=x i (t)+a·k·x i (t-1)+b·Δx;
[0019] Δx=|x i (t)-X w |;
[0020] Among them, t is the current iteration number; x i (t) represents the position information of the i-th dung beetle at the t-th iteration; a is the natural coefficient, a is 1 or -1; k∈(0,0.2] is the deflection coefficient; X w Represents the global worst position; b∈(0,1) is a constant; |x i (t)-X w | represents the light intensity, |x i (t)-X w |The higher the value, the weaker the light intensity.
[0021] As a further optimization of the grain storage environment prediction method based on the optimized extreme learning machine, the foraging stage specifically includes:
[0022] When a dung beetle encounters an obstacle and cannot move forward, it changes direction to obtain a new movement route. The formula for this process is:
[0023] X i (t+1)=x i (t)+tan(θ)·|x i (t)-x i (t-1)|;
[0024] Where θ is the deflection angle, and its value range is [0, π]; |x i (t)-x i (t-1)| represents the position offset of the i-th dung beetle at time t and time t-1.
[0025] As a further optimization of the invention of a grain storage environment prediction method based on an optimized extreme learning machine: the breeding stage specifically includes:
[0026] The oviposition area of female dung beetles is dynamically adjusted through the boundary selection strategy. The formula of this process is:
[0027]
[0028]
[0029] Among them, X * is the current local optimal position; and are the lower and upper limits of the spawning area, respectively; and T max is the maximum number of iterations; L o is the lower limit of the optimization space; U o The upper limit of the optimization space;
[0030] Generate dung beetle individuals in the spawning area and dynamically update the foraging area of dung beetle individuals. The formula of this process is:
[0031] L oo =max(X o (1-R), L o );
[0032] U oo =min(X o (1+R), U o );
[0033] Among them, X o is the global optimal position; L oo is the lower limit of the optimal foraging area; U oo is the upper limit of the optimal foraging area;
[0034] The position update formula of dung beetle individuals is:
[0035] x i (t+1)=x i (t)+C1·(x i (t)-L oo )+C2·(x i (t)-U oo );
[0036] Wherein, C1 is a random number following normal distribution, and C2∈(0, 1) is a constant value.
[0037] As a further optimization of the grain storage environment prediction method based on the optimized extreme learning machine, the formula for the resource competition stage is:
[0038] x i (t+1)=X o +S·g·(|x i (t)-X* |+|x i (t)-X o |);
[0039] Among them, X o Compete for the best position for food; x i (t) is the position information of the i-th dung beetle at the t-th iteration, g is a random matrix of size 1×D that follows the normal distribution, and S represents the disturbance intensity.
[0040] As a further optimization of the method for predicting grain storage environment based on the optimized extreme learning machine, the update threshold of the position information is set to ε, ε is 1e-5, and the x i (t) The following conditions are met:
[0041]
[0042] As a further optimization of the invention of a grain storage environment prediction method based on an optimized extreme learning machine: the output layer prediction formula of the pre-trained extreme learning machine is:
[0043]
[0044] The technical solution adopted by the present invention to solve the above technical problems is: a prediction system for implementing any one of the above-mentioned grain storage environment prediction methods based on an optimized extreme learning machine, the system comprising:
[0045] Parameter collection module, used to obtain granary environmental information and generate input layer parameters based on the granary environmental information;
[0046] Model training module, used to train the extreme learning machine;
[0047] The central control module is used to use the pre-trained extreme learning machine to predict the input layer parameters and generate prediction results.
[0048] The technical solution adopted by the present invention to solve the above technical problems is: a computer device comprising:
[0049] memory for storing computer programs;
[0050] A processor is used to read and execute the computer program to implement any one of the above-mentioned grain storage prediction methods.
[0051] Compared with the prior art, the present invention has the following beneficial effects:
[0052] The present invention generates original parameters based on the input layer weight matrix and hidden layer threshold vector of an extreme learning machine, uses the original parameters as position information, and uses a dung beetle optimizer (DBO) algorithm to iteratively optimize to obtain optimized parameters. The optimized parameters include an optimized weight W and an optimized threshold b. The extreme learning machine is trained according to the optimized parameters, thereby improving the prediction performance of the extreme learning machine. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Figure 1 It is a flow chart of the algorithm for optimizing the extreme learning machine of the present invention;
[0054] Figure 2 This is a block diagram of the optimized extreme learning machine model of the present invention. DETAILED DESCRIPTION
[0055] The technical solution of the present invention is further elaborated in detail below in conjunction with specific embodiments. Parts not described and disclosed in detail in the following embodiments of the present invention should be understood as existing technologies known or should be known to those skilled in the art.
[0056] A method for predicting grain storage environment based on optimized extreme learning machine, such as Figure 1 and Figure 2 As shown, the following steps are included:
[0057] Grain silo environmental information is obtained and used to generate input layer parameters. Based on the temperature and humidity characteristics of stored grain and the heat transfer properties of grain, the input layer parameters include outdoor temperature, outdoor humidity, internal silo temperature, external humidity, grain pile temperature, grain pile humidity, internal oxygen concentration, and internal carbon dioxide concentration. A multi-sensor detection system deployed within the silo is used to predict internal silo temperature and humidity. Figure 1 In the text, outdoor temperature and humidity are used to represent outdoor temperature and outdoor humidity, warehouse temperature and humidity are used to represent warehouse temperature and outdoor humidity, and grain pile temperature and humidity are used to represent grain pile temperature and grain pile humidity.
[0058] Use the pre-trained Extreme Learning Machine (ELM) to predict the input layer parameters and generate prediction results;
[0059] The output f of the traditional ELM model n (x) and the loss function L can be expressed as follows:
[0060]
[0061]
[0062] Where n is the number of hidden layer units; y represents the output value of the ELM model; β is the output layer weight matrix; h is the hidden layer output matrix; T = [T_train1, T_train2, ..., T_train M ] T is the true value matrix. The objective function is as follows:
[0063] min||hβ-T||;
[0064] Combined with the optimal conditions of the Lagrangian function, the solution is:
[0065]
[0066] In the formula is the output layer weight matrix; h + is the Moore-Penrose generalized inverse matrix of h.
[0067] To ensure optimal prediction performance of the extreme learning machine (ELM), this paper utilizes the dung beetle optimizer (DBO) to optimize the model's weights and thresholds. This algorithm, inspired by the natural behavior of dung beetles, simulates their behavior to find the optimal solution in the optimization space. It features strong global search capabilities, high local search accuracy, and rapid convergence. The solution: The ELM's weights w and threshold b serve as the dung beetle position information in the DBO algorithm. Training data is then used to evaluate the ELM's performance. This model's performance evaluation serves as the DBO objective function to calculate the fitness value, ultimately obtaining the weights and thresholds that achieve the optimal fitness. The extreme learning machine dataset consists of a training set, a test set, and a validation set.
[0068] Among them, the method of training the extreme learning machine includes:
[0069] The present invention utilizes the advantages of the dung beetle algorithm in strong global search capability and high local search accuracy, and generates original parameters based on the input layer weight matrix and hidden layer threshold vector of the extreme learning machine.
[0070] Extreme learning machine hidden layer output:
[0071] h=g(W i z i +b i );
[0072] Where W i represents the input layer weight matrix, represents b i Hidden layer threshold vector, g() represents the activation function, g(·) here selects the sigmoid function, which represents z i The input layer of the trained model.
[0073] The original parameters are used as position information to perform iterative optimization using the dung beetle optimizer (DBO) to obtain the optimized parameters, which include the optimization weight W and the optimization threshold b.
[0074] Taking advantage of the strong global search capability of the dung beetle algorithm, let X = (W, b) represent the position vector of the algorithm in the foraging phase. According to the workflow of the optimization algorithm, iterative optimization is performed to finally achieve the optimization of the two parameters, as shown in the following formula:
[0075]
[0076] The specific method of using the original parameters as position information to perform iterative optimization using the dung beetle algorithm to obtain the optimized parameters includes:
[0077] The ball rolling stage, foraging stage, reproduction stage and resource competition stage in the dung beetle algorithm are repeated, and the optimized parameters are updated iteratively.
[0078] The in-play phase includes:
[0079] In the absence of obstacles, the dung beetle pushes the dung ball to roll along a straight line with the sun's position as a reference. The formula for this process is:
[0080] X i (t+1)=x i (t)+a·k·x i (t-1)+b·Δx;
[0081] Δx=|x i (t)-X w |;
[0082] Among them, t is the current iteration number; x i (t) represents the position information of the i-th dung beetle at the t-th iteration; a is the natural coefficient, a is 1 or -1; k∈(0,0.2] is the deflection coefficient; X w Represents the global worst position; b∈(0,1) is a constant; |x i (t)-X w | represents the light intensity, |x i (t)-X w |The higher the value, the weaker the light intensity.
[0083] The foraging phase specifically includes:
[0084] When a dung beetle encounters an obstacle and cannot move forward, it changes direction to obtain a new movement route. The formula for this process is:
[0085] X i (t+1)=x i(t)+tan(θ)·|x i (t)-x i (t-1)|;
[0086] Where θ is the deflection angle, and its value range is [0, π]; |x i (t)-x i (t-1)| represents the position offset of the i-th dung beetle at time t and time t-1.
[0087] The reproductive stages include:
[0088] The oviposition area of female dung beetles is dynamically adjusted through the boundary selection strategy. The formula of this process is:
[0089]
[0090]
[0091] Among them, X * is the current local optimal position; and are the lower and upper limits of the spawning area, respectively; and T max is the maximum number of iterations; L o is the lower limit of the optimization space; U o is the upper limit of the optimization space; the optimization space is a boundary description of the optimal solution under the sparsity constraint, that is, it includes the theoretical minimum possible number of non-zero elements, and also involves the sparsity that can be achieved in the actual search during the reproduction phase of the dung beetle algorithm.
[0092] Generate dung beetle individuals in the spawning area and dynamically update the foraging area of dung beetle individuals. The formula of this process is:
[0093] L oo =max(X o (1-R), L o );
[0094] U oo =min(X o (1+R), U o );
[0095] Among them, X o is the global optimal position; L oo is the lower limit of the optimal foraging area; U oo is the upper limit of the optimal foraging area;
[0096] The position update formula of dung beetle individuals is:
[0097] x i (t+1)=x i(t)+C1·(x i (t)-L oo )+C2·(x i (t)-U oo );
[0098] Wherein, C1 is a random number following normal distribution, and C2∈(0, 1) is a constant value.
[0099] The formula for the resource competition phase is:
[0100] x i (t+1)=X o +S·g·(|x i (t)-X * |+|x i (t)-X o |);
[0101] Among them, X o Compete for the best position for food; x i (t) is the position information of the i-th dung beetle at the t-th iteration, g is a random matrix of size 1×D that follows the normal distribution, and S represents the disturbance intensity.
[0102] Repeat the above stages, monitoring the fitness of the position update value of the global optimal solution is less than the update threshold of the position information, until a suitable optimal solution is obtained, x i (t) The following judgment conditions are met. The update threshold of the location information is set to ε, ε is e-5, and the x i (t) The following conditions are met:
[0103]
[0104] The output layer prediction formula of the pre-trained extreme learning machine is:
[0105]
[0106] The objective function of the extreme learning machine is:
[0107] min||g(W i z i +b i )β-T||;
[0108] Given h=g(W i z i +b i ), the optimized extreme learning machine output weight solution condition:
[0109]
[0110] The extreme learning machine is trained according to the optimized parameters.
[0111] According to the process of the above technical solution, the neural network model is learned and trained, and the prediction results are evaluated.
[0112] A prediction system for implementing any one of the above-mentioned methods for predicting grain storage environments based on an optimized extreme learning machine, the system comprising:
[0113] Parameter collection module, used to obtain granary environmental information and generate input layer parameters based on the granary environmental information;
[0114] Model training module, used to train the extreme learning machine;
[0115] The central control module is used to use the pre-trained extreme learning machine to predict the input layer parameters and generate prediction results.
[0116] Computer equipment, including:
[0117] memory for storing computer programs;
[0118] A processor is used to read and execute the computer program to implement any one of the above-mentioned grain storage prediction methods.
[0119] It should be noted that the user 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, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0120] Those skilled in the art will understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, database or other media used in the embodiments provided in this application may include at least one of non-volatile memory and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory may include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, distributed databases based on blockchains. The processor involved in the various embodiments provided herein may be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to these.
[0121] The above description of the disclosed embodiments is intended to enable one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be readily apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention is not limited to the embodiments shown herein but is intended to conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for predicting grain storage environment based on an optimized extreme learning machine, characterized in that: The steps include: Obtain granary environmental information and generate input layer parameters based on the granary environmental information; Use the pre-trained Extreme Learning Machine (ELM) to predict the input layer parameters and generate prediction results; Among them, the method of training the extreme learning machine includes: Generate original parameters based on the input layer weight matrix and hidden layer threshold vector of the extreme learning machine; The original parameters are used as position information to perform iterative optimization using the dung beetle optimizer (DBO) to obtain the optimized parameters, which include the optimization weight W and the optimization threshold b. The extreme learning machine is trained according to the optimized parameters.
2. The method for predicting grain storage environment based on an optimized extreme learning machine according to claim 1, wherein: The specific method of using the original parameters as position information to perform iterative optimization using the dung beetle algorithm to obtain the optimized parameters includes: The ball rolling stage, foraging stage, reproduction stage and resource competition stage in the dung beetle algorithm are repeated, and the optimized parameters are updated iteratively.
3. The method for predicting grain storage environment based on an optimized extreme learning machine according to claim 2, wherein: The rolling ball stage specifically includes: In the absence of obstacles, the dung beetle pushes the dung ball to roll along a straight line with the sun's position as a reference. The formula for this process is: X i (t+1)=x i (t)+a·k·x i (t-1)+b·Δx; Δx=|x i (t)-X w |; Among them, t is the current iteration number; x i (t) represents the position information of the i-th dung beetle at the t-th iteration; a is the natural coefficient, a is 1 or -1; k∈(0,0.2] is the deflection coefficient; X w Represents the global worst position; b∈(0,1) is a constant; |x i (t)-X w | represents the light intensity, |x i (t)-X w |The higher the value, the weaker the light intensity.
4. The method for predicting grain storage environment based on an optimized extreme learning machine according to claim 3, wherein: The foraging stage specifically includes: When a dung beetle encounters an obstacle and cannot move forward, it changes direction to obtain a new movement route. The formula for this process is: X i (t+1)=x i (t)+tan(θ)·|x i (t)-x i (t-1)|| Where θ is the deflection angle, and its value range is [0, π]; |x i (t)-x i (t-1)| represents the position offset of the i-th dung beetle at time t and time t-1.
5. The method for predicting grain storage environment based on an optimized extreme learning machine according to claim 4, wherein: The breeding stage specifically includes: The oviposition area of female dung beetles is dynamically adjusted through the boundary selection strategy. The formula of this process is: Among them, X * is the current local optimal position; and are the lower and upper limits of the spawning area, respectively; and T max is the maximum number of iterations; L o is the lower limit of the optimization space; U o The upper limit of the optimization space; Generate dung beetle individuals in the spawning area and dynamically update the foraging area of dung beetle individuals. The formula of this process is: L oo =max(X o ·(1-R),L o ); U oo =min(X o ·(1+R),U o ); Among them, X o is the global optimal position; L oo is the lower limit of the optimal foraging area; U oo is the upper limit of the optimal foraging area; The position update formula of dung beetle individuals is: x i (t+1)=x i (t)+C1·(x i (t)-L oo )+C2·(x i (t)-U oo ); Wherein, C1 is a random number following normal distribution, and C2∈(0, 1) is a constant value.
6. The method for predicting grain storage environment based on an optimized extreme learning machine according to claim 5, wherein: The formula for the resource competition phase is: x i (t+1)=X o +S·g·(|x i (t)-X * |+|x i (t)-X o |); Among them, X o Compete for the best position for food; x i (t) is the position information of the i-th dung beetle at the t-th iteration, g is a random matrix of size 1×D that follows the normal distribution, and S represents the disturbance intensity.
7. The method for predicting grain storage environment based on an optimized extreme learning machine according to claim 6, wherein: The update threshold of the position information is set to ε, ε is 1e-5, and the x i (t) The following conditions are met:
8. The method for predicting grain storage environment based on an optimized extreme learning machine according to claim 1, wherein: The output layer prediction formula of the pre-trained extreme learning machine is:
9. A prediction system for implementing the grain storage environment prediction method based on an optimized extreme learning machine according to any one of claims 1 to 8, characterized in that: The system comprises: Parameter collection module, used to obtain granary environmental information and generate input layer parameters based on the granary environmental information; Model training module, used to train the extreme learning machine; The central control module is used to use the pre-trained extreme learning machine to predict the input layer parameters and generate prediction results.
10. Computer device, characterized in that include: memory for storing computer programs; A processor is used to read and execute the computer program to implement the grain storage prediction method according to any one of claims 1 to 8.