Environmental monitoring method and system for stropharia rugoso-annulata cultivation
The environmental monitoring system for Stropharia officinalis cultivation uses a link state routing algorithm and improved horned lizard optimization to quickly establish and maintain efficient data transmission links, addressing the challenge of constructing accurate routing in distributed systems for optimal growth conditions.
Patent Information
- Application Number
- CN202411336735.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-25
- Publication Date
- 2024-12-31
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing agricultural systems face challenges in accurately and quickly constructing the shortest data transmission links for each routing node in a distributed routing system for Stropharia officinalis cultivation, failing to maintain an efficient working state.
An environmental monitoring system using sensor and image acquisition equipment, coupled with a distributed routing system employing a link state routing algorithm and an improved horned lizard optimization algorithm to calculate and dynamically adjust data transmission links, ensuring real-time monitoring and recalculating routes based on node operation states.
The system enables accurate and rapid construction of data transmission links, maintaining an efficient working state, allowing timely discovery and regulation of adverse environmental factors for optimal Stropharia officinalis growth conditions.
Smart Images

Figure CN119232770A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to an agricultural Internet of Things, and in particular to an environmental monitoring method and system for Stropharia officinalis cultivation. Background Art
[0002] In the process of cultivating Stropharia, in order to ensure good growth conditions and high yield and quality, multiple environmental factors need to be monitored and regulated in real time. The growth of Stropharia is affected by many environmental factors, including temperature, humidity, light, soil conditions (such as pH, soil structure, air permeability, water holding capacity, etc.), air composition (such as oxygen, carbon dioxide concentration) and nutrient supply. These environmental factors are interrelated and jointly affect the growth, development and yield quality of Stropharia. Therefore, real-time monitoring of the cultivation environment of Stropharia can help to timely discover and regulate adverse environmental factors and provide the best growth conditions for Stropharia.
[0003] For large-scale cultivation of Stropharia officinalis, the use of a distributed routing system of self-organizing networks for data transmission is a more practical technical solution. However, how to accurately and quickly build the shortest data transmission link for each routing node in the distributed routing system and ensure that the distributed routing system maintains an efficient working state has become a technical problem that needs to be solved urgently. Summary of the invention
[0004] 1. Technical issues to be solved
[0005] In view of the above-mentioned shortcomings of the prior art, the present invention provides an environmental monitoring method and system for the cultivation of Stropharia rugosa, which can effectively overcome the defects of the prior art that it is difficult to accurately and quickly construct the shortest data transmission link for each routing node in a distributed routing system, and cannot ensure that the distributed routing system maintains an efficient working state.
[0006] (II) Technical solution
[0007] To achieve the above objectives, the present invention is implemented through the following technical solutions:
[0008] A method for environmental monitoring of Stropharia officinalis cultivation, using sensor equipment and image acquisition equipment to collect cultivation environment elements in real time, and uploading the collected data to a host computer via a distributed routing system of an ad hoc network with the shortest data transmission link, and the host computer performs data analysis and cultivation equipment control;
[0009] Each routing node in the distributed routing system uses a link state routing algorithm to calculate the shortest data transmission link from itself to the host computer. At the same time, each routing node in the distributed routing system determines whether it is in an abnormal operation state by calculating the operation state value in real time, and broadcasts the abnormal operation state information to the distributed routing system when it is in an abnormal operation state, so that other routing nodes recalculate the shortest data transmission link;
[0010] Among them, the link state routing algorithm uses the improved horned lizard optimization algorithm to calculate the shortest data transmission link:
[0011] When the blood ejection behavior of horned lizard individuals is simulated in the improved horned lizard optimization algorithm for searching, the moving step factor of the optimal solution direction and random direction is dynamically adjusted based on the number of iterations to enhance the global exploration ability in the early stage of the search and the local search ability in the later stage of the search, so that the improved horned lizard optimization algorithm converges quickly;
[0012] When searching for the skin color change behavior of horned lizard individuals in the improved horned lizard optimization algorithm, the position of the horned lizard individuals is updated by adjusting the parameters that characterize the rate or level of the melanocyte stimulating hormone (MSH) to improve the ability to respond quickly to environmental changes. At the same time, it avoids repeated searches in the search space that has already been searched, so that the improved horned lizard optimization algorithm converges quickly.
[0013] Preferably, each routing node in the distributed routing system uses a link state routing algorithm to calculate the shortest data transmission link from itself to the host computer, including:
[0014] S1. The routing node actively tests the link status between itself and the surrounding routing nodes, determines its own neighbor routing nodes, and collects link status information between itself and each neighbor routing node;
[0015] S2, the routing node encapsulates the collected link state information into a link state packet LSP, and uses the flooding method to broadcast the link state packet LSP to other routing nodes in the distributed routing system;
[0016] S3, each routing node receives the link state packet LSP sent by other routing nodes, stores it in the local network structure topology map, and updates the network structure topology map in real time;
[0017] S4, each routing node uses the improved horned lizard optimization algorithm to calculate the shortest data transmission link from itself to the host computer, and generates a corresponding routing table according to the calculation result;
[0018] S5. The routing node continuously monitors the link status between itself and each neighbor routing node, and when it detects a change in the link status or receives abnormal operation status information sent from other routing nodes, it repeats S1 to S4 to recalculate the shortest data transmission link.
[0019] Preferably, each routing node in S4 uses an improved horned lizard optimization algorithm to calculate the shortest data transmission link from itself to the host computer, and generates a corresponding routing table according to the calculation result, including:
[0020] S41, initializing parameters and randomly generating an initial population of a certain size in the search space, wherein each horned lizard individual in the initial population represents a potential solution;
[0021] S42. In each iteration, the position of the individual horned lizard is updated by simulating various behaviors of the individual horned lizard to optimize the quality of the solution;
[0022] S43, using the fitness function to evaluate each horned lizard individual and calculate the corresponding fitness value;
[0023] S44, record and update the global optimal solution;
[0024] S45. Determine whether the iteration termination condition is met. If the iteration termination condition is not met, return to S42. Otherwise, use the current global optimal solution as the shortest data transmission link.
[0025] Preferably, in S42, in each iteration, the position of the individual horned lizard is updated by simulating multiple behaviors of the individual horned lizard to optimize the quality of the solution, including:
[0026] In the local search phase, the position of the individual horned lizard is updated by simulating the hiding behavior of the individual horned lizard:
[0027] X k+1 =X k +α*(X best -X k )+β*r1*(X ub -X lb );
[0028] Among them, X k is the position of the horned lizard individual at the kth iteration, X k+1 is the position of the horned lizard individual at the k+1th iteration, X best is the current optimal solution, X ub , X lb are the upper and lower bounds of the search space respectively, α is the learning factor, β is the exploration factor, r1 is a random number, r1∈[0,1].
[0029] Preferably, in each iteration in S42, the position of the individual horned lizard is updated by simulating multiple behaviors of the individual horned lizard to optimize the quality of the solution, including:
[0030] In the global exploration stage, the behavior of horned lizards spraying blood from their eyes to scare off predators when encountering threats is simulated, so that when the horned lizards are trapped in the local optimum, they can make large changes in position to jump out of the local optimum.
[0031] When simulating the blood ejection behavior of individual horned lizards for search, the optimal solution direction and the moving step factor of the random direction are dynamically adjusted based on the number of iterations to enhance the global exploration ability in the early stage of the search and the local search ability in the later stage of the search, so that the improved horned lizard optimization algorithm converges quickly, including:
[0032] S4211. Dynamically adjust the optimal solution direction and the moving step factor of the random direction based on the number of iterations:
[0033] a(k)=a1*(a2-a1) k / K ;
[0034] b(k)=b1*(b2-b1) k / K ;
[0035] Among them, a(k) is the moving step factor in the direction of the optimal solution at the kth iteration, a1 is the initial value of the moving step factor in the direction of the optimal solution, which is set larger in the early stage of the search to enhance the global exploration ability, and a2 is the final value of the moving step factor in the direction of the optimal solution, which is set smaller in the later stage of the search to enhance the local search ability;
[0036] b(k) is the moving step factor of the random direction at the kth iteration, b1 is the initial value of the moving step factor of the random direction, which is set larger in the early stage of the search to enhance the global exploration ability, b2 is the final value of the moving step factor of the random direction, which is set smaller in the later stage of the search to enhance the local search ability, k is the current iteration number, and K is the maximum iteration number;
[0037] S4212. Calculate the optimal solution direction and the moving step length in the random direction:
[0038] s best (k) = a(k)*r2*X best -X k2 ;
[0039] s random (k) = b(k)*r3*(X ub -X lb ) dim ;
[0040] Among them, s best(k) is the moving step length in the direction of the optimal solution at the kth iteration, X best -X k2 is the current optimal solution X best and the current horned lizard individual position X k The Euclidean distance between random (k) is the moving step length in the random direction at the kth iteration, (X ub -X lb ) dim is the range size of the search space in the dimth dimension, r2 and r3 are both random numbers, r2, r3∈[0,1];
[0041] S4213. According to the optimal solution direction and the moving step length in the random direction, the position of the horned lizard individual is updated by simulating the blood ejection behavior of the horned lizard individual:
[0042] X k+1 =X k +γ*(r4 κ *u best *s best (k)+r5*u random *s random (k));
[0043] Among them, u best Pointing to the current optimal solution X best The unit vector of the direction, u random is a random vector pointing in a random direction, X j1 , X j2 are the positions of two random points j1 and j2 in the search space, r4 and r5 are random numbers, r4, r5∈[0,1], γ is the adjustment factor, and κ is the tendency factor.
[0044] Preferably, in S42, in each iteration, the position of the individual horned lizard is updated by simulating multiple behaviors of the individual horned lizard to optimize the quality of the solution, including:
[0045] In the global exploration phase, the position of the individual horned lizard is updated by simulating the behavior of the individual horned lizard in adjusting its skin color according to environmental changes;
[0046] When simulating the skin color change behavior of horned lizards for searching, the position of horned lizards is updated by adjusting the parameters that characterize the rate or level of melanocyte stimulating hormone (MSH) to improve the ability to respond quickly to environmental changes. At the same time, it avoids repeated searches in the search space that has already been searched, so that the improved horned lizard optimization algorithm converges quickly. Specifically, it includes:
[0047] S4221, simulating the perception of the surrounding environment by the horned lizard individual, and calculating the environmental factor E according to the current environmental conditions;
[0048] S4222. Determine the skin color change according to the environmental factor E. If the environmental factor E indicates that the skin has darkened, adjust the skin color brightness using the following formula:
[0049] B'=B-λ1*(BB min );
[0050] Among them, B is the current skin color brightness parameter, B' is the adjusted skin color brightness parameter, and B min is the darkest skin color brightness parameter, λ1 is the darkening adjustment factor, which is a parameter that characterizes the rate or level of melanocyte stimulating hormone MSH, λ1=F1(f,E,T), F1(·) is a function that calculates the darkening adjustment factor λ1 according to the fitness value f of the horned lizard individual, the environmental factor E and the time factor T;
[0051] S4223. If the environmental factor E indicates that the skin is brightening, the following formula is used to adjust the skin color brightness:
[0052] B'=B+λ2*(B max -B);
[0053] Among them, B max is the brightness parameter of the brightest skin color, λ2 is the lightening adjustment factor, which is a parameter that characterizes the rate or level of the melanocyte stimulating hormone MSH, λ2=F2(f,E,T), F2(·) is a function that calculates the lightening adjustment factor λ2 based on the fitness value f of the horned lizard individual, the environmental factor E and the time factor T.
[0054] Preferably, in S42, in each iteration, the position of the individual horned lizard is updated by simulating multiple behaviors of the individual horned lizard to optimize the quality of the solution, including:
[0055] In the global exploration phase, the position of the individual horned lizard is updated by simulating the behavior of the individual horned lizard moving and escaping when encountering a predator:
[0056] X k+1 =X k +τ*(X ub -X lb );
[0057] Among them, τ is the step size adjustment factor.
[0058] Preferably, each routing node in the distributed routing system determines whether it is in an abnormal operating state by calculating the operating state value in real time, and broadcasts abnormal operating state information to the distributed routing system when it is in an abnormal operating state, so that other routing nodes recalculate the shortest data transmission link, including:
[0059] Each routing node in the distributed routing system uses the following formula to calculate the running status value in real time:
[0060] S(t)=f1(PLR)+f2(PLR,DTR,HS);
[0061] Among them, S(t) is the running status value at time t, PLR represents packet loss rate, PLR' represents standard packet loss rate, DTR represents transmission rate, DTR' represents standard transmission rate, HS represents hardware status, ω1, ω2, ω3 are the weights of packet loss rate, transmission rate, and hardware status respectively;
[0062] When the operation status value of a routing node is greater than a preset threshold for p consecutive moments, the routing node is in an abnormal operation state, and stops working after broadcasting the abnormal operation status information to the distributed routing system, so that other routing nodes in the distributed routing system recalculate the shortest data transmission link.
[0063] An environmental monitoring system for the cultivation of Stropharia rugosa, comprising a sensor device, an image acquisition device, a distributed routing system and a host computer;
[0064] Sensor equipment and image acquisition equipment for real-time acquisition of cultivation environment elements;
[0065] The distributed routing system is composed of a plurality of distributed routing nodes, and is used to upload the collected data to the host computer via the shortest data transmission link. Each routing node in the distributed routing system uses a link state routing algorithm to calculate the shortest data transmission link from itself to the host computer. At the same time, each routing node in the distributed routing system determines whether it is in an abnormal operation state by calculating the operation state value in real time, and broadcasts the abnormal operation state information to the distributed routing system when it is in an abnormal operation state, so that other routing nodes recalculate the shortest data transmission link.
[0066] The host computer is used to receive the collected data transmitted by the distributed routing system and perform data analysis and cultivation equipment control;
[0067] Among them, the link state routing algorithm uses the improved horned lizard optimization algorithm to calculate the shortest data transmission link:
[0068] When the blood ejection behavior of horned lizard individuals is simulated in the improved horned lizard optimization algorithm for searching, the moving step factor of the optimal solution direction and random direction is dynamically adjusted based on the number of iterations to enhance the global exploration ability in the early stage of the search and the local search ability in the later stage of the search, so that the improved horned lizard optimization algorithm converges quickly;
[0069] When searching for the skin color change behavior of horned lizard individuals in the improved horned lizard optimization algorithm, the position of the horned lizard individuals is updated by adjusting the parameters that characterize the rate or level of the melanocyte stimulating hormone (MSH) to improve the ability to respond quickly to environmental changes. At the same time, it avoids repeated searches in the search space that has already been searched, so that the improved horned lizard optimization algorithm converges quickly.
[0070] Preferably, each routing node in the distributed routing system uses a link state routing algorithm to calculate the shortest data transmission link from itself to the host computer, including:
[0071] S1. The routing node actively tests the link status between itself and the surrounding routing nodes, determines its own neighbor routing nodes, and collects link status information between itself and each neighbor routing node;
[0072] S2, the routing node encapsulates the collected link state information into a link state packet LSP, and uses the flooding method to broadcast the link state packet LSP to other routing nodes in the distributed routing system;
[0073] S3, each routing node receives the link state packet LSP sent by other routing nodes, stores it in the local network structure topology map, and updates the network structure topology map in real time;
[0074] S4, each routing node uses the improved horned lizard optimization algorithm to calculate the shortest data transmission link from itself to the host computer, and generates a corresponding routing table according to the calculation result;
[0075] S5. The routing node continuously monitors the link status between itself and each neighbor routing node, and when it detects a change in the link status or receives abnormal operation status information sent from other routing nodes, it repeats S1 to S4 to recalculate the shortest data transmission link.
[0076] (III) Beneficial effects
[0077] Compared with the prior art, the environmental monitoring method and system for Stropharia officinalis cultivation provided by the present invention has the following beneficial effects:
[0078] 1) Each routing node in the distributed routing system uses a link state routing algorithm to calculate the shortest data transmission link from itself to the host computer. The link state routing algorithm uses an improved horned lizard optimization algorithm to calculate the shortest data transmission link. When the improved horned lizard optimization algorithm simulates the blood ejection behavior of the horned lizard individual for search, the moving step factor of the optimal solution direction and the random direction is dynamically adjusted based on the number of iterations to enhance the global exploration ability in the early stage of the search and enhance the local search ability in the later stage of the search, so that the improved horned lizard optimization algorithm converges quickly; at the same time, when the improved horned lizard optimization algorithm simulates the skin color change behavior of the horned lizard individual for search, the position of the horned lizard individual is updated by adjusting the parameters that characterize the rate or level of the melanocyte stimulating hormone MSH, so as to improve the ability to respond quickly to environmental changes, and avoid repeated searches in the search space that has been searched, so that the improved horned lizard optimization algorithm converges quickly, so that the shortest data transmission link of each routing node can be accurately and quickly constructed;
[0079] 2) Each routing node in the distributed routing system determines whether it is in an abnormal operating state by calculating the operating status value in real time, and broadcasts the abnormal operating status information to the distributed routing system when it is in an abnormal operating state, so that other routing nodes can recalculate the shortest data transmission link, ensuring that the distributed routing system maintains an efficient working state, so that the host computer can perform data analysis and cultivation equipment control in a timely manner, which helps to quickly discover and regulate adverse environmental factors and provide the best growth conditions for Stropharia rugosa. BRIEF DESCRIPTION OF THE DRAWINGS
[0080] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0081] Figure 1 It is a schematic diagram of the process of the present invention;
[0082] Figure 2 The figure is a flow chart of the routing node in the present invention using the link state routing algorithm to calculate the shortest data transmission link from itself to the host computer. DETAILED DESCRIPTION
[0083] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution 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 part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0084] A method for environmental monitoring of Stropharia officinalis cultivation, such as Figure 1 As shown, sensor equipment and image acquisition equipment are used to collect cultivation environment elements in real time, and the collected data are uploaded to the host computer with the shortest data transmission link through the distributed routing system of the self-organizing network, and the host computer performs data analysis and cultivation equipment control;
[0085] Each routing node in the distributed routing system uses a link state routing algorithm to calculate the shortest data transmission link from itself to the host computer. At the same time, each routing node in the distributed routing system determines whether it is in an abnormal operation state by calculating the operation state value in real time, and broadcasts the abnormal operation state information to the distributed routing system when it is in an abnormal operation state, so that other routing nodes recalculate the shortest data transmission link;
[0086] Among them, the link state routing algorithm uses the improved horned lizard optimization algorithm to calculate the shortest data transmission link:
[0087] When the blood ejection behavior of horned lizard individuals is simulated in the improved horned lizard optimization algorithm for searching, the moving step factor of the optimal solution direction and random direction is dynamically adjusted based on the number of iterations to enhance the global exploration ability in the early stage of the search and the local search ability in the later stage of the search, so that the improved horned lizard optimization algorithm converges quickly;
[0088] When searching for the skin color change behavior of horned lizard individuals in the improved horned lizard optimization algorithm, the position of the horned lizard individuals is updated by adjusting the parameters that characterize the rate or level of the melanocyte stimulating hormone (MSH) to improve the ability to respond quickly to environmental changes. At the same time, it avoids repeated searches in the search space that has already been searched, so that the improved horned lizard optimization algorithm converges quickly.
[0089] Each routing node in the distributed routing system determines whether it is in an abnormal operating state by calculating the operating state value in real time, and broadcasts the abnormal operating state information to the distributed routing system when it is in an abnormal operating state, so that other routing nodes recalculate the shortest data transmission link, including:
[0090] Each routing node in the distributed routing system uses the following formula to calculate the running status value in real time:
[0091] S(t)=f1(PLR)+f2(PLR,DTR,HS);
[0092] Among them, S(t) is the running status value at time t, PLR represents packet loss rate, PLR' represents standard packet loss rate, DTR represents transmission rate, DTR' represents standard transmission rate, HS represents hardware status, ω1, ω2, ω3 are the weights of packet loss rate, transmission rate, and hardware status respectively;
[0093] When the operation status value of a routing node is greater than a preset threshold for p consecutive moments, the routing node is in an abnormal operation state, and stops working after broadcasting the abnormal operation status information to the distributed routing system, so that other routing nodes in the distributed routing system recalculate the shortest data transmission link.
[0094] In the above technical solution, each routing node in the distributed routing system determines whether it is in an abnormal operating state by calculating the operating state value in real time, and broadcasts the abnormal operating state information to the distributed routing system when it is in an abnormal operating state, so that other routing nodes recalculate the shortest data transmission link, ensuring that the distributed routing system maintains an efficient working state, so that the host computer can perform data analysis and cultivation equipment control in a timely manner, which is helpful to quickly discover and regulate adverse environmental factors and provide the best growth conditions for Stropharia rugosa.
[0095] like Figure 2 As shown in the figure, each routing node in the distributed routing system uses a link state routing algorithm to calculate the shortest data transmission link from itself to the host computer, including:
[0096] S1. The routing node actively tests the link status between itself and the surrounding routing nodes, determines its own neighbor routing nodes, and collects link status information between itself and each neighbor routing node;
[0097] S2, the routing node encapsulates the collected link state information into a link state packet LSP, and uses the flooding method to broadcast the link state packet LSP to other routing nodes in the distributed routing system;
[0098] S3, each routing node receives the link state packet LSP sent by other routing nodes, stores it in the local network structure topology map, and updates the network structure topology map in real time;
[0099] S4, each routing node uses the improved horned lizard optimization algorithm to calculate the shortest data transmission link from itself to the host computer, and generates a corresponding routing table according to the calculation result;
[0100] S5. The routing node continuously monitors the link status between itself and each neighbor routing node, and when it detects a change in the link status or receives abnormal operation status information sent from other routing nodes, it repeats S1 to S4 to recalculate the shortest data transmission link.
[0101] Specifically, each routing node in S4 uses the improved horned lizard optimization algorithm to calculate the shortest data transmission link from itself to the host computer, and generates a corresponding routing table based on the calculation results, including:
[0102] S41, initializing parameters and randomly generating an initial population of a certain size in the search space, wherein each horned lizard individual in the initial population represents a potential solution;
[0103] S42. In each iteration, the position of the individual horned lizard is updated by simulating various behaviors of the individual horned lizard to optimize the quality of the solution;
[0104] S43, using the fitness function to evaluate each horned lizard individual and calculate the corresponding fitness value;
[0105] S44, record and update the global optimal solution;
[0106] S45. Determine whether the iteration termination condition is met. If the iteration termination condition is not met, return to S42. Otherwise, use the current global optimal solution as the shortest data transmission link.
[0107] 1) In each iteration of S42, the position of the individual horned lizard is updated by simulating various behaviors of the individual horned lizard to optimize the quality of the solution, including:
[0108] In the local search phase, the position of the individual horned lizard is updated by simulating the hiding behavior of the individual horned lizard:
[0109] X k+1 =X k +α*(X best -X k )+β*r1*(X ub -X lb );
[0110] Among them, X k is the position of the horned lizard individual at the kth iteration, X k+1 is the position of the horned lizard individual at the k+1th iteration, X best is the current optimal solution, X ub , X lb are the upper and lower bounds of the search space respectively, α is the learning factor, β is the exploration factor, r1 is a random number, r1∈[0,1].
[0111] 2) In each iteration of S42, the position of the individual horned lizard is updated by simulating various behaviors of the individual horned lizard to optimize the quality of the solution, including:
[0112] In the global exploration stage, the behavior of horned lizards spraying blood from their eyes to scare off predators when encountering threats is simulated, so that when the horned lizards are trapped in the local optimum, they can make large changes in position to jump out of the local optimum.
[0113] When simulating the blood ejection behavior of individual horned lizards for search, the optimal solution direction and the moving step factor of the random direction are dynamically adjusted based on the number of iterations to enhance the global exploration ability in the early stage of the search and the local search ability in the later stage of the search, so that the improved horned lizard optimization algorithm converges quickly, including:
[0114] S4211. Dynamically adjust the optimal solution direction and the moving step factor of the random direction based on the number of iterations:
[0115] a(k)=a1*(a2-a1) k / K ;
[0116] b(k)=b1*(b2-b1) k / K ;
[0117] Among them, a(k) is the moving step factor in the direction of the optimal solution at the kth iteration, a1 is the initial value of the moving step factor in the direction of the optimal solution, which is set larger in the early stage of the search to enhance the global exploration ability, and a2 is the final value of the moving step factor in the direction of the optimal solution, which is set smaller in the later stage of the search to enhance the local search ability;
[0118] b(k) is the moving step factor of the random direction at the kth iteration, b1 is the initial value of the moving step factor of the random direction, which is set larger in the early stage of the search to enhance the global exploration ability, b2 is the final value of the moving step factor of the random direction, which is set smaller in the later stage of the search to enhance the local search ability, k is the current iteration number, and K is the maximum iteration number;
[0119] S4212. Calculate the optimal solution direction and the moving step length in the random direction:
[0120] s best (k) = a(k)*r2*X best -X k2 ;
[0121] s random (k) = b(k)*r3*(X ub -X lb ) dim ;
[0122] Among them, s best(k) is the moving step length in the direction of the optimal solution at the kth iteration, X best -X k2 is the current optimal solution X best and the current horned lizard individual position X k The Euclidean distance between random (k) is the moving step length in the random direction at the kth iteration, (X ub -X lb ) dim is the range size of the search space in the dimth dimension, r2 and r3 are both random numbers, r2, r3∈[0,1];
[0123] S4213. According to the optimal solution direction and the moving step length in the random direction, the position of the horned lizard individual is updated by simulating the blood ejection behavior of the horned lizard individual:
[0124] X k+1 =X k +γ*(r4 κ *u best *s best (k)+r5*u random *s random (k));
[0125] Among them, u best Pointing to the current optimal solution X best The unit vector of the direction, u random is a random vector pointing in a random direction, X j1 , X j2 are the positions of two random points j1 and j2 in the search space, r4 and r5 are random numbers, r4, r5∈[0,1], γ is the adjustment factor, and κ is the tendency factor.
[0126] 3) In each iteration of S42, the position of the individual horned lizard is updated by simulating various behaviors of the individual horned lizard to optimize the quality of the solution, including:
[0127] In the global exploration phase, the position of the individual horned lizard is updated by simulating the behavior of the individual horned lizard in adjusting its skin color according to environmental changes;
[0128] When simulating the skin color change behavior of horned lizards for searching, the position of horned lizards is updated by adjusting the parameters that characterize the rate or level of melanocyte stimulating hormone (MSH) to improve the ability to respond quickly to environmental changes. At the same time, it avoids repeated searches in the search space that has already been searched, so that the improved horned lizard optimization algorithm converges quickly. Specifically, it includes:
[0129] S4221, simulating the perception of the surrounding environment by the horned lizard individual, and calculating the environmental factor E according to the current environmental conditions;
[0130] S4222. Determine the skin color change according to the environmental factor E. If the environmental factor E indicates that the skin has darkened, adjust the skin color brightness using the following formula:
[0131] B'=B-λ1*(BB min );
[0132] Among them, B is the current skin color brightness parameter, B' is the adjusted skin color brightness parameter, and B min is the darkest skin color brightness parameter, λ1 is the darkening adjustment factor, which is a parameter that characterizes the rate or level of melanocyte stimulating hormone MSH, λ1=F1(f,E,T), F1(●) is a function that calculates the darkening adjustment factor λ1 according to the fitness value f of the horned lizard individual, the environmental factor E and the time factor T;
[0133] S4223. If the environmental factor E indicates that the skin is brightening, the following formula is used to adjust the skin color brightness:
[0134] B'=B+λ2*(B max -B);
[0135] Among them, B max is the brightness parameter of the brightest skin color, λ2 is the lightening adjustment factor, which is a parameter that characterizes the rate or level of the melanocyte stimulating hormone MSH, λ2=F2(f,E,T), F2(·) is a function that calculates the lightening adjustment factor λ2 based on the fitness value f of the horned lizard individual, the environmental factor E and the time factor T.
[0136] 4) In each iteration of S42, the position of the individual horned lizard is updated by simulating various behaviors of the individual horned lizard to optimize the quality of the solution, including:
[0137] In the global exploration phase, the position of the horned lizard individual is updated by simulating the behavior of the horned lizard individual moving and escaping when encountering a predator:
[0138] X k+1 =X k +τ*(X ub -X lb );
[0139] Among them, τ is the step size adjustment factor.
[0140] In the above technical solution, each routing node in the distributed routing system uses a link state routing algorithm to calculate the shortest data transmission link from itself to the host computer. The improved horned lizard optimization algorithm is used in the link state routing algorithm to calculate the shortest data transmission link. When the improved horned lizard optimization algorithm simulates the blood ejection behavior of the horned lizard individual for search, the moving step factor of the optimal solution direction and the random direction is dynamically adjusted based on the number of iterations to enhance the global exploration ability in the early stage of the search and enhance the local search ability in the later stage of the search, so that the improved horned lizard optimization algorithm converges quickly; at the same time, when the improved horned lizard optimization algorithm simulates the skin color change behavior of the horned lizard individual for search, the position of the horned lizard individual is updated by adjusting the parameters that characterize the rate or level of the melanocyte stimulating hormone MSH, so as to improve the ability to respond quickly to environmental changes, and avoid repeated searches in the search space that has been searched, so that the improved horned lizard optimization algorithm converges quickly, so that the shortest data transmission link of each routing node can be accurately and quickly constructed.
[0141] In the technical solution of the present application, on the basis of disclosing the above-mentioned environmental monitoring method for the cultivation of Stropharia officinalis, an environmental monitoring system for the cultivation of Stropharia officinalis is also disclosed, including a sensor device, an image acquisition device, a distributed routing system and a host computer;
[0142] Sensor equipment and image acquisition equipment for real-time acquisition of cultivation environment elements;
[0143] The distributed routing system is composed of a plurality of distributed routing nodes, and is used to upload the collected data to the host computer via the shortest data transmission link. Each routing node in the distributed routing system uses a link state routing algorithm to calculate the shortest data transmission link from itself to the host computer. At the same time, each routing node in the distributed routing system determines whether it is in an abnormal operation state by calculating the operation state value in real time, and broadcasts the abnormal operation state information to the distributed routing system when it is in an abnormal operation state, so that other routing nodes recalculate the shortest data transmission link.
[0144] The host computer is used to receive the collected data transmitted by the distributed routing system and perform data analysis and cultivation equipment control;
[0145] Among them, the link state routing algorithm uses the improved horned lizard optimization algorithm to calculate the shortest data transmission link:
[0146] When the blood ejection behavior of horned lizard individuals is simulated in the improved horned lizard optimization algorithm for searching, the moving step factor of the optimal solution direction and random direction is dynamically adjusted based on the number of iterations to enhance the global exploration ability in the early stage of the search and the local search ability in the later stage of the search, so that the improved horned lizard optimization algorithm converges quickly;
[0147] When searching for the skin color change behavior of horned lizard individuals in the improved horned lizard optimization algorithm, the position of the horned lizard individuals is updated by adjusting the parameters that characterize the rate or level of the melanocyte stimulating hormone (MSH) to improve the ability to respond quickly to environmental changes. At the same time, it avoids repeated searches in the search space that has already been searched, so that the improved horned lizard optimization algorithm converges quickly.
[0148] Specifically, each routing node in the distributed routing system uses a link state routing algorithm to calculate the shortest data transmission link from itself to the host computer, including:
[0149] S1. The routing node actively tests the link status between itself and the surrounding routing nodes, determines its own neighbor routing nodes, and collects link status information between itself and each neighbor routing node;
[0150] S2, the routing node encapsulates the collected link state information into a link state packet LSP, and uses the flooding method to broadcast the link state packet LSP to other routing nodes in the distributed routing system;
[0151] S3, each routing node receives the link state packet LSP sent by other routing nodes, stores it in the local network structure topology map, and updates the network structure topology map in real time;
[0152] S4, each routing node uses the improved horned lizard optimization algorithm to calculate the shortest data transmission link from itself to the host computer, and generates a corresponding routing table according to the calculation result;
[0153] S5. The routing node continuously monitors the link status between itself and each neighbor routing node, and when it detects a change in the link status or receives abnormal operation status information sent from other routing nodes, it repeats S1 to S4 to recalculate the shortest data transmission link.
[0154] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements will not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for environmental monitoring of Stropharia officinalis cultivation, characterized in that: Use sensor equipment and image acquisition equipment to collect cultivation environment elements in real time, and upload the collected data to the host computer with the shortest data transmission link through the distributed routing system of the self-organizing network, and the host computer will perform data analysis and cultivation equipment control; Each routing node in the distributed routing system uses a link state routing algorithm to calculate the shortest data transmission link from itself to the host computer. At the same time, each routing node in the distributed routing system determines whether it is in an abnormal operation state by calculating the operation state value in real time, and broadcasts the abnormal operation state information to the distributed routing system when it is in an abnormal operation state, so that other routing nodes recalculate the shortest data transmission link; Among them, the link state routing algorithm uses the improved horned lizard optimization algorithm to calculate the shortest data transmission link: When the blood ejection behavior of horned lizard individuals is simulated in the improved horned lizard optimization algorithm for searching, the moving step factor of the optimal solution direction and random direction is dynamically adjusted based on the number of iterations to enhance the global exploration ability in the early stage of the search and the local search ability in the later stage of the search, so that the improved horned lizard optimization algorithm converges quickly; When searching for the skin color change behavior of horned lizard individuals in the improved horned lizard optimization algorithm, the position of the horned lizard individuals is updated by adjusting the parameters that characterize the rate or level of the melanocyte stimulating hormone (MSH) to improve the ability to respond quickly to environmental changes. At the same time, it avoids repeated searches in the search space that has already been searched, so that the improved horned lizard optimization algorithm converges quickly.
2. The environmental monitoring method for cultivation of Stropharia rugosa according to claim 1, characterized in that: Each routing node in the distributed routing system uses a link state routing algorithm to calculate the shortest data transmission link from itself to the host computer, including: S1. The routing node actively tests the link status between itself and the surrounding routing nodes, determines its own neighbor routing nodes, and collects link status information between itself and each neighbor routing node; S2, the routing node encapsulates the collected link state information into a link state packet LSP, and uses the flooding method to broadcast the link state packet LSP to other routing nodes in the distributed routing system; S3, each routing node receives the link state packet LSP sent by other routing nodes, stores it in the local network structure topology map, and updates the network structure topology map in real time; S4, each routing node uses the improved horned lizard optimization algorithm to calculate the shortest data transmission link from itself to the host computer, and generates a corresponding routing table according to the calculation result; S5. The routing node continuously monitors the link status between itself and each neighbor routing node, and when it detects a change in the link status or receives abnormal operation status information sent from other routing nodes, it repeats S1 to S4 to recalculate the shortest data transmission link.
3. The environmental monitoring method for cultivation of Stropharia rugosa according to claim 2, characterized in that: Each routing node in S4 uses the improved horned lizard optimization algorithm to calculate the shortest data transmission link from itself to the host computer, and generates a corresponding routing table based on the calculation results, including: S41, initializing parameters and randomly generating an initial population of a certain size in the search space, wherein each horned lizard individual in the initial population represents a potential solution; S42. In each iteration, the position of the individual horned lizard is updated by simulating various behaviors of the individual horned lizard to optimize the quality of the solution; S43, using the fitness function to evaluate each horned lizard individual and calculate the corresponding fitness value; S44, record and update the global optimal solution; S45. Determine whether the iteration termination condition is met. If the iteration termination condition is not met, return to S42. Otherwise, use the current global optimal solution as the shortest data transmission link.
4. The environmental monitoring method for cultivation of Stropharia rugosa according to claim 3, characterized in that: In each iteration of S42, the positions of individual horned lizards are updated by simulating various behaviors of individual horned lizards to optimize the quality of the solution, including: In the local search phase, the position of the individual horned lizard is updated by simulating the hiding behavior of the individual horned lizard: X k+1 =X k +α*(X best -X k )+β*r1*(X ub -X lb ); Among them, X k is the position of the horned lizard individual at the kth iteration, X k+1 is the position of the horned lizard individual at the k+1th iteration, X best is the current optimal solution, X ub , X lb are the upper and lower bounds of the search space respectively, α is the learning factor, β is the exploration factor, r1 is a random number, r1∈[0,1].
5. The environmental monitoring method for cultivation of Stropharia rugosa according to claim 4, characterized in that: In each iteration of S42, the positions of individual horned lizards are updated by simulating various behaviors of individual horned lizards to optimize the quality of the solution, including: In the global exploration stage, the behavior of horned lizards spraying blood from their eyes to scare off predators when encountering threats is simulated, so that when the horned lizards are trapped in the local optimum, they can make large changes in position to jump out of the local optimum. When simulating the blood ejection behavior of individual horned lizards for search, the optimal solution direction and the moving step factor of the random direction are dynamically adjusted based on the number of iterations to enhance the global exploration ability in the early stage of the search and the local search ability in the later stage of the search, so that the improved horned lizard optimization algorithm converges quickly, including: S4211. Dynamically adjust the optimal solution direction and the moving step factor of the random direction based on the number of iterations: <h2 style=";text-align:left;direction:ltr">a(k) = a1*(a2-a1)<h2 style=";text-align:left;direction:ltr"> k / K <h2 style=";text-align:left;direction:ltr"> ; b(k)=b1*(b2-b1) k / K ; Among them, a(k) is the moving step factor in the direction of the optimal solution at the kth iteration, a1 is the initial value of the moving step factor in the direction of the optimal solution, which is set larger in the early stage of the search to enhance the global exploration ability, and a2 is the final value of the moving step factor in the direction of the optimal solution, which is set smaller in the later stage of the search to enhance the local search ability; b(k) is the moving step factor of the random direction at the kth iteration, b1 is the initial value of the moving step factor of the random direction, which is set larger in the early stage of the search to enhance the global exploration ability, b2 is the final value of the moving step factor of the random direction, which is set smaller in the later stage of the search to enhance the local search ability, k is the current iteration number, and K is the maximum iteration number; S4212. Calculate the optimal solution direction and the moving step length in the random direction: s best (k)=a(k)*r2*||X best -X k ||2; s random (k)=b(k)*r3*(X ub -X lb ) dim ; Among them, s best (k) is the moving step in the direction of the optimal solution at the kth iteration, ||X best -X k ||2 is the current optimal solution X best and the current horned lizard individual position X k The Euclidean distance between random (k) is the moving step length in the random direction at the kth iteration, (X ub -X lb ) dim is the range size of the search space in the dimth dimension, r2 and r3 are both random numbers, r2, r3∈[0,1]; S4213. According to the optimal solution direction and the moving step length in the random direction, the position of the horned lizard individual is updated by simulating the blood ejection behavior of the horned lizard individual: X k+1 =X k +γ*(r4 κ *u best *s best (k)+r5*u random *s random (k)); Among them, u best Pointing to the current optimal solution X best The unit vector of the direction, u random is a random vector pointing in a random direction, X j1 , X j2 are the positions of two random points j1 and j2 in the search space, r4 and r5 are random numbers, r4, r5∈[0,1], γ is the adjustment factor, and κ is the tendency factor.
6. The environmental monitoring method for cultivation of Stropharia rugosa according to claim 4, characterized in that: In each iteration of S42, the positions of individual horned lizards are updated by simulating various behaviors of individual horned lizards to optimize the quality of the solution, including: In the global exploration phase, the position of the individual horned lizard is updated by simulating the behavior of the individual horned lizard in adjusting its skin color according to environmental changes; When simulating the skin color change behavior of horned lizards for searching, the position of horned lizards is updated by adjusting the parameters that characterize the rate or level of melanocyte stimulating hormone (MSH) to improve the ability to respond quickly to environmental changes. At the same time, it avoids repeated searches in the search space that has already been searched, so that the improved horned lizard optimization algorithm converges quickly. Specifically, it includes: S4221, simulating the perception of the surrounding environment by the horned lizard individual, and calculating the environmental factor E according to the current environmental conditions; S4222. Determine the skin color change according to the environmental factor E. If the environmental factor E indicates that the skin has darkened, adjust the skin color brightness using the following formula: B'=B-λ1*(B-B min ); Among them, B is the current skin color brightness parameter, B' is the adjusted skin color brightness parameter, and B min is the darkest skin color brightness parameter, λ1 is the darkening adjustment factor, which is a parameter that characterizes the rate or level of melanocyte stimulating hormone MSH, λ1=F1(f,E,T), F1(·) is a function that calculates the darkening adjustment factor λ1 according to the fitness value f of the horned lizard individual, the environmental factor E and the time factor T; S4223. If the environmental factor E indicates that the skin is brightening, the following formula is used to adjust the skin color brightness: B'=B+λ2*(B max -B); Among them, B max is the brightness parameter of the brightest skin color, λ2 is the lightening adjustment factor, which is a parameter that characterizes the rate or level of the melanocyte stimulating hormone MSH, λ2=F2(f,E,T), F2(·) is a function that calculates the lightening adjustment factor λ2 based on the fitness value f of the horned lizard individual, the environmental factor E and the time factor T.
7. The environmental monitoring method for cultivation of Stropharia rugosa according to claim 4, characterized in that: In each iteration of S42, the positions of individual horned lizards are updated by simulating various behaviors of individual horned lizards to optimize the quality of the solution, including: In the global exploration phase, the position of the individual horned lizard is updated by simulating the behavior of the individual horned lizard moving and escaping when encountering a predator: X k+1 =X k +τ*(X ub -X lb ); Among them, τ is the step size adjustment factor.
8. The environmental monitoring method for cultivation of Stropharia rugosa according to claim 2, characterized in that: Each routing node in the distributed routing system determines whether it is in an abnormal operating state by calculating the operating state value in real time, and broadcasts abnormal operating state information to the distributed routing system when it is in an abnormal operating state, so that other routing nodes recalculate the shortest data transmission link, including: Each routing node in the distributed routing system uses the following formula to calculate the running status value in real time: S(t)=f1(PLR)+f2(PLR,DTR,HS); Among them, S(t) is the running status value at time t, PLR represents packet loss rate, PLR' represents standard packet loss rate, DTR represents transmission rate, DTR' represents standard transmission rate, HS represents hardware status, ω1, ω2, ω3 are the weights of packet loss rate, transmission rate, and hardware status respectively; When the operation status value of a routing node is greater than a preset threshold for p consecutive moments, the routing node is in an abnormal operation state, and stops working after broadcasting the abnormal operation status information to the distributed routing system, so that other routing nodes in the distributed routing system recalculate the shortest data transmission link.
9. An environmental monitoring system for cultivation of Stropharia rugosa, used for executing the environmental monitoring method for cultivation of Stropharia rugosa according to claim 1, characterized in that: Including sensor equipment, image acquisition equipment, distributed routing system and host computer; Sensor equipment and image acquisition equipment for real-time acquisition of cultivation environment elements; The distributed routing system is composed of a plurality of distributed routing nodes, and is used to upload the collected data to the host computer via the shortest data transmission link. Each routing node in the distributed routing system uses a link state routing algorithm to calculate the shortest data transmission link from itself to the host computer. At the same time, each routing node in the distributed routing system determines whether it is in an abnormal operation state by calculating the operation state value in real time, and broadcasts the abnormal operation state information to the distributed routing system when it is in an abnormal operation state, so that other routing nodes recalculate the shortest data transmission link. The host computer is used to receive the collected data transmitted by the distributed routing system and perform data analysis and cultivation equipment control; Among them, the link state routing algorithm uses the improved horned lizard optimization algorithm to calculate the shortest data transmission link: When the blood ejection behavior of horned lizard individuals is simulated in the improved horned lizard optimization algorithm for searching, the moving step factor of the optimal solution direction and random direction is dynamically adjusted based on the number of iterations to enhance the global exploration ability in the early stage of the search and the local search ability in the later stage of the search, so that the improved horned lizard optimization algorithm converges quickly; When searching for the skin color change behavior of horned lizard individuals in the improved horned lizard optimization algorithm, the position of the horned lizard individuals is updated by adjusting the parameters that characterize the rate or level of the melanocyte stimulating hormone (MSH) to improve the ability to respond quickly to environmental changes. At the same time, it avoids repeated searches in the search space that has already been searched, so that the improved horned lizard optimization algorithm converges quickly.
10. The environmental monitoring system for cultivation of Stropharia officinalis according to claim 9, characterized in that: Each routing node in the distributed routing system uses a link state routing algorithm to calculate the shortest data transmission link from itself to the host computer, including: S1. The routing node actively tests the link status between itself and the surrounding routing nodes, determines its own neighbor routing nodes, and collects link status information between itself and each neighbor routing node; S2, the routing node encapsulates the collected link state information into a link state packet LSP, and uses the flooding method to broadcast the link state packet LSP to other routing nodes in the distributed routing system; S3, each routing node receives the link state packet LSP sent by other routing nodes, stores it in the local network structure topology map, and updates the network structure topology map in real time; S4, each routing node uses the improved horned lizard optimization algorithm to calculate the shortest data transmission link from itself to the host computer, and generates a corresponding routing table according to the calculation result; S5. The routing node continuously monitors the link status between itself and each neighbor routing node, and when it detects a change in the link status or receives abnormal operation status information sent from other routing nodes, it repeats S1 to S4 to recalculate the shortest data transmission link.
Citation Information
Cited By
Meteorological data transmission method based on quantum key encryption
CN122226280A
