Earth and rockfill dam termite distribution dynamic management method based on reinforcement learning and neural network
By introducing reinforcement learning and neural network technology in the management of termites in the earth and stone dam, accurate prediction and management of termite distribution dynamics are achieved, and the problem of insufficient monitoring and management in traditional methods is solved, and management efficiency and automation are improved.
Patent Information
- Application Number
- CN202510211954.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-25
- Publication Date
- 2025-06-10
AI Technical Summary
Traditional soil and rock dam termite management methods lack timely and accurately monitoring and prediction, and the management is not comprehensive and continuous enough.
The dynamic management method of termite distribution of earth and rock dams based on reinforcement learning and neural network is adopted to identify termite species through multi-layer perceptual neural network, use infrared or thermal imaging technology to detect termite number, and use deep Q network reinforcement learning model to construct the dynamic relationship between environmental characteristics and termite number and species, and optimize termite distribution strategy.
Accurate prediction of termite distribution dynamics in earth-rock dams, timely discover abnormal situations, improve the degree of automation of management, reduce labor costs, and be able to respond to changes in termite activities in real time and take targeted measures.
Smart Images

Figure CN120125899A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of dynamic prediction and management of termites in earth-rock dams, and particularly to a dynamic management method for termite distribution in earth-rock dams based on reinforcement learning and neural networks. Background Art
[0002] There are some limitations in traditional termite management methods for earth-rock dams. Traditional methods often rely on manual observation and empirical judgment, lacking timely and accurate monitoring and prediction of the activities of termites in earth-rock dams.
[0003] Moreover, traditional methods usually can only manage specific time periods or specific areas, lacking comprehensiveness and continuity. Summary of the Invention
[0004] This application aims to solve at least one of the technical problems in the related art to some extent.
[0005] To this end, the first object of this application is to propose a dynamic management method for termite distribution in earth-rock dams based on reinforcement learning and neural networks. By introducing the reinforcement learning algorithm and neural network model, the limitations of traditional methods are overcome. The reinforcement learning algorithm can learn through interaction with the environment to achieve accurate prediction of the dynamic distribution of termites in earth-rock dams, so as to timely detect abnormal situations and take corresponding measures.
[0006] The second object of this application is to propose a dynamic management device for termite distribution in earth-rock dams based on reinforcement learning and neural networks.
[0007] The third object of this application is to propose an electronic device.
[0008] The fourth object of this application is to propose a computer-readable storage medium.
[0009] The fifth object of this application is to propose a computer program product.
[0010] To achieve the above object, the first aspect embodiment of this application proposes a dynamic management method for termite distribution in earth-rock dams based on reinforcement learning and neural networks, including:
[0011] According to the termite distribution, the initial area of the earth-rock dam is divided into multiple areas, and the environmental parameters in each area are obtained. The environmental parameters include humidity, temperature, light conditions, air pressure, soil material, soil pH value, groundwater level, and earth-rock dam material;
[0012] Based on the environmental parameters, the weighted Euclidean distance is used to re-divide each area, calculate the similarity between the environmental characteristics of each area and the central orientation, and divide the area according to the similarity;
[0013] In each divided area, identify the termite species through a multi-layer perceptron neural network, and use infrared or thermal imaging technology to detect the number of termites;
[0014] Based on the environmental parameters and the termite quantity and species data, utilize a deep Q-network reinforcement learning model to construct the dynamic relationship between the environmental characteristics and the termite quantity and species, and optimize the termite distribution strategy;
[0015] According to the optimization results of the deep Q-network reinforcement learning model, control the quantity and species distribution of termites by regulating the environmental parameters.
[0016] Optionally, obtain the environmental parameters in each area, including:
[0017] Set humidity sensors at different height positions, record the humidity values at each position and calculate their mean value. The calculation formula is:
[0018] S = mean(S a ,S b ,S c )
[0019] where mean represents the mean operation, S represents the final sensor humidity value, and S a ,S b ,S c represent the humidity values at different heights respectively;
[0020] Set temperature sensors to record the temperatures at four time periods in a day respectively, and form a temperature data list. The formula is:
[0021] T = {T 1 ,T 2 ,T 3 ,T 4}
[0022] where T 1 ,T 2 ,T 3 ,T 4 are the temperature values at different time periods respectively, and T is the temperature data list;
[0023] Set barometric pressure sensors to record the atmospheric pressures at four time periods in a day respectively, and form a barometric pressure data list. The formula is:
[0024] Q = {Q 1 ,Q 2 ,Q 3 ,Q 4}
[0025] where Q 1 ,Q 2 ,Q 3 ,Q4 They are the air pressure values for different time periods, and Q is the air pressure data list;
[0026] Based on the VGG16 model, visual features are extracted from the earth-rock dam image, and the visual features include brightness, color distribution, and shadow;
[0027] Survey lines and marking points are arranged in the area to be measured. According to the detection target and area, the ground-penetrating radar is in the parallel profile scanning mode. The earth-rock dam adaptive filter is used to remove noise and interference and convert the reflection time into depth information to generate a radar profile diagram, showing the layers and changes of the underground structure, and obtaining the soil material. The earth-rock dam adaptive filter is expressed as:
[0028]
[0029] where f k (x(n - k)) is the dynamic weight output by the deep learning model, corresponding to the order of the filter extracted from the input signal x(n - k), y(n) is the value of the filtered output signal at time point n, x(n - k) is the value of the input signal at time point n - k, and M is the order of the filter;
[0030] The soil pH value is measured by pH test paper to form a soil pH data list. The formula is:
[0031] P = {P1, P2, P3, P4, P5, P6, P7}
[0032] where P1, P2, P3, P4, P5, P6, P7 respectively represent the soil pH values at 7 azimuths in each area;
[0033] Record the types of earth-rock dam materials and their effects on termites to form a material data list. The formula is:
[0034] C = {C1, C2.C3.C4, C5, C6, C7}
[0035] where C1, C2.C3.C4, C5, C6, C7 respectively represent the earth-rock dam materials at 7 azimuths in each area;
[0036] The resistivity value of the measurement area is obtained through the earth-rock dam resistivity calculation formula, and the apparent resistivity is used to generate an underground resistivity structure diagram to obtain the underground water level. The earth-rock dam resistivity calculation formula is:
[0037]
[0038] where a is the electrode spacing, V is the voltage, and I is the current.
[0039] Optionally, based on the VGG16 model, visual features are extracted from the earth-rock dam image, including:
[0040] Preprocess the original earth-rock dam image, and the preprocessing steps include denoising, grayscale conversion, and image scaling;
[0041] By loading the VGG16 model, extract features from the preprocessed earth-rock dam image, and the extracted features include edge features, texture features, high-level semantic features, and local features;
[0042] Based on the extracted features, obtain the brightness value of the lighting condition through the earth-rock dam adaptive brightness enhancement formula, obtain the color channel of the lighting condition through the earth-rock dam joint histogram formula, and obtain the shadow mask value of the lighting condition through the earth-rock dam adaptive threshold formula; among them, the earth-rock dam adaptive brightness enhancement formula is:
[0043]
[0044] Among them, (x, y) represents the pixel position in the image, L(x, y) represents the brightness value, Ω(x, y) represents the neighborhood around (x, y), represents the local window area; N represents the total number of pixels in the neighborhood Ω(x, y), represents the number of pixels in the local neighborhood; I(i, j) represents the pixel value at position (i, j), represents the grayscale value of the image; w(i, j) represents the weight function;
[0045] The earth-rock dam joint histogram formula is:
[0046] H(l, c) = ∑ x,y δ(L(x, y) - l) * δ(C(x, y) - c)
[0047] Among them, H(l, c) represents the joint histogram of the brightness value l and the color channel value c, L(x, y) is the brightness value at position (x, y), represents the local brightness; C(x, y) is the color channel value at position (x, y), δ() represents the Dirac function, which returns 1 when the input value is 0 and returns 0 otherwise, and is used for statistical values;
[0048] The earth-rock dam adaptive threshold formula is:
[0049]
[0050] Among them, S(x, y) is the shadow mask value at position (x, y), represents the shadow detection result; G(x, y) is the gradient value at position (x, y), represents the image gradient value; T G is the adaptive threshold of the gradient, represents the gradient threshold; I gray is the grayscale image value at position (x, y), represents the brightness value of the grayscale image; T Lis the adaptive threshold of brightness, representing the brightness threshold.
[0051] Optionally, based on the environmental parameters, use the weighted Euclidean distance to re-divide each region, calculate the similarity between the environmental characteristics of each region and the central orientation, and divide the regions according to the similarity, including:
[0052] Define the environmental characteristics of each region through the environmental characteristic dataset {S, T, G, Q, D, P, H, C}, where S represents humidity, T represents temperature, G represents light condition, Q represents air pressure, D represents soil material, P represents soil pH, H represents groundwater level, and C represents earth-rock dam material;
[0053] Use the weighted Euclidean distance to calculate the environmental characteristics of each region and the environmental characteristics of the central orientation. The formula for the weighted Euclidean distance is:
[0054]
[0055] where d is the weighted Euclidean distance, x i y i are the i-th eigenvalue of the central region and the surrounding region respectively, σ i represents the standard deviation of the i-th feature, w i represents the weight of the i-th feature, and i represents humidity, temperature, light condition, air pressure, soil material, soil pH, groundwater level, and earth-rock dam material;
[0056] Evaluate the similarity between each region and the central orientation according to the calculated weighted Euclidean distance value. For the features with a weighted Euclidean distance less than the preset similarity threshold, divide them into the same region.
[0057] Optionally, the training process of the multi-layer perceptron neural network includes:
[0058] Collect and preprocess termite image data, where the image data contains different part features of termites, and the part features include head, mouthparts, body, and wings;
[0059] For each termite species, define its characteristic information and convert the characteristic information of each part into a numerical value recognizable by a computer;
[0060] Train through a multi-layer neural network, and use the labeled termite images and the corresponding species labels for iterative training, so that the neural network can extract the features of termite species from the input images and perform classification prediction. During the neural network training process, a weighted mean square error loss function is used for optimization. The formula for the loss function is:
[0061]
[0062] Among them, α represents the adjustment parameter for the variation range of the aerial weight; y i represents the true value, represents the predicted value, and n represents the total number of predicted categories.
[0063] Optionally, based on the environmental parameters and termite quantity and species data, using a deep Q-network reinforcement learning model, a dynamic relationship between environmental characteristics and termite quantity and species is constructed, and termite distribution strategy optimization is performed, including:
[0064] Define the environmental state space and construct environmental feature data s t ={S, T, G, Q, D, P, H, C}, and the environmental state consists of humidity, temperature, light conditions, air pressure, soil material, soil pH, groundwater level, and earth-rock dam material;
[0065] According to the dynamic distribution process of termites in the earth-rock dam, construct the action space b t , where b t ={B 1 , B 2}, B 1 , B 2 respectively represent the actions that are beneficial to termite survival and the actions that are not beneficial to termite survival;
[0066] Set the reward function r t to measure the effects of different action strategies, and the reward function is adjusted according to the change in the termite quantity at the current moment. Among them, the formula for the reward function r t is:
[0067] r t ={R 1 , R 2}
[0068] Among them:
[0069] R 1 =max(0, N t -N t-1 )
[0070] R 2 =max(N t-1 -N t , 0)
[0071] Among them, N t represents the termite quantity at the current moment, N t-1 represents the termite quantity at the previous moment, R 1 represents the reward for the increase in termite quantity, and R 2 represents the reward for the decrease in termite quantity;
[0072] Build a deep Q - network model, which estimates the Q - value of the state - action pair through a deep neural network. The Q - value represents the expected return of taking a certain action in a given state, and the formula is:
[0073] Q(s t ,b t )=Output(s t ,b t )
[0074] where s t represents various environmental parameters, and b t represents the parameter change of the action space;
[0075] Using the deep Q - network model, based on the current state s t , the action b t taken, and the reward r t generated, perform Q - value update. The Q - value update formula is:
[0076] Q new =Q(s t ,b t )+α*(r t +γmax(Q(s t+1 ,b t ))-Q(s t ,b t ))
[0077] where Q new represents the updated parameter value, Q(s t ,b t ) represents the current Q - value, s t represents the environmental feature data before taking the action, b t represents the action encoding number taken, r t represents the comprehensive reward value generated after taking the action, s t+1 represents the environmental feature data after taking the action, α is the learning rate, and γ is the discount factor;
[0078] Through multiple iterative trainings, adjust the environmental parameters and action strategies so that the deep Q - network model can learn the optimal termite distribution strategy.
[0079] To achieve the above - mentioned purpose, the second - aspect embodiment of this application proposes a dynamic management device for termite distribution in earth - rock dams based on reinforcement learning and neural networks, including:
[0080] An acquisition module, configured to divide the initial area of the earth - rock dam into multiple areas according to the termite distribution, and acquire the environmental parameters in each area. The environmental parameters include humidity, temperature, light conditions, air pressure, soil material, soil acidity - alkalinity, groundwater level, and earth - rock dam material;
[0081] A partitioning module, configured to re-partition each area based on the environmental parameters by using the weighted Euclidean distance, calculate the similarity between the environmental characteristics of each area and the central orientation, and partition the areas according to the similarity;
[0082] An identification and detection module, configured to identify termite species through a multi-layer perceptron neural network and detect the number of termites by using infrared or thermal imaging technology in each partitioned area;
[0083] An optimization module, configured to construct a dynamic relationship between environmental characteristics and the number and species of termites by using a deep Q-network reinforcement learning model based on the environmental parameters and the termite number and species data, and optimize the termite distribution strategy;
[0084] A regulation module, configured to control the number and species distribution of termites by regulating environmental parameters according to the optimization result of the deep Q-network reinforcement learning model.
[0085] To achieve the above object, an embodiment of the third aspect of the present application provides an electronic device, including: a processor, and a memory communicatively connected to the processor;
[0086] The memory stores computer-executable instructions;
[0087] The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of the above first aspects.
[0088] To achieve the above object, an embodiment of the fourth aspect of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored, and when the computer-executable instructions are executed by a processor, they are used to implement the method according to any one of the above first aspects.
[0089] To achieve the above object, an embodiment of the fifth aspect of the present application provides a computer program product, including a computer program, and when the computer program is executed by a processor, it implements the method according to any one of the above first aspects.
[0090] The technical solutions provided by the embodiments of the present application at least bring the following beneficial effects:
[0091] (1) Through the perception neural module and the reinforcement learning neural network, the present application can accurately classify and predict termites. In addition, the present invention uses sensor arrangement and intelligent trapping lights to record environmental parameters and termite behavior data, realizing automatic monitoring and control of termite activities. This degree of automation improves the efficiency of monitoring and reduces labor costs.
[0092] (2) This application can respond in real time to changes in termite activities and take targeted measures, such as changing lighting conditions, humidity, temperature, etc., to effectively control the number and range of activities of termites.
[0093] (3) By improving the Kmeans network and combining it with a prediction model, this application can optimize the area division, gather termites with similar behaviors, and thus better manage and control termite activities.
[0094] Additional aspects and advantages of this application will be given in part in the following description, will become apparent in part from the following description, or will be learned through the practice of this application. Brief Description of the Drawings
[0095] The above-mentioned and / or additional aspects and advantages of this application will become apparent and easy to understand from the following description of the embodiments in conjunction with the drawings, where:
[0096] Figure 1 is a schematic flow chart of a dynamic management method for termite distribution in an earth-rock dam based on reinforcement learning and neural network provided by an embodiment of this application;
[0097] Figure 2 is an initial area division diagram of a dynamic management method for termite distribution in an earth-rock dam based on reinforcement learning and neural network provided by an embodiment of this application.
[0098] Figure 3 is a humidity measurement diagram of a dynamic management method for termite distribution in an earth-rock dam based on reinforcement learning and neural network provided by an embodiment of this application.
[0099] Figure 4 is a lighting measurement diagram of a dynamic management method for termite distribution in an earth-rock dam based on reinforcement learning and neural network provided by an embodiment of this application.
[0100] Figure 5 is a soil geology diagram of a dynamic management method for termite distribution in an earth-rock dam based on reinforcement learning and neural network provided by an embodiment of this application.
[0101] Figure 6 is a water level depth diagram of a dynamic management method for termite distribution in an earth-rock dam based on reinforcement learning and neural network provided by an embodiment of this application.
[0102] Figure 7 is a diagram of re-divided areas of a dynamic management method for termite distribution in an earth-rock dam based on reinforcement learning and neural network provided by an embodiment of this application.
[0103] Figure 8 is a multi-layer perceptron network diagram of a dynamic management method for termite distribution in an earth-rock dam based on reinforcement learning and neural network provided by an embodiment of this application.
[0104] Figure 9 It is a termite species map of a dynamic management method for termite distribution in an earth-rock dam based on reinforcement learning and neural network provided by an embodiment of the present application.
[0105] Figure 10 It is a structure diagram of a reinforcement learning network of a dynamic management method for termite distribution in an earth-rock dam based on reinforcement learning and neural network provided by an embodiment of the present application.
[0106] Figure 11 It is a DQN structure diagram of a dynamic management method for termite distribution in an earth-rock dam based on reinforcement learning and neural network provided by an embodiment of the present application.
[0107] Figure 12 It is a schematic structural diagram of a device for dynamic management of termite distribution in an earth-rock dam based on reinforcement learning and neural network provided by an embodiment of the present application. Detailed implementation manners
[0108] The embodiments of the present application will be described in detail below. The examples of the embodiments are shown in the accompanying drawings, where the same or similar reference numerals denote the same or similar elements or elements with the same or similar functions throughout. The embodiments described below by referring to the accompanying drawings are exemplary and are intended to explain the present application, and should not be construed as a limitation to the present application.
[0109] Moreover, it should be understood that the following specific implementation manners are only used to illustrate the present invention and not to limit the scope of the present invention. It should be noted that the terms "front", "rear", "left", "right", "upper" and "lower" used in the following description refer to the directions in the accompanying drawings, and the terms "inner" and "outer" respectively refer to the directions towards or away from the geometric center of a specific component.
[0110] Figure 1 It is a schematic flow diagram of a dynamic management method for termite distribution in an earth-rock dam based on reinforcement learning and neural network provided by an embodiment of the present application. As Figure 1 shown, the method includes the following steps:
[0111] Step S1, according to the termite distribution, divide the initial area of the earth-rock dam into multiple areas, and obtain the environmental parameters in each area. The environmental parameters include humidity, temperature, light conditions, air pressure, soil material, soil pH value, groundwater level, and earth-rock dam material.
[0112] In a possible embodiment, divide the initial area into six areas ABCDEF as Figure 2 shown. Assume that the environmental parameters in each initial area are the same, and obtain the humidity, temperature, light conditions, air pressure, soil material, soil pH value, groundwater level, and earth-rock dam material at 7 azimuths in each area respectively.
[0113] In the embodiments of the present application, the environmental parameters in each area are obtained through the following steps specifically:
[0114] Step S11. In order to accurately measure the humidity value, considering the complexity of the terrain and environment of the earth-rock dam, sensors are set at different height positions in the embodiments of the present application, such as Figure 3 shown, record the humidity value at each position and calculate its average value. The calculation formula is:
[0115] S = mean(S a , S b , S c )
[0116] where mean represents the mean operation, taking the average value of the obtained numerical values; S represents the final sensor humidity value, and S a , S b , S c respectively represent the humidity values at different heights, that is, the humidity values at positions a, b, and c respectively.
[0117] Through such calculation, the influence brought by the height difference can be eliminated, and the average humidity level of the entire area can be better reflected.
[0118] Step S12. Set temperature sensors, record the temperatures at four time periods in a day respectively, and form a temperature data list. The formula is:
[0119] T = {T 1 , T 2 , T 3 , T 4}
[0120] where T 1 , T 2 , T 3 , T 4 are the temperature values at different time periods respectively, and T is the temperature data list.
[0121] In a possible embodiment, the temperature in a day can be roughly divided into 4 time periods, from 8:00 to 9:00 in the morning, from 12:00 to 14:00 at noon, from 17:00 to 19:00 in the afternoon, and from 0:00 to 2:00 in the early morning. The temperatures at these four time periods can be recorded respectively and form a data list. The present application does not make specific limitations on this.
[0122] Step S13. Set barometric pressure sensors, record the atmospheric pressures at four time periods in a day respectively, and form a barometric pressure data list.
[0123] It can be understood that affected by various factors, the atmospheric pressure values during a day are usually different. Generally in the morning, when the sun rises, the air pressure increases; at noon, the temperature is the highest and the atmospheric pressure is relatively low; in the afternoon, the atmospheric pressure may drop slightly; in the evening, when the sun sets, the atmospheric pressure may rise slightly. Therefore, it is necessary to sample the atmospheric pressure at 4 time periods and form a data table. The formula is:
[0124] Q = {Q 1 , Q 2 , Q 3 , Q 4}
[0125] Among them, Q 1 , Q 2 , Q 3 , Q 4 are the air pressure values at different time periods respectively, and Q is the air pressure data list;
[0126] Step S14, based on the VGG16 model, extract visual features from the earth-rock dam image. The visual features include brightness, color distribution, and shadow.
[0127] In the embodiment of the present application, rich visual features are extracted from the earth-rock dam image based on the VGG16 model, including information such as brightness, color distribution, and shadow.
[0128] First, preprocess the original image, including operations such as denoising, grayscaling, and image scaling, which helps to eliminate noise and highlight key features.
[0129] Then, by loading the VGG16 model and using the feature extraction ability of its convolutional neural network, extract features from the earth-rock dam image. The extracted features mainly include edge features, texture features, high-level semantic features, and local features, which help to detect the structural integrity, material uniformity, and overall shape of the earth-rock dam.
[0130] Next, calculate the brightness, extract the color histogram, and detect the shadow for the extracted features respectively. Obtain the brightness value of the illumination condition through the earth-rock dam adaptive brightness enhancement formula, obtain the color channel of the illumination condition through the earth-rock dam joint histogram formula, and obtain the shadow mask value of the illumination condition through the earth-rock dam adaptive threshold formula.
[0131] Specifically, the brightness calculation adopts an improved earth-rock dam adaptive brightness enhancement algorithm. By calculating the local brightness histogram, the brightness information is made more representative. The earth-rock dam adaptive brightness enhancement formula is:
[0132]
[0133] Among them, (x, y) represents the position of a pixel in the image, L(x, y) represents the brightness value, Ω(x, y) represents the neighborhood around (x, y), and represents the local window area; N represents the total number of pixels in the neighborhood Ω(x, y), representing the number of pixels in the local neighborhood; I(i, j) represents the pixel value at position (i, j), representing the gray value of the image; w(i, j) represents the weight function, taking into account the distance and pixel value difference, representing the weight of each pixel in the neighborhood.
[0134] The extraction of the color histogram is based on the scene requirements. This application proposes an improved joint histogram method for earth-rock dams, which combines brightness and color information to improve the accuracy of color distribution analysis. The joint histogram formula for earth-rock dams is:
[0135] H(l, c) = ∑ x,y δ(L(x, y) - l) * δ(C(x, y) - c)
[0136] Among them, H(l, c) represents the joint histogram of the brightness value l and the color channel value c, L(x, y) is the brightness value at position (x, y), representing the local brightness; C(x, y) is the color channel value at position (x, y), representing the color channel values (red, green, blue); δ() represents the Dirac function, which returns 1 when the input value is 0 and 0 otherwise, and is used for statistical values.
[0137] Shadow detection combines the gradient information and brightness value of the image, and generates a shadow mask through an improved adaptive threshold method for earth-rock dams. The adaptive threshold formula for earth-rock dams is:
[0138]
[0139] Among them, S(x, y) is the shadow mask value at position (x, y), representing the shadow detection result; G(x, y) is the gradient value at position (x, y), representing the image gradient value; T G is the adaptive threshold of the gradient, representing the gradient threshold; I gray is the gray image value at position (x, y), representing the brightness value of the gray image; T L is the adaptive threshold of the brightness, representing the brightness threshold.
[0140] Finally, through visualization technology, the extracted features are presented in an intuitive way, such as Figure 4 shown. Through this figure, the brightness information of the earth-rock dam can be intuitively felt. The brightness distribution and shadow area in the figure can help identify the lighting conditions of different parts of the earth-rock dam, so as to more accurately predict and monitor the activity areas of termites. This will help formulate more effective prevention and control measures.
[0141] Step S15, obtain the soil geological conditions in the area. Termites have obvious preferences for soil texture. In particular, loose and organic-rich soil provides an ideal living environment for termites, which helps their reproduction and survival.
[0142] It can be understood that the ground penetrating radar emits high-frequency electromagnetic waves (usually between 10 MHz and 2.6 GHz) into the ground. When the electromagnetic waves encounter different media, reflection, refraction, and scattering will occur. The receiving antenna receives the reflected electromagnetic wave signals. By analyzing the time delay and intensity changes of these signals, the underground structure and medium characteristics can be inferred.
[0143] In the embodiment of the present application, the implementation method of obtaining the soil geological conditions in the area is as follows:
[0144] First, check that the transmitter, receiver, control unit, and antenna of the ground penetrating radar are all in good condition; then, arrange survey lines and marking points in the area to be measured to ensure the accuracy of the spatial position of data collection; next, select the parallel profile scanning mode according to the detection target and area. The operator holds the antenna or installs the antenna on a mobile platform and moves along the survey line. The control unit records the reflected signals in real time; finally, use the filtering algorithm to remove noise and interference, enhance the effective signals, and convert the reflection time into depth information to generate a radar profile diagram, showing the layers and changes of the underground structure.
[0145] It should be noted that since traditional adaptive filters (such as the LMS filter) may be difficult to adapt to the rapidly changing noise characteristics in a complex noise environment. In this application, an earth-rock dam adaptive filter is proposed to dynamically adjust the filter parameters to improve the filtering effect. The earth-rock dam adaptive filter is expressed as:
[0146]
[0147] where f k (x(n-k)) is the dynamic weight output by the deep learning model, corresponding to the order of the filter extracted from the input signal x(n-k); y(n) is the value of the filtered output signal at time point n. x(n-k) is the value of the input signal at time point n-k, and M is the order of the filter, that is, the number of delayed samples used.
[0148] The final image is as Figure 5As shown in the figure, the content displayed in the figure is that the horizontal axis represents the survey line position or trace number (from 1 to 1279), and the vertical axis represents time or depth (from 0 to 0.6), expressed in seconds or depth units. The reflection signals are represented by black and white stripes indicating the change in reflection intensity. There are multiple parallel stripes in the figure, representing different soil layer interfaces. There are obvious stripe changes at depths of 0.1, 0.2, 0.3, 0.4, 0.5, and 0.6, representing different geological layers. These parallel stripes indicate that there is obvious soil stratification in this area, and the reflection signal intensities between each layer are different, representing different soil densities or compositions. There is a group of strong reflection signals between depths of 0.1 and 0.2, indicating a soil layer with higher density or different composition. There is also a group of obvious strong reflection signals between 0.3 and 0.4, indicating another significant stratigraphic interface. At a depth of approximately 0.3, some arc-shaped reflection signals can be seen, indicating the existence of cavities or cracks underground. These arc-shaped reflection signals are usually caused by strong reflections of electromagnetic waves at the boundaries of cavities or cracks. Between depths of 0.4 and 0.5, some irregular reflection signals can be seen, indicating a complex underground structure such as a fracture zone or heterogeneous strata underground.
[0149] In summary, based on the analysis of the geological radar profile, the soil layers are clear, and there are loose and organic-rich soil layers; there are strong reflection areas, indicating soil layers rich in organic matter, which helps termites obtain food; the arc-shaped reflection signals indicate underground cavities, which are suitable for termites to build nests; the irregular reflection signals indicate complex underground structures, providing diverse habitats; therefore, this soil structure is generally suitable for termite survival.
[0150] Step S16: Measure the soil pH value with a pH test paper to form a soil pH data list.
[0151] In specific implementation, first collect soil samples from 7 directions in each area, add distilled water or deionized water, stir evenly to form a slurry, then immerse the pH test paper in the slurry, take it out after keeping it for a few seconds. According to the color change of the test paper, compare it with the pH standard colorimetric card, read the soil pH value, and form a list record:
[0152] P = {P1, P2, P3, P4, P5, P6, P7}
[0153] Among them, P1, P2, P3, P4, P5, P6, and P7 respectively represent the soil pH values of 7 directions in each area.
[0154] Step S17: Record the types of earth-rock dam materials and their effects on termites to form a material data list.
[0155] It is understandable that the construction materials and their chemical compositions of earth-rock dams may also affect the distribution of termites. Certain materials may repel termites or provide better habitats.
[0156] Common earth-rock dam materials are shown in the following table:
[0157] Table 1
[0158]
[0159]
[0160] Record the materials of earth-rock dams in the recording area and form a list. The formula is:
[0161] C = {C1, C2, C3, C4, C5, C6, C7}
[0162] Among them, C1, C2, C3, C4, C5, C6, and C7 respectively represent the earth-rock dam materials in 7 directions in each area.
[0163] S18. Obtain the resistivity value of the measurement area through the earth-rock dam resistivity calculation formula, generate an underground resistivity structure diagram from the apparent resistivity, and obtain the underground water level.
[0164] It is understandable that the underground water level can affect the soil humidity and air permeability, thus affecting the activity area and nest depth of termites.
[0165] In the embodiments of the present application, the resistivity method is used to measure the underground water level information. The resistivity method is based on the different abilities of different geological materials to conduct current. By measuring the potential difference and current between electrodes, the resistivity of each underground layer is calculated, so as to infer the underground water level and other geological characteristics.
[0166] The principle is that in the measurement area, the current electrodes (C1 and C2) and voltage electrodes (P1 and P2) are inserted into the ground surface in the arrangement of C1 - P1 - P2 - C2. The resistivity meter is connected to the current electrodes and voltage electrodes through a cable. A known current is injected into the current electrodes (C1 and C2) through the resistivity meter, and the potential difference is measured between the voltage electrodes (P1 and P2). Record the current and voltage data at different electrode spacings. According to the measured current (I) and voltage (V), the earth-rock dam soil resistivity (ρ) is characterized through the earth-rock dam resistivity calculation formula. The calculation formula is:
[0167]
[0168] Among them, a is the electrode spacing, V is the voltage, and I is the current.
[0169] Then, generate an underground resistivity structure diagram from the apparent resistivity, as Figure 6As shown, it can be seen from the figure that there is an obvious low resistivity area in the depth range of 20 - 50 meters. Generally, a low resistivity area indicates an underground aquifer or the groundwater level.
[0170] Step S2: Based on the environmental parameters, re - divide each area using the weighted Euclidean distance, calculate the similarity between the environmental characteristics of each area and the central orientation, and divide the areas according to the similarity.
[0171] In the embodiment of the present application, based on the humidity, temperature, light conditions, air pressure, soil material, soil pH, groundwater level, and earth - rock dam material at 7 orientations within each area obtained in step S1, with the central orientation as the clustering center, calculate the similarity between the environmental characteristic parameters of the remaining orientations and the clustering center. The closer the distance, the higher the similarity between the two data points usually indicates, or in other words, they are closer in a certain feature space, meaning the possibility that they belong to the same category is greater.
[0172] In the embodiment of the present application, the environmental characteristics of each area are defined by the environmental characteristic dataset {S, T, G, Q, D, P, H, C}, where S represents humidity, T represents temperature, G represents light conditions, Q represents air pressure, D represents soil material, P represents soil pH, H represents groundwater level, and C represents earth - rock dam material.
[0173] More specifically, use X = {Sa, Ta, Ga, Qa, Da, Pa, Ha, Ca} to represent the clustering center, and use Y = {Sb, Tb, Gb, Qb, Db, Pb, Hb, Cb} to represent the surrounding characteristic environmental parameters.
[0174] Considering that the influence of different environmental characteristics on similarity may be different, the present application introduces the weighted Euclidean distance and calculates the environmental characteristics of each area and the environmental characteristics of the central orientation using the weighted Euclidean distance. The formula for the weighted Euclidean distance is:
[0175]
[0176] where d is the weighted Euclidean distance, x i y i are the i - th eigenvalue of the central area and the surrounding area respectively, σ i represents the standard deviation of the i - th feature, w i represents the weight of the i - th feature, indicating its importance; i represents the features of humidity, temperature, light conditions, air pressure, soil material, soil pH, groundwater level, and earth - rock dam material.
[0177] It can be understood that by introducing the weighted Euclidean distance and feature standardization processing, the similarity of different areas can be measured more accurately.
[0178] Furthermore, in the embodiments of the present application, the similarity between each area and the central orientation is evaluated according to the calculated weighted Euclidean distance value. For the features with a weighted Euclidean distance less than the preset similarity threshold, they are divided into the same area.
[0179] In a possible embodiment, when the distance is less than 0.5, it is considered to have the highest similarity and will be identified as the same area, as Figure 7 shown. This innovative method takes into account the different importance of each feature, improving the accuracy and scientific nature of similarity judgment.
[0180] Step S3: Within each divided area, identify the termite species through a multi-layer perceptron neural network, and use infrared or thermal imaging technology to detect the number of termites.
[0181] It can be understood that due to the different environmental characteristics in different areas, there are differences in the termite species and quantities in each area. Therefore, by calculating and analyzing the termite species and quantities, the relationship between environmental characteristics and termite distribution can be established.
[0182] Step S3 specifically includes the following steps:
[0183] Step S31: Use a multi-layer perceptron neural network to identify the termite species.
[0184] Common termites mainly include Macrotermes: Macrotermes annandalei, Macrotermes yunnanensis, Macrotermes barneyi, etc.; Odontotermes: Odontotermes yunnanensis, Odontotermes formosanus, etc.; Coptotermes xishuangbannaensis. The body characteristics of each type of termite are different. In the present application, a multi-layer perceptron neural network is used, as Figure 8 shown. By extracting the characteristics of each part of the termite and converting the image information into computer language, the neural network is iterated multiple times to predict the termite species. The implementation method is as follows:
[0185] First, due to the differences in the body parts of termites, as shown in the following table:
[0186] Table 2
[0187] Termite species Genus Head Mouthparts Body Wings Macrotermes annandalei Macrotermes Round Strong Larger Long Macrotermes yunnanensis Macrotermes Larger Strong Medium-sized Longer Odontotermes formosanus Odontotermes Round Strong Larger Long Odontotermes yunnanensis Odontotermes Smaller Weaker Medium-sized Shorter Odontotermes formosanus Odontotermes Small Weaker Small-sized Longer Coptotermes bannaensis Coptotermes bannaensis Smaller Weaker Smaller Short
[0188] As can be seen from the table, the differences are mainly reflected in four parts: the head, mouthparts, body, and wings. Therefore, in this application, starting from four aspects of the head, mouthparts, body, and wings of termites, W1, W2, W3, and W4 are used to represent these four parts respectively, and {W11: round head, W12: relatively large head, W13: round head, W14: relatively small head, W15: small head, W16: relatively small head, W21: strong mouthparts, W22: strong mouthparts, W23: strong mouthparts, W24: relatively weak mouthparts, W25: relatively weak mouthparts, W26: relatively weak mouthparts, W31: large body, W32: medium body, W33: large body, W34: medium body, W35: small body, W36: relatively small body, W41: long wings, W42: relatively long wings, W43: long wings, W44: relatively short wings, W45: relatively long wings, W46: short wings} are used to represent the specific information of each species. Odontotermes formosanus, Macrotermes yunnanensis, Macrotermes barneyi, Odontotermes yunnanensis, Odontotermes formosanus, Coptotermes bangnaensis are represented by the numbers {1, 2, 3, 4, 5, 6} respectively.
[0189] Thus, an association between species information and species types is established, that is:
[0190] {1, 2, 3, 4, 5, 6} = β{W1, W2, W3, W4}
[0191] Among them, β represents a hyperparameter.
[0192] In the embodiments of this application, the labeled termite images and corresponding species labels are used to iteratively train the neural network, so that the neural network can extract the characteristics of termite species from the input images and perform classification prediction. During the neural network training process, a weighted mean square error loss function is used for optimization, and the formula of the loss function is:
[0193]
[0194] Among them, α represents a regulation parameter, which is used for the change range of the aerial weight; y i represents the true value, represents the predicted value, and n represents the total number of predicted categories.
[0195] It should be noted that in the traditional mean square error, the same weight is given to the errors of all samples. In this application, by introducing an adaptive weight, the weight is dynamically adjusted according to the error size, so that the penalty for large errors is smoother. After iterative training, the loss is minimized.
[0196] Furthermore, the trained model is used with the Softmax function to predict its species probability, and the one with the maximum probability is the current species prediction.
[0197] Step S32, record the number of termites.
[0198] As a possible implementation, when the number of termites is too large, the present application uses infrared or thermal imaging technology to detect their presence by utilizing the temperature difference between the body temperature of termites and the surrounding environment. Since the body temperature of termites is usually slightly higher than the ambient temperature, they will appear as bright spots or areas in the infrared or thermal imaging images. The edge features of these bright areas are extracted using a convolutional neural network, as Figure 9 shown, so that the number of termites can be accurately and quickly identified.
[0199] Step S4: Based on the environmental parameters and the data of the number and species of termites, use the deep Q-network reinforcement learning model to construct the dynamic relationship between the environmental features and the number and species of termites, and optimize the termite distribution strategy.
[0200] In the embodiment of the present application, the complex dynamic problem of predicting and managing the dynamic distribution of termites in earth-rock dams is solved by virtue of the ability of the deep Q-network reinforcement learning to process a large state space. The specific structure diagram is as Figure 11 shown.
[0201] Step S4 specifically includes the following steps:
[0202] Step S41: Define the environmental state space.
[0203] In the embodiment of the present application, based on the living environment of termites in earth-rock dams, environmental feature data s t ={S, T, G, Q, D, P, H, C} is constructed with four parameters: humidity, temperature, light condition, and air pressure. The environmental state consists of humidity, temperature, light condition, air pressure, soil material, soil pH value, groundwater level, and earth-rock dam material.
[0204] Step S42: Construct the action space according to the dynamic distribution process of termites in earth-rock dams.
[0205] In the scenario of the present application, since the change of environmental parameters will cause the change of the number of termites, there are 2 actions in the action space, which are respectively:
[0206] Action 1: {S: 60 - 100, T: 20 - 25 °C, G: 0 - 0.25, Q: 900 - 1000 MPa, D: soft, P: 6 - 7, H: 5 m, C: loam};
[0207] Action 2: {S: less than 60, greater than 100, T: less than 20 °C, greater than 25 °C, G: greater than 0.25, Q: less than 900 MPa, greater than 10.
[0208] Action 1 indicates that it is beneficial to the survival of termites, and action 2 indicates that it is not beneficial to the survival of termites.
[0209] Thus, the action space b can be constructed. t , where b t = {B 1 , B 2}, B 1 , B 2 respectively represent the actions that are beneficial to the survival of termites and the actions that are not beneficial to the survival of termites, that is, Action 1 and Action 2.
[0210] Step S43, set the reward function r t to measure the effects of different action strategies, and the reward function is adjusted according to the change in the number of termites at the current moment.
[0211] In the embodiment of the present application, the reward function is divided into two types.
[0212] R 1 : represents an increase in the number of termites, R 2 : represents a decrease in the number.
[0213] Therefore, the formula for the reward function r t is:
[0214] r t = {R 1 , R 2}
[0215] Where:
[0216] R 1 = max(0, N t - N t-1 )
[0217] R 2 = max(N t-1 - N t , 0)
[0218] Where, N t represents the number of termites at the current moment, N t-1 represents the number of termites at the previous moment, R 1 represents the reward for an increase in the number of termites, R 2 represents the reward for a decrease in the number of termites.
[0219] Step S44, construct a data set.
[0220] In the embodiment of the present application, during the corresponding time period, the reward value, environmental feature data, and action parameters are aligned and stored in the historical database. This process collects a total of 10,000 data sets, including the environmental feature data (s t ) before taking the action, the action encoding number (b t ), and the comprehensive reward value (r t), and the environmental feature data (s after taking actions t+1 )
[0221] Furthermore, these data are passed into DataLoad to construct a data set, and the parameters epoch is set to 1000 and batch_size is set to 600, and they are divided into a training set and a test set according to the ratio of 8 to 2
[0222] Step S45, construct a model network. In this application, the reinforcement learning algorithm is selected. Specifically, the deep Q-network (DQN) is used to process the above data
[0223] The core of DQN is a deep neural network, which is used to estimate the value function (Q-value function) of the state-action pair. The input of the neural network is the environmental parameters (humidity, temperature, light conditions, and air pressure), and the output is the corresponding Q-value for each possible action
[0224] As Figure 11 shown, in the DQN neural network, it mainly contains three layers of models, namely
[0225] Input layer: The number of nodes in the input layer is equal to the dimension of the state space. Each node represents a state parameter of the earth-rock filled dam. The function of this layer is to receive environmental-related parameters, including environmental parameters such as humidity, temperature, light conditions, and air pressure. In this layer, the main operators used are LN+Linear, where the meaning of the LN operator is to integrate the data so that the data will not be too large or too small, and the Linear function is for linear connection to linearly transform the data
[0226] Hidden layer: In this layer, the data is mainly used for non-linear feature learning. The number of nodes and the number of layers in the hidden layer can be adjusted according to the complexity of the problem. The main operators used are Relu+LN+Dropout, where the function of Relu is to map the data to a non-linear space to obtain more data features, and the function of the Dropout operator is pruning operation, which is used to suppress some neurons that need to be learned in order to speed up the training speed
[0227] Output layer: The number of nodes in the output layer is equal to the dimension of the action space, and each node corresponds to a possible scheduling action. The output Q-value represents the expected return of executing the corresponding action in a given state. In this layer, the main operators used are Linear+Output. Output represents the output function, which is used to output the Q-value. The specific expression formula is as follows
[0228] Q(s t ,b t ) = Output(s t ,b t )
[0229] where s t represents various environmental parameters, including humidity, temperature, lighting conditions, and air pressure, and b t represents the parameter change in the action space.
[0230] Finally, based on the reward function, the Q value is adjusted so that the predicted Q value of the model gradually approaches the true Q value. The optimization goal is to maximize the cumulative reward so that the model can meet the requirements for the number of termites in different environments. The specific implementation is as follows:
[0231] Q new = Q(s t , b t ) + α * (r t + γ max(Q(s t+1 , b t )) - Q(s t , b t ))
[0232] where Q new represents the updated parameter value, Q(s t , b t ) represents the current Q value, s t represents the environmental feature data before taking the action, b t represents the action encoding number taken, r t represents the comprehensive reward value generated after taking the action, s t+1 represents the environmental feature data after taking the action. a is the learning rate, and r is the discount factor. This update rule enables the model to gradually approach the true optimal Q value, that is, to make the state of each step meet the expected requirements.
[0233] Finally, through multiple iterative trainings, the environmental parameters and action strategies are adjusted so that the deep Q-network model can learn the optimal termite distribution strategy.
[0234] Step S5, according to the optimization result of the deep Q-network reinforcement learning model, control the number and species distribution of termites by regulating the environmental parameters.
[0235] In the embodiment of the present application, based on the optimization result of the deep Q-network reinforcement learning model, by precisely controlling the environmental parameters, the purpose is to reduce the living conditions of termites, reduce their number, and inhibit their distribution.
[0236] Specifically, the following regulation measures are included:
[0237] First, in each of the ABCDE regions, according to the optimization results of the model, dehumidifiers are installed to adjust the air humidity. By continuously reducing the air humidity in the region and keeping the humidity at a low level, an environment that is not conducive to the survival and reproduction of termites is created. Termites generally prefer a humid environment. Especially in regions with higher humidity, termite activities are frequent and the reproduction rate is relatively fast. Therefore, reducing humidity is one of the effective measures for termite control. The dehumidifier removes moisture from the air and continuously keeps the environment dry, thereby reducing the habitats and living conditions of termites. In an environment with low air humidity, it is more difficult for termites to find suitable habitats and breeding environments, resulting in a decrease in their numbers.
[0238] In addition, by using fans or air circulation systems to increase air flow, although the use of dehumidifiers can reduce humidity, to further strengthen the adverse conditions of the environment, fans or air circulation systems can be used in the region to increase air flow. The increase in air flow helps to accelerate the evaporation of moisture and further reduce the moisture in the air. Termites are very sensitive to humidity. The increase in air flow will make termites feel the deterioration of the environment, thus prompting them to swarm or reduce their stay in this region.
[0239] Moreover, rainfall is also one of the important factors affecting the termite living environment. When the precipitation is too large, the soil humidity will rise rapidly, providing a suitable living environment for termites. Therefore, using rain covers or other covering materials can effectively reduce the direct impact of rainfall on the regional soil, thereby reducing the soil humidity and the termite habitats.
[0240] In addition, termites have a strong adaptability to a moist soil environment. Especially after precipitation, the increase in humidity provides an ideal breeding environment. Therefore, establishing an efficient drainage system plays an important role in preventing the spread of termites. This drainage system can quickly drain the accumulated water in the region after rainfall and keep the soil and the environment dry. The effectiveness of the drainage system is not only reflected in preventing the formation of accumulated water, but also in quickly reducing the surface humidity, making it difficult for termites to survive in a moist environment and thus inhibiting their reproductive activities. Through continuous drainage, the soil moisture can be kept at a low level, reducing the habitats and breeding conditions of termites.
[0241] Through the above series of control measures - the use of dehumidifiers, the increase in fans and air flow, the covering with rain covers, and the efficient drainage system, the air humidity and soil humidity in the region can be significantly reduced, and at the same time, the impact of rainfall on the environment can be reduced. These measures work together to create an environment that is not conducive to the survival of termites, thus effectively reducing the number of termites and controlling the species distribution of termites. The implementation of these environmental control measures severely restricts the survival and reproduction of termites. Through these means, while keeping the environment controllable, the damage of termites to facilities such as earth-rock dams can be effectively reduced, and thus the dynamic management and control of termites can be achieved.
[0242] To implement the above embodiments, the present application also proposes a dynamic management device for termite distribution in earth-rock dams based on reinforcement learning and neural networks. Figure 12 The following is a schematic structural diagram of a dynamic management device for termite distribution in earth-rock dams based on reinforcement learning and neural networks provided by an embodiment of the present application. As Figure 12 shown, the device includes:
[0243] An acquisition module 100, configured to divide the initial area of the earth-rock dam into multiple areas according to the termite distribution, and acquire the environmental parameters in each area. The environmental parameters include humidity, temperature, light conditions, air pressure, soil material, soil acidity and alkalinity, groundwater level, and earth-rock dam material;
[0244] A division module 200, configured to re-divide each area based on the environmental parameters, calculate the similarity between the environmental characteristics of each area and the central orientation, and divide the area according to the similarity;
[0245] An identification and detection module 300, configured to identify the termite species through a multi-layer perceptron neural network in each divided area, and detect the termite quantity using infrared or thermal imaging technology;
[0246] An optimization module 400, configured to construct a dynamic relationship between the environmental characteristics and the termite quantity and species based on the environmental parameters and the termite quantity and species data, and optimize the termite distribution strategy using a deep Q-network reinforcement learning model;
[0247] A regulation module 500, configured to control the termite quantity and species distribution by regulating the environmental parameters according to the optimization result of the deep Q-network reinforcement learning model.
[0248] To implement the above embodiments, the present application also proposes an electronic device, including: a processor, and a memory communicatively connected to the processor; the memory stores computer execution instructions; the processor executes the computer execution instructions stored in the memory to implement the method provided in the foregoing embodiments.
[0249] To implement the above embodiments, the present application also proposes a computer-readable storage medium storing computer execution instructions, and when the computer execution instructions are executed by a processor, they are used to implement the method provided in the foregoing embodiments.
[0250] To implement the above embodiments, the present application also proposes a computer program product, including a computer program, and when the computer program is executed by a processor, it implements the method provided in the foregoing embodiments.
[0251] The collection, storage, use, processing, transmission, provision, and disclosure of the user's personal information involved in this application all comply with the provisions of relevant laws and regulations and do not violate public order and good customs.
[0252] It should be noted that personal information from users should be collected for legal and reasonable purposes and not shared or sold outside of these legal uses. In addition, such collection / sharing should be carried out after obtaining the informed consent of the user, including but not limited to notifying the user to read the user agreement / user notice and sign an agreement / authorization including authorizing relevant user information before the user uses the function. In addition, any necessary steps should be taken to safeguard and secure access to such personal information data and ensure that others with access to the personal information data comply with their privacy policies and procedures.
[0253] This application is expected to provide an implementation plan for users to selectively block the use or access of personal information data. That is, this disclosure is expected to provide hardware and / or software to prevent or block access to such personal information data. Once the personal information data is no longer needed, the risk can be minimized by restricting data collection and deleting the data. In addition, when applicable, personal identifiers are removed from such personal information to protect the privacy of the user.
[0254] In the description of the foregoing embodiments, the descriptions referring to terms such as "one embodiment", "some embodiments", "example", "specific example", or "some examples" mean that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of this application. In this specification, the schematic expressions of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described can be combined in any one or more embodiments or examples in a suitable manner. In addition, without contradiction, those skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of different embodiments or examples.
[0255] In addition, the terms "first" and "second" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, the features defined with "first" and "second" can explicitly or implicitly include at least one of the features. In the description of this application, "a plurality" means at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0256] Any process or method description represented in a flowchart or otherwise described herein can be understood to represent a module, segment, or portion of code including one or more executable instructions for implementing a customized logical function or process. The scope of the preferred embodiments of the present application includes additional implementations, where functions may be executed in a substantially simultaneous manner or in a reverse order according to the functions involved, rather than in the order shown or discussed, which should be understood by those skilled in the art to which the embodiments of the present application pertain.
[0257] Logic and / or steps represented in a flowchart or otherwise described herein, for example, can be considered a sequenced list of executable instructions for implementing a logical function, and can be embodied specifically in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, a system including a processor, or other systems that can fetch and execute instructions from the instruction execution system, apparatus, or device. For the purposes of this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium include the following: an electrical connection having one or more wires (electronic device), a portable computer diskette (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium can even be paper or other suitable medium on which the program can be printed, as the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpretation, or other suitable processing as necessary, and then stored in a computer memory.
[0258] It should be understood that various parts of the present application can be implemented by hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one of the following techniques known in the art or a combination thereof can be used: discrete logic circuits having logic gate circuits for implementing logical functions on data signals, application specific integrated circuits having appropriate combinational logic gate circuits, programmable gate arrays (PGAs), field programmable gate arrays (FPGAs), and the like.
[0259] Those of ordinary skill in the art can understand that all or part of the steps carried out in implementing the above-described embodiment methods can be completed by a program instructing relevant hardware. The program can be stored in a computer-readable storage medium, and when executed, it includes one or a combination of the steps of the method embodiment.
[0260] In addition, in each of the various embodiments of the present application, the functional units can be integrated in one processing module, or each unit can exist physically alone, or two or more units can be integrated in one module. The above-mentioned integrated module can be implemented in the form of hardware or in the form of a software functional module. When the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.
[0261] The storage medium mentioned above can be a read-only memory, a magnetic disk, an optical disc, etc. Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and should not be construed as limiting the present application. Those of ordinary skill in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of the present application.
[0262] It should be understood that various forms of the processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in the present application can be executed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present application can be achieved. This is not limited herein.
[0263] The above specific implementation manners do not constitute a limitation to the protection scope of the present application. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principle of the present application should be included within the protection scope of the present application.
Claims
1. A dynamic management method for termite distribution in earth-rock dams based on reinforcement learning and neural networks, characterized in that: The following steps are involved: According to the distribution of termites, the initial area of the earth-rock dam is divided into multiple areas, and the environmental parameters in each area are obtained, wherein the environmental parameters include humidity, temperature, light conditions, air pressure, soil material, soil pH, groundwater level, and earth-rock dam material; Based on the environmental parameters, each area is re-divided using weighted Euclidean distance, the similarity between the environmental characteristics of each area and the central orientation is calculated, and the areas are divided according to the similarity; In each divided area, the termite species are identified through a multi-layer perception neural network, and the number of termites is detected using infrared or thermal imaging technology; Based on the environmental parameters and termite quantity and species data, a deep Q network reinforcement learning model is used to construct a dynamic relationship between environmental characteristics and termite quantity and species, and to optimize termite distribution strategy; According to the optimization results of the deep Q network reinforcement learning model, the number and species distribution of termites are controlled by adjusting environmental parameters.
2. The method according to claim 1, characterized in that Get the environmental parameters in each area, including: Humidity sensors are set at different heights, the humidity value at each position is recorded and the average is calculated. The calculation formula is: S=mean(S a ,S b ,S c ) Where, mean represents the mean operation, S represents the final sensor humidity value, and S a ,S b ,S c Respectively represent the humidity values at different altitudes; Set up a temperature sensor to record the temperature in four time periods of the day and form a temperature data list. The formula is: T={T1,T2,T3,T4} Among them, T1, T2, T3, T4 are the temperature values in different time periods, and T is the temperature data list; Set up an air pressure sensor to record the atmospheric pressure in four time periods of the day and form an air pressure data list. The formula is: Q={Q1,Q2,Q3,Q4} Among them, Q1, Q2, Q3, Q4 are the air pressure values in different time periods, and Q is the air pressure data list; Based on the VGG16 model, visual features are extracted from the earth-rock dam image, wherein the visual features include brightness, color distribution and shadow; Arrange survey lines and marking points in the area to be measured, select the geological radar in parallel profile scanning mode according to the detection target and area, use the earth-rock dam adaptive filter to remove noise and interference and convert the reflection time into depth information, generate a radar profile, show the level and change of the underground structure, and obtain the soil material. The earth-rock dam adaptive filter is expressed as: Among them, f k (x(nk)) is the dynamic weight output by the deep learning model, corresponding to the order of the filter extracted from the input signal x(nk), y(n) is the value of the filtered output signal at time point n, x(nk) is the value of the input signal at time point nk, and M is the order of the filter; The pH value of the soil is measured by pH test paper to form a list of soil pH data. The formula is: P={P1,P2,P3,P4,P5,P6,P7} Among them, P1, P2, P3, P4, P5, P6, and P7 represent the soil pH values at seven locations in each area; Record the types of earth-rock dam materials and their impact on termites to form a material data list. The formula is: C={C1,C2.C3.C4,C5,C6,C7} Among them, C1, C2.C3.C4, C5, C6, and C7 represent the materials of earth-rock dams in seven directions in each area; The resistivity value of the measurement area is obtained by the resistivity calculation formula of the earth-rock dam, and the underground resistivity structure diagram is generated from the apparent resistivity to obtain the groundwater level. The resistivity calculation formula of the earth-rock dam is: Where a is the electrode distance, V is the voltage, and I is the current.
3. The method according to claim 2, characterized in that The method of extracting visual features from earth-rock dam images based on the VGG16 model includes: Preprocessing the original earth-rock dam image, wherein the preprocessing steps include denoising, graying, and image scaling; By loading the VGG16 model, the preprocessed earth-rock dam image is subjected to feature extraction. The extracted features include edge features, texture features, high-level semantic features, and local features. Based on the extracted features, the brightness value of the illumination condition is obtained through the earth-rock dam adaptive brightness enhancement formula, the color channel of the illumination condition is obtained through the earth-rock dam joint histogram formula, and the shadow mask value of the illumination condition is obtained through the earth-rock dam adaptive threshold formula; among which, the earth-rock dam adaptive brightness enhancement formula is: Among them, (x, y) represents the position of the pixel in the image, L(x, y) represents the brightness value, Ω(x, y) represents the neighborhood around (x, y), which represents the local window area; N represents the total number of pixels in the neighborhood Ω(x, y), which represents the number of pixels in the local neighborhood; I(i, j) represents the pixel value at the position (i, j), which represents the grayscale value of the image; w(i, j) represents the weight function; The combined histogram formula for earth-rock dam is: H(l,c)=Σ x,y δ(L(x,y)-l)*δ(C(x,y)-c) Among them, H(l,c) represents the joint histogram of brightness value l and color channel value c, L(x,y) is the brightness value at position (x,y), indicating local brightness; C(x,y) is the color channel value at position (x,y), δ() represents the Dirac function, which returns 1 when the input value is 0, otherwise it returns 0, and is used for statistical values; The formula for the adaptive threshold of earth-rock dam is: Among them, S(x,y) is the shadow mask value at the position (x,y), which represents the shadow detection result; G(x,y) is the gradient value at the position (x,y), which represents the image gradient value; T G is the adaptive threshold of the gradient, indicating the gradient threshold; I gray is the grayscale image value at position (x, y), which represents the brightness value of the grayscale image; T L is the adaptive threshold of brightness, indicating the brightness threshold.
4. The method according to claim 3, characterized in that: Based on the environmental parameters, each area is re-divided using weighted Euclidean distance, the similarity between the environmental characteristics of each area and the central orientation is calculated, and the area is divided according to the similarity, including: The environmental characteristics of each area are defined by the environmental characteristic dataset {S, T, G, Q, D, P, H, C}, where S represents humidity, T represents temperature, G represents light conditions, Q represents air pressure, D represents soil material, P represents soil pH, H represents groundwater level, and C represents earth-rock dam material; The weighted Euclidean distance is used to calculate the environmental characteristics of each area and the environmental characteristics of the central position. The formula of the weighted Euclidean distance is: Among them, d is the weighted Euclidean distance, x i y i are the i-th eigenvalues of the central area and the surrounding area, σ i represents the standard deviation of the i-th feature, w i represents the weight of the i-th feature, where i represents humidity, temperature, light conditions, air pressure, soil material, soil pH, groundwater level, and earth-rock dam material; The similarity between each region and the central position is evaluated according to the calculated weighted Euclidean distance value. For features whose weighted Euclidean distance is less than the preset similarity threshold, they are divided into the same region.
5. The method according to claim 4, characterized in that The training process of the multi-layer perceptron neural network includes: Collecting and preprocessing termite image data, wherein the image data contains features of different parts of the termite, including the head, mouthparts, body and wings; For each termite species, define its characteristic information, and convert the characteristic information of each part into a numerical value that can be recognized by a computer; The multi-layer neural network is trained by using annotated termite images and corresponding species labels for iterative training, so that the neural network can extract the characteristics of termite species from the input image and perform classification prediction. During the neural network training process, the weighted mean square error loss function is used for optimization. The formula of the loss function is: Among them, α represents the adjustment parameter, which is used for the change range of air weight; y i represents the true value, Represents the predicted value, and n represents the total number of predicted categories.
6. The method according to claim 5, characterized in that Based on the environmental parameters and the data on the number and species of termites, a deep Q network reinforcement learning model is used to construct a dynamic relationship between environmental characteristics and the number and species of termites, and optimize the termite distribution strategy, including: Define the environment state space and construct the environment feature data s t ={S,T,G,Q,D,P,H,C}, the environmental conditions are composed of humidity, temperature, light conditions, air pressure, soil material, soil pH, groundwater level, and earth-rock dam material; According to the dynamic distribution process of termites in earth-rock dam, the action space b is constructed. t , where b t ={B1,B2}, where B1 and B2 represent actions that are beneficial to termite survival and actions that are not beneficial to termite survival, respectively; Set the reward function r t To measure the effect of different action strategies, the reward function is adjusted according to the change of the number of termites at the current moment, where the reward function r t The formula is: r t ={R1,R2} in: R1=max(0,N t -N t-1 ) R2=max(N t-1 -N t ,0) Among them, N t Represents the number of termites at the current moment, N t-1 represents the number of termites at the previous moment, R1 represents the reward for an increase in the number of termites, and R2 represents the reward for a decrease in the number of termites; A deep Q network model is constructed, which estimates the Q value of a state-action pair through a deep neural network. The Q value represents the expected return of taking an action in a given state, and the formula is: Q(s t ,b t )=Output(s t ,b t ) Among them, s t Represents various environmental parameters, b t Represents the parameter changes in the action space; Using the deep Q network model, based on the current state s t , Action taken b t and the resulting reward r t , perform Q value update, the Q value update formula is: Q new =Q(s t ,b t )+α*(r t +γ max(Q(s t+1 ,b t ))-Q(s t ,b t )) Among them, Q new represents the updated parameter value, Q(s t ,b t ) represents the current Q value, s t Indicates the environmental characteristic data before taking action, b t Indicates the action code number taken, r t Represents the comprehensive reward value generated after taking an action, s t+1 represents the environmental feature data after taking action, α is the learning rate, and γ is the discount factor; Through multiple iterative training, adjustment of environmental parameters and action strategies, the deep Q network model can learn the optimal termite distribution strategy.
7. A dynamic management device for termite distribution in earth-rock dam based on reinforcement learning and neural network, characterized in that: include: An acquisition module is used to divide the initial area of the earth-rock dam into multiple areas according to the distribution of termites, and obtain environmental parameters in each area, wherein the environmental parameters include humidity, temperature, light conditions, air pressure, soil material, soil pH, groundwater level, and earth-rock dam material; A division module, for re-dividing each area based on the environmental parameters using weighted Euclidean distance, calculating the similarity between the environmental characteristics of each area and the central orientation, and dividing the area according to the similarity; The recognition and detection module is used to identify the type of termites in each divided area through a multi-layer perception neural network and detect the number of termites using infrared or thermal imaging technology; An optimization module is used to construct a dynamic relationship between environmental characteristics and the number and type of termites based on the environmental parameters and the number and type data of termites, and optimize the termite distribution strategy by using a deep Q network reinforcement learning model; The control module is used to control the number and species distribution of termites by adjusting environmental parameters according to the optimization results of the deep Q network reinforcement learning model.
8. An electronic device, characterized in that: include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 6 when executed by a processor.
10. A computer program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 6 when being executed by a processor.