Water surface reflective termite winged adult trapping and killing method based on optimized RL network
Through the water surface reflective termite winged adult trapping method based on optimized RL network, dynamically adjusting the capture strategy, solving the problems of slow response and low recognition accuracy of traditional methods, achieving efficient and accurate termite trapping effect.
Patent Information
- Application Number
- CN202510041685.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-10
- Publication Date
- 2025-05-13
AI Technical Summary
Traditional termite winged adult trapping methods have slow response and low recognition accuracy, and cannot adjust strategies in real time to respond to environmental changes.
The water surface reflective termite winged adult trapping method is adopted based on the optimized RL network. By extracting environmental parameters such as light intensity, reflector height and angle, water surface fluctuation and water surface cleanliness, the data set is constructed and the optimized RL network is trained, and the capture strategy is dynamically adjusted to achieve the optimal trapping effect.
It significantly improves the trapping efficiency of termite winged adults, realizes real-time dynamic adjustment of capture strategies, improves the accuracy and efficiency of trapping effect, and reduces resource waste and manual intervention.
Smart Images

Figure CN119992319A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of trapping and killing winged adult termites, and in particular to a method for trapping and killing winged adult termites reflecting light on a water surface based on an optimized RL network. Background Art
[0002] The traditional technology of trapping and killing winged adult termites is based on the biological characteristics of insects' attraction to light. It uses light sources of specific wavelengths to attract winged adult termites, thereby achieving the centralized trapping and killing of winged adult termites. In the termite swarming season, their strong phototaxis is used to add sex pheromones to lure them to the lights. Then they are blown into or sucked into a special container through airflow; or they are killed by instantaneous high voltage generated by a high-voltage power grid, thereby achieving the purpose of killing winged reproductive ants, reducing their chances of landing and mating, reducing the base number of new colonies, and controlling termite damage. The installation location of the trapping and killing equipment is installed according to different protected objects; in order to prevent termites from entering the protected area, the organic combination of trapping and killing lamps can be used to form a light barrier to form a protective circle to prevent termites from flying in. The distance between the installation location of the trapping and killing lamp and the protected object must be greater than the irradiation radius of the light; usually, the trapping and killing equipment is installed in areas where termites are active frequently, thereby achieving effective killing of winged adult termites.
[0003] However, traditional methods of trapping and killing winged adult termites often suffer from slow response and low recognition accuracy, and traditional methods are often unable to adjust strategies in real time to cope with environmental changes. Summary of the invention
[0004] The present application aims to solve one of the technical problems in the related art at least to some extent.
[0005] To this end, the first purpose of the present application is to propose a method for trapping and killing winged adult termites that reflect light on the water surface based on an optimized RL network.
[0006] The second objective of the present application is to propose a water surface reflective winged adult termite trapping device based on an optimized RL network.
[0007] The third objective of the present application is to provide an electronic device.
[0008] A fourth objective of the present application is to provide a computer-readable storage medium.
[0009] A fifth object of the present application is to provide a computer program product.
[0010] To achieve the above-mentioned purpose, the first embodiment of the present application proposes a method for trapping and killing winged adult termites on a water surface based on an optimized RL network, comprising:
[0011] Extract environmental parameters based on water surface images and analyze the effects of different environmental parameters on termite flight behavior to obtain environmental parameter characteristic data, wherein the environmental parameters include light intensity, height and angle of the reflector, water surface fluctuations, and water surface cleanliness;
[0012] Mapping the environmental parameter characteristic data to construct a data set space and form a comprehensive data set for subsequent network training;
[0013] Based on the data set space, construct and train an optimized RL network, wherein the RL network optimizes the capture strategy through historical data and current environmental characteristics, and comprehensively evaluates the capture effect and resource consumption by combining the long-term reward function and the final reward function;
[0014] Using the trained optimized RL network, the optimal capture strategy is predicted according to the current environmental parameters, wherein the optimal capture strategy includes the optimal light intensity, reflector angle adjustment, and capture time selection;
[0015] The optimal capture strategy is applied to real-time monitoring of swimming scenes, and the optimal capture strategy is dynamically adjusted based on the optimized RL network by continuously collecting water surface environmental parameters.
[0016] Optionally, the calculation formula for the light intensity is:
[0017]
[0018] Where L is the illumination intensity, N is the total number of pixels in the water surface image, and Gray i is the gray value of the i-th pixel, is the average of the grayscale values, α and β are weight coefficients used to adjust the average brightness and brightness distribution, respectively.
[0019] Optionally, the measurement of the height and angle of the reflector includes the following steps:
[0020] The depth Z of the reflector is calculated using the following formula:
[0021]
[0022] Among them, Z is the depth, f is the focal length, B is the baseline distance, d is the disparity, and ∈ is the disparity adjustment term;
[0023] According to the depth of the reflector, the height Y of the reflector or light source is calculated by extracting the three-dimensional coordinate feature points of the reflector. The calculation formula is:
[0024] Y=Ztan(α)
[0025] Where α is the pitch angle between the camera and the reflector or light source;
[0026] The angle calculation formula is used to determine the inclination angle θ of the reflector or light source. The calculation formula is:
[0027]
[0028] Among them, arctan() is the inverse tangent function.
[0029] Optionally, the calculation of the water surface fluctuation includes the following steps:
[0030] The water surface image is converted into a frequency domain to extract the frequency component of the water surface fluctuation. The frequency domain conversion is achieved by the following formula:
[0031]
[0032] Among them, F(u,v) represents the complex value in the frequency domain image, f(x,y) represents the pixel value with coordinates (x,y) in the spatial domain image, (x,y) represents the horizontal and vertical coordinates in the spatial domain image, ranging from 0 to M-1 and 0 to N-1, μ and y represent the horizontal and vertical coordinates in the frequency domain image, respectively, M and N represent the width and height of the spatial domain image, respectively, and j represents the imaginary unit;
[0033] The fluctuation index W is calculated based on the fluctuation of frequency domain intensity, edge density, texture roughness, optical flow amplitude and time variation. I , the volatility index is calculated by the following formula:
[0034] W I =α·E D +β*Fre+γ·Text+δ·Flow+∈·Temp
[0035] Among them, α, β, γ, δ and ∈ are the weight coefficients of each feature, E D is the edge density, Fre is the frequency domain intensity, Text is the texture roughness, Flow is the optical flow amplitude, and Temp is the volatility that changes over time.
[0036] Optionally, the calculation formula for the water surface cleanliness is:
[0037]
[0038] Where C is the water surface cleanliness, a, b, γ and δ are weight coefficients of different features, σ / μ represents the inverse of image contrast, Col is the color standard deviation, T F is the texture feature, and Pol is the proportion of the pollutant area.
[0039] Optionally, the calculation of the long-term reward function comprises the following steps:
[0040] Based on the capture effect and resource consumption, the comprehensive rewards in the future time period are evaluated, and the long-term rewards are calculated by the following formula:
[0041]
[0042] Among them, G t represents the long-term reward, t represents the current time step, k represents the index of the future time step, γ represents the discount factor, and r t+k is the immediate reward at the t+kth moment.
[0043] Optionally, the calculation of the final reward function includes the following steps:
[0044] Based on the number of captures, resource consumption, operation frequency and environmental stability, the comprehensive reward is calculated. The final reward function is implemented by the following formula:
[0045] reward=w N *N E -w E *Ew F *F+w ΔN *(N cur -N pre )+w s *S+γ*G t
[0046] Among them, S is the environmental stability reward, N is the number of traps, E is the resource consumption, F is the operation frequency, and N cur -N pre is the immediate reward, i.e., the difference between the number of traps in the current time step and the previous time step, w s is the weight coefficient of environmental stability, w N is the weight coefficient of the number of traps, w F is the weight coefficient of the operating frequency, w E is the weight coefficient of resource consumption, w ΔN is the weight coefficient of the immediate reward, G t For long-term rewards.
[0047] To achieve the above-mentioned purpose, the second embodiment of the present application proposes a water surface reflective winged adult termite trapping device based on an optimized RL network, comprising:
[0048] An extraction module is used to extract environmental parameters based on the water surface image and analyze the effects of different environmental parameters on termite flight behavior to obtain environmental parameter characteristic data, wherein the environmental parameters include light intensity, height and angle of the reflector, water surface fluctuation, and water surface cleanliness;
[0049] A mapping module, used for mapping the environmental parameter characteristic data to construct a data set space and form a comprehensive data set for subsequent network training;
[0050] A training module is used to construct and train an optimized RL network based on the data set space, wherein the RL network optimizes the capture strategy through historical data and current environmental characteristics, and comprehensively evaluates the capture effect and resource consumption by combining a long-term reward function and a final reward function;
[0051] A prediction module is used to use the trained optimized RL network to predict the optimal capture strategy according to the current environmental parameters. The optimal capture strategy includes the optimal light intensity, reflector angle adjustment and capture time selection;
[0052] The feedback module is used to apply the optimal capture strategy to the real-time monitoring of the swimming scene, and dynamically adjust the optimal capture strategy based on the optimized RL network by continuously collecting water surface environment parameters.
[0053] To achieve the above-mentioned purpose, the third aspect of the present application provides an electronic device, including: a processor, and a memory communicatively connected to the processor;
[0054] The memory stores computer-executable instructions;
[0055] The processor executes the computer-executable instructions stored in the memory to implement the method as described in any one of the first aspects.
[0056] To achieve the above-mentioned purpose, the fourth aspect embodiment of the present application proposes a computer-readable storage medium, in which computer-readable storage medium is stored computer execution instructions, and when the computer execution instructions are executed by a processor, they are used to implement the method as described in any one of the first aspects.
[0057] To achieve the above-mentioned purpose, the fifth aspect of the present application proposes a computer program product, which implements any method in the first aspect when executed by a processor.
[0058] The technical solution provided by the embodiments of the present application brings at least the following beneficial effects:
[0059] The present application can significantly improve the efficiency of trapping winged adult termites by introducing an optimized RL (reinforcement learning) neural network model. Different from the fixed or static capture strategy in the prior art, the present invention can analyze environmental parameters in real time and dynamically adjust the capture strategy to ensure that the capture process is always in the optimal state, thereby improving the accuracy and efficiency of the trapping effect.
[0060] In addition, this application proposes an optimized long-term reward and final reward function by comprehensively considering capture efficiency, resource consumption and operation frequency, which can achieve optimal resource allocation, reduce resource waste, reduce operating costs and improve overall economic benefits.
[0061] This application can dynamically adjust the capture strategy based on the environmental parameters collected in real time, including light intensity, height and angle of the reflector, water surface fluctuations and water surface cleanliness, to ensure that the system can adapt to and maintain a stable capture effect under different environmental conditions.
[0062] In terms of automation, this application reduces manual intervention through multi-dimensional feature integration analysis and reinforcement learning algorithms. After collecting environmental parameters, the system can automatically process data, capture strategy prediction and make real-time adjustments, greatly improving operational efficiency and reducing labor costs.
[0063] In addition, through the improved environmental parameter mapping method and optimized reward function, the present application can more accurately reflect the actual situation in a complex environment, further ensuring the scientificity and accuracy of the trapping of winged adult termites.
[0064] Finally, during the application process, this application can quickly respond to environmental changes through real-time monitoring and dynamic adjustment of capture strategies, ensuring that the capture strategy continues to maintain the optimal state, further improving the stability and adaptability of capture.
[0065] In summary, the present application provides an efficient, low-cost, automated and highly adaptable method for trapping and killing winged adult termites, achieving dual optimization of economic benefits and technical performance, and solving the problems of low capture efficiency, serious waste of resources and lack of dynamic adaptability in the prior art.
[0066] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0067] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:
[0068] Figure 1 A schematic diagram of a process for trapping and killing winged adult termites reflecting light on the water surface based on an optimized RL network provided in an embodiment of the present application;
[0069] Figure 2 A dam brightness map of a method for trapping and killing winged adult termites using water-reflective materials based on an optimized RL network provided in an embodiment of the present application.
[0070] Figure 3A water surface fluctuation diagram of a method for trapping and killing winged adult termites reflecting water surface based on an optimized RL network provided in an embodiment of the present application.
[0071] Figure 4 A water surface cleanliness diagram of a method for trapping and killing winged adult reflective termites on the water surface based on an optimized RL network provided in an embodiment of the present application.
[0072] Figure 5 A schematic diagram of the structure of a water surface reflective winged adult termite trapping device based on an optimized RL network provided in an embodiment of the present application. DETAILED DESCRIPTION
[0073] Embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limiting the present application.
[0074] In view of the problems existing in the prior art, the present application provides a method for trapping and killing winged adult termites based on an optimized RL network. Figure 1 A schematic diagram of a method for trapping and killing winged adult termites based on an optimized RL network provided in an embodiment of the present application. Figure 1 As shown, the method comprises the following steps:
[0075] Step 101, extracting environmental parameters based on the water surface image and analyzing the effects of different environmental parameters on termite flight behavior to obtain environmental parameter characteristic data, wherein the environmental parameters include light intensity, height and angle of the reflector, water surface fluctuation, and water surface cleanliness.
[0076] In an embodiment of the present application, a real-time image of the water surface in the target area can be obtained through an image acquisition device (such as a camera or a drone), and image processing technology can be used to extract key environmental parameters closely related to the flight behavior of termites.
[0077] Figure 2 A dam brightness map of a method for trapping and killing winged adult termites using water-reflective materials based on an optimized RL network provided in an embodiment of the present application.
[0078] Figure 3 A water surface fluctuation diagram of a method for trapping and killing winged adult termites reflecting water surface based on an optimized RL network provided in an embodiment of the present application.
[0079] Figure 4 A water surface cleanliness diagram of a method for trapping and killing winged adult reflective termites on the water surface based on an optimized RL network provided in an embodiment of the present application.
[0080] For light intensity, the embodiment of the present application calculates the average brightness and distribution standard deviation of the light through the image grayscale information, and combines the improved light intensity calculation formula to accurately reflect the uniformity and degree of change of the water surface light, providing suitable lighting conditions for the trapping equipment. The calculation formula for light intensity is:
[0081]
[0082] Where L is the light intensity, N is the total number of pixels in the water surface image, and Gray i is the gray value of the i-th pixel, is the average of the grayscale values, α and β are weight coefficients used to adjust the average brightness and brightness distribution, respectively.
[0083] Compared with the traditional method that only relies on average brightness, this formula provides more accurate and comprehensive information on light intensity. Specifically, the traditional method ignores the local changes in image brightness and can only reflect the overall brightness level. This formula introduces the standard deviation of brightness distribution, so that the calculation result can reflect the uniformity and degree of change of image illumination, thereby more realistically describing the impact of illumination on the reflection effect of the water surface.
[0084] This improvement has important practical significance for capturing winged adult termites: more accurate light intensity information helps optimize the reflective effect, enhance the attractiveness to termites, and improve the efficiency of trapping. At the same time, the design of the formula is also suitable for real-time analysis under different lighting conditions, providing a scientific basis for dynamically adjusting the capture strategy.
[0085] For the height and angle of the reflector, the embodiment of the present application uses the depth calculation formula to calculate the actual depth of the reflector based on the parallax measurement principle of the camera; calculates the height of the reflector by extracting the coordinates of the feature points of the reflector in the image; and further determines the inclination angle of the reflector or light source based on the geometric relationship between the height and the depth. The above parameters are of great significance for optimizing the trapping effect of reflected light.
[0086] The measurement of the height and angle of the reflector includes the following steps:
[0087] First, calculate the depth Z of the reflector. The calculation formula is:
[0088]
[0089] Among them, Z is the depth, f is the focal length, B is the baseline distance, d is the parallax, and ∈ is the parallax adjustment term, which is used to compensate for the slight deviation of the camera in actual applications. By introducing the parallax adjustment term, the measurement error can be effectively corrected, the accuracy of the depth calculation can be significantly improved, and the calculated depth can be more accurate and reliable.
[0090] Then, according to the depth of the reflector, the height Y of the reflector or light source is calculated by extracting the three-dimensional coordinate feature points of the reflector. The calculation formula is:
[0091] Y=Ztan(α)
[0092] Wherein, α is the pitch angle between the camera and the reflector or light source, which is obtained through the data collected by the camera and the angle relationship. Based on the geometric relationship between depth and angle, the height of the reflector can be accurately determined.
[0093] Finally, the angle calculation formula is used to determine the inclination angle θ of the reflector or light source. The calculation formula is:
[0094]
[0095] Among them, arctan() is an inverse tangent function, which is used to calculate the angle information corresponding to the ratio of height to depth.
[0096] The embodiment of the present application firstly significantly improves the accuracy of depth measurement by introducing a parallax adjustment item in the depth calculation, and solves the problem of calculation deviation caused by equipment errors in traditional methods. Secondly, the manual measurement process is replaced by automated image processing technology, which can quickly extract the three-dimensional coordinate feature points of the reflector, greatly improve the measurement efficiency, simplify the operation steps, and reduce human errors. In addition, based on improved formulas and technical means, this method can process a large amount of data in real time, dynamically monitor the height and angle of the reflector, ensure that the system can adapt to changes under different environmental conditions, and achieve efficient and accurate measurement and dynamic adjustment.
[0097] Through the above steps, this method not only improves the accuracy and efficiency of measurement, but also provides scientific data support for dynamically adjusting the angle and height of the light reflector, which helps to further optimize the strategy of trapping winged adult termites and improve the overall capture effect.
[0098] For the fluctuation of the water surface, the embodiment of the present application extracts the frequency components of the water surface image through frequency domain analysis (such as Fourier transform), and combines texture features (such as gray-level co-occurrence matrix) and optical flow method to evaluate the movement amplitude and change trend of the ripples, and then calculates the fluctuation index of the water surface. The fluctuation directly affects the reflection effect and the concentration of termites, and is therefore one of the important environmental parameters.
[0099] Compared with the traditional fluctuation index formula that relies on only a single feature, this application introduces multiple image features, including edge density, frequency domain intensity, texture roughness, and optical flow amplitude, and adds the volatility of time changes. This improvement enables the fluctuation index to more comprehensively and accurately reflect the actual situation of water surface ripples, thereby improving the accuracy and efficiency of measurement and realizing real-time monitoring and dynamic adjustment. The specific steps are as follows:
[0100] First, the water surface image is transformed into the frequency domain to extract the frequency components of the water surface fluctuations. The frequency domain transformation is achieved by the following formula:
[0101]
[0102] Among them, F(u,v) represents the complex value in the frequency domain image, f(x,y) represents the pixel value with coordinates (x,y) in the spatial domain image, (x,y) represents the horizontal and vertical coordinates in the spatial domain image, ranging from 0 to M-1 and 0 to N-1, μ and y represent the horizontal and vertical coordinates in the frequency domain image, M and N represent the width and height of the spatial domain image, and j represents the imaginary unit. Through frequency domain conversion, the frequency characteristics of water surface fluctuations can be extracted to provide basic data for the calculation of the fluctuation index.
[0103] On this basis, the fluctuation index W is calculated comprehensively based on a variety of image features, including frequency domain intensity, edge density, texture roughness, optical flow amplitude and time-varying fluctuations. I The volatility index is calculated using the following formula:
[0104] W I =α·E D +β·Fre+γ·Text+δ·Flow+∈·Temp
[0105] Among them, α, β, γ, δ and ∈ are the weight coefficients of each feature, W D is the edge density, Fre is the frequency domain intensity, Text is the texture roughness, Flow is the optical flow amplitude, and Temp is the volatility that changes over time.
[0106] Through the above calculations, the results of the fluctuation index are more scientific and comprehensive, and can provide a reliable basis for dynamically adjusting the capture strategy. This improvement not only improves the accuracy and efficiency of water surface fluctuation measurement, but also can reflect the complex changes of water surface ripples in real time, thus providing scientific support for the analysis of termite flight behavior and the optimization of capture schemes.
[0107] For the evaluation of the cleanliness of the water surface, the embodiment of the present application comprehensively analyzes multiple features of the image, including contrast, color standard deviation, texture features, and the proportion of polluted areas, so as to accurately evaluate the cleanliness of the water surface. The cleanliness of the water surface directly affects the reflection effect of light, and the reflection effect is an important factor in attracting winged adult termites, so it plays a key role in the accurate measurement of the cleanliness of the water surface.
[0108] Specifically, the calculation formula for water surface cleanliness is:
[0109]
[0110] Where C is the cleanliness of the water surface; a, b, γ and δ are weight coefficients of different features, which are used to balance the influence of each feature on the cleanliness; σ / μ represents the inverse of image contrast, which is used to measure the consistency between water surface illumination and image quality. The smaller the value, the cleaner the water surface; Col is the color standard deviation, which is used to evaluate the uniformity of water surface color. When the standard deviation is large, there may be debris or pollutants; T F It is a texture feature, which determines whether there is non-uniform material by analyzing the texture complexity of the water surface area; Pol is the proportion of the polluted area, which reflects the degree of water surface pollution by segmenting the proportion of the polluted area in the image.
[0111] It should be noted that traditional water surface cleanliness measurements mostly rely on a single parameter (such as visual observation or single contrast calculation), which is highly subjective and has low precision. This application uses multiple image features such as contrast, color, texture, and pollution percentage to perform quantitative analysis to comprehensively reflect the cleanliness of the water surface and effectively improve the accuracy and objectivity of the measurement.
[0112] In addition, this application introduces neural network learning technology to automatically process and extract features from water surface images, significantly improving measurement accuracy and avoiding errors in traditional manual observation methods. In addition, by automatically analyzing image features, the assessment of water surface cleanliness can be completed quickly, improving processing efficiency.
[0113] In summary, the present application realizes high-precision, real-time dynamic monitoring of water surface cleanliness through an improved water surface cleanliness calculation method, which can provide more accurate environmental data support for capture strategies and further improve the effect and efficiency of trapping winged adult termites.
[0114] Step 102, mapping the environmental parameter feature data to construct a data set space, forming a comprehensive data set for subsequent network training.
[0115] In an embodiment of the present application, based on the environmental parameter characteristic data extracted in step 101, including light intensity, height and angle of the reflector, water surface fluctuation, and water surface cleanliness, each parameter is quantified and standardized through a data mapping method to construct a data set space suitable for network training.
[0116] Specifically, firstly, for different types of environmental parameters, an adaptive mapping method is used for data processing; secondly, through the data mapping process, the above environmental parameters are standardized and feature combined to form a unified data structure, ensuring that various parameters are consistent in numerical scale and feature expression, thereby avoiding training bias caused by dimensional differences.
[0117] Moreover, on this basis, the dataset space is further constructed, and different environmental parameter characteristics are used as input variables. Through data fusion and dimension mapping technology, a multi-dimensional and comprehensive feature dataset is formed. The dataset space contains multiple data samples, and each sample corresponds to a set of environmental parameter characteristics and a state description under the current environmental conditions.
[0118] Ultimately, the resulting comprehensive dataset can fully reflect the impact of the water surface environment on termite flight behavior and provide basic input data for the subsequent training of the RL (reinforcement learning) network. Through the precisely constructed dataset space, the system can better learn the mapping relationship between environmental parameters and trapping strategies, thereby achieving dynamic prediction and adjustment of the optimal capture strategy.
[0119] Step 103, based on the data set space, construct and train an optimized RL network. The RL network optimizes the capture strategy through historical data and current environmental characteristics, and comprehensively evaluates the capture effect and resource consumption by combining the long-term reward function and the final reward function.
[0120] In the embodiment of the present application, the data set space constructed in step 102 is first used as input data, combined with historical data and current environmental characteristics, as the state information of the RL network, and input into the optimized RL network model. The RL network continuously learns the relationship between environmental parameters and capture strategies, dynamically optimizes the capture strategy, and maintains optimal performance under different environmental conditions.
[0121] To evaluate the comprehensive effect of the capture strategy in the future time period, the calculation of the long-term reward function includes the following steps:
[0122] Based on the capture effect and resource consumption, the comprehensive rewards in the future time period are evaluated, and the long-term rewards are calculated by the following formula:
[0123]
[0124] Among them, G t represents the long-term reward, t represents the current time step, k represents the index of the future time step, and γ represents the discount factor, which is used to measure the impact of future rewards on the current strategy; r t+k is the immediate reward at the t+kth moment.
[0125] By introducing the discount factor, the function can balance the impact of immediate rewards and future rewards, allowing the network to pay more attention to long-term strategy effects and avoid ignoring the global optimal solution due to short-term benefits.
[0126] In addition, in order to comprehensively evaluate the capture effect, resource consumption, operation frequency and environmental stability, the calculation of the final reward function includes the following steps:
[0127] Based on the number of captures, resource consumption, operation frequency, and environmental stability, the final reward function is implemented by the following formula:
[0128] reward=w N *N E -w E *Ew F *F+w ΔN *(N cur -N pre )+w s *S+γ*G t
[0129] Among them, S is the environmental stability reward, N is the number of traps, which is used to measure the capture effect of the strategy; E is resource consumption, including energy consumption, manpower and equipment operation costs; F is the operation frequency, which means the number of executions of the capture device, which is used to balance the capture efficiency and equipment maintenance; N cur -N pre is the immediate reward, i.e., the difference between the number of traps in the current time step and the number in the previous time step, reflecting the immediate effect of strategy adjustment; w s is the weight coefficient of environmental stability, w N is the weight coefficient of the number of traps, w F is the weight coefficient of the operating frequency, w E is the weight coefficient of resource consumption, w ΔN is the weight coefficient of the immediate reward, which is used to adjust the influence of each factor on the final reward; G t For long-term rewards, provide comprehensive effects in future time periods.
[0130] During the network training process, the RL network continuously interacts with the environment, evaluates the reward values under different capture strategies, and optimizes the strategy to maximize the output of the reward function. Compared with the traditional reward function, this application can better balance immediate benefits and long-term benefits by introducing long-term rewards, ensuring that the optimal capture method is automatically found under different environmental parameters and strategy conditions.
[0131] By combining long-term rewards with the final reward function, the RL network can comprehensively evaluate multi-dimensional indicators such as capture efficiency, resource consumption, and operation frequency, achieving a balance between capture effect and economic benefits. This method makes the capture strategy more adaptable and stable, and can also be dynamically adjusted in complex environments, maximizing capture efficiency and optimizing resource utilization.
[0132] Step 104, using the trained optimized RL network, predict the optimal capture strategy according to the current environmental parameters. The optimal capture strategy includes optimal light intensity, reflector angle adjustment, and capture time selection.
[0133] In an embodiment of the present application, by inputting the current environmental parameters collected in real time (including light intensity, height and angle of the reflector, water surface fluctuations and water surface cleanliness) into the trained optimized RL network, the network can dynamically predict and output the optimal capture strategy based on the current environmental characteristics and the strategy model obtained in the previous training process.
[0134] The optimal capture strategy includes the following:
[0135] (1) Optimal light intensity
[0136] Combined with the real-time changes in light intensity parameters, the network analyzes the impact of light on the reflective effect, predicts and outputs the appropriate light intensity range to ensure the best light reflection effect, thereby maximizing the attraction of winged adult termites.
[0137] (2) Adjust the angle of the reflector
[0138] Based on the current lighting conditions and water surface fluctuations, the network dynamically adjusts the angle of the reflector. By calculating the inclination and height parameters of the reflector, the reflection direction and intensity are adjusted to focus the reflection effect on the termite flight area, thereby improving the coverage and accuracy of the trap.
[0139] (3) Capture time selection
[0140] Based on the correlation analysis of current environmental characteristics and historical data, the network can predict the high-frequency time periods of termite flight behavior and dynamically output the best capture time. By selecting a reasonable capture time, resource waste can be avoided and the capture success rate and efficiency can be improved.
[0141] By optimizing the dynamic prediction capability of the RL network, this application can quickly output the optimal capture strategy based on real-time environmental parameters to ensure that the capture device always operates in the optimal state. In particular, the comprehensive adjustment of light intensity, reflector angle and capture time makes the capture effect more accurate and efficient, while reducing resource consumption and human intervention.
[0142] Step 105, applying the optimal capture strategy to the real-time monitoring of the swimming scene, and dynamically adjusting the optimal capture strategy based on the optimized RL network by continuously collecting water surface environment parameters.
[0143] Specifically, the optimal capture strategy (including optimal light intensity, reflector angle adjustment, and capture time selection) predicted in step 104 is deployed to the real-time monitoring system of the swimming scene. The system continuously monitors the target water surface area through monitoring equipment (such as cameras, sensors, etc.), dynamically collects current environmental parameter data, and inputs the data into the optimized RL network in real time.
[0144] Subsequently, the optimized RL network dynamically analyzes and evaluates the capture strategy based on the current environmental parameters, combined with historical data and capture effect feedback, and outputs the optimal capture strategy that adapts to the current environmental conditions. Specific adjustments include:
[0145] According to the changes in the current light intensity, the angle and height of the reflective plate are automatically optimized to ensure that the light reflection effect can be maintained in the best state to enhance the attractiveness to winged adult termites; when the water surface fluctuation changes, the system re-evaluates the fluctuation index and adjusts the capture time and equipment operation frequency in a timely manner to avoid the influence of adverse conditions; based on the real-time evaluation results of the water surface cleanliness, the system can further optimize the stability of the reflective effect and maintain a high capture efficiency.
[0146] In addition, during the execution of the capture strategy, the system also provides real-time feedback on the trapping effect, equipment operating status and environmental parameters, and uses the feedback data as input to the reinforcement learning network to further iterate and optimize the capture strategy. Through this adaptive dynamic adjustment mechanism, the system can effectively respond to changes in different environmental parameters and continue to maintain the efficiency and accuracy of the capture process.
[0147] By applying the optimal capture strategy to the real-time monitoring of swimming scenes and combining it with the dynamic adjustment of the optimized RL network, this application achieves efficient trapping and killing of winged adult termites, while significantly reducing resource waste and manual intervention. It has a high degree of automation and environmental adaptability, ensuring the stable operation and capture effect of the system in complex dynamic environments.
[0148] In order to implement the above embodiments, the present application also proposes a water surface reflective winged adult termite trapping device based on an optimized RL network. Figure 5 This is a schematic diagram of a water surface reflective termite winged adult trapping device based on an optimized RL network provided in an embodiment of the present application. Figure 5 As shown, the device comprises:
[0149] The extraction module 100 is used to extract environmental parameters based on the water surface image and analyze the influence of different environmental parameters on the termite flight behavior to obtain environmental parameter characteristic data, wherein the environmental parameters include light intensity, height and angle of the reflector, water surface fluctuation and water surface cleanliness;
[0150] A mapping module 200 is used to map the environmental parameter characteristic data to construct a data set space and form a comprehensive data set for subsequent network training;
[0151] The training module 300 is used to construct and train an optimized RL network based on the data set space. The RL network optimizes the capture strategy through historical data and current environmental characteristics, and comprehensively evaluates the capture effect and resource consumption by combining the long-term reward function and the final reward function.
[0152] Prediction module 400, used to use the trained optimized RL network to predict the optimal capture strategy according to the current environmental parameters, the optimal capture strategy includes the optimal light intensity, reflector angle adjustment and capture time selection;
[0153] The feedback module 500 is used to apply the optimal capture strategy to the real-time monitoring of the swimming scene, and dynamically adjust the optimal capture strategy based on the optimized RL network by continuously collecting water surface environment parameters.
[0154] In order to implement the above embodiments, the present application also proposes an electronic device, comprising: 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 provided by the above embodiments.
[0155] In order to implement the above embodiments, the present application also proposes a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the methods provided by the above embodiments.
[0156] In order to implement the above embodiments, the present application also proposes a computer program product, including a computer program, which implements the methods provided by the above embodiments when executed by a processor.
[0157] The collection, storage, use, processing, transmission, provision and disclosure of user personal information involved in this application are in compliance with relevant laws and regulations and do not violate public order and good morals.
[0158] It should be noted that personal information from users should be collected for legitimate and reasonable purposes and should not be shared or sold outside of these legitimate uses. In addition, such collection / sharing should be carried out after receiving the user's informed consent, including but not limited to notifying the user to read the user agreement / user notice and sign the agreement / authorization including authorization of relevant user information before the user uses the function. In addition, any necessary steps should be taken to protect and safeguard access to such personal information data and ensure that others who have access to personal information data comply with its privacy policy and procedures.
[0159] The present application is expected to provide an implementation scheme for users to selectively block the use or access of personal information data. That is, the present 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 limiting data collection and deleting the data. In addition, when applicable, such personal information is de-identified to protect the privacy of the user.
[0160] In the description of the aforementioned embodiments, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.
[0161] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0162] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, fragment or portion of code comprising one or more executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present application belong.
[0163] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute the instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purpose of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways if necessary, and then stored in a computer memory.
[0164] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned 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 by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0165] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.
[0166] In addition, each functional unit in each embodiment of the present application may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.
[0167] The storage medium mentioned above may be a read-only memory, a magnetic disk or an optical disk, 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 cannot be understood as limiting the present application. A person of ordinary skill in the art may change, modify, replace and modify the above embodiments within the scope of the present application.
[0168] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this application can be executed in parallel, sequentially or in different orders, as long as the expected results of the technical solution of this application can be achieved, and this document is not limited here.
[0169] The above specific implementations do not constitute a limitation on the protection scope of this application. It should be understood by those skilled in the art 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 principles of this application should be included in the protection scope of this application.
Claims
1. A method for trapping and killing winged adult termites based on optimized RL network, characterized in that: The following steps are involved: Extract environmental parameters based on water surface images and analyze the effects of different environmental parameters on termite flight behavior to obtain environmental parameter characteristic data, wherein the environmental parameters include light intensity, height and angle of the reflector, water surface fluctuations, and water surface cleanliness; Mapping the environmental parameter characteristic data to construct a data set space and form a comprehensive data set for subsequent network training; Based on the data set space, construct and train an optimized RL network, wherein the RL network optimizes the capture strategy through historical data and current environmental characteristics, and comprehensively evaluates the capture effect and resource consumption by combining the long-term reward function and the final reward function; Using the trained optimized RL network, the optimal capture strategy is predicted according to the current environmental parameters, wherein the optimal capture strategy includes the optimal light intensity, reflector angle adjustment, and capture time selection; The optimal capture strategy is applied to real-time monitoring of swimming scenes, and the optimal capture strategy is dynamically adjusted based on the optimized RL network by continuously collecting water surface environmental parameters.
2. The method according to claim 1, characterized in that The calculation formula of the light intensity is: Where L is the illumination intensity, N is the total number of pixels in the water surface image, and Gray i is the gray value of the i-th pixel, is the average of the grayscale values, α and β are weight coefficients used to adjust the average brightness and brightness distribution, respectively.
3. The method according to claim 1, characterized in that The measurement of the height and angle of the reflector comprises the following steps: The depth Z of the reflector is calculated using the following formula: Among them, Z is the depth, f is the focal length, B is the baseline distance, d is the disparity, and ∈ is the disparity adjustment term; According to the depth of the reflector, the height Y of the reflector or light source is calculated by extracting the three-dimensional coordinate feature points of the reflector. The calculation formula is: Y=Ztan(α) Where α is the pitch angle between the camera and the reflector or light source; The angle calculation formula is used to determine the inclination angle θ of the reflector or light source. The calculation formula is: Among them, arctan() is the inverse tangent function.
4. The method according to claim 1, characterized in that: The calculation of the water surface fluctuation comprises the following steps: The water surface image is converted into a frequency domain to extract the frequency component of the water surface fluctuation. The frequency domain conversion is achieved by the following formula: Among them, F(u,v) represents the complex value in the frequency domain image, f(x,y) represents the pixel value with coordinates (x,y) in the spatial domain image, (x,y) represents the horizontal and vertical coordinates in the spatial domain image, ranging from 0 to M-1 and 0 to N-1, μ and y represent the horizontal and vertical coordinates in the frequency domain image, respectively, M and N represent the width and height of the spatial domain image, respectively, and j represents the imaginary unit; The fluctuation index W is calculated based on the fluctuation of frequency domain intensity, edge density, texture roughness, optical flow amplitude and time variation. I , the volatility index is calculated by the following formula: W I =α·E D +β·Fre+γ·Text+δ·Flow+∈·Temp Among them, α, β, γ, δ and ∈ are the weight coefficients of each feature, E D is the edge density, Fre is the frequency domain intensity, Text is the texture roughness, Flow is the optical flow amplitude, and Temp is the volatility that changes over time.
5. The method according to claim 1, characterized in that The calculation formula of the water surface cleanliness is: Where C is the cleanliness of the water surface, a, b, γ and δ are weight coefficients of different features, σ / μ represents the inverse of image contrast, Col is the color standard deviation, T F is the texture feature, and Pol is the proportion of the pollutant area.
6. The method according to claim 1, characterized in that The calculation of the long-term reward function includes the following steps: Based on the capture effect and resource consumption, the comprehensive rewards in the future time period are evaluated, and the long-term rewards are calculated by the following formula: Among them, G t represents the long-term reward, t represents the current time step, k represents the index of the future time step, γ represents the discount factor, and r t+k is the immediate reward at the t+kth moment.
7. The method according to claim 6, characterized in that The calculation of the final reward function includes the following steps: Based on the number of captures, resource consumption, operation frequency and environmental stability, the comprehensive reward is calculated. The final reward function is implemented by the following formula: reward=w N *N E -w E *Ew F *F+w ΔN *(N cur -N pre )+w s *S+γ*G t Among them, S is the environmental stability reward, N is the number of traps, E is the resource consumption, F is the operation frequency, and N cur -N pre is the immediate reward, i.e., the difference between the number of traps in the current time step and the previous time step, w s is the weight coefficient of environmental stability, w N is the weight coefficient of the number of traps, w F is the weight coefficient of the operating frequency, w E is the weight coefficient of resource consumption, w ΔN is the weight coefficient of the immediate reward, G t For long-term rewards.
8. A water surface reflective winged adult termite trapping device based on optimized RL network, characterized in that: include: An extraction module is used to extract environmental parameters based on the water surface image and analyze the effects of different environmental parameters on termite flight behavior to obtain environmental parameter characteristic data, wherein the environmental parameters include light intensity, height and angle of the reflector, water surface fluctuation, and water surface cleanliness; A mapping module, used for mapping the environmental parameter characteristic data to construct a data set space and form a comprehensive data set for subsequent network training; A training module is used to construct and train an optimized RL network based on the data set space, wherein the RL network optimizes the capture strategy through historical data and current environmental characteristics, and comprehensively evaluates the capture effect and resource consumption by combining a long-term reward function and a final reward function; A prediction module is used to use the trained optimized RL network to predict the optimal capture strategy according to the current environmental parameters. The optimal capture strategy includes the optimal light intensity, reflector angle adjustment and capture time selection; The feedback module is used to apply the optimal capture strategy to the real-time monitoring of the swimming scene, and dynamically adjust the optimal capture strategy based on the optimized RL network by continuously collecting water surface environment parameters.
9. 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 7.
10. 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 7 when executed by a processor.